[
  {
    "path": ".eslintrc.js",
    "content": "module.exports = {\n    root:true,\n    env: {\n      browser: true,\n      es6: true,\n    },\n    extends: [\n      'standard',\n    ],\n    globals: {\n      Atomics: 'readonly',\n      SharedArrayBuffer: 'readonly'\n    },\n    parserOptions: {\n      ecmaVersion: 2018,\n      parser:'babel-eslint'\n    },\n    rules: {\n      'semi':[2,'always']\n    }\n  }\n"
  },
  {
    "path": ".gitattributes",
    "content": "*.php linguist-language=JavaScript\n*.interface linguist-language=JavaScript\n*.cml linguist-language=JavaScript\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: bug\nassignees: ''\n\n---\n\n**bug描述**\n描述出现的问题\n\n**复现bug的步骤**\n1. Go to '...'\n2. Click on '....'\n3. Scroll down to '....'\n4. See error\n\n**问题截图**\n\n\n**编译环境信息**\n - chameleon-tool 版本：[e.g.0.1.0]\n - nodejs版本、npm版本：[node v8.11.4、npm 5.6.0]\n - 电脑操作系统： [e.g. macOS High Sierra 10.13.6]\n\n**运行环境信息**\n - 端版本： [e.g. 微信小程序 7.0.3、weex 2.0、手机Safari浏览器 、PC Chrome浏览器 1.30]\n - 手机机型: [e.g. iPhone6 12.0]\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "content": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Is your feature request related to a problem? Please describe.**\nA clear and concise description of what the problem is. Ex. I'm always frustrated when [...]\n\n**Describe the solution you'd like**\nA clear and concise description of what you want to happen.\n\n**Describe alternatives you've considered**\nA clear and concise description of any alternative solutions or features you've considered.\n\n**Additional context**\nAdd any other context or screenshots about the feature request here.\n"
  },
  {
    "path": ".gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n.vscode\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\n/node_modules\n/packages/*/node_modules\n\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\ncoverage\n.nyc_output\n# ///////////////////////////\n\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: node_js\nnode_js:\n  - \"8.10.0\"\nbefore_script:\n  - lerna bootstrap --ignore-scripts\n  - cd packages/easy-chameleon && rm -rf node_modules &&  npm i && cd ../../\n  - cd packages/chameleon-tool && rm -rf node_modules && npm i && cd ../../\nscript:\n  - npm run coverage\nafter_script:\n  - cat coverage/lcov.info | node_modules/.bin/codecov\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "## [1.0.8]\n\n* 支持data-class 配置\nchameleon.config.js 文件中配置\n\n```javascript\nwx:{ //alipay/baidu/...\n\n  dev:{\n    hasMiniAppCustomDataClass:true\n  }\n  build:{\n    hasMiniAppCustomDataClass:true\n  }\n\n}\n```\n* 内置支持循环依赖检测\n```javascript\noptimize: {\n  circularDependency: true// 默认引入自动检测循环引用的插件\n}\n\n```\n## [1.0.8-alpha.1]\n\n* 路由配置文件处理\n* HtmlWebpackPlugin配置适配\n* express本地服务配置\n* 预览页面跳转以及二维码适配\n* hash页面适配多路由: 需要修改preview页面跳转\n* history页面适配多路由：需要修改本地express服务\n\n## [1.0.8-alpha.0]\n  * 支持chameleon-api-miniapp按需加载\n  * 支持组件动态加载\n  * 支持路由懒加载\n  * 支持终端构建进度 processBar 可配置，默认关闭\n  * 修复config.json生成的weex端信息缺失\n  * 支持压缩模式下console信息可配置是否删除\n  * chameleon-linter修复useingComponents中引入动态组件校验\n  \n## [1.0.6]\n\n  * web端动态加载支持自定义chunk名称\n  * 修复小程序端原生tabbar图标配置在windows上的Bug\n\n  \n## [1.0.6-alpha.6]\n\n  * web端 dev模式下如何支持跨域\n  * 构建过程警告信息支持配置是否输出，可以排查重复npm包的安装 \n  * 压缩构建过程删除console\n\n  * windows下 subProject 配置npmName的路径适配修复\n  * 修复项目内安装cli通过npm脚本构建全局变量校验问题\n## [1.0.6-alpha.5]\n* 增加运行环境获取命令 cml info\n* 提供构建进程和面板，优化开发体验\n* 更新初始化项目依赖版本\n* 支持weex多bundle构建自定义name\n\n\n## [1.0.6-alpha.3]\n\n* 初始化项目paltform默认值['web','weex','wx']三端\n* 支持weex多bundle构建\n\n\n## [1.0.6-alpha.2]\n\n* 支付宝小程序编译组件包裹层id上移\n* web、weex端router.config.json的编译方式增加name字段进行区分\n\n## [1.0.6-alpha.1]\n\n* 升级less编译器\n* 支持原生组件样式引入对应平台样式文件不带后缀\n* 支持路由多平台配置\n\n## [1.0.5]\n\n* 发布支持头条和小程序增强相关能力的正式版本\n* 预览页面改版，支持预览页面搜索能力\n\n## [1.0.5-alpha.2]\n\n* 全局配置支持小程序云开发\n* 支持小程序插件使用和插件开发\n* 支持微信小程序sitemap配置\n* 命令行内置支持头条小程序\n* 支持头条小程序端语法校验\n\n\n## [1.0.5-alpha.1]\n \n  - 支持全局样式\n  - 修复config.json缺少qq和扩展新端信息\n  - 优化全局配置，支持性能优化配置项\n  - 配置不引入基础样式，小程序端不生成对应样式文件\n  - 修复语法校验中stylus、component 校验逻辑报错\n## [1.0.4]\n  - 支持mock文件更新实时重新编译\n  - 支持分包页面依赖的js更新，打包结果重新编译\n  - 优化dev模式内存占用\n  - 修复分包模式下组件js抽离的时候重复对页面js抽离的操作\n\n## [1.0.4-alpha.2]\n  - 扩展新端增加内置环境变量 NODE_ENV\n  - 支持模板多态语法\n\n## [1.0.4-alpha.1]\n\n  - 解决分包内组件js分包不彻底，优化包体积40%左右\n  - 支持原生小程序组件的导入也是函数式的\n  - 支持公用样式以文件的形式 @import\n\n## [1.0.3]\n\n- 发布1.0.3-alpha.0的正式版\n\n## [1.0.3-alpha.0]\n- Bugfixes\n  - 区分web端click和tap事件，由原来的click和tap统一处理成tap，改为tap和click区别对待，如果要在pc端生效click事件，那么必须绑定click而非tap\n  - 修复windows 上 app.json 中分包页面没有删除\n  - 修复windows 上初始化项目无法运行\n- Features\n  - 扩展新端命令支持集成到chameleon-tool中\n## [1.0.2]\n\n - 修改project tododemo的package.lock.json\n\n## [1.0.0]\n\n### Bugfixes\n   - 修复alipay baidu qq 端引用原生组件的问题\n   \n## [0.4.1]\n### Bugfixes\n   - 修复内联事件对象 $event的匹配问题\n   - 修复chameleon.config.js内部配置公用miniappConfig一个对象导致的对象合并不准确问题\n## [0.4.1-alpha.1]\n### Bugfixes\n   - 修复window下分包加载的bug\n   - 修复babel-loader无法在回调插件中重新配置的bug\n## [0.4.1-alpha.0]\n\n### Bug Fixes\n\n- 修复 config.json文件中不生成extra\n- 修复 -h 指令提示 -n 的情况\n\n## [0.4.0]\n### Features\n- 灰度完成发正式版\n  \n## [0.4.0-alpha.2]\n### Features\n- 合并0.3.3 和 mvvm+ 版本的代码\n\n## [0.4.0-mvvm.16]\n\n### Bug Fixes\n- 修复扩展新端运行时代码插入\n\n## [0.4.0-mvvm.15]\n\n### Bug Fixes\n- 修复扩展新端代码中无法使用async函数\n\n## [0.4.0-mvvm.13]\n\n### Bug Fixes\n- 修复扩展新端用户编译插件报错导致阻塞watch\n- 修复扩展新端中不支持变量注入的bug\n\n## [0.4.0-mvvm.12]\n\n### Features\n- 支持给扩展新端自定义loader传默认options\n\n### Bug Fixes\n- 修复多路由报错的bug\n\n## [0.4.0-mvvm.11]\n### Features\n- 增加生成config.json文件的钩子\n- 打包文件增量覆盖\n- 新端插件中可以有默认配置\n- 静态资源可以添加生成路径前缀\n\n## [0.4.0-mvvm.10]\n### Features\n- 完善mvvm-pack单元测试\n- 扩展新端compiler对象新增获取路由方法\n- 扩展新端cml节点的extra字段添加引用组件\n\n## [0.4.0-mvvm.9]\n### Features\n- 支持script类型节点 originSource字段获取节点babel前代码\n- linter支持扩展多态协议的校验\n\n## [0.4.0-mvvm.8]\n### Bug Fixes\n- 修复扩展新端在window上构建报错\n## [0.4.0-mvvm.7]\n### Features\n- 支持扩展新端支持文件指纹与js和css压缩\n- 对齐百度和微信小程序能力，支持 支付宝 web weex 在自定义组件上使用 tap touchstart touchend touchcancel原生事件直接触发\n\n## [0.4.0-mvvm.6]\n### Features\n- 支持扩展新端对小程序原生组件支持\n\n## [0.4.0-mvvm.1-0.4.0-mvvm.3]\n### Features\n- 增加 扩展新端功能\n- 增加 web端组件导出支持externals参数进行运行时分离\n- 增加 支持小程序配置原生tabbar\n\n## [0.3.3]\n### Features:\n  - 组件导出依赖分离\n  - 可通过命令行配置 preview 预览页是否打开\n  - 合并qq小程序分支\n  - web端原生origin click事件不处理成tap\n  - 修改全局变量校验失效问题，同时增加 qq 全局变量名单。\n  - 模板变量校验添加 LogicalExpression 处理逻辑表达式里的变量\n  - 支持以组件、页面、子项目粒度配置是否注入默认样式\n### Bug Fixes\n  - 修改cover-view报未定义组件问题件\n  - 修复引入zepto库后tap事件触发两次问题\n## [0.3.3-alpha.6]\n### Features\n  - 组件导出依赖分离\n  - 可通过命令行配置 preview 预览页是否打开\n  \n## [0.3.3-alpha.5]\n### Features\n  - 合并qq小程序分支\n  - web端原生origin click事件不处理成tap\n  \n## [0.3.3-alpha.4]\n### Features\n  - 修改全局变量校验失效问题，同时增加 qq 全局变量名单。\n  - 模板变量校验添加 LogicalExpression 处理逻辑表达式里的变量\n### Bug Fixes\n  - 修改cover-view报未定义组件问题件\n  - 修复引入zepto库后tap事件触发两次问题\n  \n## [0.3.3-alpha.3]\n### Features\n  - 支持web weex可配置是否包裹组件\n\n## [0.3.3-alpha.qq.1]\n### Features\n* 支持qq小程序\n  旧项目支持qq小程序 需要修改的地方\n  - 1 升级以下几个npm包版本\n    \"chameleon-api\": \"0.5.0-alpha.6\",\n    \"chameleon-bridge\": \"0.2.0-alpha.5\",\n    \"chameleon-runtime\": \"0.2.2-alpha.qq\",\n    \"chameleon-store\": \"0.1.0-alpha.qq\",\n    \"chameleon-ui-builtin\": \"0.2.11-alpha.qq\",\n    \"cml-ui\": \"0.2.0-alpha.qq\"\n  - 2 chameleon.config.js中`platforms`字段添加`qq`\n  - \n## [0.3.3-alpha.2]\n\n### Bug Fixes \n\n* 修复 weex dev模式liveload失效\n  老项目如果修复，还需要升级项目中两个npm包如下：\n  - \"chameleon-api\": \"0.4.17\",\n  - \"chameleon-bridge\": \"0.1.10\",\n* weex babelPolyfill为true时 将添加整个@babel/polyfill修改为只添加几个polyfill方法<a href=\"https://github.com/didi/chameleon/blob/v0.3.x-alpha/packages/chameleon-tool/configs/default/miniappPolyfill.js\">miniappPolyfill.js</a>\n## [0.3.3-alpha.1]\n  - 支持小程序分包加载\n  - 修复windows 路径带有数字无法运行\n  - 升级webpack-bundle-analyzer 解决安全漏洞警告\n## [0.3.3-alpha.0]\n- web/weex样式一致性加强\n- 基础样式设置支持不导入\n- 修复 vue 语法下 v-for bug\n- 支持在cml组件上绑定原生事件，注意：需要升级chameleon-ui-builtin到0.2.10-alpha.4版本才支持\n- 修复weex内联事件传汉字编译过慢；\n- 支持组件上绑定多个内联事件传参的情况\n\n## [0.3.2]\n\n###  Bug Fixes\n* 修复 web端模板错误\n\n## [0.3.1] \n有bug\n\n## [0.3.0]\n0.3.0-alpha.9 灰度为正式版本\n\n## [0.3.0-alpha.9](https://github.com/didi/chameleon/compare/v0.3.0-alpha.8...v0.3.0-alpha.9)\n\n###  Bug Fixes\n* 修复 cml build 命令 不配置web端也会进行web端构建的bug\n\n###  0.3.0-alpha.8 灰度完成发布0.3.0版本\n\n\n## [0.3.0-alpha.8](https://github.com/didi/chameleon/compare/v0.3.0-alpha.7...v0.3.0-alpha.8)\n\n###  Bug Fixes\n* 修复 全局安装chameleon-tool时的npm warn\n\n\n## [0.3.0-alpha.7](https://github.com/didi/chameleon/compare/v0.3.0-alpha.6...v0.3.0-alpha.7)\n\n###  Bug Fixes\n* 修复 build 模式autoprefixer被删除\n* 修复 chameleon.config.js 中的base配置优先级bug\n\n\n### Features\n* 增加了cmss.enableAutoPrefix 参数控制是否添加css的autoprefix\n\n\n## [0.3.0-alpha.6](https://github.com/didi/chameleon/compare/v0.3.0-alpha.5...v0.3.0-alpha.6)\n\n###  Bug Fixes\n* 修复 cml wx build执行后报错\n\n\n## [0.3.0-alpha.5](https://github.com/didi/chameleon/compare/v0.3.0-alpha.4...v0.3.0-alpha.5)\n\n###  Bug Fixes\n* 修复 cml weex build生成config.json 格式不正确\n\n\n## [0.3.0-alpha.4](https://github.com/didi/chameleon/compare/v0.3.0-alpha.3...v0.3.0-alpha.4)\n\n###  Bug Fixes\n* 回退模板的chameleon-ui-builtin@0.2.1 到chameleon-ui-builtin@0.2.0， 因为image组件不兼容样式设置\n\n\n## [0.3.0-alpha.3](https://github.com/didi/chameleon/compare/v0.3.0-alpha.2...v0.3.0-alpha.3)\n\n### Features\n* 升级初始化项目运行时依赖\n* weex config.json中增加md5字段\n\n### Bug Fixes\n* 组件间css优先级问题\n\n## [0.3.0-alpha.2](https://github.com/didi/chameleon/compare/v0.3.0-alpha.1...v0.3.0-alpha.2)\n\n### Features\n* 支持微信wxs 支付宝sjs 百度.filter.js的文件引用  [issues/67](https://github.com/didi/chameleon/issues/67)\n\n\n## [0.3.0-alpha.1](https://github.com/didi/chameleon/compare/v0.2.0...v0.3.0-alpha.1)\n\n### Bug Fixes\n* preview页面iframe未撑开修复\n* weex的 build模式jsbundle中存在本地路径\n\n### Features\n* 小程序的图片地址本地图片改网络图片\n* 解决父级目录babel-loader问题\n* build模式config.json的生成\n* web端weex端 多态组件支持js格式的vue组件\n* 小程序和weex也添加babelPolyfill的选项\n* 校验不支持Promise类型定义\n* 默认添加/components 别名\n* 校验添加生命周期函数白名单\n## [0.2.0](https://github.com/didi/chameleon/compare/v0.2.0-alpha.1...v0.2.0)\n\n### Bug Fixes\n\n- 默认开启全局变量校验，升级初始化项目中依赖符合全局变量校验\n- linter校验支持component is的校验\n\n## [0.2.0-alpha.1](https://github.com/didi/chameleon/compare/v0.2.0-alpha.0...v0.2.0-alpha.1)\n\n### Bug Fixes\n\n- 修复 js中import css文件导致构建停滞的bug\n\n## [0.2.0-alpha.0](https://github.com/didi/chameleon/compare/v0.1.0-alpha.4...v0.2.0-alpha.0)\n\n### Features\n\n- 优化api多域名mock方式\n- 组件间css优先级修复\n- chameleon.config.js支持base配置\n- cml和vue的语法支持事件冒泡\n- vue语法下扩展了 v-on:click.stop=\"handleClick\" 的形式来阻止冒泡\n- wx端用户自定义组件不添加 cml-base class\n- component is支持事件绑定以及component is上的属性解析\n- 支持cml子项目放入node_module中引入\n- 支持拷贝node_modules中的小程序子项目\n\n### Bug Fixes\n\n- 修复 组件间css优先级 使父组件可覆盖子组件样式\n\n## [0.1.1](https://github.com/didi/chameleon/compare/v0.1.0-alpha.4...v0.1.1)\n\n### Features\n\n- init component命令提示文案\n- init 多态组件中的json部分优化\n\n\n## [0.1.0-alpha.4](https://github.com/didi/chameleon/compare/v0.1.0-alpha.3...v0.1.0-alpha.4)\n\n### Features\n\n- 终端提示英文化\n- 样式隔离，模板包裹，特殊属性被包裹层继承\n- 事件处理优化\n- 动画和轮播图的模板解析支持\n- chameleon-template-parse 单测完善到 90% 以上 增加对模板解析时候语法的校验\n- mock多域名请求优化\n\n### Bug Fixes\n\n- 修复component is v-model c-model v-show c-show\n\n\n## [0.1.0-alpha.3](https://github.com/didi/chameleon/compare/v0.1.0-alpha.2...v0.1.0-alpha.3)\n\n### Bug Fixes\n\n- **chameleon-tool** 修复 alpha版本cli兼容0.1.1版本的chameleon-api ([0deaa8d](https://github.com/didi/chameleon/commit/0deaa8df11f605fc08c1b71850379500ea3f38cc))\n\n\n## [0.1.0-alpha.2](https://github.com/didi/chameleon/compare/v0.1.0-alpha.1...v0.1.0-alpha.2)\n\n### Bug Fixes\n\n- **chameleon-template-parse** 修复 c-show bug ([4c2c750](https://github.com/didi/chameleon/commit/4c2c7507f2aa906f0580ed59d056e91be7269a93))\n- **chameleon-template-parse** 修复 component is bug ([4c2c750](https://github.com/didi/chameleon/commit/4c2c7507f2aa906f0580ed59d056e91be7269a93))\n- **chameleon-loader** 修复 window上数字目录编译报错 ([f1b236d](https://github.com/didi/chameleon/commit/f1b236dfe602daf9dd476b9c6e33e980e3640dbc))\n- **chameleon-mixins** 修复 百度小程序中动画bug ([ca41f54](https://github.com/didi/chameleon/commit/ca41f5460bc0098ce8b401e4b0fc2baad0ffc254))\n\n## [0.1.0-alpha.1](https://github.com/didi/chameleon/compare/v0.0.12...v0.1.0-alpha.1)\n\n### Features\n\n- 支持百度小程序和支付宝小程序\n- 支持mock多域名请求\n\n## [0.0.16](https://github.com/didi/chameleon/compare/v0.0.15...v0.0.16)\n\n### Bug Fixes\n* 修复 小程序组件导出 样式文件压缩\n* 回退 v0.3.0-alpha.0中引入微信预览模式白屏的问题\n\n## [0.0.13](https://github.com/didi/chameleon/compare/b2aa4b...6dc5ff9#diff-b21d2ccb648a84e2a7348250c471cc2aL32)\n\n### Bug Fixes\n\n- **chameleon-templates** 修复默认初始化项目中的微信app.json默认配置([dc58180](https://github.com/didi/chameleon/commit/dc58180827327bbd966398c57602822992238c1f)）\n\n## [0.0.12](https://github.com/didi/chameleon/compare/v0.0.11...v0.0.12)\n\n### Bug Fixes\n- **chameleon-css-loader** 修复低版本浏览器todo demo白屏问题，fix [#3](https://github.com/didi/chameleon/issues/3) ([d565a29](https://github.com/didi/chameleon/commit/d565a292ccef56de5c283cce2debeaca5ee7d722))\n- **chameleon-css-loader** 修复不处理第一个样式多态的问题([d565a29](https://github.com/didi/chameleon/commit/d565a292ccef56de5c283cce2debeaca5ee7d722)）\n- **chameleon-loader** 修复cml-ui中组件事件不代理的问题([21e0709](https://github.com/didi/chameleon/commit/21e0709353a2635f9055a79009b9d992dfb68f78)）\n- **chameleon-templates** 修复todo-demo图片损坏问题([de5b42d](https://github.com/didi/chameleon/commit/de5b42da50e5b7315ce1ad33b82c2e6ed94fe04a)）\n- **chameleon-templates** 升级初始化项目依赖版本，fix [#2](https://github.com/didi/chameleon/issues/2) ([75ba521](https://github.com/didi/chameleon/commit/75ba52111634f218a404ca85fe57e448f8ed880a)）\n\n"
  },
  {
    "path": "LICENSE",
    "content": "                              Apache License\n\n                        Version 2.0, January 2004\n\n                     http://www.apache.org/licenses/\n\n\n\n\nTERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n\n\n\n1. Definitions.\n\n\n\n\n   \"License\" shall mean the terms and conditions for use, reproduction,\n\n   and distribution as defined by Sections 1 through 9 of this document.\n\n\n\n\n   \"Licensor\" shall mean the copyright owner or entity authorized by\n\n   the copyright owner that is granting the License.\n\n\n\n\n   \"Legal Entity\" shall mean the union of the acting entity and all\n\n   other entities that control, are controlled by, or are under common\n\n   control with that entity. For the purposes of this definition,\n\n   \"control\" means (i) the power, direct or indirect, to cause the\n\n   direction or management of such entity, whether by contract or\n\n   otherwise, or (ii) ownership of fifty percent (50%) or more of the\n\n   outstanding shares, or (iii) beneficial ownership of such entity.\n\n\n\n\n   \"You\" (or \"Your\") shall mean an individual or Legal Entity\n\n   exercising permissions granted by this License.\n\n\n\n\n   \"Source\" form shall mean the preferred form for making modifications,\n\n   including but not limited to software source code, documentation\n\n   source, and configuration files.\n\n\n\n\n   \"Object\" form shall mean any form resulting from mechanical\n\n   transformation or translation of a Source form, including but\n\n   not limited to compiled object code, generated documentation,\n\n   and conversions to other media types.\n\n\n\n\n   \"Work\" shall mean the work of authorship, whether in Source or\n\n   Object form, made available under the License, as indicated by a\n\n   copyright notice that is included in or attached to the work\n\n   (an example is provided in the Appendix below).\n\n\n\n\n   \"Derivative Works\" shall mean any work, whether in Source or Object\n\n   form, that is based on (or derived from) the Work and for which the\n\n   editorial revisions, annotations, elaborations, or other modifications\n\n   represent, as a whole, an original work of authorship. For the purposes\n\n   of this License, Derivative Works shall not include works that remain\n\n   separable from, or merely link (or bind by name) to the interfaces of,\n\n   the Work and Derivative Works thereof.\n\n\n\n\n   \"Contribution\" shall mean any work of authorship, including\n\n   the original version of the Work and any modifications or additions\n\n   to that Work or Derivative Works thereof, that is intentionally\n\n   submitted to Licensor for inclusion in the Work by the copyright owner\n\n   or by an individual or Legal Entity authorized to submit on behalf of\n\n   the copyright owner. For the purposes of this definition, \"submitted\"\n\n   means any form of electronic, verbal, or written communication sent\n\n   to the Licensor or its representatives, including but not limited to\n\n   communication on electronic mailing lists, source code control systems,\n\n   and issue tracking systems that are managed by, or on behalf of, the\n\n   Licensor for the purpose of discussing and improving the Work, but\n\n   excluding communication that is conspicuously marked or otherwise\n\n   designated in writing by the copyright owner as \"Not a Contribution.\"\n\n\n\n\n   \"Contributor\" shall mean Licensor and any individual or Legal Entity\n\n   on behalf of whom a Contribution has been received by Licensor and\n\n   subsequently incorporated within the Work.\n\n\n\n\n2. Grant of Copyright License. Subject to the terms and conditions of\n\n   this License, each Contributor hereby grants to You a perpetual,\n\n   worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n\n   copyright license to reproduce, prepare Derivative Works of,\n\n   publicly display, publicly perform, sublicense, and distribute the\n\n   Work and such Derivative Works in Source or Object form.\n\n\n\n\n3. Grant of Patent License. Subject to the terms and conditions of\n\n   this License, each Contributor hereby grants to You a perpetual,\n\n   worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n\n   (except as stated in this section) patent license to make, have made,\n\n   use, offer to sell, sell, import, and otherwise transfer the Work,\n\n   where such license applies only to those patent claims licensable\n\n   by such Contributor that are necessarily infringed by their\n\n   Contribution(s) alone or by combination of their Contribution(s)\n\n   with the Work to which such Contribution(s) was submitted. If You\n\n   institute patent litigation against any entity (including a\n\n   cross-claim or counterclaim in a lawsuit) alleging that the Work\n\n   or a Contribution incorporated within the Work constitutes direct\n\n   or contributory patent infringement, then any patent licenses\n\n   granted to You under this License for that Work shall terminate\n\n   as of the date such litigation is filed.\n\n\n\n\n4. Redistribution. You may reproduce and distribute copies of the\n\n   Work or Derivative Works thereof in any medium, with or without\n\n   modifications, and in Source or Object form, provided that You\n\n   meet the following conditions:\n\n\n\n\n   (a) You must give any other recipients of the Work or\n\n       Derivative Works a copy of this License; and\n\n\n\n\n   (b) You must cause any modified files to carry prominent notices\n\n       stating that You changed the files; and\n\n\n\n\n   (c) You must retain, in the Source form of any Derivative Works\n\n       that You distribute, all copyright, patent, trademark, and\n\n       attribution notices from the Source form of the Work,\n\n       excluding those notices that do not pertain to any part of\n\n       the Derivative Works; and\n\n\n\n\n   (d) If the Work includes a \"NOTICE\" text file as part of its\n\n       distribution, then any Derivative Works that You distribute must\n\n       include a readable copy of the attribution notices contained\n\n       within such NOTICE file, excluding those notices that do not\n\n       pertain to any part of the Derivative Works, in at least one\n\n       of the following places: within a NOTICE text file distributed\n\n       as part of the Derivative Works; within the Source form or\n\n       documentation, if provided along with the Derivative Works; or,\n\n       within a display generated by the Derivative Works, if and\n\n       wherever such third-party notices normally appear. The contents\n\n       of the NOTICE file are for informational purposes only and\n\n       do not modify the License. You may add Your own attribution\n\n       notices within Derivative Works that You distribute, alongside\n\n       or as an addendum to the NOTICE text from the Work, provided\n\n       that such additional attribution notices cannot be construed\n\n       as modifying the License.\n\n\n\n\n   You may add Your own copyright statement to Your modifications and\n\n   may provide additional or different license terms and conditions\n\n   for use, reproduction, or distribution of Your modifications, or\n\n   for any such Derivative Works as a whole, provided Your use,\n\n   reproduction, and distribution of the Work otherwise complies with\n\n   the conditions stated in this License.\n\n\n\n\n5. Submission of Contributions. Unless You explicitly state otherwise,\n\n   any Contribution intentionally submitted for inclusion in the Work\n\n   by You to the Licensor shall be under the terms and conditions of\n\n   this License, without any additional terms or conditions.\n\n   Notwithstanding the above, nothing herein shall supersede or modify\n\n   the terms of any separate license agreement you may have executed\n\n   with Licensor regarding such Contributions.\n\n\n\n\n6. Trademarks. This License does not grant permission to use the trade\n\n   names, trademarks, service marks, or product names of the Licensor,\n\n   except as required for reasonable and customary use in describing the\n\n   origin of the Work and reproducing the content of the NOTICE file.\n\n\n\n\n7. Disclaimer of Warranty. Unless required by applicable law or\n\n   agreed to in writing, Licensor provides the Work (and each\n\n   Contributor provides its Contributions) on an \"AS IS\" BASIS,\n\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n\n   implied, including, without limitation, any warranties or conditions\n\n   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n\n   PARTICULAR PURPOSE. You are solely responsible for determining the\n\n   appropriateness of using or redistributing the Work and assume any\n\n   risks associated with Your exercise of permissions under this License.\n\n\n\n\n8. Limitation of Liability. In no event and under no legal theory,\n\n   whether in tort (including negligence), contract, or otherwise,\n\n   unless required by applicable law (such as deliberate and grossly\n\n   negligent acts) or agreed to in writing, shall any Contributor be\n\n   liable to You for damages, including any direct, indirect, special,\n\n   incidental, or consequential damages of any character arising as a\n\n   result of this License or out of the use or inability to use the\n\n   Work (including but not limited to damages for loss of goodwill,\n\n   work stoppage, computer failure or malfunction, or any and all\n\n   other commercial damages or losses), even if such Contributor\n\n   has been advised of the possibility of such damages.\n\n\n\n\n9. Accepting Warranty or Additional Liability. While redistributing\n\n   the Work or Derivative Works thereof, You may choose to offer,\n\n   and charge a fee for, acceptance of support, warranty, indemnity,\n\n   or other liability obligations and/or rights consistent with this\n\n   License. However, in accepting such obligations, You may act only\n\n   on Your own behalf and on Your sole responsibility, not on behalf\n\n   of any other Contributor, and only if You agree to indemnify,\n\n   defend, and hold each Contributor harmless for any liability\n\n   incurred by, or claims asserted against, such Contributor by reason\n\n   of your accepting any such warranty or additional liability.\n\n\n\n\nEND OF TERMS AND CONDITIONS\n\n\n\n\nAPPENDIX: How to apply the Apache License to your work.\n\n\n\n\n   To apply the Apache License to your work, attach the following\n\n   boilerplate notice, with the fields enclosed by brackets \"{}\"\n\n   replaced with your own identifying information. (Don't include\n\n   the brackets!)  The text should be enclosed in the appropriate\n\n   comment syntax for the file format. We also recommend that a\n\n   file or class name and description of purpose be included on the\n\n   same \"printed page\" as the copyright notice for easier\n\n   identification within third-party archives.\n\n\n\n\nCopyright (C) 2017 Beijing Didi Infinity Technology and Development Co.,Ltd. All rights reserved.\n\n\n\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\n\nyou may not use this file except in compliance with the License.\n\nYou may obtain a copy of the License at\n\n\n\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n\n\n\nUnless required by applicable law or agreed to in writing, software\n\ndistributed under the License is distributed on an \"AS IS\" BASIS,\n\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\nSee the License for the specific language governing permissions and\n\nlimitations under the License.\n"
  },
  {
    "path": "README.md",
    "content": "\n\nChameleon [![Build Status](https://www.travis-ci.org/didi/chameleon.svg?branch=master)](https://www.travis-ci.org/didi/chameleon) [![license](https://img.shields.io/npm/l/chameleon-tool.svg?registry_uri=https%3A%2F%2Fregistry.npmjs.com&style=popout-square)](https://www.npmjs.com/package/chameleon-tool) [![version](https://img.shields.io/npm/v/chameleon-tool.svg?style=flat)](https://www.npmjs.com/package/chameleon-tool)\n\n**Chameleon**/kəˈmiːlɪən/，简写`CML`，中文名`卡梅龙`；中文意思`变色龙`，意味着就像变色龙一样能适应不同环境的跨端整体解决方案。\n\n[English Introduction](https://github.com/didi/chameleon/blob/gh-pages/doc/quick_start/readme-en.md) | 中文介绍\n\n## 文档\n[新官网文档](http://cml.didi.cn/)\n\n[CML.JS.org](https://cml.js.org)\n\n- [安装](https://CML.JS.org/doc/quick_start/quick_start.html)\n- [快速上手](https://CML.JS.org/doc/quick_start/quick_start.html)\n- [API 文档](https://CML.JS.org/doc/api/api.html)\n- [组件文档](https://CML.JS.org/doc/component/component.html)\n- [资源汇总 💰awesome-cml](https://github.com/chameleon-team/awesome-cml)：依赖库、demo、完整应用示例、学习资源\n- [后续规划](https://github.com/didi/chameleon/wiki/%E5%90%8E%E6%9C%9F%E8%A7%84%E5%88%92)\n- [五分钟上手视频教程](https://mp.weixin.qq.com/s/3NY_pbqDVnbQSYQG_D2qiA)\n- [青桔单车 chameleon 跨平台实践分享](https://mp.weixin.qq.com/s/N8PpxRHHtlIHVlemQ1Gepg)\n- [谁在使用？](https://github.com/didi/chameleon/issues/131)\n\n## 仓库更新说明\n\n本仓库仅包含编译时代码，全部开源代码参见：https://github.com/chameleon-team\n\nmaster为稳定版本，除了紧急 bug 修复，每份代码提交都有很严格的发布流程规范，会先在分支经历一段时间灰度期，确认稳定可用后才会合并到 master，\n[进行中的项目分支介绍](https://github.com/didi/chameleon/wiki/%E8%BF%9B%E8%A1%8C%E4%B8%AD%E7%9A%84%E9%A1%B9%E7%9B%AE)\n\n## CML 即 多端\n支持平台：**web、微信小程序、支付宝小程序、百度小程序、[android(weex)](https://github.com/chameleon-team/chameleon-sdk-android)、[ios(weex)](https://github.com/chameleon-team/chameleon-sdk-ios)、qq 小程序、[字节跳动小程序](https://cml.js.org/doc/example/tt_miniapp.html)、[快应用](https://cml.js.org/doc/example/quickapp_miniapp.html)、持续更新中**\n\n**一端所见即多端所见**——多端高度一致，无需关注各端文档。\n\n> 基于多态协议不影响各端差异化灵活性\n<a href=\"https://github.com/beatles-chameleon/cml-demo\">\n<img src=\"https://cml.js.org/doc/assets/efficient.gif\" width=\"400px\"/>\n</a>\n\n\n|                                                                 web                                                                  |                                                             微信小程序                                                             |                                                              native-weex                                                              |                                                               百度小程序                                                               |                                                              支付宝小程序                                                              |\n| :----------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------: |\n| <a href=\"https://github.com/beatles-chameleon/cml-demo\"><img src=\"https://cmljs.org/cml-demo/preview/web-1.jpg\" width=\"200px\"/> </a> | <a href=\"https://github.com/beatles-chameleon/cml-demo\"><img src=\"https://cmljs.org/cml-demo/preview/wx-1.jpg\" width=\"200px\"/></a> | <a href=\"https://github.com/beatles-chameleon/cml-demo\"><img src=\"https://cmljs.org/cml-demo/preview/weex-1.jpg\" width=\"200px\"/> </a> | <a href=\"https://github.com/beatles-chameleon/cml-demo\"><img src=\"https://cmljs.org/cml-demo/preview/baidu-1.png\" width=\"200px\"/> </a> | <a href=\"https://github.com/beatles-chameleon/cml-demo\"><img src=\"https://cmljs.org/cml-demo/preview/alipay-1.png\" width=\"200px\"/></a> |\n\n## 背景\n\n研发同学在端内既追求 h5 的灵活性，也要追求性能趋近于原生。\n面对入口扩张，App 客户端、微信小程序、支付宝小程序、百度小程序、Android 厂商联盟快应用、其他类小程序，单一功能在各平台都要重复实现，开发和维护成本成倍增加。迫切需要维护一套代码可以构建多入口的解决方案，滴滴跨端解决方案 Chameleon 终于发布。真正专注于让一套代码运行多端。\n\n## 设计理念\n\n软件架构设计里面最基础的概念“拆分”和“合并”，拆分的意义是“分而治之”，将复杂问题拆分成单一问题解决，比如后端业务系统的”微服务化“设计；“合并”的意义是将同样的业务需求抽象收敛到一块，达成高效率高质量的目的，例如后端业务系统中的“中台服务”设计。\n\n而 Chameleon 属于后者，通过定义统一的语言框架+[统一多态协议](http://cml.didi.cn/docs/poly.html)，从多端（对应多个独立服务）业务中抽离出自成体系、连续性强、可维护强的“前端中台服务”。\n\n<img src=\"https://cml.js.org/doc/assets/chameleon-idea.png\" width=\"400px\"/>\n\n### 跨端目标\n\n虽然不同各端环境千变万化，但万变不离其宗的是 MVVM 架构思想，**Chameleon 目标是让 MVVM 跨端环境大统一**。\n\n![跨端目标](https://cml.js.org/doc/assets/mvvm4.png)\n\n\n## 开发语言\n代码示例\n```html\n<template>\n  <view>\n    <text>{{title}}</text><text>{{reversedTitle}}</text>\n  </view>\n</template>\n\n<script>\nclass Index  {\n  data = {\n    title: \"chameleon\"\n  }\n  computed = {\n    reversedTitle: function () {\n      return this.title.split('').reverse().join('')\n    }\n  }\n  mounted() {}\n  destroyed() {}\n}\nexport default new Index();\n</script>\n```\n从事过网页编程的人知道，网页编程采用的是 HTML + CSS + JS 这样的组合，同样道理，chameleon 中采用的是 CML + CMSS + JS。\n\n[JS](https://CML.JS.org/doc/logic/logic.html)语法用于处理页面的逻辑层，与普通网页编程相比，本项目目标定义标准 MVVM 框架，拥有完整的生命周期，watch，computed，数据双向绑定等优秀的特性，能够快速提高开发速度、降低维护成本。\n\n[CML](https://CML.JS.org/doc/view/cml.html)（Chameleon Markup Language）用于描述页面的结构，我们知道 HTML 是有一套标准的语义化标签，例如文本是`<span>` 按钮是`<button>`。CML 同样具有一套标准的标签，我们将标签定义为`组件`，CML 为用户提供了一系列[组件](https://CML.JS.org/doc/component/base/base.html)。同时 CML 中还支持<b>模板语法</b>，例如条件渲染、列表渲染，数据绑定等等。同时，CML 支持使用[类 VUE 语法](https://CML.JS.org/doc/view/vue.html)，让你更快入手。\n\n[CMSS](https://CML.JS.org/doc/view/cmss.html)(Chameleon Style Sheets)用于描述 CML 页面结构的样式语言，其具有大部分 CSS 的特性，并且还可以支持各种 css 的预处语言`less stylus`。\n\nCML 采用与 Vue 一致的组件化方案、单文件组织方式、生命周期，同时数据响应能力对齐 Vue，数据管理能力对齐 Vuex，非常方便开发者上手、维护。\n\n通过以上对于开发语言的介绍，相信你看到只要是有过网页编程知识的人都可以快速的上手chameleon的开发。\n\n## 多端高度一致\n\n深入到编程语言维度保障一致性，包括框架、生命周期、内置组件、事件通信、路由、界面布局、界面单位、组件作用域、组件通信等高度统一\n\n## 丰富的组件\n\n在用 CML 写页面时，chameleon 提供了[丰富的组件](https://CML.JS.org/doc/component/component.html)供开发者使用，内置的有`button switch radio checkbox`等组件，扩展的有`c-picker c-dialog c-loading`等等,覆盖了开发工作中常用的组件。\n\n## 丰富的 API\n\n为了方便开发者的高效开发，chameleon 提供了[丰富的 API 库](https://CML.JS.org/doc/api/api.html),发布为 npm 包`chameleon-api`，里面包括了网络请求、数据存储、地理位置、系统信息、动画等方法。\n\n## 自由定制 API 和组件\n\n基于强大的[多态协议](https://CML.JS.org/doc/framework/polymorphism/intro.html)，可自由扩展任意 API 和组件，不强依赖框架的更新。各端原始项目中已积累大量组件，也能直接引入到跨端项目中使用。\n\n基于强大的[多态协议](https://CML.JS.org/doc/framework/polymorphism/intro.html)，充分隔离各端差异化实现，轻松维护一套代码实现跨多端\n\n## [规范校验](http://cml.didi.cn/docs/introduction.html#%E6%99%BA%E8%83%BD%E8%A7%84%E8%8C%83%E6%A0%A1%E9%AA%8C)\n\n代码规范校验，当出现不符合规范要求的代码时，编辑器会展示智能提示，不用挨个调试各端代码，同时命令行启动窗口也会提示代码的错误位置。\n\n## 渐进式跨端\n\n既想一套代码运行多端，又不用大刀阔斧的重构项目？不仅可以用 cml 开发页面，也可以将多端重用组件用 cml 开发，直接在原有项目里面调用。\n\n## 先进前端开发体验\n\nChameleon 不仅仅是跨端解决方案。基于优秀的前端打包工具 Webpack，吸收了业内多年来积累的最有用的工程化设计，提供了前端基础开发脚手架命令工具，帮助端开发者从开发、联调、测试、上线等全流程高效的完成业务开发。\n\n## 联系我们\n\n[ChameleonCore@didiglobal.com](mailto:ChameleonCore@didiglobal.com)\n\n## [Beatles Chameleon 团队](https://github.com/chameleon-team)\n\n负责人：Conan\n\n内部成员：透心凉、Sgoddon、动机不纯、Jalon、Jack、卡尺哈哈、change、Observer、Kevin、guoqingSmile、Mr.MY、JiM、lzc、名字待定、朱智恒、亭、龚磊、w55、小龙、不懂小彬、荣景超\n\n## 特别鸣谢\n[![zheyizhifeng](https://avatars3.githubusercontent.com/u/9592849?s=100&v=4)](https://github.com/zheyizhifeng)|[(头像空)](https://github.com/whuhenrylee)|[![broven](https://avatars0.githubusercontent.com/u/12854613?s=100&v=4)](https://github.com/broven/)|[(头像空)](https://github.com/Jeany/)\n:---:|:---:|:---:|:---:\n[zheyizhifeng（快应用）](https://github.com/zheyizhifeng)|[whuhenrylee（快应用）](https://github.com/whuhenrylee)|[broven（阿里影业）](https://github.com/broven/)|[Jeany（芒果 TV)](https://github.com/yaxiji/)\n\n## 贡献者们\n快应用官方研发团队、luyixin、z-mirror、夏夜焰火（百度）\n[kingsleydon](https://github.com/kingsleydon)\n\n## 微信 & QQ 交流群\n\n**微信**<br />\n<img width=\"150px\" src=\"https://CML.JS.org/doc/assets/wx-qr-code.png\" />\n\n<br />\n\n**QQ**<br />\n<img width=\"150px\" src=\"https://cmljs.org/doc/assets/qq2-qrcode.JPG\" />\n\n\n## 协议\n\nApache-2.0 license\n\nChameleon 基于 Apache-2.0 协议进行分发和使用，更多信息参见[协议文件](./LICENSE)。\n\n## 友情链接\n\n[DoraemonKit](https://github.com/didi/DoraemonKit) /'dɔ:ra:'emɔn/，简称DoKit， 一款功能齐全的客户端（ iOS 、Android、微信小程序 ）研发助手，你值得拥有。\n\n[Mand Mobile](https://github.com/didi/mand-mobile) 一款优秀的面向金融场景的 移动端UI组件库。\n\n\n[Cube-UI](https://github.com/didi/cube-ui)  基于 Vue.js 实现的精致移动端组件库。\n"
  },
  {
    "path": "commitlint.config.js",
    "content": "//git commit -m\"feat: 新增功能\"\n//规范团队commit规范，参考commitlint-angular https://www.npmjs.com/package/@commitlint/config-angular\nmodule.exports = {\n  extends: ['@commitlint/config-angular'],\n  rules: {\n    'type-enum': [2, 'always', [\n      \"feat\", \"fix\", \"docs\", \"style\", \"refactor\", \"test\", \"chore\", \"revert\"\n    ]],\n    'subject-full-stop': [0, 'never'],\n    'subject-case': [0, 'never'],\n  }\n};\n\n//[build, ci, docs, feat, fix, perf, refactor, revert, style, test]\n\n\n\n"
  },
  {
    "path": "elevate/cr.yml",
    "content": "# 鲲鹏接入教程：http://wiki.intra.xiaojukeji.com/pages/viewpage.action?pageId=111903894\n# ---------refer用来标识此项目评审入口是OneExperience, 请勿改动--------- #\nrefer: OE\nstrategy: ownerOne\nowners: wangmengjun\nreviewers: \n"
  },
  {
    "path": "lerna.json",
    "content": "{\n  \"packages\": [\n    \"packages/*\"\n  ],\n  \"version\": \"1.0.8\",\n  \"command\": {\n    \"publish\": {\n      \"allowBranch\": \"master\",\n      \"npmClient\": \"npm\",\n      \"verifyAccess\": false,\n      \"registry\": \"https://registry.npmjs.org/\"\n    },\n    \"add\": {\n      \"registry\": \"https://registry.npmjs.org/\"\n    },\n    \"bootstrap\": {\n      \"registry\": \"https://registry.npmjs.org/\"\n    }\n  }\n}\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"root\",\n  \"private\": true,\n  \"scripts\": {\n    \"build\": \"lerna run build\",\n    \"publish\": \"npm run build && lerna publish\",\n    \"coverage\": \"sh ./test/test.sh\",\n    \"clear\": \"rm -rf package-lock.json  packages/*/package-lock.json\",\n    \"clear-all\": \"rimraf package-lock.json packages/*/node_modules packages/*/package-lock.json\"\n  },\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache 2.0\",\n  \"devDependencies\": {\n    \"@commitlint/cli\": \"^8.2.0\",\n    \"@commitlint/config-angular\": \"^8.2.0\",\n    \"babel-eslint\": \"^10.0.3\",\n    \"eslint\": \"^6.8.0\",\n    \"eslint-config-standard\": \"^14.1.0\",\n    \"eslint-plugin-import\": \"^2.19.1\",\n    \"eslint-plugin-node\": \"^11.0.0\",\n    \"eslint-plugin-promise\": \"^4.2.1\",\n    \"eslint-plugin-standard\": \"^4.0.1\",\n    \"eslint-plugin-vue\": \"^6.0.2\",\n    \"husky\": \"^3.1.0\",\n    \"istanbul\": \"^0.4.5\",\n    \"lerna\": \"^3.5.1\",\n    \"lint-staged\": \"^9.5.0\"\n  },\n  \"husky\": {\n    \"hooks\": {\n      \"commit-msg\": \"commitlint -E HUSKY_GIT_PARAMS\",\n      \"pre-commit\": \"lint-staged\"\n    }\n  },\n  \"dependencies\": {\n    \"babel-core\": \"^6.26.3\",\n    \"babel-istanbul\": \"^0.12.2\",\n    \"chai\": \"^4.2.0\",\n    \"codecov\": \"^3.1.0\",\n    \"coveralls\": \"^3.0.2\",\n    \"mocha\": \"*\",\n    \"nyc\": \"*\",\n    \"rimraf\": \"^2.6.3\"\n  },\n  \"lint-staged\": {\n    \"packages/**/*.js\": \"eslint --fix\"\n  }\n}\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/.editorconfig",
    "content": "# http://editorconfig.org\nroot = true\n\n[*]\nindent_style = space\nindent_size = 2\nend_of_line = lf\ncharset = utf-8\ntrim_trailing_whitespace = true\ninsert_final_newline = true\n\n[*.md]\ntrim_trailing_whitespace = false\n\n[Makefile]\nindent_style = tab\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/.eslintignore",
    "content": "**/*/__tests__\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/.eslintrc",
    "content": "{\n  \"extends\": \"eslint-config-airbnb/base\",\n  \"rules\": {\n    \"no-console\": [0]\n  }\n}\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/.gitignore",
    "content": ".idea\ntmp\nnode_modules\ncoverage\nlib\n*.log\n*.log.*\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/.npmignore",
    "content": ".idea\ntmp\ncoverage\n__tests__\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/.travis.yml",
    "content": "language: node_js\nnode_js:\n  - 8\n  - 10\nafter_success:\n  - npm run test\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/package.json",
    "content": "{\n  \"name\": \"babel-plugin-chameleon-import\",\n  \"version\": \"1.0.8\",\n  \"description\": \"Component modular import plugin for babel.\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/ant-design/babel-plugin-import\"\n  },\n  \"main\": \"src/index.js\",\n  \"scripts\": {\n    \"debug\": \"umi-tools test\",\n    \"lint\": \"eslint --ext .js src\",\n    \"coveralls\": \"cat ./coverage/lcov.info | coveralls\"\n  },\n  \"pre-commit\": [\n    \"lint\"\n  ],\n  \"keywords\": [\n    \"babel-plugin\",\n    \"antd\"\n  ],\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"devDependencies\": {\n    \"@babel/core\": \"^7.0.0\",\n    \"@babel/preset-react\": \"^7.0.0\",\n    \"babel-core\": \"^7.0.0-0\",\n    \"babel-preset-umi\": \"^1.0.0\",\n    \"coveralls\": \"^2.11.6\",\n    \"eslint\": \"^2.7.0\",\n    \"eslint-config-airbnb\": \"^6.2.0\",\n    \"material-ui\": \"^0.15.4\",\n    \"pre-commit\": \"~1.1.2\",\n    \"react-toolbox\": \"^1.2.5\",\n    \"umi-tools\": \"^0.1.4\"\n  },\n  \"babel\": {\n    \"presets\": [\n      \"umi\"\n    ]\n  },\n  \"files\": [\n    \"src\",\n    \"lib\",\n    \"package.json\",\n    \"README.md\"\n  ],\n  \"dependencies\": {\n    \"@babel/helper-module-imports\": \"^7.0.0\",\n    \"@babel/runtime\": \"^7.0.0\"\n  },\n  \"gitHead\": \"5ddcde4330774710f7646559446e008f7785ce00\"\n}"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/src/Plugin.js",
    "content": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\n\nvar _path2 = require(\"path\");\n\nvar _helperModuleImports = require(\"@babel/helper-module-imports\");\n\nfunction camel2Dash(_str) {\n  const str = _str[0].toLowerCase() + _str.substr(1);\n\n  return str.replace(/([A-Z])/g, $1 => `-${$1.toLowerCase()}`);\n}\n\nfunction camel2Underline(_str) {\n  const str = _str[0].toLowerCase() + _str.substr(1);\n\n  return str.replace(/([A-Z])/g, $1 => `_${$1.toLowerCase()}`);\n}\n\nfunction winPath(path) {\n  return path.replace(/\\\\/g, '/');\n}\n\nclass Plugin {\n  constructor(libraryName, libraryDirectory, style, camel2DashComponentName, camel2UnderlineComponentName, libraryFileName, customName, transformToDefaultImport, types, index = 0, defaulLibraryDirectory, defaulLibraryFileName) {\n    this.libraryName = libraryName;\n    this.defaulLibraryDirectory = defaulLibraryDirectory;\n    this.libraryDirectory = typeof libraryDirectory === 'undefined' ? 'lib' : libraryDirectory;\n    this.camel2DashComponentName = typeof camel2DashComponentName === 'undefined' ? true : camel2DashComponentName;\n    this.camel2UnderlineComponentName = camel2UnderlineComponentName;\n    this.style = style || false;\n    this.libraryFileName = libraryFileName || '';\n    this.defaulLibraryFileName = defaulLibraryFileName || '';\n    this.customName = customName;\n    this.transformToDefaultImport = typeof transformToDefaultImport === 'undefined' ? true : transformToDefaultImport;\n    this.types = types;\n    this.pluginStateKey = `importPluginState${index}`;\n    this.libraryVariable = '';\n  }\n\n  getPluginState(state) {\n    if (!state[this.pluginStateKey]) {\n      state[this.pluginStateKey] = {}; // eslint-disable-line\n    }\n\n    return state[this.pluginStateKey];\n  }\n\n  isInGlobalScope(path, name, pluginState) {\n    const parentPath = path.findParent(_path => _path.scope.hasOwnBinding(pluginState.specified[name]));\n    return !!parentPath && parentPath.isProgram();\n  }\n\n  importMethod(methodName, file, pluginState) {\n    if (!pluginState.selectedMethods[methodName]) {\n      const libraryDirectory = this.libraryDirectory;\n      const style = this.style;\n      const transformedMethodName = methodName;\n      const path = winPath(this.customName ? this.customName(transformedMethodName) : (0, _path2.join)(this.libraryName, libraryDirectory, transformedMethodName, this.libraryFileName) // eslint-disable-line\n      );\n      pluginState.selectedMethods[methodName] = this.transformToDefaultImport // eslint-disable-line\n      ? (0, _helperModuleImports.addDefault)(file.path, path, {\n        nameHint: methodName\n      }) : (0, _helperModuleImports.addNamed)(file.path, methodName, path);\n\n      if (style === true) {\n        (0, _helperModuleImports.addSideEffect)(file.path, `${path}/style`);\n      } else if (style === 'css') {\n        (0, _helperModuleImports.addSideEffect)(file.path, `${path}/style/css`);\n      } else if (typeof style === 'function') {\n        const stylePath = style(path, file);\n\n        if (stylePath) {\n          (0, _helperModuleImports.addSideEffect)(file.path, stylePath);\n        }\n      }\n    }\n\n    return Object.assign({}, pluginState.selectedMethods[methodName]);\n  }\n\n  buildExpressionHandler(node, props, path, state) {\n    const file = path && path.hub && path.hub.file || state && state.file;\n    const types = this.types;\n    const pluginState = this.getPluginState(state);\n    props.forEach(prop => {\n      if (!types.isIdentifier(node[prop])) return;\n\n      if (pluginState.specified[node[prop].name]) {\n        node[prop] = this.importMethod(pluginState.specified[node[prop].name], file, pluginState); // eslint-disable-line\n      }\n    });\n  }\n\n  buildDeclaratorHandler(node, prop, path, state) {\n    const file = path && path.hub && path.hub.file || state && state.file;\n    const types = this.types;\n    const pluginState = this.getPluginState(state);\n    if (!types.isIdentifier(node[prop])) return;\n\n    if (pluginState.specified[node[prop].name] && path.scope.hasBinding(node[prop].name) && path.scope.getBinding(node[prop].name).path.type === 'ImportSpecifier') {\n      node[prop] = this.importMethod(node[prop].name, file, pluginState); // eslint-disable-line\n    }\n  }\n\n  ProgramEnter(path, state) {\n    const pluginState = this.getPluginState(state);\n    pluginState.specified = Object.create(null);\n    pluginState.libraryObjs = Object.create(null);\n    pluginState.selectedMethods = Object.create(null);\n    pluginState.pathsToRemove = [];\n  }\n\n  ProgramExit(path, state) {\n    this.getPluginState(state).pathsToRemove.forEach(p => !p.removed && p.remove());\n  }\n\n  Identifier(path, state) {\n    const node = path.node;\n    const pluginState = this.getPluginState(state);\n    //如果使用了libraryVariable，则增加import libraryVariable from libraryName\n    if(node.name === this.libraryVariable && (path.parent.type !== 'ImportDefaultSpecifier') && pluginState.libraryObjs[this.libraryVariable]) {\n      const libraryName = _path2.join(this.libraryName, this.defaulLibraryDirectory, this.defaulLibraryFileName)\n      _helperModuleImports.addDefault(path.hub.file.path, libraryName, {\n        nameHint: this.libraryVariable\n      })\n      node.name = `_${node.name}`;\n    }\n    \n  }\n\n  ImportDeclaration(path, state) {\n    const node = path.node; // path maybe removed by prev instances.\n\n    if (!node) return;\n    const value = node.source.value;\n    const libraryName = this.libraryName;\n    const types = this.types;\n    const pluginState = this.getPluginState(state);\n\n    if (value === libraryName) {\n      node.specifiers.forEach(spec => {\n        if (types.isImportSpecifier(spec)) {\n          pluginState.specified[spec.local.name] = spec.imported.name;\n        } else {\n          pluginState.libraryObjs[spec.local.name] = true;\n          this.libraryVariable = spec.local.name;\n        }\n      });\n      pluginState.pathsToRemove.push(path);\n    }\n  }\n\n  CallExpression(path, state) {\n    const node = path.node;\n    const file = path && path.hub && path.hub.file || state && state.file;\n    const name = node.callee.name;\n    const types = this.types;\n    const pluginState = this.getPluginState(state);\n\n    if (types.isIdentifier(node.callee)) {\n      if (pluginState.specified[name]) {\n        node.callee = this.importMethod(pluginState.specified[name], file, pluginState);\n      }\n    }\n\n    node.arguments = node.arguments.map(arg => {\n      const argName = arg.name;\n\n      if (pluginState.specified[argName] && path.scope.hasBinding(argName) && path.scope.getBinding(argName).path.type === 'ImportSpecifier') {\n        return this.importMethod(pluginState.specified[argName], file, pluginState);\n      }\n\n      return arg;\n    });\n  }\n\n  MemberExpression(path, state) {\n    const node = path.node;\n    const file = path && path.hub && path.hub.file || state && state.file;\n    const pluginState = this.getPluginState(state); // multiple instance check.\n\n    if (!node.object || !node.object.name) return;\n\n    if (pluginState.libraryObjs[node.object.name]) {\n      // antd.Button -> _Button\n      if (node.property.type === 'Identifier') {\n        //antd.Button\n        path.replaceWith(this.importMethod(node.property.name, file, pluginState));\n      } else if (node.property.type === 'Literal') {\n        //antd['Button']\n        path.replaceWith(this.importMethod(node.property.value, file, pluginState));\n      }\n    } else if (pluginState.specified[node.object.name]) {\n      node.object = this.importMethod(pluginState.specified[node.object.name], file, pluginState);\n    }\n  }\n\n  Property(path, state) {\n    const node = path.node;\n    this.buildDeclaratorHandler(node, 'value', path, state);\n  }\n\n  VariableDeclarator(path, state) {\n    const node = path.node;\n    this.buildDeclaratorHandler(node, 'init', path, state);\n  }\n\n  ArrayExpression(path, state) {\n    const node = path.node;\n    const props = node.elements.map((_, index) => index);\n    this.buildExpressionHandler(node.elements, props, path, state);\n  }\n\n  LogicalExpression(path, state) {\n    const node = path.node;\n    this.buildExpressionHandler(node, ['left', 'right'], path, state);\n  }\n\n  ConditionalExpression(path, state) {\n    const node = path.node;\n    this.buildExpressionHandler(node, ['test', 'consequent', 'alternate'], path, state);\n  }\n\n  IfStatement(path, state) {\n    const node = path.node;\n    this.buildExpressionHandler(node, ['test'], path, state);\n    this.buildExpressionHandler(node.test, ['left', 'right'], path, state);\n  }\n\n  ExpressionStatement(path, state) {\n    const node = path.node;\n    const types = this.types;\n\n    if (types.isAssignmentExpression(node.expression)) {\n      this.buildExpressionHandler(node.expression, ['right'], path, state);\n    }\n  }\n\n  ReturnStatement(path, state) {\n    const types = this.types;\n    const file = path && path.hub && path.hub.file || state && state.file;\n    const node = path.node;\n    const pluginState = this.getPluginState(state);\n\n    if (node.argument && types.isIdentifier(node.argument) && pluginState.specified[node.argument.name] && this.isInGlobalScope(path, node.argument.name, pluginState)) {\n      node.argument = this.importMethod(node.argument.name, file, pluginState);\n    }\n  }\n\n  ExportDefaultDeclaration(path, state) {\n    const node = path.node;\n    this.buildExpressionHandler(node, ['declaration'], path, state);\n  }\n\n  BinaryExpression(path, state) {\n    const node = path.node;\n    this.buildExpressionHandler(node, ['left', 'right'], path, state);\n  }\n\n  NewExpression(path, state) {\n    const node = path.node;\n    this.buildExpressionHandler(node, ['callee', 'arguments'], path, state);\n  }\n\n}\n\nexports.default = Plugin;"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/src/index.js",
    "content": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = _default;\n\nvar _assert = _interopRequireDefault(require(\"assert\"));\n\nvar _Plugin = _interopRequireDefault(require(\"./Plugin\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default({\n  types\n}) {\n  let plugins = null; // Only for test\n\n  global.__clearBabelAntdPlugin = () => {\n    plugins = null;\n  };\n\n  function applyInstance(method, args, context) {\n    var _iteratorNormalCompletion = true;\n    var _didIteratorError = false;\n    var _iteratorError = undefined;\n\n    try {\n      for (var _iterator = plugins[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n        const plugin = _step.value;\n\n        if (plugin[method]) {\n          plugin[method].apply(plugin, [...args, context]);\n        }\n      }\n    } catch (err) {\n      _didIteratorError = true;\n      _iteratorError = err;\n    } finally {\n      try {\n        if (!_iteratorNormalCompletion && _iterator.return != null) {\n          _iterator.return();\n        }\n      } finally {\n        if (_didIteratorError) {\n          throw _iteratorError;\n        }\n      }\n    }\n  }\n\n  const Program = {\n    enter(path, {\n      opts = {}\n    }) {\n      // Init plugin instances once.\n      if (!plugins) {\n        if (Array.isArray(opts)) {\n          plugins = opts.map(({\n            libraryName,\n            libraryDirectory,\n            defaulLibraryDirectory,\n            style,\n            camel2DashComponentName,\n            camel2UnderlineComponentName,\n            libraryFileName,\n            customName,\n            transformToDefaultImport,\n            defaulLibraryFileName\n          }, index) => {\n            (0, _assert.default)(libraryName, 'libraryName should be provided');\n            return new _Plugin.default(libraryName, libraryDirectory, style, camel2DashComponentName, camel2UnderlineComponentName, libraryFileName, customName, transformToDefaultImport, types, index, defaulLibraryDirectory, defaulLibraryFileName);\n          });\n        } else {\n          (0, _assert.default)(opts.libraryName, 'libraryName should be provided');\n          plugins = [new _Plugin.default(opts.libraryName, opts.libraryDirectory, opts.style, opts.camel2DashComponentName, opts.camel2UnderlineComponentName, opts.libraryFileName, opts.customName, opts.transformToDefaultImport, types, null, opts.defaulLibraryDirectory, opts.defaulLibraryFileName)];\n        }\n      }\n\n      applyInstance('ProgramEnter', arguments, this); // eslint-disable-line\n    },\n\n    exit() {\n      applyInstance('ProgramExit', arguments, this); // eslint-disable-line\n    }\n\n  };\n  const methods = ['ImportDeclaration', 'CallExpression', 'MemberExpression', 'Property', 'VariableDeclarator', 'ArrayExpression', 'LogicalExpression', 'ConditionalExpression', 'IfStatement', 'ExpressionStatement', 'ReturnStatement', 'ExportDefaultDeclaration', 'BinaryExpression', 'NewExpression', 'Identifier'];\n  const ret = {\n    visitor: {\n      Program\n    }\n  };\n\n  for (var _i = 0; _i < methods.length; _i++) {\n    const method = methods[_i];\n\n    ret.visitor[method] = function () {\n      // eslint-disable-line\n      applyInstance(method, arguments, ret.visitor); // eslint-disable-line\n    };\n  }\n\n  return ret;\n}"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/array-expression/actual.js",
    "content": "import { Button } from 'antd';\n\nvar a = [Button];\nvar b = { 'test': [Button] };\n[Button].map(function(){});\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/array-expression/expected.js",
    "content": "\"use strict\";\n\nvar _button = _interopRequireDefault(require(\"antd/lib/button\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar a = [_button.default];\nvar b = {\n  'test': [_button.default]\n};\n[_button.default].map(function () {});\n\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/as-arguments/actual.js",
    "content": "import { Modal } from 'antd';\nconst _Modal = bind({})(Modal);\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/as-arguments/expected.js",
    "content": "\"use strict\";\n\nvar _modal = _interopRequireDefault(require(\"antd/lib/modal\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _Modal = bind({})(_modal.default);"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/as-arguments-identifier/actual.js",
    "content": "import { Modal } from 'antd';\nconst _Modal = bind()(Modal);\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/as-arguments-identifier/expected.js",
    "content": "\"use strict\";\n\nvar _modal = _interopRequireDefault(require(\"antd/lib/modal\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _Modal = bind()(_modal.default);"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/binary-expression/actual.js",
    "content": "import { Button } from 'antd';\nconst extraProps = undefined === Button ? { type: 'primary' } : {};\nconsole.log(extraProps);\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/binary-expression/expected.js",
    "content": "\"use strict\";\n\nvar _button = _interopRequireDefault(require(\"antd/lib/button\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar extraProps = undefined === _button.default ? {\n  type: 'primary'\n} : {};\nconsole.log(extraProps);"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/conditions/actual.js",
    "content": "import { Select } from 'antd';\n\nif (a === Select) {}\nif (Select) {}\n\nSelect ? 'a' : 'b';\na ? Select : 2;\n\nSelect || 'a';\na || Select;\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/conditions/expected.js",
    "content": "\"use strict\";\n\nvar _select = _interopRequireDefault(require(\"antd/lib/select\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nif (a === _select.default) {}\n\nif (_select.default) {}\n\n_select.default ? 'a' : 'b';\na ? _select.default : 2;\n_select.default || 'a';\na || _select.default;"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/custom-name/actual.js",
    "content": "import { Button } from 'plat/antd';\n\nReactDOM.render(<div component={Button} />);\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/custom-name/expected.js",
    "content": "\"use strict\";\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _button = _interopRequireDefault(require(\"antd/lib/button\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nReactDOM.render(_react.default.createElement(\"div\", {\n  component: _button.default\n}));"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/custom-style-path/actual.js",
    "content": "import React from 'react';\nimport ReactDom from 'react-dom';\nimport { Button } from 'antd';\n\nReactDOM.render(<div>\n  <Button>xxxx</Button>\n</div>, document.getElementById('react-container'));\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/custom-style-path/expected.js",
    "content": "\"use strict\";\n\nrequire(\"antd/lib/button/style/2x\");\n\nvar _button = _interopRequireDefault(require(\"antd/lib/button\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _reactDom = _interopRequireDefault(require(\"react-dom\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nReactDOM.render(_react.default.createElement(\"div\", null, _react.default.createElement(_button.default, null, \"xxxx\")), document.getElementById('react-container'));"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/custom-style-path-ignore/actual.js",
    "content": "import React from \"react\";\nimport ReactDom from \"react-dom\";\nimport { Animation, Button } from \"antd\";\n\nReactDOM.render(\n  <Animation>\n    <Button>xxxx</Button>\n  </Animation>,\n  document.getElementById(\"react-container\")\n);\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/custom-style-path-ignore/expected.js",
    "content": "\"use strict\";\n\nvar _animation = _interopRequireDefault(require(\"antd/lib/animation\"));\n\nrequire(\"antd/lib/button/style/2x\");\n\nvar _button = _interopRequireDefault(require(\"antd/lib/button\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _reactDom = _interopRequireDefault(require(\"react-dom\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nReactDOM.render(_react.default.createElement(_animation.default, null, _react.default.createElement(_button.default, null, \"xxxx\")), document.getElementById(\"react-container\"));\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/execute-direct/actual.js",
    "content": "import { message } from 'antd';\n\nmessage('xxx');\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/execute-direct/expected.js",
    "content": "\"use strict\";\n\nvar _message2 = _interopRequireDefault(require(\"antd/lib/message\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n(0, _message2.default)('xxx');"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/execute-member/actual.js",
    "content": "import { message } from 'antd';\n\nmessage.success('xxx');\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/execute-member/expected.js",
    "content": "\"use strict\";\n\nvar _message2 = _interopRequireDefault(require(\"antd/lib/message\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_message2.default.success('xxx');"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/export-import/actual.js",
    "content": "import { DatePicker } from 'antd';\nexport default DatePicker;\n\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/export-import/expected.js",
    "content": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\n\nvar _datePicker = _interopRequireDefault(require(\"antd/lib/date-picker\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = _datePicker.default;\nexports.default = _default;"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/expression-statement/actual.js",
    "content": "import {Toast} from 'antd-mobile';\nwindow.Toast = Toast;\nToast.success('test');"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/expression-statement/expected.js",
    "content": "\"use strict\";\n\nvar _antdMobile = require(\"antd-mobile\");\n\nwindow.Toast = _antdMobile.Toast;\n\n_antdMobile.Toast.success('test');"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/file-name/actual.js",
    "content": "import { Select } from 'antd-mobile-fake-2.0';\n\nif (Select) {}\n\nconsole.log(Select);\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/file-name/expected.js",
    "content": "\"use strict\";\n\nvar _index = _interopRequireDefault(require(\"antd-mobile-fake-2.0/lib/select/index.native\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nif (_index.default) {}\n\nconsole.log(_index.default);"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/import-alias/actual.js",
    "content": "import { Select as AntdSelect } from 'antd';\n\nif (AntdSelect) {\n  console.log('foo');\n}\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/import-alias/expected.js",
    "content": "\"use strict\";\n\nvar _select = _interopRequireDefault(require(\"antd/lib/select\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nif (_select.default) {\n  console.log('foo');\n}"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/import-css/actual.js",
    "content": "import { message } from 'antd';\nimport { Button } from 'antd';\n\nmessage('xxx');\nReactDOM.render(<div>\n  <Button>xxxx</Button>\n</div>);\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/import-css/expected.js",
    "content": "\"use strict\";\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nrequire(\"antd/lib/button/style\");\n\nvar _button = _interopRequireDefault(require(\"antd/lib/button\"));\n\nrequire(\"antd/lib/message/style\");\n\nvar _message2 = _interopRequireDefault(require(\"antd/lib/message\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n(0, _message2.default)('xxx');\nReactDOM.render(_react.default.createElement(\"div\", null, _react.default.createElement(_button.default, null, \"xxxx\")));"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/keep-named-import/actual.js",
    "content": "import { start, end } from 'stream';\n\nstart();\nend();\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/keep-named-import/expected.js",
    "content": "\"use strict\";\n\nvar _end2 = require(\"stream/lib/end\");\n\nvar _start2 = require(\"stream/lib/start\");\n\n(0, _start2.start)();\n(0, _end2.end)();\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/material-ui/actual.js",
    "content": "import { Toolbar } from 'material-ui';\n\nToolbar('xxx');\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/material-ui/expected.js",
    "content": "\"use strict\";\n\nvar _Toolbar2 = _interopRequireDefault(require(\"material-ui/Toolbar\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n(0, _Toolbar2.default)('xxx');"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/member-expression/actual.js",
    "content": "import antd from 'antd';\n\nReactDOM.render(<div>\n  <antd.Button type=\"primary\">Button</antd.Button>\n</div>);\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/member-expression/expected.js",
    "content": "\"use strict\";\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _button = _interopRequireDefault(require(\"antd/lib/button\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nReactDOM.render(_react.default.createElement(\"div\", null, _react.default.createElement(_button.default, {\n  type: \"primary\"\n}, \"Button\")));"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/modules-false/actual.js",
    "content": "import React from 'react';\nimport ReactDom from 'react-dom';\nimport { Button } from 'antd';\n\nReactDOM.render(<div>\n  <Button>xxxx</Button>\n</div>, document.getElementById('react-container'));"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/modules-false/expected.js",
    "content": "\"use strict\";\n\nrequire(\"antd/lib/button/style\");\n\nvar _button = _interopRequireDefault(require(\"antd/lib/button\"));\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _reactDom = _interopRequireDefault(require(\"react-dom\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nReactDOM.render(_react.default.createElement(\"div\", null, _react.default.createElement(_button.default, null, \"xxxx\")), document.getElementById('react-container'));\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/multiple-libraries/actual.js",
    "content": "import { Select } from 'antd';\nimport { Select as SelectMobile } from 'antd-mobile';\n\nif (Select) {}\nif (SelectMobile) {}\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/multiple-libraries/expected.js",
    "content": "\"use strict\";\n\nvar _select = _interopRequireDefault(require(\"antd-mobile/lib/select\"));\n\nvar _select2 = _interopRequireDefault(require(\"antd/lib/select\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nif (_select2.default) {}\n\nif (_select.default) {}"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/multiple-libraries-hilojs/actual.js",
    "content": "import { Select } from 'antd';\nimport { Abc, Class } from 'hilojs';\n\nif (Select) {}\nif (Class && Abc) {}\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/multiple-libraries-hilojs/expected.js",
    "content": "\"use strict\";\n\nvar _abc = _interopRequireDefault(require(\"hilojs/abc\"));\n\nvar _class = _interopRequireDefault(require(\"hilojs/core/class\"));\n\nvar _select = _interopRequireDefault(require(\"antd/lib/select\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nif (_select.default) {}\n\nif (_class.default && _abc.default) {}"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/multiple-words/actual.js",
    "content": "import { InputNumber } from 'antd';\n\n<InputNumber />;\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/multiple-words/expected.js",
    "content": "\"use strict\";\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _inputNumber = _interopRequireDefault(require(\"antd/lib/input-number\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_react.default.createElement(_inputNumber.default, null);"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/new-expression/actual.js",
    "content": "import { Button } from 'antd';\nnew Button();\n\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/new-expression/expected.js",
    "content": "\"use strict\";\n\nvar _button = _interopRequireDefault(require(\"antd/lib/button\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nnew _button.default();"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/object-shorthand/actual.js",
    "content": "import { message } from 'antd';\n\nmessage('xxx');\n\nfunction App() {\n  const message = 'xxx';\n  console.log({ message });\n}\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/object-shorthand/expected.js",
    "content": "\"use strict\";\n\nvar _message2 = _interopRequireDefault(require(\"antd/lib/message\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n(0, _message2.default)('xxx');\n\nfunction App() {\n  var message = 'xxx';\n  console.log({\n    message: message\n  });\n}"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/property/actual.js",
    "content": "import { Button } from 'antd';\n\nReactDOM.render(<div component={Button} />);\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/property/expected.js",
    "content": "\"use strict\";\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _button = _interopRequireDefault(require(\"antd/lib/button\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nReactDOM.render(_react.default.createElement(\"div\", {\n  component: _button.default\n}));"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/react-element/actual.js",
    "content": "import { Button } from 'antd';\n\nReactDOM.render(<div>\n  <Button>xxxx</Button>\n</div>);\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/react-element/expected.js",
    "content": "\"use strict\";\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _button = _interopRequireDefault(require(\"antd/lib/button\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nReactDOM.render(_react.default.createElement(\"div\", null, _react.default.createElement(_button.default, null, \"xxxx\")));"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/react-toolbox/actual.js",
    "content": "import { AppBar } from 'react-toolbox';\n\nAppBar('xxx');\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/react-toolbox/expected.js",
    "content": "\"use strict\";\n\nvar _app_bar = _interopRequireDefault(require(\"react-toolbox/lib/app_bar\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n(0, _app_bar.default)('xxx');"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/return/actual.js",
    "content": "import { toast } from 'antd';\n\nfunction a() {\n  return toast;\n}\n\nfunction b(toast) {\n  return toast;\n}\n\nfunction c() {\n  var toast = 'toast';\n  return toast;\n}\n\nfunction d() {\n  var toast = 'toast';\n  return function () {\n    return toast;\n  };\n}\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/return/expected.js",
    "content": "\"use strict\";\n\nvar _toast2 = _interopRequireDefault(require(\"antd/lib/toast\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction a() {\n  return _toast2.default;\n}\n\nfunction b(toast) {\n  return toast;\n}\n\nfunction c() {\n  var toast = 'toast';\n  return toast;\n}\n\nfunction d() {\n  var toast = 'toast';\n  return function () {\n    return toast;\n  };\n}\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/specifier-alias/actual.js",
    "content": "import { Button as Button1 } from 'antd';\n\nconst foo = Button1.foo\n\nReactDOM.render(<div>\n  <Button1>xxxx</Button1>\n</div>);\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/specifier-alias/expected.js",
    "content": "\"use strict\";\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _button = _interopRequireDefault(require(\"antd/lib/button\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar foo = _button.default.foo;\nReactDOM.render(_react.default.createElement(\"div\", null, _react.default.createElement(_button.default, null, \"xxxx\")));"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/use-multiple-times/actual.js",
    "content": "import a from 'a';\nimport { Button } from 'antd-mobile';\n\na(Button);\na(Button);\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/use-multiple-times/expected.js",
    "content": "\"use strict\";\n\nvar _button = _interopRequireDefault(require(\"antd-mobile/lib/button\"));\n\nvar _a = _interopRequireDefault(require(\"a\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n(0, _a.default)(_button.default);\n(0, _a.default)(_button.default);"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/variable-declarator/actual.js",
    "content": "import { Button } from 'antd';\n\nconst a = Button;\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/variable-declarator/expected.js",
    "content": "\"use strict\";\n\nvar _button = _interopRequireDefault(require(\"antd/lib/button\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar a = _button.default;"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/variable-scope/actual.js",
    "content": "import { message } from 'antd';\n\nmessage('xxx');\n\nfunction App() {\n  const message = 'xxx';\n  return <div>{message}</div>;\n}\n"
  },
  {
    "path": "packages/babel-plugin-chameleon-import/test/fixtures/variable-scope/expected.js",
    "content": "\"use strict\";\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _message2 = _interopRequireDefault(require(\"antd/lib/message\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n(0, _message2.default)('xxx');\n\nfunction App() {\n  var message = 'xxx';\n  return _react.default.createElement(\"div\", null, message);\n}"
  },
  {
    "path": "packages/chameleon-css-loader/.eslintrc",
    "content": "{\n    // 在配置文件里配置全局变量时，使用 globals 指出你要使用的全局变量。将变量设置为 true 将允许变量被重写，或 false 将不允许被重写\n    \"globals\": {\n        \"cml\": false\n    },\n    // 环境定义了预定义的全局变量。\n    \"env\": {\n        //环境定义了预定义的全局变量。更多在官网查看\n        \"browser\": true,\n        \"node\": true,\n        \"commonjs\": true,\n        \"amd\": true,\n        \"es6\": true,\n        \"mocha\": true\n    },\n    // JavaScript 语言选项\n    \"parserOptions\": {\n        // ECMAScript 版本\n        \"ecmaVersion\": 6,\n        \"sourceType\": \"module\", //设置为 \"script\" (默认) 或 \"module\"（如果你的代码是 ECMAScript 模块)。\n        //想使用的额外的语言特性:\n        \"ecmaFeatures\": {\n            // 允许在全局作用域下使用 return 语句\n            \"globalReturn\": true,\n            // impliedStric\n            \"impliedStrict\": true,\n            // 启用 JSX\n            \"jsx\": true,\n            \"modules\": true\n        }\n    },\n    //-----让eslint支持 JSX start\n    \"plugins\": [\n\n    ],\n    \"extends\": [\n        \"eslint:recommended\"\n    ],\n    //-----让eslint支持 JSX end\n\n\n    /**\n     * \"off\" 或 0 - 关闭规则\n     * \"warn\" 或 1 - 开启规则，使用警告级别的错误：warn (不会导致程序退出),\n     * \"error\" 或 2 - 开启规则，使用错误级别的错误：error (当被触发的时候，程序会退出)\n     */\n    \"rules\": {\n\n        ////////////////\n        // 可能的错误 //\n        ////////////////\n\n        // 禁止条件表达式中出现赋值操作符\n        \"no-cond-assign\": 2,\n        // 禁用 console\n        \"no-console\": 0,\n        // 禁止在条件中使用常量表达式\n        // if (false) {\n        // doSomethingUnfinished();\n        // } //cuowu\n        \"no-constant-condition\": 2,\n        // 禁止在正则表达式中使用控制字符 ：new RegExp(\"\\x1f\")\n        \"no-control-regex\": 2,\n        // 数组和对象键值对最后一个逗号， never参数：不能带末尾的逗号, always参数：必须带末尾的逗号，\n        // always-multiline：多行模式必须带逗号，单行模式不能带逗号\n        \"comma-dangle\": [1, \"never\"],\n        // 禁用 debugger\n        \"no-debugger\": 2,\n        // 禁止 function 定义中出现重名参数\n        \"no-dupe-args\": 2,\n        // 禁止对象字面量中出现重复的 key\n        \"no-dupe-keys\": 2,\n        // 禁止重复的 case 标签\n        \"no-duplicate-case\": 2,\n        // 禁止空语句块\n        \"no-empty\": 2,\n        // 禁止在正则表达式中使用空字符集 (/^abc[]/)\n        \"no-empty-character-class\": 2,\n        // 禁止对 catch 子句的参数重新赋值\n        \"no-ex-assign\": 2,\n        // 禁止不必要的布尔转换\n        \"no-extra-boolean-cast\": 2,\n        // 禁止不必要的括号 //(a * b) + c;//报错\n        \"no-extra-parens\": 0,\n        // 禁止不必要的分号\n        \"no-extra-semi\": 2,\n        // 禁止对 function 声明重新赋值\n        \"no-func-assign\": 2,\n        // 禁止在嵌套的块中出现 function 或 var 声明\n        \"no-inner-declarations\": [2, \"functions\"],\n        // 禁止 RegExp 构造函数中无效的正则表达式字符串\n        \"no-invalid-regexp\": 2,\n        // 禁止在字符串和注释之外不规则的空白\n        \"no-irregular-whitespace\": 2,\n        // 禁止在 in 表达式中出现否定的左操作数\n        \"no-negated-in-lhs\": 2,\n        // 禁止把全局对象 (Math 和 JSON) 作为函数调用 错误：var math = Math();\n        \"no-obj-calls\": 2,\n        // 禁止直接使用 Object.prototypes 的内置属性\n        \"no-prototype-builtins\": 0,\n        // 禁止正则表达式字面量中出现多个空格\n        \"no-regex-spaces\": 2,\n        // 禁用稀疏数组\n        \"no-sparse-arrays\": 2,\n        // 禁止出现令人困惑的多行表达式\n        \"no-unexpected-multiline\": 2,\n        // 禁止在return、throw、continue 和 break语句之后出现不可达代码\n        \"no-unreachable\": 2,\n        // 要求使用 isNaN() 检查 NaN\n        \"use-isnan\": 2,\n        // 强制使用有效的 JSDoc 注释\n        \"valid-jsdoc\": 0,\n        // 强制 typeof 表达式与有效的字符串进行比较\n        // typeof foo === \"undefimed\" 错误\n        \"valid-typeof\": 2,\n\n\n        //////////////\n        // 最佳实践 //\n        //////////////\n\n        // 定义对象的set存取器属性时，强制定义get\n        \"accessor-pairs\": 2,\n        // 强制数组方法的回调函数中有 return 语句\n        \"array-callback-return\": 0,\n        // 强制把变量的使用限制在其定义的作用域范围内\n        \"block-scoped-var\": 0,\n        // 限制圈复杂度，也就是类似if else能连续接多少个\n        \"complexity\": [2, 20],\n        // 要求 return 语句要么总是指定返回的值，要么不指定\n        \"consistent-return\": 0,\n        // 强制所有控制语句使用一致的括号风格\n        \"curly\": [2, \"all\"],\n        // switch 语句强制 default 分支，也可添加 // no default 注释取消此次警告\n        \"default-case\": 2,\n        // 强制object.key 中 . 的位置，参数:\n        // property，'.'号应与属性在同一行\n        // object, '.' 号应与对象名在同一行\n        \"dot-location\": [2, \"property\"],\n        // 强制使用.号取属性\n        // 参数： allowKeywords：true 使用保留字做属性名时，只能使用.方式取属性\n        // false 使用保留字做属性名时, 只能使用[]方式取属性 e.g [2, {\"allowKeywords\": false}]\n        // allowPattern: 当属性名匹配提供的正则表达式时，允许使用[]方式取值,否则只能用.号取值 e.g [2, {\"allowPattern\": \"^[a-z]+(_[a-z]+)+$\"}]\n        \"dot-notation\": [2, {\n            \"allowKeywords\": false\n        }],\n        // 使用 === 替代 == allow-null允许null和undefined==\n        \"eqeqeq\": [0, \"allow-null\"],\n        // 要求 for-in 循环中有一个 if 语句\n        \"guard-for-in\": 2,\n        // 禁用 alert、confirm 和 prompt\n        \"no-alert\": 0,\n        // 禁用 arguments.caller 或 arguments.callee\n        \"no-caller\": 2,\n        // 不允许在 case 子句中使用词法声明\n        \"no-case-declarations\": 2,\n        // 禁止除法操作符显式的出现在正则表达式开始的位置\n        \"no-div-regex\": 2,\n        // 禁止 if 语句中有 return 之后有 else\n        \"no-else-return\": 0,\n        // 禁止出现空函数.如果一个函数包含了一条注释，它将不会被认为有问题。\n        \"no-empty-function\": 2,\n        // 禁止使用空解构模式no-empty-pattern\n        \"no-empty-pattern\": 2,\n        // 禁止在没有类型检查操作符的情况下与 null 进行比较\n        \"no-eq-null\": 1,\n        // 禁用 eval()\n        \"no-eval\": 2,\n        // 禁止扩展原生类型\n        \"no-extend-native\": 2,\n        // 禁止不必要的 .bind() 调用\n        \"no-extra-bind\": 2,\n        // 禁用不必要的标签\n        \"no-extra-label:\": 0,\n        // 禁止 case 语句落空\n        \"no-fallthrough\": 2,\n        // 禁止数字字面量中使用前导和末尾小数点\n        \"no-floating-decimal\": 2,\n        // 禁止使用短符号进行类型转换(!!fOO)\n        \"no-implicit-coercion\": 0,\n        // 禁止在全局范围内使用 var 和命名的 function 声明\n        \"no-implicit-globals\": 1,\n        // 禁止使用类似 eval() 的方法\n        \"no-implied-eval\": 2,\n        // 禁止 this 关键字出现在类和类对象之外\n        \"no-invalid-this\": 0,\n        // 禁用 __iterator__ 属性\n        \"no-iterator\": 2,\n        // 禁用标签语句\n        \"no-labels\": 2,\n        // 禁用不必要的嵌套块\n        \"no-lone-blocks\": 2,\n        // 禁止在循环中出现 function 声明和表达式\n        \"no-loop-func\": 1,\n        // 禁用魔术数字(3.14什么的用常量代替)\n        \"no-magic-numbers\": [1, {\n            \"ignore\": [0, -1, 1]\n        }],\n        // 禁止使用多个空格\n        \"no-multi-spaces\": 2,\n        // 禁止使用多行字符串，在 JavaScript 中，可以在新行之前使用斜线创建多行字符串\n        \"no-multi-str\": 2,\n        // 禁止对原生对象赋值\n        \"no-native-reassign\": 2,\n        // 禁止在非赋值或条件语句中使用 new 操作符\n        \"no-new\": 2,\n        // 禁止对 Function 对象使用 new 操作符\n        \"no-new-func\": 0,\n        // 禁止对 String，Number 和 Boolean 使用 new 操作符\n        \"no-new-wrappers\": 2,\n        // 禁用八进制字面量\n        \"no-octal\": 2,\n        // 禁止在字符串中使用八进制转义序列\n        \"no-octal-escape\": 2,\n        // 不允许对 function 的参数进行重新赋值\n        \"no-param-reassign\": 0,\n        // 禁用 __proto__ 属性\n        \"no-proto\": 2,\n        // 禁止使用 var 多次声明同一变量\n        \"no-redeclare\": 2,\n        // 禁用指定的通过 require 加载的模块\n        \"no-return-assign\": 0,\n        // 禁止使用 javascript: url\n        \"no-script-url\": 0,\n        // 禁止自我赋值\n        \"no-self-assign\": 2,\n        // 禁止自身比较\n        \"no-self-compare\": 2,\n        // 禁用逗号操作符\n        \"no-sequences\": 2,\n        // 禁止抛出非异常字面量\n        \"no-throw-literal\": 2,\n        // 禁用一成不变的循环条件\n        \"no-unmodified-loop-condition\": 2,\n        // 禁止出现未使用过的表达式\n        \"no-unused-expressions\": 0,\n        // 禁用未使用过的标签\n        \"no-unused-labels\": 2,\n        // 禁止不必要的 .call() 和 .apply()\n        \"no-useless-call\": 2,\n        // 禁止不必要的字符串字面量或模板字面量的连接\n        \"no-useless-concat\": 0,\n        // 禁用不必要的转义字符\n        \"no-useless-escape\": 0,\n        // 禁用 void 操作符\n        \"no-void\": 0,\n        // 禁止在注释中使用特定的警告术语\n        \"no-warning-comments\": 0,\n        // 禁用 with 语句\n        \"no-with\": 2,\n        // 强制在parseInt()使用基数参数\n        \"radix\": 2,\n        // 要求所有的 var 声明出现在它们所在的作用域顶部\n        \"vars-on-top\": 0,\n        // 要求 IIFE 使用括号括起来\n        \"wrap-iife\": [2, \"any\"],\n        // 要求或禁止 “Yoda” 条件\n        \"yoda\": [2, \"never\"],\n        // 要求或禁止使用严格模式指令\n        \"strict\": 0,\n\n\n        //////////////\n        // 变量声明 //\n        //////////////\n\n        // 要求或禁止 var 声明中的初始化(初值)\n        \"init-declarations\": 0,\n        // 不允许 catch 子句的参数与外层作用域中的变量同名\n        \"no-catch-shadow\": 0,\n        // 禁止删除变量\n        \"no-delete-var\": 2,\n        // 不允许标签与变量同名\n        \"no-label-var\": 2,\n        // 禁用特定的全局变量\n        \"no-restricted-globals\": 0,\n        // 禁止 var 声明 与外层作用域的变量同名\n        \"no-shadow\": 0,\n        // 禁止覆盖受限制的标识符\n        \"no-shadow-restricted-names\": 2,\n        // 禁用未声明的变量，除非它们在 /*global */ 注释中被提到\n        \"no-undef\": 2,\n        // 禁止将变量初始化为 undefined\n        \"no-undef-init\": 2,\n        // 禁止将 undefined 作为标识符\n        \"no-undefined\": 0,\n        // 禁止出现未使用过的变量\n        \"no-unused-vars\": [2, {\n            \"vars\": \"all\",\n            \"args\": \"none\"\n        }],\n        // 不允许在变量定义之前使用它们\n        \"no-use-before-define\": 0,\n\n        //////////////////////////\n        // Node.js and CommonJS //\n        //////////////////////////\n\n        // require return statements after callbacks\n        \"callback-return\": 0,\n        // 要求 require() 出现在顶层模块作用域中\n        \"global-require\": 1,\n        // 要求回调函数中有容错处理\n        \"handle-callback-err\": [2, \"^(err|error)$\"],\n        // 禁止混合常规 var 声明和 require 调用\n        \"no-mixed-requires\": 0,\n        // 禁止调用 require 时使用 new 操作符\n        \"no-new-require\": 2,\n        // 禁止对 __dirname 和 __filename进行字符串连接\n        \"no-path-concat\": 0,\n        // 禁用 process.env\n        \"no-process-env\": 0,\n        // 禁用 process.exit()\n        \"no-process-exit\": 0,\n        // 禁用同步方法\n        \"no-sync\": 0,\n\n        //////////////\n        // 风格指南 //\n        //////////////\n\n        // 指定数组的元素之间要以空格隔开(, 后面)， never参数：[ 之前和 ] 之后不能带空格，always参数：[ 之前和 ] 之后必须带空格\n        \"array-bracket-spacing\": [2, \"never\"],\n        // 禁止或强制在单行代码块中使用空格(禁用)\n        \"block-spacing\": [1, \"never\"],\n        //强制使用一致的缩进 第二个参数为 \"tab\" 时，会使用tab，\n        // if while function 后面的{必须与if在同一行，java风格。\n        \"brace-style\": [2, \"1tbs\", {\n            \"allowSingleLine\": true\n        }],\n        // 双峰驼命名格式\n        \"camelcase\": 2,\n        // 控制逗号前后的空格\n        \"comma-spacing\": [2, {\n            \"before\": false,\n            \"after\": true\n        }],\n        // 控制逗号在行尾出现还是在行首出现 (默认行尾)\n        // http://eslint.org/docs/rules/comma-style\n        \"comma-style\": [2, \"last\"],\n        //\"SwitchCase\" (默认：0) 强制 switch 语句中的 case 子句的缩进水平\n        // 以方括号取对象属性时，[ 后面和 ] 前面是否需要空格, 可选参数 never, always\n        \"computed-property-spacing\": [2, \"never\"],\n        // 用于指统一在回调函数中指向this的变量名，箭头函数中的this已经可以指向外层调用者，应该没卵用了\n        // e.g [0,\"that\"] 指定只能 var that = this. that不能指向其他任何值，this也不能赋值给that以外的其他值\n        \"consistent-this\": [1, \"that\"],\n        // 强制使用命名的 function 表达式\n        \"func-names\": 0,\n        // 文件末尾强制换行\n        \"eol-last\": 2,\n        \"indent\": [2, 2, {\n            \"SwitchCase\": 1\n        }],\n        // 强制在对象字面量的属性中键和值之间使用一致的间距\n        \"key-spacing\": [2, {\n            \"beforeColon\": false,\n            \"afterColon\": true\n        }],\n        // 强制使用一致的换行风格\n        \"linebreak-style\": [1, \"unix\"],\n        // 要求在注释周围有空行 ( 要求在块级注释之前有一空行)\n        \"lines-around-comment\": [1, {\n            \"beforeBlockComment\": true\n        }],\n        // 强制一致地使用函数声明或函数表达式，方法定义风格，参数：\n        // declaration: 强制使用方法声明的方式，function f(){} e.g [2, \"declaration\"]\n        // expression：强制使用方法表达式的方式，var f = function() {} e.g [2, \"expression\"]\n        // allowArrowFunctions: declaration风格中允许箭头函数。 e.g [2, \"declaration\", { \"allowArrowFunctions\": true }]\n        \"func-style\": 0,\n        // 强制回调函数最大嵌套深度 5层\n        \"max-nested-callbacks\": [1, 5],\n        // 禁止使用指定的标识符\n        \"id-blacklist\": 0,\n        // 强制标识符的最新和最大长度\n        \"id-length\": 0,\n        // 要求标识符匹配一个指定的正则表达式\n        \"id-match\": 0,\n        // 强制在 JSX 属性中一致地使用双引号或单引号\n        \"jsx-quotes\": 0,\n        // 强制在关键字前后使用一致的空格 (前后腰需要)\n        \"keyword-spacing\": 2,\n        // 强制一行的最大长度\n        \"max-len\": [1, 200],\n        // 强制最大行数\n        \"max-lines\": 0,\n        // 强制 function 定义中最多允许的参数数量\n        \"max-params\": [1, 7],\n        // 强制 function 块最多允许的的语句数量\n        \"max-statements\": [1, 200],\n        // 强制每一行中所允许的最大语句数量\n        \"max-statements-per-line\": 0,\n        // 要求构造函数首字母大写 （要求调用 new 操作符时有首字母大小的函数，允许调用首字母大写的函数时没有 new 操作符。）\n        \"new-cap\": [2, {\n            \"newIsCap\": true,\n            \"capIsNew\": false\n        }],\n        // 要求调用无参构造函数时有圆括号\n        \"new-parens\": 2,\n        // 要求或禁止 var 声明语句后有一行空行\n        \"newline-after-var\": 0,\n        // 禁止使用 Array 构造函数\n        \"no-array-constructor\": 2,\n        // 禁用按位运算符\n        \"no-bitwise\": 0,\n        // 要求 return 语句之前有一空行\n        \"newline-before-return\": 0,\n        // 要求方法链中每个调用都有一个换行符\n        \"newline-per-chained-call\": 1,\n        // 禁用 continue 语句\n        \"no-continue\": 0,\n        // 禁止在代码行后使用内联注释\n        \"no-inline-comments\": 0,\n        // 禁止 if 作为唯一的语句出现在 else 语句中\n        \"no-lonely-if\": 0,\n        // 禁止混合使用不同的操作符\n        \"no-mixed-operators\": 0,\n        // 不允许空格和 tab 混合缩进\n        \"no-mixed-spaces-and-tabs\": 2,\n        // 不允许多个空行\n        \"no-multiple-empty-lines\": [2, {\n            \"max\": 2\n        }],\n        // 不允许否定的表达式\n        \"no-negated-condition\": 0,\n        // 不允许使用嵌套的三元表达式\n        \"no-nested-ternary\": 0,\n        // 禁止使用 Object 的构造函数\n        \"no-new-object\": 2,\n        // 禁止使用一元操作符 ++ 和 --\n        \"no-plusplus\": 0,\n        // 禁止使用特定的语法\n        \"no-restricted-syntax\": 0,\n        // 禁止 function 标识符和括号之间出现空格\n        \"no-spaced-func\": 2,\n        // 不允许使用三元操作符\n        \"no-ternary\": 0,\n        // 禁用行尾空格\n        \"no-trailing-spaces\": 2,\n        // 禁止标识符中有悬空下划线_bar\n        \"no-underscore-dangle\": 0,\n        // 禁止可以在有更简单的可替代的表达式时使用三元操作符\n        \"no-unneeded-ternary\": 2,\n        // 禁止属性前有空白\n        \"no-whitespace-before-property\": 0,\n        // 强制花括号内换行符的一致性\n        \"object-curly-newline\": 0,\n        // 强制在花括号中使用一致的空格\n        \"object-curly-spacing\": 0,\n        // 强制将对象的属性放在不同的行上\n        \"object-property-newline\": 0,\n        // 强制函数中的变量要么一起声明要么分开声明\n        \"one-var\": [2, {\n            \"initialized\": \"never\"\n        }],\n        // 要求或禁止在 var 声明周围换行\n        \"one-var-declaration-per-line\": 0,\n        // 要求或禁止在可能的情况下要求使用简化的赋值操作符\n        \"operator-assignment\": 0,\n        // 强制操作符使用一致的换行符\n        \"operator-linebreak\": [2, \"after\", {\n            \"overrides\": {\n                \"?\": \"before\",\n                \":\": \"before\"\n            }\n        }],\n        // 要求或禁止块内填充\n        \"padded-blocks\": 0,\n        // 要求对象字面量属性名称用引号括起来\n        \"quote-props\": 0,\n        // 强制使用一致的反勾号、双引号或单引号\n        // \"quotes\": [2, \"single\", \"avoid-escape\"],\n        // 要求使用 JSDoc 注释\n        \"require-jsdoc\": 0,\n        // 要求或禁止使用分号而不是 ASI（这个才是控制行尾部分号的，）\n        \"semi\": [0, \"always\"],\n        // 强制分号之前和之后使用一致的空格\n        \"semi-spacing\": 0,\n        // 要求同一个声明块中的变量按顺序排列\n        \"sort-vars\": 0,\n        // 强制在块之前使用一致的空格\n        \"space-before-blocks\": [2, \"always\"],\n        // 强制在 function的左括号之前使用一致的空格\n        \"space-before-function-paren\": [0, \"always\"],\n        // 强制在圆括号内使用一致的空格\n        \"space-in-parens\": [2, \"never\"],\n        // 要求操作符周围有空格\n        \"space-infix-ops\": 2,\n        // 强制在一元操作符前后使用一致的空格\n        \"space-unary-ops\": [2, {\n            \"words\": true,\n            \"nonwords\": false\n        }],\n        // 强制在注释中 // 或 /* 使用一致的空格\n        \"spaced-comment\": [2, \"always\", {\n            \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n        }],\n        // 要求或禁止 Unicode BOM\n        \"unicode-bom\": 0,\n        // 要求正则表达式被括号括起来\n        \"wrap-regex\": 0,\n\n        //////////////\n        // ES6.相关 //\n        //////////////\n\n        // 要求箭头函数体使用大括号\n        \"arrow-body-style\": 2,\n        // 要求箭头函数的参数使用圆括号\n        \"arrow-parens\": 0,\n        \"arrow-spacing\": [2, {\n            \"before\": true,\n            \"after\": true\n        }],\n        // 强制在子类构造函数中用super()调用父类构造函数，TypeScrip的编译器也会提示\n        \"constructor-super\": 0,\n        // 强制 generator 函数中 * 号周围使用一致的空格\n        \"generator-star-spacing\": [2, {\n            \"before\": true,\n            \"after\": true\n        }],\n        // 禁止修改类声明的变量\n        \"no-class-assign\": 2,\n        // 不允许箭头功能，在那里他们可以混淆的比较\n        \"no-confusing-arrow\": 0,\n        // 禁止修改 const 声明的变量\n        \"no-const-assign\": 2,\n        // 禁止类成员中出现重复的名称\n        \"no-dupe-class-members\": 2,\n        // 不允许复制模块的进口\n        \"no-duplicate-imports\": 0,\n        // 禁止 Symbol 的构造函数\n        \"no-new-symbol\": 2,\n        // 允许指定模块加载时的进口\n        \"no-restricted-imports\": 0,\n        // 禁止在构造函数中，在调用 super() 之前使用 this 或 super\n        \"no-this-before-super\": 2,\n        // 禁止不必要的计算性能键对象的文字\n        \"no-useless-computed-key\": 0,\n        // 要求使用 let 或 const 而不是 var\n        \"no-var\": 0,\n        // 要求或禁止对象字面量中方法和属性使用简写语法\n        \"object-shorthand\": 0,\n        // 要求使用箭头函数作为回调\n        \"prefer-arrow-callback\": 0,\n        // 要求使用 const 声明那些声明后不再被修改的变量\n        \"prefer-const\": 0,\n        // 要求在合适的地方使用 Reflect 方法\n        \"prefer-reflect\": 0,\n        // 要求使用扩展运算符而非 .apply()\n        \"prefer-spread\": 0,\n        // 要求使用模板字面量而非字符串连接\n        \"prefer-template\": 0,\n        // Suggest using the rest parameters instead of arguments\n        \"prefer-rest-params\": 0,\n        // 要求generator 函数内有 yield\n        \"require-yield\": 0,\n        // enforce spacing between rest and spread operators and their expressions\n        \"rest-spread-spacing\": 0,\n        // 强制模块内的 import 排序\n        \"sort-imports\": 0,\n        // 要求或禁止模板字符串中的嵌入表达式周围空格的使用\n        \"template-curly-spacing\": 1,\n        // 强制在 yield* 表达式中 * 周围使用空格\n        \"yield-star-spacing\": 2\n    }\n}\n"
  },
  {
    "path": "packages/chameleon-css-loader/.gitignore",
    "content": ""
  },
  {
    "path": "packages/chameleon-css-loader/handler/lines.js",
    "content": "// 静态编译和运行时 web和小程序端对lines属性特殊处理\n\nmodule.exports = function(linesNumber) {\n  // 作为一个属性注意最后不能添加分号\n  return `display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: ${linesNumber}; overflow: hidden`\n}\n"
  },
  {
    "path": "packages/chameleon-css-loader/index.js",
    "content": "const loaderUtils = require('loader-utils')\nconst webParse = require('./parser/web');\nconst miniParse = require('./parser/miniapp');\nconst weexParse = require('./parser/weex');\nconst mediaParse = require('./parser/media');\n\nmodule.exports = function(source, options) {\n  options = options || loaderUtils.getOptions(this);\n  options.filePath = this.resourcePath;\n  // 处理差异化的media代码块功能\n  if (options.media) {\n    return mediaParse(source, options.cmlType);\n  }\n  if (source) {\n    let result;\n    switch (options.platform) {\n      case 'web': result = webParse(source, options); break;\n      case 'miniapp': result = miniParse(source, options); break;\n      case 'weex': result = weexParse(source, options); break;\n      default: break;\n    }\n    return result;\n  }\n  return source;\n}\n\n\n"
  },
  {
    "path": "packages/chameleon-css-loader/package.json",
    "content": "{\n  \"name\": \"chameleon-css-loader\",\n  \"version\": \"1.0.8\",\n  \"description\": \"chameleon样式处理\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"mocha --recursive --reporter spec\",\n    \"cover\": \"istanbul cover --report lcov node_modules/mocha/bin/_mocha -- -R spec --recursive\",\n    \"eslint\": \"eslint ./proxy ./transform ./parser utils.js index.js\",\n    \"eslint:fix\": \"eslint utils.js --ext .js parser --ext .js proxy --ext .js transform --fix\"\n  },\n  \"keywords\": [\n    \"css\"\n  ],\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"dependencies\": {\n    \"autoprefixer\": \"^9.3.1\",\n    \"hash-sum\": \"^1.0.2\",\n    \"loader-utils\": \"^1.1.0\",\n    \"postcss\": \"^7.0.6\",\n    \"postcss-plugin-px2rem\": \"^0.7.0\",\n    \"rework\": \"^1.0.1\"\n  },\n  \"devDependencies\": {\n    \"chai\": \"^4.2.0\",\n    \"chameleon-tool-utils\": \"1.0.8\",\n    \"coveralls\": \"^2.11.9\",\n    \"eslint\": \"^5.9.0\",\n    \"gulp\": \"^3.9.1\",\n    \"gulp-uglify-es\": \"^1.0.4\",\n    \"istanbul\": \"^0.4.5\",\n    \"mocha\": \"^5.2.0\"\n  },\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"gitHead\": \"5ddcde4330774710f7646559446e008f7785ce00\"\n}"
  },
  {
    "path": "packages/chameleon-css-loader/parser/media.js",
    "content": "\n\nmodule.exports = function(source = '', targetType) {\n  let reg = /@media\\s*cml-type\\s*\\(([\\w\\s,]*)\\)\\s*/g;\n  if (!reg.test(source)) {\n    return source;\n  }\n  reg.lastIndex = 0;\n  while (true) { // eslint-disable-line\n    let result = reg.exec(source);\n    if (!result) {break;}\n    let cmlTypes = result[1] || '';\n    cmlTypes = cmlTypes.split(',').map(item => item.trim());\n    let isSave = ~cmlTypes.indexOf(targetType);\n\n    let startIndex = result.index; // @media的开始\n\n    let currentIndex = source.indexOf('{', startIndex); // 从第一个@media开始\n    let signStartIndex = currentIndex; // 第一个{的位置\n    if (currentIndex == -1) {\n      throw new Error(\"@media cml-type format err\");\n    }\n\n    let signStack = [];\n    signStack.push(0);\n    while (signStack.length > 0) {\n      let index1 = source.indexOf('{', currentIndex + 1);\n      let index2 = source.indexOf('}', currentIndex + 1);\n      let index;\n      // 都有的话 index为最前面的\n      if (index1 !== -1 && index2 !== -1) {\n        index = Math.min(index1, index2);\n      } else {\n        index = Math.max(index1, index2);\n      }\n      if (index === -1) {\n        throw new Error(\"@media cml-type format err\");\n      }\n      let sign = source[index];\n      currentIndex = index;\n      if (sign === '{') {\n        signStack.push(signStack.length);\n      } else if (sign === '}') {\n        signStack.pop();\n      }\n    }\n\n    // 操作source\n    if (isSave) { // 保存的@media\n      var sourceArray = Array.from(source);\n      sourceArray.splice(startIndex, currentIndex - startIndex + 1, source.slice(signStartIndex + 1, currentIndex));\n      source = sourceArray.join('');\n    } else { // 删除的\n      source = source.slice(0, startIndex) + source.slice(currentIndex + 1);\n    }\n    reg.lastIndex = 0;\n  }\n\n  return source;\n\n}\n"
  },
  {
    "path": "packages/chameleon-css-loader/parser/miniapp.js",
    "content": "\nconst cpx = require('../postcss/cpx.js');\nconst weexPlus = require('../postcss/weex-plus');\nconst addAlipayClassPlugin = require('../postcss/add-alipay-class')\nconst postcss = require('postcss');\nconst cmlUtils = require('chameleon-tool-utils');\nmodule.exports = function(source, options = {}) {\n  options.cpxType = 'rpx';\n  let {cmlType, filePath} = options;\n  let globalCssPath = [`chameleon-runtime/src/platform/${cmlType}/style/index.css`, `chameleon-runtime/src/platform/${cmlType}/style/page.css`];\n  let globalStyleConfig = cml.config.get().globalStyleConfig;\n  if (globalStyleConfig && globalStyleConfig.globalCssPath && cmlUtils.isFile(globalStyleConfig.globalCssPath)) {\n    globalCssPath.push(globalStyleConfig.globalCssPath)\n  }\n  let isGlobalCss = globalCssPath.some((item) => filePath.includes(item))\n  if (cmlType === 'alipay' && !isGlobalCss) { // 对于全局样式不能经过 addAlipayClassPlugin 这个插件进行样式唯一性的处理；比如这样的 .cml-57b5135a.scroller-wrap\n    return postcss([cpx(options), weexPlus(), addAlipayClassPlugin(options)]).process(source).css;\n  } else {\n    return postcss([cpx(options), weexPlus()]).process(source).css;\n\n  }\n\n}\n"
  },
  {
    "path": "packages/chameleon-css-loader/parser/web.js",
    "content": "\nconst cpx = require('../postcss/cpx.js');\nconst postcss = require('postcss');\nconst px2rem = require('postcss-plugin-px2rem');\nconst weexPlus = require('../postcss/weex-plus');\nmodule.exports = function(source, options = {}) {\n  if (options.rem === true) {\n    return postcss([px2rem(options.remOptions), weexPlus()]).process(source).css;\n  } else {\n    options.cpxType = 'scale';\n    return postcss([cpx(options), weexPlus()]).process(source).css;\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-css-loader/parser/weex.js",
    "content": "\nconst weex = require('../postcss/weex.js');\nmodule.exports = function(source, options = {}) {\n  return weex(source, options);\n}\n"
  },
  {
    "path": "packages/chameleon-css-loader/postcss/add-alipay-class.js",
    "content": "const postcss = require('postcss');\nconst hash = require('hash-sum');\n\nmodule.exports = postcss.plugin('add-alipay-class-name', function(options) {\n  let { filePath} = options;\n  let randomClassName = hash(filePath);\n  options.alipayClassName = `.cml-${randomClassName}`;\n  return function(css, result) {\n    function getSelector (value) {\n      let temp = '';\n      for (let i = 0, len = value.length; i < len; i++) {\n        if (value[i] === '.') {\n          temp += `${options.alipayClassName}.`\n        } else {\n          temp += value[i];\n        }\n      }\n      return temp;\n    }\n    css.walkRules(rule => {\n      if (rule.selector.indexOf('.') === 0) {\n        let newSelector = getSelector(rule.selector);\n        rule.selector = newSelector;\n      }\n    });\n  };\n})\n"
  },
  {
    "path": "packages/chameleon-css-loader/postcss/cpx.js",
    "content": "const postcss = require('postcss');\n// 非rem的cpx处理，rem的利用postcss-plugin-px2rem插件即可实现\n\nmodule.exports = postcss.plugin('postcss-plugin-cpx', function (options) {\n  // parseType 参数决定cpx的转换\n  let { unitPrecision = 5, scale = 1, cpxType = 'scale'} = options;\n  const pxRegex = /(\\d*\\.?\\d+)cpx/gi;\n\n  const pxReplace = function(m, $1, $2) {\n    switch (cpxType) {\n      case 'scale':\n        return toFixed(parseFloat($1, 10) * scale, unitPrecision) + 'px';\n      case 'px':\n        return $1 + \"px\";\n      case 'rpx':\n        return $1 + \"rpx\";\n      default:\n        return m;\n    }\n\n  }\n\n  function toFixed(number, precision) {\n    var multiplier = Math.pow(10, precision + 1);\n    var wholeNumber = Math.floor(number * multiplier);\n    return Math.round(wholeNumber / 10) * 10 / multiplier;\n  }\n\n  return function (css) {\n    css.walkDecls(function (decl, i) {\n      if (~decl.value.indexOf('cpx')) {\n        let value = decl.value.replace(pxRegex, pxReplace);\n        decl.value = value;\n      }\n    });\n\n    css.walkAtRules('media', function (rule) {\n      if (!rule.params.indexOf('cpx')) {\n        rule.params = rule.params.replace(pxRegex, pxReplace);\n      }\n    });\n  };\n});\n"
  },
  {
    "path": "packages/chameleon-css-loader/postcss/weex-plus.js",
    "content": "// 为web和小程序提供编译weex为标准的特殊样式\n\nconst postcss = require('postcss');\n\nmodule.exports = postcss.plugin('postcss-weex-plus', function(options) {\n  return (root, result) => {\n    root.walkDecls((decl, i) => {\n      if (decl.prop === 'lines') {\n        const decllist = [\n          postcss.decl({prop: 'overflow', value: 'hidden'}),\n          postcss.decl({prop: 'text-overflow', value: 'ellipsis'}),\n          postcss.decl({prop: 'display', value: '-webkit-box'}),\n          postcss.decl({prop: '-webkit-line-clamp', value: decl.value}),\n          postcss.decl({prop: '-webkit-box-orient', value: 'vertical'})\n        ];\n        decl.parent.append(...decllist)\n      }\n      // decl.parent.removeChild(decl);\n    })\n  }\n})\n"
  },
  {
    "path": "packages/chameleon-css-loader/postcss/weex.js",
    "content": "const rework = require('rework');\nconst weexCssSupport = require('../transform/weex');\n\n/**\n * 处理css源码\n *\n * @param  {string} source 源码\n * @return {string}        处理后的数据\n */\nmodule.exports = source => {\n  let result = rework(source).use(function (ast) {\n    ast.rules.forEach(rule => {\n      if (!rule.declarations) {\n        return;\n      }\n      let allDeclarations = [];\n      rule.declarations.forEach(declaration => {\n        delete declaration.position;\n        // 注释部分不做处理\n        if (declaration.type !== 'comment') {\n          let declarations = weexCssSupport.convert(declaration);\n          allDeclarations = allDeclarations.concat(declarations);\n        }\n      });\n      rule.declarations = allDeclarations;\n    });\n  })\n    .toString();\n  return result;\n};\n"
  },
  {
    "path": "packages/chameleon-css-loader/proxy/proxyMiniapp.js",
    "content": "const utils = require('../utils');\nconst lines = require('../handler/lines');\n// 运行时的cpx2rpx不能使用postcss处理，因为$cmlStyle方法用到了该方法，在运行时使用postcss 会出现Cannot find module \"fs\"的错误\nmodule.exports = function(content) {\n  content = utils.disappearCssComment(content);\n  return parse(content);\n  function parse (style) {\n    return style\n      .split(';')\n      .filter(declaration => !!declaration.trim())\n      .map(declaration => {\n        let {key, value} = utils.getStyleKeyValue(declaration);\n        return {\n          property: key,\n          value\n        };\n      })\n      .map(declaration => {\n        if (declaration.property === 'lines') {\n          return lines(declaration.value);\n        }\n        declaration.value = handle(declaration.value);\n        return declaration.property + ':' + declaration.value;\n      })\n      .join(';')\n  }\n\n  function handle(content) {\n    if (content && content.replace) {\n      content = content.replace(/(\\d*\\.?\\d+)cpx/ig, function (m, $1) {\n        return $1 + 'rpx'\n      })\n    }\n    return content\n  }\n\n}\n"
  },
  {
    "path": "packages/chameleon-css-loader/proxy/proxyWeb.js",
    "content": "/** 提供编译时样式处理的方法 */\n// 运行时不能使用postcss 体积过大\nconst lines = require('../handler/lines');\nconst utils = require('../utils');\n\nmodule.exports = function(content, options) {\n  if (typeof options === 'string') {\n    options = JSON.parse(utils.singlequot2doublequot(options))\n  }\n  if (typeof content !== 'string') {\n    throw new Error(`expected the value of style is string but get ${typeof content}`);\n  }\n  content = utils.disappearCssComment(content);\n  content = utils.uniqueStyle(content);\n  return parse(content);\n  function parse (style) {\n    return style\n      .split(';')\n      .filter(declaration => !!declaration.trim())\n      .map(declaration => {\n        let {key, value} = utils.getStyleKeyValue(declaration);\n        return {\n          property: key,\n          value\n        };\n      })\n      .map(declaration => {\n        if (declaration.property === 'lines') {\n          return lines(declaration.value);\n        }\n        declaration.value = handle(declaration.value, options);\n        return declaration.property + ':' + declaration.value;\n      })\n      .join(';')\n  }\n\n  function handle(content, options) {\n    const pxRegex = /(\\d*\\.?\\d+)cpx/gi;\n    let unitPrecision = 5;\n    function toFixed(number, precision) {\n      var multiplier = Math.pow(10, precision + 1);\n      var wholeNumber = Math.floor(number * multiplier);\n      return Math.round(wholeNumber / 10) * 10 / multiplier;\n    }\n    if (options.rem === true) {\n      let base = options.remOptions.rootValue.cpx;\n      return content.replace(pxRegex, function(m, $1) {\n        return toFixed(parseFloat($1, 10) / base, unitPrecision) + 'rem';\n      })\n\n    } else {\n      let scale = options.scale;\n      return content.replace(pxRegex, function(m, $1) {\n        return toFixed(parseFloat($1, 10) * scale, unitPrecision) + 'px';\n      })\n\n    }\n  }\n}\n\n\n"
  },
  {
    "path": "packages/chameleon-css-loader/test/parser-test/media.test.js",
    "content": "let content = `\n@media cml-type(wx) {\n  body {\n    color: red;\n  }\n}\n\n@media cml-type(weex) {\n  body {\n    color: blue;\n  }\n}\n\n@media cml-type(web) {\n  body {\n    color: green;\n  }\n}\n\n@media cml-type(web,wx) {\n  body {\n    color: orange;\n  }\n}\n\n.border-scale(@color, @border-radius: 2px,\n  @border-width: 1px 1px 1px 1px) {\n&:after {\ncontent: \" \";\nposition: absolute;\ntop: 0;\nleft: 0;\nwidth: 200%;\nheight: 200%;\nborder: 1px solid @color;\nborder-width: @border-width;\nborder-radius: 2 * @border-radius;\ntransform-origin: 0% 0%;\n-webkit-transform-origin: 0% 0%;\n-webkit-transform: scale(0.5, 0.5);\ntransform: scale(0.5, 0.5);\npointer-events: none;\n-webkit-box-sizing: border-box;\nbox-sizing: border-box;\n}\n}\n`\nconst expect = require('chai').expect;\nlet mediaParse = require('../../parser/media.js');\n\n\ndescribe('parse/media.js', function() {\n  it('cmltype wx', function() {\n    let result = mediaParse(content, 'wx');\n    console.log(result)\n    expect(/red/.test(result)).to.be.ok;\n    expect(/blue/.test(result)).to.equals(false);\n  })\n})\n\n\n"
  },
  {
    "path": "packages/chameleon-css-loader/test/parser-test/miniapp.test.js",
    "content": "const parseCss = require('../../parser/miniapp.js');\nconst expect = require('chai').expect;\n\nlet source = `body {width:100cpx;font-size:26px;/* height:200px; */}`;\nlet alipayCSS = `.cls1{color:red} .cls2{width:100cpx;height:200cpx;}  .cls3:{font-size:30cpx;}`\ndescribe('parse/miniapp', function() {\n  it('parse cssstyle px to rpx but leave comment in style alone', function() {\n    let result = parseCss(source,{\n      cmlType:'alipay',\n      filePath:\"chameleon-runtime/src/platform/alipay/style/index.css\"\n    });\n    expect(/100rpx/.test(result)).to.be.ok;\n  })\n  it('parse cssstyle px to rpx but leave comment in style alone', function() {\n    let result = parseCss(alipayCSS,{\n      cmlType:'alipay',\n      filePath:\"/src/page/index.cml\"\n    });\n    expect(/100rpx/.test(result)).to.be.ok;\n  })\n  it('parse cssstyle px to rpx but leave comment in style alone', function() {\n    let result = parseCss(source,{\n      cmlType:'wx',\n      filePath:\"chameleon-runtime/src/platform/alipay/style/index.css\"\n    });\n    expect(/100rpx/.test(result)).to.be.ok;\n  })\n})\n"
  },
  {
    "path": "packages/chameleon-css-loader/test/parser-test/web.test.js",
    "content": "const parseCss = require('../../parser/web.js');\nconst expect = require('chai').expect;\n\nlet source = `body {width:75cpx; height: 1px}`;\nlet source2 = `width:75cpx; height: 1px;`;\n\n\ndescribe('parse/web', function() {\n  it('web-cssStyle:if options.rem to be truthy ,parse px to rem,else multiply the px value by options.scale', function() {\n    let options1 = {\n      rem: true,\n      scale: 0.5,\n      remOptions: {\n        // base on 750px standard.\n        rootValue: {cpx: 75}\n\n      }\n    }\n    let options2 = {\n      rem: false,\n      scale: 0.5,\n      remOptions: {\n        // base on 750px standard.\n        rootValue: {cpx: 75}\n      }\n    }\n    let result1 = parseCss(source, options1);\n    let result2 = parseCss(source, options2);\n    expect(result1).to.equal('body {width:1rem; height: 1px}');\n    expect(result2).to.equal('body {width:37.5px; height: 1px}')\n\n    let result3 = parseCss(source2, options1);\n    expect(result3).to.equal('width:1rem; height: 1px;');\n\n    let result4 = parseCss(source2, options2);\n    expect(result4).to.equal('width:37.5px; height: 1px;')\n\n\n  })\n})\n\n\n"
  },
  {
    "path": "packages/chameleon-css-loader/test/parser-test/weex.test.js",
    "content": "const parseCss = require('../../parser/weex.js');\nconst expect = require('chai').expect;\n\nlet source = `body {width:75cpx;border:1cpx solid red;}`;\n\n\ndescribe('parse/weex', function() {\n  it('if options.rem to be truthy ,parse px to rem,else multiply the px value by options.scale', function() {\n\n    let result = parseCss(source);// body {width:1rem;}\n    console.log(result);\n    expect(/border\\-style/.test(result)).to.be.ok;\n    expect(/border\\-width/.test(result)).to.be.ok;\n    expect(/border\\-color/.test(result)).to.be.ok;\n    expect(/75px/.test(result)).to.be.ok;\n  })\n\n})\n\ndescribe('parse/weex', function() {\n  let css = `\n  .a {\n    border: solid 1px red;\n  }\n  .b {\n    border: dotted 0 rgb(255,255, 255);\n  }\n  .c {\n    border-left: solid 1px #ccc;\n  }\n  \n`;\n\n  it('border', function() {\n\n    let result = parseCss(css);// body {width:1rem;}\n    console.log(result);\n    expect(result).to.equal(`.a {\\n  border-style: solid;\\n  border-width: 1px;\\n  border-color: #ff0000;\\n}\\n\\n.b {\\n  border-style: dotted;\\n  border-width: 0;\\n  border-color: rgb(255,255,255);\\n}\\n\\n.c {\\n  border-left-style: solid;\\n  border-left-width: 1px;\\n  border-left-color: #ccc;\\n}`);\n  })\n\n})\n\n\ndescribe('parse/weex', function() {\n  let css = `\n  .a {\n    margin-left: 10px;\n  }\n  .b {\n    margin: 10px;\n  }\n  .c {\n    margin: 10px 20px;\n  }\n  .d {\n    margin: 10px 20px 10px;\n  }\n  .e {\n    margin: 10px 20px 5px 15px;\n  }\n  .f {\n    border-style:solid;\n    border-width:10cpx;\n    border-color:red;\n    flex-flow:row;\n  }\n`;\n\n  it('margin', function() {\n\n    let result = parseCss(css);// body {width:1rem;}\n    expect(result).to.equal('.a {\\n  margin-left: 10px;\\n}\\n\\n.b {\\n  margin-top: 10px;\\n  margin-right: 10px;\\n  margin-bottom: 10px;\\n  margin-left: 10px;\\n}\\n\\n.c {\\n  margin-top: 10px;\\n  margin-right: 20px;\\n  margin-bottom: 10px;\\n  margin-left: 20px;\\n}\\n\\n.d {\\n  margin-top: 10px;\\n  margin-right: 20px;\\n  margin-bottom: 10px;\\n  margin-left: 20px;\\n}\\n\\n.e {\\n  margin-top: 10px;\\n  margin-right: 20px;\\n  margin-bottom: 5px;\\n  margin-left: 15px;\\n}\\n\\n.f {\\n  border-top-style: solid;\\n  border-right-style: solid;\\n  border-bottom-style: solid;\\n  border-left-style: solid;\\n  border-top-width: 10px;\\n  border-right-width: 10px;\\n  border-bottom-width: 10px;\\n  border-left-width: 10px;\\n  border-top-color: red;\\n  border-right-color: red;\\n  border-bottom-color: red;\\n  border-left-color: red;\\n  flex-direction: row;\\n}');\n  })\n\n})\n\n\ndescribe('parse/weex', function() {\n  let css = `\n    .a {\n      padding-left: 10px;\n    }\n    .b {\n      padding: 10px;\n    }\n  `;\n  it('padding', function() {\n    let result = parseCss(css);// body {width:1rem;}\n    console.log(result);\n    expect(result).to.equal(`.a {\\n  padding-left: 10px;\\n}\\n\\n.b {\\n  padding-top: 10px;\\n  padding-right: 10px;\\n  padding-bottom: 10px;\\n  padding-left: 10px;\\n}`);\n  })\n\n})\n\n\ndescribe('parse/weex', function() {\n  let css = `\n  .a {\n    background: #ccc\n                  url(img.png)\n                  no-repeat\n                  scroll\n                  center center / 50%\n                  content-box border-box;\n\n  }\n  .b {\n    background: url(img.png) #ccc;\n  }\n`;\n\n  it('background', function() {\n    let result = parseCss(css);// body {width:1rem;}\n    console.log(result);\n    expect(result).to.equal(`.a {\\n  background-color: #ccc;\\n  background-position: center center;\\n  background-size: 50%;\\n  background-repeat: no-repeat;\\n  background-origin: content-box;\\n  background-clip: border-box;\\n  background-attachment: scroll;\\n  background-image: url(img.png);\\n}\\n\\n.b {\\n  background-color: #ccc;\\n  background-image: url(img.png);\\n}`);\n  })\n\n})\n"
  },
  {
    "path": "packages/chameleon-css-loader/test/postcss-test/weex-plus.test.js",
    "content": "var postcss = require('postcss');\nvar weexPlus = require('../../postcss/weex-plus');\nvar content = `\n.class1 {\n  lines: 1;\n}\n`\nconst expect = require('chai').expect;\n\ndescribe('postcss/weex-plus', function() {\n  it('convert lines', function() {\n\n    let ret = postcss(weexPlus()).process(content).css;\n    console.log(ret)\n    expect(ret).to.equal(`\\n.class1 {\\n  lines: 1;\\n  overflow: hidden;\\n  text-overflow: ellipsis;\\n  display: -webkit-box;\\n  -webkit-line-clamp: 1;\\n  -webkit-box-orient: vertical;\\n}\\n`);\n  })\n})\n"
  },
  {
    "path": "packages/chameleon-css-loader/test/proxy-test/proxyMiniapp.test.js",
    "content": "const parseCss = require('../../proxy/proxyMiniapp.js');\nconst expect = require('chai').expect;\n\nlet source = `width:75cpx;font-size:26px;/* height:200px; */`;\ndescribe('proxy/miniapp', function() {\n  it('parse miniapp cssvalue cpx to rpx', function() {\n    let result = parseCss(source);\n    expect(/75rpx/.test(result)).to.be.ok;\n  })\n\n  it('lines', function() {\n    let result = parseCss('lines:1;');\n    expect(result).to.equal('display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden');\n  })\n})\n\n\n"
  },
  {
    "path": "packages/chameleon-css-loader/test/proxy-test/proxyWeb.test.js",
    "content": "const parseCss = require('../../proxy/proxyWeb.js');\nconst expect = require('chai').expect;\n\nlet source = `width:75cpx;font-size:26px;/* height:200px; */`;\n\n\ndescribe('parse/web', function() {\n  it('web-cssvalue : if options.rem to be truthy ,parse cpx to rem,else multiply the cpx value by options.scale', function() {\n    let options1 = {\n      rem: true,\n      scale: 0.5,\n      remOptions: {\n        // base on 750px standard.\n        rootValue: {cpx: 75},\n        // to leave 1px alone.\n        minPixelValue: 1.01\n      }\n    }\n    let options2 = {\n      rem: false,\n      scale: 0.5,\n      remOptions: {\n        // base on 750px standard.\n        rootValue: {cpx: 75},\n        // to leave 1px alone.\n        minPixelValue: 1.01\n      }\n    }\n    let result1 = parseCss(source, options1);// body {width:1rem;}\n    let result2 = parseCss(source, options2);// body {width:37.5px;}\n    expect(/1rem/.test(result1)).to.be.ok;\n    expect(/37.5px/.test(result2)).to.be.ok;\n  })\n\n\n  it('lines', function() {\n    let result = parseCss('lines:1;');\n    expect(result).to.equal('display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden');\n  })\n})\n\n\n"
  },
  {
    "path": "packages/chameleon-css-loader/test/transform/weex.test.js",
    "content": "const parseCss = require('../../transform/weex.js');\nconst expect = require('chai').expect;\nlet source = `width:75cpx;border:1cpx solid red;`;\n\n\ndescribe('parse/weex', function() {\n  it('if options.rem to be truthy ,parse px to rem,else multiply the px value by options.scale', function() {\n    let result = parseCss.parse(source);// body {width:1rem;}\n    console.log(result);\n    expect(/75px/.test(result)).to.be.ok;\n    expect(/1px/.test(result)).to.be.ok;\n  })\n})\n"
  },
  {
    "path": "packages/chameleon-css-loader/test/utils.test.js",
    "content": "\n\nconst utils = require('../utils.js');\nconst expect = require('chai').expect;\n\n\ndescribe('utils', function() {\n  it('transform singlequot to doublequot', function() {\n    expect(utils.singlequot2doublequot(`'`)).to.be.equal(`\"`);\n  });\n  it('unique cssStyleValue ', function() {\n    expect(utils.uniqueStyle(`width:300px;width:300px`)).to.be.equal(`width:300px`)\n  });\n  it('disappearCssComment', function() {\n    expect(utils.disappearCssComment(`/*width:300px;*/`)).to.be.empty;\n  })\n})\n\n\n"
  },
  {
    "path": "packages/chameleon-css-loader/transform/color.js",
    "content": "const COLOR_MAP = {\n  aliceblue: '#f0f8ff',\n  antiquewhite: '#faebd7',\n  aqua: '#00ffff',\n  aquamarine: '#7fffd4',\n  azure: '#f0ffff',\n  beige: '#f5f5dc',\n  bisque: '#ffe4c4',\n  black: '#000000',\n  blanchedalmond: '#ffebcd',\n  blue: '#0000ff',\n  blueviolet: '#8a2be2',\n  brown: '#a52a2a',\n  burlywood: '#deb887',\n  cadetblue: '#5f9ea0',\n  chartreuse: '#7fff00',\n  chocolate: '#d2691e',\n  coral: '#ff7f50',\n  cornflowerblue: '#6495ed',\n  cornsilk: '#fff8dc',\n  crimson: '#dc143c',\n  cyan: '#00ffff',\n  darkblue: '#00008b',\n  darkcyan: '#008b8b',\n  darkgoldenrod: '#b8860b',\n  darkgray: '#a9a9a9',\n  darkgrey: '#a9a9a9',\n  darkgreen: '#006400',\n  darkkhaki: '#bdb76b',\n  darkmagenta: '#8b008b',\n  darkolivegreen: '#556b2f',\n  darkorange: '#ff8c00',\n  darkorchid: '#9932cc',\n  darkred: '#8b0000',\n  darksalmon: '#e9967a',\n  darkseagreen: '#8fbc8f',\n  darkslateblue: '#483d8b',\n  darkslategray: '#2f4f4f',\n  darkslategrey: '#2f4f4f',\n  darkturquoise: '#00ced1',\n  darkviolet: '#9400d3',\n  deeppink: '#ff1493',\n  deepskyblue: '#00bfff',\n  dimgray: '#696969',\n  dimgrey: '#696969',\n  dodgerblue: '#1e90ff',\n  firebrick: '#b22222',\n  floralwhite: '#fffaf0',\n  forestgreen: '#228b22',\n  fuchsia: '#ff00ff',\n  gainsboro: '#dcdcdc',\n  ghostwhite: '#f8f8ff',\n  gold: '#ffd700',\n  goldenrod: '#daa520',\n  gray: '#808080',\n  grey: '#808080',\n  green: '#008000',\n  greenyellow: '#adff2f',\n  honeydew: '#f0fff0',\n  hotpink: '#ff69b4',\n  indianred: '#cd5c5c',\n  indigo: '#4b0082',\n  ivory: '#fffff0',\n  khaki: '#f0e68c',\n  lavender: '#e6e6fa',\n  lavenderblush: '#fff0f5',\n  lawngreen: '#7cfc00',\n  lemonchiffon: '#fffacd',\n  lightblue: '#add8e6',\n  lightcoral: '#f08080',\n  lightcyan: '#e0ffff',\n  lightgoldenrodyellow: '#fafad2',\n  lightgray: '#d3d3d3',\n  lightgrey: '#d3d3d3',\n  lightgreen: '#90ee90',\n  lightpink: '#ffb6c1',\n  lightsalmon: '#ffa07a',\n  lightseagreen: '#20b2aa',\n  lightskyblue: '#87cefa',\n  lightslateblue: '#8470ff',\n  lightslategray: '#778899',\n  lightslategrey: '#778899',\n  lightsteelblue: '#b0c4de',\n  lightyellow: '#ffffe0',\n  lime: '#00ff00',\n  limegreen: '#32cd32',\n  linen: '#faf0e6',\n  magenta: '#ff00ff',\n  maroon: '#800000',\n  mediumaquamarine: '#66cdaa',\n  mediumblue: '#0000cd',\n  mediumorchid: '#ba55d3',\n  mediumpurple: '#9370db',\n  mediumseagreen: '#3cb371',\n  mediumslateblue: '#7b68ee',\n  mediumspringgreen: '#00fa9a',\n  mediumturquoise: '#48d1cc',\n  mediumvioletred: '#c71585',\n  midnightblue: '#191970',\n  mintcream: '#f5fffa',\n  mistyrose: '#ffe4e1',\n  moccasin: '#ffe4b5',\n  navajowhite: '#ffdead',\n  navy: '#000080',\n  oldlace: '#fdf5e6',\n  olive: '#808000',\n  olivedrab: '#6b8e23',\n  orange: '#ffa500',\n  orangered: '#ff4500',\n  orchid: '#da70d6',\n  palegoldenrod: '#eee8aa',\n  palegreen: '#98fb98',\n  paleturquoise: '#afeeee',\n  palevioletred: '#db7093',\n  papayawhip: '#ffefd5',\n  peachpuff: '#ffdab9',\n  peru: '#cd853f',\n  pink: '#ffc0cb',\n  plum: '#dda0dd',\n  powderblue: '#b0e0e6',\n  purple: '#800080',\n  rebeccapurple: '#663399',\n  red: '#ff0000',\n  rosybrown: '#bc8f8f',\n  royalblue: '#4169e1',\n  saddlebrown: '#8b4513',\n  salmon: '#fa8072',\n  sandybrown: '#f4a460',\n  seagreen: '#2e8b57',\n  seashell: '#fff5ee',\n  sienna: '#a0522d',\n  silver: '#c0c0c0',\n  skyblue: '#87ceeb',\n  slateblue: '#6a5acd',\n  slategray: '#708090',\n  slategrey: '#708090',\n  snow: '#fffafa',\n  springgreen: '#00ff7f',\n  steelblue: '#4682b4',\n  tan: '#d2b48c',\n  teal: '#008080',\n  thistle: '#d8bfd8',\n  tomato: '#ff6347',\n  transparent: '#000000',\n  turquoise: '#40e0d0',\n  violet: '#ee82ee',\n  violetred: '#d02090',\n  wheat: '#f5deb3',\n  white: '#ffffff',\n  whitesmoke: '#f5f5f5',\n  yellow: '#ffff00',\n  yellowgreen: '#9acd32'\n};\n\nmodule.exports = function (color) {\n  return COLOR_MAP[color] || color;\n};\n"
  },
  {
    "path": "packages/chameleon-css-loader/transform/weex.js",
    "content": "const color = require('./color');\nconst utils = require('../utils.js');\n\n/**\n * 处理映射表\n *\n * @type {Object}\n */\nconst HANDLE_MAP = {\n  directions: ['top', 'right', 'bottom', 'left'],\n  angles: ['top-left', 'top-right', 'bottom-right', 'bottom-left'],\n  borderAttributes: ['style', 'width', 'color'],\n  backgroundAttributes: ['color', 'position', 'size', 'repeat', 'origin', 'clip', 'attachment', 'image'],\n  flexAttributes: ['direction', 'wrap']\n};\n\n/**\n * 获取声明列表\n *\n * @param  {string} tpl   声明模板\n * @param  {string} value 声明值\n * @param  {string} type  声明类型\n * @return {Array}        声明列表\n */\nlet getDeclarations = (tpl, value, type) => {\n  let declarations = [];\n  tpl.replace(/\\${(.*)}/g, (match, varible) => {\n    declarations = HANDLE_MAP[varible + 's'].map(item => {\n      let val = value;\n\n      if (type == 'margin' || type == 'padding') {\n        val = getBoxValues(value)[item];\n      } else if (varible == 'borderAttribute') {\n        val = getBorderValues(value)[item];\n      } else if (varible == 'backgroundAttribute') {\n        val = getBackgroundValues(value)[item];\n      } else if (varible == 'flexAttribute') {\n        val = getFlexValues(value)[item];\n      } else if (varible == 'angle') {\n        val = getBorderRadiusValues(value)[item];\n      } else {\n        val = value;\n      }\n\n      if (val) {\n        return {\n          type: 'declaration',\n          property: tpl.replace(/\\${.*}/g, item),\n          value: val\n        };\n      } else {\n        return null;\n      }\n    }).filter(declaration => declaration);\n  });\n\n  return declarations;\n}\n\nlet getValueSegs = value => {\n  let vals = value.replace(/\\s*,\\s*/g, ',').split(/\\s+/);\n  return vals.map(color);\n};\n\n/**\n * 获取边框样式值\n *\n * @param  {string} value 边框样式值\n * @return {Object}       边框样式表\n */\nlet getBorderValues = value => {\n  let result = {};\n  let vals = getValueSegs(value);\n\n  vals.forEach(val => {\n    if (/^(solid|dashed|dotted|none)/g.test(val)) {\n      result.style = val;\n    } else if (/^(0(px)?|[0-9]+px)/g.test(val)) {\n      result.width = val;\n    } else if (/^(#[0-9a-fA-F]*|rgba?\\(.*?\\))/g.test(val)) {\n      result.color = val;\n    }\n  });\n\n  return result;\n};\n\nlet getFlexValues = value => {\n  let result = {};\n  let vals = getValueSegs(value);\n\n  if (vals.length == 2) {\n    result = {\n      direction: 'inherit',\n      wrap: 'inherit'\n    };\n  }\n\n  let directions = ['row', 'row-reverse', 'column', 'column-reverse', 'initial', 'initial'];\n  let wraps = ['nowrap', 'wrap', 'wrap-reverse', 'initial', 'initial'];\n\n  vals.forEach(function (val, index) {\n    if (index == 0 && (directions.indexOf(val) > -1)) {\n      result.direction = val;\n    }\n    else if (index == 1 && (wraps.indexOf(val) > -1)) {\n      result.wrap = val;\n    }\n  });\n\n  return result;\n};\n\n/**\n * 获取box样式值\n *\n * @param  {string} value box样式值\n * @return {Object}       box样式表\n */\nlet getBoxValues = value => {\n  let vals = getValueSegs(value);\n\n  if (vals.length == 1) {\n    return {\n      top: vals[0],\n      right: vals[0],\n      bottom: vals[0],\n      left: vals[0]\n    };\n  } else if (vals.length == 2) {\n    return {\n      top: vals[0],\n      right: vals[1],\n      bottom: vals[0],\n      left: vals[1]\n    };\n  } else if (vals.length == 3) {\n    return {\n      top: vals[0],\n      right: vals[1],\n      bottom: vals[2],\n      left: vals[1]\n    };\n  } else if (vals.length == 4) {\n    return {\n      top: vals[0],\n      right: vals[1],\n      bottom: vals[2],\n      left: vals[3]\n    };\n  } else {\n    return {\n      top: 0,\n      right: 0,\n      bottom: 0,\n      left: 0\n    };\n  }\n};\n\nlet getBorderRadiusValues = value => {\n  let results = [];\n\n  let vals = value.split('/');\n\n  vals.forEach(val => {\n    let vals = getValueSegs(value);\n    let result;\n    if (vals.length == 1) {\n      result = {\n        'top-left': vals[0],\n        'top-right': vals[0],\n        'bottom-right': vals[0],\n        'bottom-left': vals[0]\n      };\n    }\n    else if (vals.length == 2) {\n      result = {\n        'top-left': vals[0],\n        'top-right': vals[1],\n        'bottom-right': vals[0],\n        'bottom-left': vals[1]\n      };\n    }\n    else if (vals.length == 3) {\n      result = {\n        'top-left': vals[0],\n        'top-right': vals[1],\n        'bottom-right': vals[2],\n        'bottom-left': vals[1]\n      };\n    }\n    else if (vals.length == 4) {\n      result = {\n        'top-left': vals[0],\n        'top-right': vals[1],\n        'bottom-right': vals[2],\n        'bottom-left': vals[3]\n      };\n    }\n    results.push(result);\n  })\n  let result = {};\n  results.forEach(current => {\n    ['top-left', 'top-right', 'bottom-right', 'bottom-left'].forEach(key => {\n      if (!result[key]) {\n        result[key] = current[key];\n      }\n      else {\n        result[key] += (' ' + current[key]);\n      }\n    });\n  })\n\n  return result;\n};\n\n/**\n * 获取background样式值\n *\n * @param  {string} value 背景样式值\n * @return {Object}       背景样式表\n */\nlet getBackgroundValues = value => {\n  let result = {};\n  let vals = getValueSegs(value);\n  let positionEnd = false;\n/* eslint-disable */\n  vals.forEach(val => {\n    if (/#[0-9a-fA-F]*|rgba?\\(.*?\\)/g.test(val)) {\n      result.color = val;\n    } else if (/^url\\(.*\\)/g.test(val)) {\n      result.image = val;\n    } else if (/^(repeat|repeat-x|repeat-y|no-repeat)/g.test(val)) {\n      result.repeat = val;\n    } else if (/^(padding\\-box|border\\-box|content\\-box)/g.test(val) && !result.origin) {\n      result.origin = val;\n    } else if (/^(padding\\-box|border\\-box|content\\-box)/g.test(val)) {\n      result.clip = val;\n    } else if (/^(top|center|bottom|left|right|[0-9.]+(px|%))/g.test(val) && !positionEnd) {\n      result.position = !result.position ? val : result.position + ' ' + val;\n    } else if (/\\//g.test(val)) {\n      positionEnd = true;\n    } else if (/^(top|center|bottom|left|right|[0-9.]+(px|%))/g.test(val)) {\n      result.size = !result.size ? val : result.size + ' ' + val;\n    } else if (/^(scroll|fixed)/g.test(val)) {\n      result.attachment = val;\n    }\n  });\n  /* eslint-disable */\n  return result;\n};\n\nlet parse = function (style) {\n  return style\n    .split(';')\n    .filter(declaration => !!declaration.trim())\n    .map(declaration => {\n      let {key, value} = utils.getStyleKeyValue(declaration);\n      return {\n        property: key,\n        value\n      };\n    })\n    .map(declaration => convert(declaration)\n      .map(declaration => declaration.property + ': ' + declaration.value)\n      .join(';'))\n    .join(';');\n};\n\nlet convert = function (declaration) {\n  let declarations = [];\n  let {property, value} = declaration;\n  value = value.replace(/(\\d*\\.?\\d+)cpx/gi, function(m, $1, $2) {\n    return $1 + \"px\";\n  })\n\n  switch (property) {\n    case 'margin':\n      declarations = getDeclarations('margin-${direction}', value, property);\n      break;\n    case 'padding':\n      declarations = getDeclarations('padding-${direction}', value, property);\n      break;\n    case 'background':\n      declarations = getDeclarations('background-${backgroundAttribute}', value, property);\n      break;\n    case 'border':\n    case 'border-top':\n    case 'border-right':\n    case 'border-bottom':\n    case 'border-left':\n      declarations = getDeclarations(property + '-${borderAttribute}', value, property);\n      break;\n    case 'border-style':\n      declarations = getDeclarations('border-${direction}-style', value, property);\n      break;\n    case 'border-width':\n      declarations = getDeclarations('border-${direction}-width', value);\n      break;\n    case 'border-color':\n      declarations = getDeclarations('border-${direction}-color', value);\n      break;\n    case 'border-radius':\n      declarations = getDeclarations('border-${angle}-radius', value, property);\n      break;\n    case 'flex-flow':\n      declarations = getDeclarations('flex-${flexAttribute}', value, property);\n      break;\n    default:\n      declarations = [{\n        type: 'declaration',\n        property: property,\n        value: getValueSegs(value).join(' ')\n      }];\n      break;\n  }\n  return declarations;\n}\n\nmodule.exports = {\n  convert: convert,\n  parse: parse\n};\n"
  },
  {
    "path": "packages/chameleon-css-loader/utils.js",
    "content": "const _ = {};\nmodule.exports = _;\n// 将字符串中的 单引号变成 双引号；\n_.singlequot2doublequot = function (value) {\n  return value.replace(/['']/g, '\"');\n}\n// 用于将css样式值中的重复样式去掉\n_.uniqueStyle = function(content) {\n  const uniqueStyleKeyValue = {};\n  const splitStyleKeyValue = content.split(';').filter(item => !!item.trim());\n  splitStyleKeyValue.forEach((declaration) => {\n    let {key, value} = _.getStyleKeyValue(declaration);\n    if (!key || !value) {\n      throw new Error('please check if the style that you write is correct')\n    }\n    uniqueStyleKeyValue[key] = value;\n  });\n\n  let result = [];\n  Object.keys(uniqueStyleKeyValue).forEach(key => {\n    result.push(`${key}:${uniqueStyleKeyValue[key]}`)\n  })\n  return result.join(';');\n}\n// 用于删除css样式的注释； /*width:100px;*/ ==> ''\n_.disappearCssComment = function(content) {\n  let commentReg = /\\/\\*[\\s\\S]*?\\*\\//g;\n  return content.replace(commentReg, function (match) {\n    return '';\n  })\n}\n_.getStyleKeyValue = function(declaration) {\n  let colonIndex = declaration.indexOf(':');\n  let key = declaration.slice(0, colonIndex).trim();\n  let value = declaration.slice(colonIndex + 1).trim();\n  return {\n    key, value\n  }\n}\n\n"
  },
  {
    "path": "packages/chameleon-dev-proxy/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\n"
  },
  {
    "path": "packages/chameleon-dev-proxy/index.js",
    "content": "'use strict';\n\nrequire('babel-polyfill');\n\n\n\nvar tlsUtils = require('node-mitmproxy/lib/tls/tlsUtils');\nvar qrcode = require('qrcode-terminal');\nvar http = require('http');\nvar config = require('node-mitmproxy/lib/common/config');\nvar colors = require('colors');\nvar createRequestHandler = require('node-mitmproxy/lib/mitmproxy/createRequestHandler');\nvar createConnectHandler = require('node-mitmproxy/lib/mitmproxy/createConnectHandler');\nvar createFakeServerCenter = require('node-mitmproxy/lib/mitmproxy/createFakeServerCenter');\nvar createUpgradeHandler = require('node-mitmproxy/lib/mitmproxy/createUpgradeHandler');\n\nmodule.exports = {\n    createProxy: function createProxy(_ref) {\n        var _ref$port = _ref.port;\n        var port = _ref$port === undefined ? config.defaultPort : _ref$port;\n        var caCertPath = _ref.caCertPath;\n        var caKeyPath = _ref.caKeyPath;\n        var sslConnectInterceptor = _ref.sslConnectInterceptor;\n        var requestInterceptor = _ref.requestInterceptor;\n        var responseInterceptor = _ref.responseInterceptor;\n        var _ref$getCertSocketTim = _ref.getCertSocketTimeout;\n        var getCertSocketTimeout = _ref$getCertSocketTim === undefined ? 1 * 1000 : _ref$getCertSocketTim;\n        var _ref$middlewares = _ref.middlewares;\n        var middlewares = _ref$middlewares === undefined ? [] : _ref$middlewares;\n        var externalProxy = _ref.externalProxy;\n\n\n        // Don't reject unauthorized\n        process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';\n\n        //if (!caCertPath && !caKeyPath) {\n        var rs = this.createCA(caCertPath);\n        caCertPath = rs.caCertPath;\n        caKeyPath = rs.caKeyPath;\n        if (rs.create) {\n            console.log(colors.cyan('CA Cert saved in: ' + caCertPath));\n            console.log(colors.cyan('CA private key saved in: ' + caKeyPath));\n        }\n        //}\n\n        port = ~~port;\n        var requestHandler = createRequestHandler(requestInterceptor, responseInterceptor, middlewares, externalProxy);\n\n        var upgradeHandler = createUpgradeHandler();\n\n        var fakeServersCenter = createFakeServerCenter({\n            caCertPath: caCertPath,\n            caKeyPath: caKeyPath,\n            requestHandler: requestHandler,\n            upgradeHandler: upgradeHandler,\n            getCertSocketTimeout: getCertSocketTimeout\n        });\n\n        var connectHandler = createConnectHandler(sslConnectInterceptor, fakeServersCenter);\n\n        var server = new http.Server();\n        server.listen(port, function () {\n            let crlUrl = _ref.devServer + config.caCertFileName;\n            console.log(colors.green('代理端口: ' + port));\n            console.log(colors.green(`证书地址：${crlUrl}`));\n            console.log(colors.green(`扫一扫安装证书：`));\n            qrcode.generate(`${crlUrl}`, {small: true});\n            server.on('error', function (e) {\n                console.error(colors.red(e));\n            });\n            server.on('request', function (req, res) {\n                var ssl = false;\n                requestHandler(req, res, ssl);\n            });\n            // tunneling for https\n            server.on('connect', function (req, cltSocket, head) {\n                connectHandler(req, cltSocket, head);\n            });\n            // TODO: handler WebSocket\n            server.on('upgrade', function (req, socket, head) {\n                var ssl = false;\n                upgradeHandler(req, socket, head, ssl);\n            });\n        });\n    },\n    createCA: function createCA() {\n        var caBasePath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : config.getDefaultCABasePath();\n\n        return tlsUtils.initCA(caBasePath);\n    }\n};"
  },
  {
    "path": "packages/chameleon-dev-proxy/package.json",
    "content": "{\n  \"name\": \"chameleon-dev-proxy\",\n  \"version\": \"1.0.8\",\n  \"description\": \"cml开发环境代理服务模块\",\n  \"main\": \"index.js\",\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"dependencies\": {\n    \"babel-polyfill\": \"^6.26.0\",\n    \"node-mitmproxy\": \"^3.1.0\",\n    \"qrcode-terminal\": \"^0.12.0\"\n  },\n  \"gitHead\": \"5ddcde4330774710f7646559446e008f7785ce00\"\n}"
  },
  {
    "path": "packages/chameleon-errors-webpack-plugin/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\n"
  },
  {
    "path": "packages/chameleon-errors-webpack-plugin/LICENSE",
    "content": "MIT License\n\nCopyright (c) 2016 Geoffroy Warin\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "packages/chameleon-errors-webpack-plugin/index.js",
    "content": "\nconst FriendlyErrorsWebpackPlugin = require('./src/friendly-errors-plugin');\n\nmodule.exports = FriendlyErrorsWebpackPlugin;"
  },
  {
    "path": "packages/chameleon-errors-webpack-plugin/package.json",
    "content": "{\n  \"version\": \"1.0.8\",\n  \"name\": \"chameleon-errors-webpack-plugin\",\n  \"main\": \"index.js\",\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"description\": \"fork from friendly-errors-webpack-plugin\",\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"dependencies\": {\n    \"chalk\": \"^1.1.3\",\n    \"error-stack-parser\": \"^2.0.0\",\n    \"string-width\": \"^2.0.0\"\n  },\n  \"devDependencies\": {\n    \"babel-core\": \"^6.23.1\",\n    \"babel-eslint\": \"^7.1.1\",\n    \"babel-loader\": \"^6.3.0\",\n    \"babel-plugin-transform-async-to-generator\": \"^6.22.0\",\n    \"babel-preset-react\": \"^6.23.0\",\n    \"eslint\": \"^3.16.1\",\n    \"eslint-loader\": \"^1.6.1\",\n    \"expect\": \"^1.20.2\",\n    \"jest\": \"^18.1.0\",\n    \"memory-fs\": \"^0.4.1\",\n    \"webpack\": \"^2.2.1\"\n  },\n  \"files\": [\n    \"src\",\n    \"index.js\"\n  ],\n  \"keywords\": [\n    \"friendly\",\n    \"errors\",\n    \"webpack\",\n    \"plugin\"\n  ],\n  \"gitHead\": \"5ddcde4330774710f7646559446e008f7785ce00\"\n}"
  },
  {
    "path": "packages/chameleon-errors-webpack-plugin/src/core/extractWebpackError.js",
    "content": "'use strict';\n\nconst ErrorStackParser = require('error-stack-parser');\nconst RequestShortener = require(\"webpack/lib/RequestShortener\");\n\n// TODO: allow the location to be customized in options\nconst requestShortener = new RequestShortener(process.cwd());\n\n/*\n This logic is mostly duplicated from webpack/lib/Stats.js#toJson()\n See: https://github.com/webpack/webpack/blob/2f618e733aab4755deb42e9d8e859609005607c0/lib/Stats.js#L89\n*/\n\nfunction extractError (e) {\n  return {\n    message: e.message,\n    file: getFile(e),\n    origin: getOrigin(e),\n    name: e.name,\n    severity: 0,\n    webpackError: e,\n    originalStack: getOriginalErrorStack(e)\n  };\n}\n\nfunction getOriginalErrorStack(e) {\n  while (e.error != null) {\n    e = e.error;\n  }\n  if (e.stack) {\n    return ErrorStackParser.parse(e);\n  }\n  return [];\n}\n\nfunction getFile (e) {\n  if (e.file) {\n    return e.file;\n  } else if (e.module && e.module.readableIdentifier && typeof e.module.readableIdentifier === \"function\") {\n    return e.module.readableIdentifier(requestShortener);\n  }\n}\n\nfunction getOrigin (e) {\n  let origin = '';\n  if (e.dependencies && e.origin) {\n    origin += '\\n @ ' + e.origin.readableIdentifier(requestShortener);\n    e.dependencies.forEach(function (dep) {\n      if (!dep.loc) return;\n      if (typeof dep.loc === \"string\") return;\n      if (!dep.loc.start) return;\n      if (!dep.loc.end) return;\n      origin += ' ' + dep.loc.start.line + ':' + dep.loc.start.column + '-' +\n        (dep.loc.start.line !== dep.loc.end.line ? dep.loc.end.line + ':' : '') + dep.loc.end.column;\n    });\n    var current = e.origin;\n    while (current.issuer && typeof current.issuer.readableIdentifier === 'function') {\n      current = current.issuer;\n      origin += '\\n @ ' + current.readableIdentifier(requestShortener);\n    }\n  }\n  return origin;\n}\n\nmodule.exports = extractError;\n"
  },
  {
    "path": "packages/chameleon-errors-webpack-plugin/src/core/formatErrors.js",
    "content": "'use strict';\n\n/**\n * Applies formatters to all AnnotatedErrors.\n *\n * A formatter has the following signature: FormattedError => Array<String>.\n * It takes a formatted error produced by a transformer and returns a list\n * of log statements to print.\n *\n */\nfunction formatErrors(errors, formatters, errorType) {\n  const format = (formatter) => formatter(errors, errorType) || [];\n  const flatten = (accum, curr) => accum.concat(curr);\n\n  return formatters.map(format).reduce(flatten, [])\n}\n\nmodule.exports = formatErrors;\n"
  },
  {
    "path": "packages/chameleon-errors-webpack-plugin/src/core/transformErrors.js",
    "content": "'use strict';\n\nconst extractError = require('./extractWebpackError');\n\n/**\n * Applies all transformers to all errors and returns \"annotated\"\n * errors.\n *\n * Each transformer should have the following signature WebpackError => AnnotatedError\n *\n * A WebpackError has the following fields:\n * - message\n * - file\n * - origin\n * - name\n * - severity\n * - webpackError (original error)\n *\n * An AnnotatedError should be an extension (Object.assign) of the WebpackError\n * and add whatever information is convenient for formatting.\n * In particular, they should have a 'priority' field.\n *\n * The plugin will only display errors having maximum priority at the same time.\n *\n * If they don't have a 'type' field, the will be handled by the default formatter.\n */\nfunction processErrors (errors, transformers) {\n  const transform = (error, transformer) => transformer(error);\n  const applyTransformations = (error) => transformers.reduce(transform, error);\n\n  return errors.map(extractError).map(applyTransformations);\n}\n\nmodule.exports = processErrors;\n"
  },
  {
    "path": "packages/chameleon-errors-webpack-plugin/src/formatters/defaultError.js",
    "content": "'use strict';\n\nconst concat = require('../utils').concat;\nconst formatTitle = require('../utils/colors').formatTitle;\n\nfunction displayError(severity, error) {\n  const baseError = formatTitle(severity, severity);\n\n  return concat(\n    `${baseError} ${removeLoaders(error.file)}`,\n    '',\n    error.message,\n    (error.origin ? error.origin : undefined),\n    '',\n    error.infos\n  );\n}\n\nfunction removeLoaders(file) {\n  if (!file) {\n    return \"\";\n  }\n  const split = file.split('!');\n  const filePath = split[split.length - 1];\n  return `in ${filePath}`;\n}\n\nfunction isDefaultError(error) {\n  return !error.type;\n}\n\n/**\n * Format errors without a type\n */\nfunction format(errors, type) {\n  return errors\n    .filter(isDefaultError)\n    .reduce((accum, error) => (\n      accum.concat(displayError(type, error))\n    ), []);\n}\n\nmodule.exports = format;\n"
  },
  {
    "path": "packages/chameleon-errors-webpack-plugin/src/formatters/eslintError.js",
    "content": "'use strict';\n\nconst concat = require('../utils').concat;\nconst chalk = require('chalk');\n\nconst infos = [\n  'You may use special comments to disable some warnings.',\n  'Use ' + chalk.yellow('// eslint-disable-next-line') + ' to ignore the next line.',\n  'Use ' + chalk.yellow('/* eslint-disable */') + ' to ignore all warnings in a file.'\n];\n\nfunction displayError(error) {\n  return [error.message, '']\n}\n\nfunction format(errors, type) {\n  const lintErrors = errors.filter(e => e.type === 'lint-error');\n  if (lintErrors.length > 0) {\n    const flatten = (accum, curr) => accum.concat(curr);\n    return concat(\n      lintErrors\n        .map(error => displayError(error))\n        .reduce(flatten, []),\n      infos\n    )\n  }\n\n  return [];\n}\n\nmodule.exports = format;\n"
  },
  {
    "path": "packages/chameleon-errors-webpack-plugin/src/formatters/moduleNotFound.js",
    "content": "'use strict';\nconst concat = require('../utils').concat;\n\nfunction isRelative (module) {\n  return module.startsWith('./') || module.startsWith('../');\n}\n\nfunction formatFileList (files) {\n  const length = files.length;\n  if (!length) return '';\n  return ` in ${files[0]}${files[1] ? `, ${files[1]}` : ''}${length > 2 ? ` and ${length - 2} other${length === 3 ? '' : 's'}` : ''}`;\n}\n\nfunction formatGroup (group) {\n  const files = group.errors.map(e => e.file).filter(Boolean);\n  return `* ${group.module}${formatFileList(files)}`;\n}\n\n\nfunction forgetToInstall (missingDependencies) {\n  const moduleNames = missingDependencies.map(missingDependency => missingDependency.module);\n\n  if (missingDependencies.length === 1) {\n    return `To install it, you can run: npm install --save ${moduleNames.join(' ')}`;\n  }\n\n  return `To install them, you can run: npm install --save ${moduleNames.join(' ')}`;\n}\n\nfunction dependenciesNotFound (dependencies) {\n  if (dependencies.length === 0) return;\n\n  return concat(\n    dependencies.length === 1 ? 'This dependency was not found:' : 'These dependencies were not found:',\n    '',\n    dependencies.map(formatGroup),\n    '',\n    forgetToInstall(dependencies)\n  );\n}\n\nfunction relativeModulesNotFound (modules) {\n  if (modules.length === 0) return;\n\n  return concat(\n    modules.length === 1 ? 'This relative module was not found:' : 'These relative modules were not found:',\n    '',\n    modules.map(formatGroup)\n  );\n}\n\nfunction groupModules (errors) {\n  const missingModule = new Map();\n\n  errors.forEach((error) => {\n    if (!missingModule.has(error.module)) {\n      missingModule.set(error.module, [])\n    }\n    missingModule.get(error.module).push(error);\n  });\n\n  return Array.from(missingModule.keys()).map(module => ({\n    module: module,\n    relative: isRelative(module),\n    errors: missingModule.get(module),\n  }));\n}\n\nfunction formatErrors (errors) {\n  if (errors.length === 0) {\n    return [];\n  }\n\n  const groups = groupModules(errors);\n\n  const dependencies = groups.filter(group => !group.relative);\n  const relativeModules = groups.filter(group => group.relative);\n\n  return concat(\n    dependenciesNotFound(dependencies),\n    dependencies.length && relativeModules.length ? ['', ''] : null,\n    relativeModulesNotFound(relativeModules)\n  );\n}\n\nfunction format (errors) {\n  return formatErrors(errors.filter((e) => (\n    e.type === 'module-not-found'\n  )));\n}\n\nmodule.exports = format;\n"
  },
  {
    "path": "packages/chameleon-errors-webpack-plugin/src/friendly-errors-plugin.js",
    "content": "'use strict';\n\nconst path = require('path');\nconst chalk = require('chalk');\nconst os = require('os');\nconst transformErrors = require('./core/transformErrors');\nconst formatErrors = require('./core/formatErrors');\nconst output = require('./output');\nconst utils = require('./utils');\n\nconst concat = utils.concat;\nconst uniqueBy = utils.uniqueBy;\n\nconst defaultTransformers = [\n  require('./transformers/babelSyntax'),\n  require('./transformers/moduleNotFound'),\n  require('./transformers/esLintError'),\n];\n\nconst defaultFormatters = [\n  require('./formatters/moduleNotFound'),\n  require('./formatters/eslintError'),\n  require('./formatters/defaultError'),\n];\n\nclass FriendlyErrorsWebpackPlugin {\n\n  constructor(options) {\n    options = options || {};\n    this.compilationSuccessInfo = options.compilationSuccessInfo || {};\n    this.onErrors = options.onErrors;\n    this.shouldClearConsole = options.clearConsole == null ? true : Boolean(options.clearConsole);\n    this.formatters = concat(defaultFormatters, options.additionalFormatters);\n    this.transformers = concat(defaultTransformers, options.additionalTransformers);\n    this.cmlType = options.cmlType || '';\n    this.showWarning = options.showWarning || false;\n  }\n\n  apply(compiler) {\n\n    const doneFn = stats => {\n      this.clearConsole();\n\n      const hasErrors = stats.hasErrors();\n      let hasWarnings = stats.hasWarnings();\n      if (!this.showWarning) {\n        hasWarnings = false;\n      }\n      if (!hasErrors && !hasWarnings) {\n        this.displaySuccess(stats);\n        return;\n      }\n\n      if (hasErrors) {\n        this.displayErrors(extractErrorsFromStats(stats, 'errors'), 'error');\n        return;\n      }\n\n      if (hasWarnings) {\n        this.displayErrors(extractErrorsFromStats(stats, 'warnings'), 'warning');\n      }\n    };\n\n    const invalidFn = () => {\n      this.clearConsole();\n      cml.log.notice(this.cmlType + ' Compiling...')\n    };\n\n    let first = false;\n    const beforeCompile = (compilation, callback) => {\n      if (!first) {\n        cml.log.notice(this.cmlType + ' Compiling...')\n\n        first = true;\n      }\n      return callback();\n    }\n\n    if (compiler.hooks) {\n      const plugin = { name: 'FriendlyErrorsWebpackPlugin' };\n\n      compiler.hooks.done.tap(plugin, doneFn);\n      compiler.hooks.invalid.tap(plugin, invalidFn);\n      compiler.hooks.beforeCompile.tap(plugin, beforeCompile);\n    } else {\n      compiler.plugin('before-compile', beforeCompile);\n      compiler.plugin('done', doneFn);\n      compiler.plugin('invalid', invalidFn);\n    }\n  }\n\n  clearConsole() {\n    if (this.shouldClearConsole) {\n      output.clearConsole();\n    }\n  }\n\n  displaySuccess(stats) {\n    const time = getCompileTime(stats);\n    cml.log.notice(this.cmlType + ' Compiled successfully in ' + time + 'ms')\n\n    if (this.compilationSuccessInfo.messages) {\n      this.compilationSuccessInfo.messages.forEach(message => output.info(message));\n    }\n    if (this.compilationSuccessInfo.notes) {\n      output.log();\n      this.compilationSuccessInfo.notes.forEach(note => output.note(note));\n    }\n  }\n\n  displayErrors(errors, severity) {\n    const processedErrors = transformErrors(errors, this.transformers);\n\n    const topErrors = getMaxSeverityErrors(processedErrors);\n    const nbErrors = topErrors.length;\n\n    const subtitle = severity === 'error' ?\n      `Failed to compile with ${nbErrors} ${severity}s` :\n      `Compiled with ${nbErrors} ${severity}s`;\n    output.title(severity, severity.toUpperCase(), subtitle);\n\n    if (this.onErrors) {\n      this.onErrors(severity, topErrors);\n    }\n\n    formatErrors(topErrors, this.formatters, severity)\n      .forEach(chunk => output.log(chunk));\n  }\n}\n\nfunction extractErrorsFromStats(stats, type) {\n  if (isMultiStats(stats)) {\n    const errors = stats.stats\n      .reduce((errors, stats) => errors.concat(extractErrorsFromStats(stats, type)), []);\n    // Dedupe to avoid showing the same error many times when multiple\n    // compilers depend on the same module.\n    return uniqueBy(errors, error => error.message);\n  }\n  return stats.compilation[type];\n}\n\nfunction getCompileTime(stats) {\n  if (isMultiStats(stats)) {\n    // Webpack multi compilations run in parallel so using the longest duration.\n    // https://webpack.github.io/docs/configuration.html#multiple-configurations\n    return stats.stats\n      .reduce((time, stats) => Math.max(time, getCompileTime(stats)), 0);\n  }\n  return stats.endTime - stats.startTime;\n}\n\nfunction isMultiStats(stats) {\n  return stats.stats;\n}\n\nfunction getMaxSeverityErrors(errors) {\n  const maxSeverity = getMaxInt(errors, 'severity');\n  return errors.filter(e => e.severity === maxSeverity);\n}\n\nfunction getMaxInt(collection, propertyName) {\n  return collection.reduce((res, curr) => {\n    return curr[propertyName] > res ? curr[propertyName] : res;\n  }, 0)\n}\n\nmodule.exports = FriendlyErrorsWebpackPlugin;\n"
  },
  {
    "path": "packages/chameleon-errors-webpack-plugin/src/output.js",
    "content": "'use strict';\n\nconst colors = require('./utils/colors');\nconst chalk = require('chalk');\nconst stringWidth = require('string-width');\nconst readline = require('readline');\n\nclass Debugger {\n\n  constructor () {\n    this.enabled = true;\n    this.capturing = false;\n    this.capturedMessages = [];\n  }\n\n  enable () {\n    this.enabled = true;\n  }\n\n  capture () {\n    this.enabled = true;\n    this.capturing = true;\n  }\n\n  endCapture () {\n    this.enabled = false;\n    this.capturing = false;\n    this.capturedMessages = [];\n  }\n\n  log () {\n    if (this.enabled) {\n      this.captureConsole(Array.from(arguments), console.log);\n    }\n  }\n\n  info (message) {\n    if (this.enabled) {\n      const titleFormatted = colors.formatTitle('info', 'I');\n      this.log(titleFormatted, message);\n    }\n  }\n\n  note (message) {\n    if (this.enabled) {\n      const titleFormatted = colors.formatTitle('note', 'N');\n      this.log(titleFormatted, message);\n    }\n  }\n\n  title (severity, title, subtitle) {\n    if (this.enabled) {\n      const date = new Date();\n      const dateString = chalk.grey(date.toLocaleTimeString());\n      const titleFormatted = colors.formatTitle(severity, title);\n      const subTitleFormatted = colors.formatText(severity, subtitle);\n      const message = `${titleFormatted} ${subTitleFormatted}`\n\n      // In test environment we don't include timestamp\n      if(process.env.NODE_ENV === 'test') {\n        this.log(message);\n        this.log();\n        return;\n      }\n\n      // Make timestamp appear at the end of the line\n      let logSpace = process.stdout.columns - stringWidth(message) - stringWidth(dateString)\n      if (logSpace <= 0) {\n        logSpace = 10\n      }\n\n      this.log(`${message}${' '.repeat(logSpace)}${dateString}`);\n      this.log();\n    }\n  }\n\n  clearConsole () {\n    if (!this.capturing && this.enabled && process.stdout.isTTY) {\n      // Fill screen with blank lines. Then move to 0 (beginning of visible part) and clear it\n      const blank = '\\n'.repeat(process.stdout.rows)\n      console.log(blank)\n      readline.cursorTo(process.stdout, 0, 0)\n      readline.clearScreenDown(process.stdout)\n    }\n  }\n\n  captureLogs (fun) {\n    try {\n      this.capture();\n      fun.call();\n      return this.capturedMessages;\n    } catch (e) {\n      throw e;\n    } finally {\n      this.endCapture();\n    }\n  }\n\n  captureConsole (args, method) {\n    if (this.capturing) {\n      this.capturedMessages.push(chalk.stripColor(args.join(' ')).trim());\n    } else {\n      method.apply(console, args);\n    }\n  }\n}\n\nfunction capitalizeFirstLetter (string) {\n  return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nmodule.exports = new Debugger();\n"
  },
  {
    "path": "packages/chameleon-errors-webpack-plugin/src/transformers/babelSyntax.js",
    "content": "'use strict';\n\n/**\n * This will be removed in next versions as it is not handled in the babel-loader\n * See: https://github.com/geowarin/friendly-errors-webpack-plugin/issues/2\n */\nfunction cleanStackTrace(message) {\n  return message\n    .replace(/^\\s*at\\s.*:\\d+:\\d+[\\s\\)]*\\n/gm, ''); // at ... ...:x:y\n}\n\nfunction cleanMessage(message) {\n  return message\n  // match until the last semicolon followed by a space\n  // this should match\n  // linux => \"(SyntaxError: )Unexpected token (5:11)\"\n  // windows => \"(SyntaxError: C:/projects/index.js: )Unexpected token (5:11)\"\n    .replace(/^Module build failed.*:\\s/, 'Syntax Error: ');\n}\n\nfunction isBabelSyntaxError(e) {\n  return e.name === 'ModuleBuildError' &&\n    e.message.indexOf('SyntaxError') >= 0;\n}\n\nfunction transform(error) {\n  if (isBabelSyntaxError(error)) {\n    return Object.assign({}, error, {\n      message: cleanStackTrace(cleanMessage(error.message) + '\\n'),\n      severity: 1000,\n      name: 'Syntax Error',\n    });\n  }\n\n  return error;\n}\n\nmodule.exports = transform;\n"
  },
  {
    "path": "packages/chameleon-errors-webpack-plugin/src/transformers/esLintError.js",
    "content": "'use strict';\n\nfunction isEslintError (e) {\n  return e.originalStack\n    .some(stackframe => stackframe.fileName && stackframe.fileName.indexOf('eslint-loader') > 0);\n}\n\nfunction transform(error) {\n  if (isEslintError(error)) {\n    return Object.assign({}, error, {\n      name: 'Lint error',\n      type: 'lint-error',\n    });\n  }\n\n  return error;\n}\n\nmodule.exports = transform;\n"
  },
  {
    "path": "packages/chameleon-errors-webpack-plugin/src/transformers/moduleNotFound.js",
    "content": "'use strict';\n\nconst TYPE = 'module-not-found';\n\nfunction isModuleNotFoundError (e) {\n  const webpackError = e.webpackError || {};\n  return webpackError.dependencies\n    && webpackError.dependencies.length > 0\n    && e.name === 'ModuleNotFoundError'\n    && e.message.indexOf('Module not found') === 0;\n}\n\nfunction transform(error) {\n  const webpackError = error.webpackError;\n  if (isModuleNotFoundError(error)) {\n    const module = webpackError.dependencies[0].request;\n    return Object.assign({}, error, {\n      message: `Module not found ${module}`,\n      type: TYPE,\n      severity: 900,\n      module,\n      name: 'Module not found'\n    });\n  }\n\n  return error;\n}\n\nmodule.exports = transform;\n"
  },
  {
    "path": "packages/chameleon-errors-webpack-plugin/src/utils/colors.js",
    "content": "'use strict';\n\nconst chalk = require('chalk');\n\nfunction formatTitle(severity, message) {\n  return chalk[bgColor(severity)].black('', message, '');\n}\n\nfunction formatText(severity, message) {\n  return chalk[textColor(severity)](message);\n}\n\nfunction bgColor(severity) {\n  const color = textColor(severity);\n  return 'bg'+ capitalizeFirstLetter(color)\n}\n\nfunction textColor(serverity) {\n  switch (serverity.toLowerCase()) {\n    case 'success': return 'green';\n    case 'info': return 'blue';\n    case 'note': return 'white';\n    case 'warning': return 'yellow';\n    case 'error': return 'red';\n    default: return 'red';\n  }\n}\n\nfunction capitalizeFirstLetter(string) {\n  return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nmodule.exports = {\n  bgColor: bgColor,\n  textColor: textColor,\n  formatTitle: formatTitle,\n  formatText: formatText\n};"
  },
  {
    "path": "packages/chameleon-errors-webpack-plugin/src/utils/index.js",
    "content": "'use strict';\n\n/**\n * Concat and flattens non-null values.\n * Ex: concat(1, undefined, 2, [3, 4]) = [1, 2, 3, 4]\n */\nfunction concat() {\n  const args = Array.from(arguments).filter(e => e != null);\n  const baseArray = Array.isArray(args[0]) ? args[0] : [args[0]];\n  return Array.prototype.concat.apply(baseArray, args.slice(1));\n}\n\n/**\n * Dedupes array based on criterion returned from iteratee function.\n * Ex: uniqueBy(\n *     [{ id: 1 }, { id: 1 }, { id: 2 }],\n *     val => val.id\n * ) = [{ id: 1 }, { id: 2 }]\n */\nfunction uniqueBy(arr, fun) {\n  const seen = {};\n  return arr.filter(el => {\n    const e = fun(el);\n    return !(e in seen) && (seen[e] = 1);\n  })\n}\n\nmodule.exports = {\n  concat: concat,\n  uniqueBy: uniqueBy\n};\n"
  },
  {
    "path": "packages/chameleon-linter/.eslintrc",
    "content": "{\n  \"parser\": \"babel-eslint\",\n  \"env\": {\n    \"browser\": true,\n    \"node\": true,\n    \"commonjs\": true,\n    \"amd\": true,\n    \"es6\": true,\n    \"mocha\": true\n  },\n  \"parserOptions\": {\n    \"ecmaVersion\": 6,\n    \"sourceType\": \"module\",\n    \"ecmaFeatures\": {\n      \"globalReturn\": true,\n      \"impliedStrict\": true,\n      \"jsx\": true,\n      \"modules\": true\n    }\n  },\n  \"extends\": [\n    \"eslint:recommended\"\n  ],\n\n  \"rules\": {\n    \"no-cond-assign\": 2,\n    \"no-console\": 0,\n    \"no-constant-condition\": 2,\n    \"no-control-regex\": 2,\n    \"comma-dangle\": [1, \"never\"],\n    \"no-debugger\": 2,\n    \"no-dupe-args\": 2,\n    \"no-dupe-keys\": 2,\n    \"no-duplicate-case\": 2,\n    \"no-empty\": 2,\n    \"no-empty-character-class\": 2,\n    \"no-ex-assign\": 2,\n    \"no-extra-boolean-cast\": 2,\n    \"no-extra-parens\": 0,\n    \"no-extra-semi\": 2,\n    \"no-func-assign\": 2,\n    \"no-inner-declarations\": [2, \"functions\"],\n    \"no-invalid-regexp\": 2,\n    \"no-irregular-whitespace\": 2,\n    \"no-negated-in-lhs\": 2,\n    \"no-obj-calls\": 2,\n    \"no-prototype-builtins\": 0,\n    \"no-regex-spaces\": 2,\n    \"no-sparse-arrays\": 2,\n    \"no-unexpected-multiline\": 2,\n    \"no-unreachable\": 2,\n    \"use-isnan\": 2,\n    \"valid-jsdoc\": 0,\n    \"valid-typeof\": 2,\n\n\n\n    \"accessor-pairs\": 2,\n    \"array-callback-return\": 0,\n    \"block-scoped-var\": 0,\n    \"complexity\": [2, 20],\n    \"consistent-return\": 0,\n    \"curly\": [2, \"all\"],\n    \"default-case\": 2,\n    \"dot-location\": [2, \"property\"],\n    \"dot-notation\": [2, {\n      \"allowKeywords\": false\n    }],\n    \"eqeqeq\": [0, \"allow-null\"],\n    \"guard-for-in\": 0,\n    \"no-alert\": 0,\n    \"no-caller\": 2,\n    \"no-case-declarations\": 2,\n    \"no-div-regex\": 2,\n    \"no-else-return\": 0,\n    \"no-empty-function\": 2,\n    \"no-empty-pattern\": 2,\n    \"no-eq-null\": 1,\n    \"no-eval\": 2,\n    \"no-extend-native\": 2,\n    \"no-extra-bind\": 2,\n    \"no-extra-label:\": 0,\n    \"no-fallthrough\": 2,\n    \"no-floating-decimal\": 2,\n    \"no-implicit-coercion\": 0,\n    \"no-implicit-globals\": 1,\n    \"no-implied-eval\": 2,\n    \"no-invalid-this\": 0,\n    \"no-iterator\": 2,\n    \"no-labels\": 2,\n    \"no-lone-blocks\": 2,\n    \"no-loop-func\": 0,\n    \"no-magic-numbers\": [1, {\n      \"ignore\": [0, -1, 1]\n    }],\n    \"no-multi-spaces\": 2,\n    \"no-multi-str\": 2,\n    \"no-native-reassign\": 2,\n    \"no-new\": 2,\n    \"no-new-func\": 0,\n    \"no-new-wrappers\": 2,\n    \"no-octal\": 2,\n    \"no-octal-escape\": 2,\n    \"no-param-reassign\": 0,\n    \"no-proto\": 2,\n    \"no-redeclare\": 2,\n    \"no-return-assign\": 0,\n    \"no-script-url\": 0,\n    \"no-self-assign\": 2,\n    \"no-self-compare\": 2,\n    \"no-sequences\": 2,\n    \"no-throw-literal\": 2,\n    \"no-unmodified-loop-condition\": 2,\n    \"no-unused-expressions\": 0,\n    \"no-unused-labels\": 2,\n    \"no-useless-call\": 2,\n    \"no-useless-concat\": 0,\n    \"no-useless-escape\": 0,\n    \"no-void\": 0,\n    \"no-warning-comments\": 0,\n    \"no-with\": 2,\n    \"radix\": 2,\n    \"vars-on-top\": 0,\n    \"wrap-iife\": [2, \"any\"],\n    \"yoda\": [2, \"never\"],\n    \"strict\": 0,\n\n\n\n    \"init-declarations\": 0,\n    \"no-catch-shadow\": 0,\n    \"no-delete-var\": 2,\n    \"no-label-var\": 2,\n    \"no-restricted-globals\": 0,\n    \"no-shadow\": 0,\n    \"no-shadow-restricted-names\": 2,\n    \"no-undef\": 2,\n    \"no-undef-init\": 2,\n    \"no-undefined\": 0,\n    \"no-unused-vars\": [2, {\n      \"vars\": \"all\",\n      \"args\": \"none\"\n    }],\n    \"no-use-before-define\": 0,\n\n\n    \"callback-return\": 0,\n    \"global-require\": 0,\n    \"handle-callback-err\": [2, \"^(err|error)$\"],\n    \"no-mixed-requires\": 0,\n    \"no-new-require\": 2,\n    \"no-path-concat\": 0,\n    \"no-process-env\": 0,\n    \"no-process-exit\": 0,\n    \"no-sync\": 0,\n\n\n    \"array-bracket-spacing\": [2, \"never\"],\n    \"block-spacing\": [1, \"never\"],\n    \"brace-style\": [0, \"1tbs\", {\n      \"allowSingleLine\": true\n    }],\n    \"camelcase\": 2,\n    \"comma-spacing\": [2, {\n      \"before\": false,\n      \"after\": true\n    }],\n    \"comma-style\": [2, \"last\"],\n    \"computed-property-spacing\": [2, \"never\"],\n    \"consistent-this\": [1, \"that\"],\n    \"func-names\": 0,\n    \"eol-last\": 2,\n    \"indent\": [2, 2, {\n      \"SwitchCase\": 1\n    }],\n    \"key-spacing\": [2, {\n      \"beforeColon\": false,\n      \"afterColon\": true\n    }],\n    \"linebreak-style\": [1, \"unix\"],\n    \"lines-around-comment\": [1, {\n      \"beforeBlockComment\": true\n    }],\n    \"func-style\": 0,\n    \"max-nested-callbacks\": [1, 5],\n    \"id-blacklist\": 0,\n    \"id-length\": 0,\n    \"id-match\": 0,\n    \"jsx-quotes\": 0,\n    \"keyword-spacing\": 2,\n    \"max-len\": [1, 200],\n    \"max-lines\": 0,\n    \"max-params\": [1, 7],\n    \"max-statements\": [1, 200],\n    \"max-statements-per-line\": 0,\n    \"new-cap\": [2, {\n      \"newIsCap\": true,\n      \"capIsNew\": false\n    }],\n    \"new-parens\": 2,\n    \"newline-after-var\": 0,\n    \"no-array-constructor\": 2,\n    \"no-bitwise\": 0,\n    \"newline-before-return\": 0,\n    \"newline-per-chained-call\": 1,\n    \"no-continue\": 0,\n    \"no-inline-comments\": 0,\n    \"no-lonely-if\": 0,\n    \"no-mixed-operators\": 0,\n    \"no-mixed-spaces-and-tabs\": 2,\n    \"no-multiple-empty-lines\": [2, {\n      \"max\": 2\n    }],\n    \"no-negated-condition\": 0,\n    \"no-nested-ternary\": 0,\n    \"no-new-object\": 2,\n    \"no-plusplus\": 0,\n    \"no-restricted-syntax\": 0,\n    \"no-spaced-func\": 2,\n    \"no-ternary\": 0,\n    \"no-trailing-spaces\": 2,\n    \"no-underscore-dangle\": 0,\n    \"no-unneeded-ternary\": 2,\n    \"no-whitespace-before-property\": 0,\n    \"object-curly-newline\": 0,\n    \"object-curly-spacing\": 0,\n    \"object-property-newline\": 0,\n    \"one-var\": [2, {\n      \"initialized\": \"never\"\n    }],\n    \"one-var-declaration-per-line\": 0,\n    \"operator-assignment\": 0,\n    \"operator-linebreak\": [2, \"after\", {\n      \"overrides\": {\n        \"?\": \"before\",\n        \":\": \"before\"\n      }\n    }],\n    \"padded-blocks\": 0,\n    \"quote-props\": 0,\n    \"quotes\": [2, \"single\", \"avoid-escape\"],\n    \"require-jsdoc\": 0,\n    \"semi\": [0, \"always\"],\n    \"semi-spacing\": 0,\n    \"sort-vars\": 0,\n    \"space-before-blocks\": [2, \"always\"],\n    \"space-before-function-paren\": [0, \"always\"],\n    \"space-in-parens\": [2, \"never\"],\n    \"space-infix-ops\": 2,\n    \"space-unary-ops\": [2, {\n      \"words\": true,\n      \"nonwords\": false\n    }],\n    \"spaced-comment\": [2, \"always\", {\n      \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n    }],\n    \"unicode-bom\": 0,\n    \"wrap-regex\": 0,\n\n\n    \"arrow-body-style\": 0,\n    \"arrow-parens\": 0,\n    \"arrow-spacing\": [2, {\n      \"before\": true,\n      \"after\": true\n    }],\n    \"constructor-super\": 0,\n    \"generator-star-spacing\": [2, {\n      \"before\": true,\n      \"after\": true\n    }],\n    \"no-class-assign\": 2,\n    \"no-confusing-arrow\": 0,\n    \"no-const-assign\": 2,\n    \"no-dupe-class-members\": 2,\n    \"no-duplicate-imports\": 0,\n    \"no-new-symbol\": 2,\n    \"no-restricted-imports\": 0,\n    \"no-this-before-super\": 2,\n    \"no-useless-computed-key\": 0,\n    \"no-var\": 0,\n    \"object-shorthand\": 0,\n    \"prefer-arrow-callback\": 0,\n    \"prefer-const\": 0,\n    \"prefer-reflect\": 0,\n    \"prefer-spread\": 0,\n    \"prefer-template\": 0,\n    \"prefer-rest-params\": 0,\n    \"require-yield\": 0,\n    \"rest-spread-spacing\": 0,\n    \"sort-imports\": 0,\n    \"template-curly-spacing\": 1,\n    \"yield-star-spacing\": 2\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-linter/.gitignore",
    "content": ".DS_Store\n.vscode\n.nyc_output\n"
  },
  {
    "path": "packages/chameleon-linter/bin/cli.js",
    "content": "#!/usr/bin/env node\n// --inspect-brk\nconst program = require('commander');\nconst packageJson = require('../package.json');\nconst main = require('../index');\n\nprocess.on('unhandledRejection', error => {\n  // Will print \"unhandledRejection err is not defined\"\n  console.log('unhandledRejection', error.message);\n});\n\nprogram\n  .version(packageJson.version)\n  .parse(process.argv);\nlet currentWorkspace = process.cwd();\nglobal.workspace = currentWorkspace;\n\nprocess.on('unhandledRejection', error => {\n  console.log(error);\n});\nmain(currentWorkspace, true);\n\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/index.js",
    "content": "module.exports = {\n  // json校验\n  json: require('./json'),\n\n  // 脚本校验\n  script: require('./script'),\n\n  // 样式校验\n  style: require('./style'),\n\n  // 模板校验\n  Template: require('./template')\n};\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/json.js",
    "content": "const config = require('../config');\nconst cmlUtils = require('chameleon-tool-utils');\n\n/**\n * 查找token\n *\n * @param  {Object} ast      语法树\n * @param  {Array}  tokens   token列表\n * @param  {string} template 模板\n * @return {Object}          查找结果\n */\nlet findTokens = (ast, tokens, template) => {\n  let result = {};\n\n  if (ast) {\n    ast.program.body[0].expression.right.properties.forEach(property => {\n      if (property.key.value == tokens[0]) {\n        if (tokens.length == 1) {\n          result = {\n            line: property.key.loc.start.line - 1,\n            column: property.key.loc.start.column,\n            token: tokens.join('.'),\n            msg: template.replace(/\\{\\{token\\}\\}/, tokens.join(','))\n          };\n        }\n        else if (tokens.length === 2) {\n          property.value.properties.forEach(property => {\n            if (property.key.value == tokens[1]) {\n              result = {\n                line: property.key.loc.start.line - 1,\n                column: property.key.loc.start.column,\n                token: tokens.join('.'),\n                msg: template.replace(/\\{\\{token\\}\\}/, tokens.join('.'))\n              };\n            }\n          });\n        }\n        else {\n          property.value.properties.forEach(property => {\n            if (property.key.value == tokens[1]) {\n              if (property.value.properties) {\n                property.value.properties.forEach(property => {\n                  if (property.key.value == tokens[2]) {\n                    result = {\n                      line: property.value.loc.start.line - 1,\n                      column: property.value.loc.start.column,\n                      token: tokens.join('.'),\n                      msg: template\n                    };\n                  }\n                });\n              }\n            }\n          });\n        }\n      }\n    });\n  }\n  return result;\n}\n\nlet checkComponentName = (name) => {\n  let keys = [\n    'a', 'div', 'image', 'indicator', 'input', 'list', 'cell', 'recycle-list',\n    'loading', 'refresh', 'scroller', 'slider', 'switch', 'text', 'textarea',\n    'video', 'waterfall', 'web', 'richtext'\n  ];\n\n  if (keys.indexOf(name) > -1) {\n    return false;\n  }\n  return true;\n};\n\nmodule.exports = (result) => {\n  if (result.json && result.json.obj) {\n    let json = result.json.obj;\n    let platforms = config.getPlatforms();\n    if (!result.json.platform || result.json.platform == 'weex') {\n      let usingComponents = (json.base || {}).usingComponents || {};\n      for (let key in usingComponents) {\n        if (!checkComponentName(key)) {\n          if (result.json.ast) {\n            result.json.messages.push(findTokens(result.json.ast, ['base', 'usingComponents', key], 'component [' + key + '] is conflicted with weex buildin component, please rename the component!'));\n          }\n        }\n      }\n      let platformUsingComponents = ((json[result.json.platform] || {}).usingComponents) || {};\n      for (let key in platformUsingComponents) {\n        if (!checkComponentName(key)) {\n          if (result.json.ast) {\n            result.json.messages.push(findTokens(result.json.ast, ['weex', 'usingComponents', key], 'component [' + key + '] is conflicted with weex buildin component, please rename the component'));\n          }\n        }\n      }\n    }\n\n\n    // 分平台\n    if (result.json.platform) {\n      platforms.forEach((item) => {\n        if (json[item] && item != result.json.platform) {\n          if (result.json.ast) {\n            result.json.messages.push(findTokens(result.json.ast, [item], 'Useless fields: {{token}}'));\n          }\n        }\n      });\n    }\n    // 不分平台\n    else {\n      platforms.forEach((item) => {\n        if (json[item] && json[item].usingComponents) {\n          if (result.json.ast) {\n            result.json.messages.push(findTokens(result.json.ast, [item, 'usingComponents'], 'Useless fields: {{token}}'));\n          }\n        }\n      });\n    }\n\n\n    ['base'].concat(platforms).forEach(item => {\n      if (json[item] && json[item].usingComponents) {\n        for (let key in json[item].usingComponents) {\n          let filePath = json[item].usingComponents[key];\n          filePath = filePath.split('?')[0];\n          let currentWorkspace = config.getCurrentWorkspace();\n          let componentInfo = cmlUtils.lintHandleComponentUrl(currentWorkspace, result.json.file, filePath);\n\n          if (!componentInfo.filePath && componentInfo.refUrl) {\n            if (componentInfo.refUrl.indexOf('plugin://') != 0 && result.json.ast) {\n              result.json.messages.push(findTokens(result.json.ast, [item, 'usingComponents', key], 'component: [' + filePath + '] is not found'));\n            }\n          }\n        }\n      }\n    });\n  }\n\n};\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/script.js",
    "content": "const traverse = require('@babel/traverse')['default'];\nconst utils = require('../utils');\n\n/**\n * 获取接口定义\n *\n * @param  {Object} ast ast\n * @return {Object}     分析结果\n */\nconst getInterfaces = (ast) => {\n  let result = {\n    name: '',\n    properties: {}\n  };\n  ast.program.body.forEach(function (node) {\n    if (node.type == 'InterfaceDeclaration') {\n      let interfaceName = node.id.name;\n      result.name = interfaceName;\n      result.loc = {\n        line: node.id.loc.start.line,\n        column: node.id.loc.start.column\n      };\n      node.body.properties.map((property) => {\n        result.properties[property.key.name] = {\n          type: property.value.type.replace(/TypeAnnotation/g, ''),\n          line: property.key.loc.start.line,\n          column: property.key.loc.start.column\n        };\n      });\n    }\n  });\n  return result;\n};\n\n/**\n * 获取类定义\n * @param   {Object} ast ast\n * @param   {Object} isComp a flag indentify whether the ast is component or an interface portion\n * @return  {Object}     类定义\n */\nconst getClass = (ast, isComp) => {\n  return isComp ? getCompClassDef(ast) : getInterfacePortionClassDef(ast);\n};\n\n\nfunction getCompClassDef(ast) {\n  let classes = [];\n  let clazz = {\n    interfaces: [],\n    properties: [],\n    events: [],\n    methods: []\n  };\n\n  traverse(ast, {\n    ClassDeclaration(path) {\n      // 接口\n      if (path.node['implements']) {\n        path.node['implements'].forEach(implament => {\n          clazz.interfaces.push(implament.id.name);\n        });\n      }\n\n      path.node.body.body.forEach(define => {\n        if (define.key.name == 'props') {\n          define.value.properties.forEach(property => {\n            clazz.properties.push(property.key.name);\n          });\n        }\n        else if (define.key.name == 'methods') {\n          define.value.properties.filter(property => {\n            return property.type === 'ObjectMethod';\n          }).forEach(property => {\n            clazz.methods.push(property.key.name);\n          });\n        }\n      });\n\n      classes.push(clazz);\n    },\n    MemberExpression(path) {\n      if (!path.node.computed && path.get('object').isThisExpression() && path.get('property').isIdentifier()) {\n        if (path.node.property.name === '$cmlEmit') {\n          let parentNode = path.findParent(path => path.isCallExpression());\n          if (parentNode && parentNode.get('arguments')) {\n            let event = null;\n            let nameArg = parentNode.get('arguments')[0];\n            if (nameArg.isStringLiteral()) {\n              event = {\n                event: nameArg.node.value,\n                line: nameArg.node.loc.start.line,\n                column: nameArg.node.loc.start.column\n              };\n            } else if (nameArg.isIdentifier()) {\n              let argBinding = nameArg.scope.getBinding(nameArg.node.name);\n              let possibleInit = argBinding ? argBinding.path.node.init : null;\n              // For now, we only check just one jump along its scope chain.\n              if (possibleInit && possibleInit.type === 'StringLiteral') {\n                event = {\n                  event: possibleInit.value,\n                  line: nameArg.node.loc.start.line,\n                  column: nameArg.node.loc.start.column\n                };\n              }\n            }\n            if (event) {\n              clazz.methods.push(event.event);\n              clazz.events.push(event);\n            }\n          }\n        }\n      }\n    }\n  });\n\n  return classes;\n}\n\nfunction getInterfacePortionClassDef(ast) {\n  let classes = [];\n\n  traverse(ast, {\n    enter(path) {\n      if (path.node.type == 'ClassDeclaration') {\n        let clazz = {\n          interfaces: [],\n          properties: [],\n          events: [],\n          methods: []\n        };\n\n        // 接口\n        if (path.node['implements']) {\n          path.node['implements'].forEach(implament => {\n            clazz.interfaces.push(implament.id.name);\n          });\n        }\n\n        path.node.body.body.forEach(define => {\n          if (define.type == 'ClassProperty') {\n            clazz.properties.push(define.key.name);\n          } else if (define.type === 'ClassMethod') {\n            define.key.name && (clazz.methods.push(define.key.name));\n          }\n        });\n\n        classes.push(clazz);\n      }\n    }\n  });\n\n  return classes;\n}\n\n\n/**\n * 校验接口与脚本\n *\n * @param  {Object}  interfaceAst 接口ast\n * @return {Array}                数组\n */\nconst checkScript = async (result) => {\n  let validPlatforms = Object.keys(result)\n    .filter(platform => {\n      return platform && (!~['json', 'template', 'style', 'script'].indexOf(platform));\n    })\n    .filter(platform => {\n      return platform && (platform != 'interface');\n    });\n  // add a script type for multi-file components.\n  result['interface'] && validPlatforms.concat('script').forEach(platform => {\n    let script;\n    let isComp = (platform === 'script');\n    if (result[platform] && result[platform].ast) {\n      script = result[platform];\n    }\n    if (result['interface'] && result['interface'].ast && script && script.ast) {\n      const interfaceDefine = getInterfaces(result['interface'].ast);\n      const classDefines = getClass(script.ast, isComp);\n      classDefines.forEach(clazz => {\n        let define = null;\n        clazz.interfaces.forEach(interfaceName => {\n          define = interfaceDefine.name === interfaceName ? interfaceDefine.properties : null;\n          if (!define) {\n            result['interface'].messages.push({\n              msg: `The implement class name: \"${interfaceName}\" used in file: \"${utils.toSrcPath(script.file)}\" doesn\\'t match the name defined in it\\'s interface file: \"${utils.toSrcPath(result['interface'].file)}\"`\n            });\n            return;\n          }\n          for (let key of Object.keys(define)) {\n            if ((define[key] && define[key].type == 'Generic') && clazz.properties.indexOf(key) == -1) {\n              result['interface'].messages.push({\n                line: define[key].line,\n                column: define[key].column,\n                token: key,\n                msg: `interface property \"${key}\" is not defined for platform ${script.platform} in file \"${utils.toSrcPath(script.file)}\"`\n              });\n            }\n            else if ((define[key] && define[key].type == 'Function' && clazz.methods.indexOf(key) === -1)) {\n              result['interface'].messages.push({\n                line: define[key].line,\n                column: define[key].column,\n                token: key,\n                msg: `interface method \"${key}\" is not defined for platform ${script.platform} in file \"${utils.toSrcPath(script.file)}\"`\n              });\n            }\n          }\n        });\n\n        define && clazz.events.forEach(event => {\n          if (!define[event.event] || (define[event.event] && (define[event.event].type != 'Function'))) {\n            script.messages.push({\n              line: event.line,\n              column: event.column,\n              token: event.event,\n              msg: 'event \"' + event.event + '\" is not defined in interface file \"' + utils.toSrcPath(result['interface'].file) + '\"'\n            });\n          }\n        });\n      });\n    }\n  });\n};\n\n\nmodule.exports = checkScript;\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/style.js",
    "content": "const config = require('../config');\n\nfunction getCmlType(mediaParams = '') {\n  let types = [];\n  if (mediaParams) {\n    let typeStr = /\\((.*)\\)/.exec(mediaParams);\n    if (typeStr && typeStr[1]) {\n      types = typeStr[1].split(',')\n        .filter(type => !!type.trim())\n        .map(type => {\n          return type.trim().toLowerCase();\n        });\n    }\n  }\n  return types;\n}\n\nfunction detectFloatProp(rule, result) {\n  rule.walkDecls('float', (decl) => {\n    result.style.messages.push({\n      line: decl.source.start.line,\n      column: decl.source.start.column,\n      token: decl.prop,\n      msg: `Weex does not support style property: \"${decl.prop}\", therefor you should not use \"float\" under a media rule with weex parameter or use \"float\" in a template file with platform type set to weex`\n    });\n  });\n}\n\nfunction isMediaNode(node) {\n  return node && node.type === 'atrule' && node.name === 'media';\n}\n\nconst RULER_MAP = {\n  'important': {\n    rule: function (decl, platform) {\n      return config.neexLintWeex() && (!platform || platform == 'weex') && decl.important === true;\n    },\n    msg: function (decl) {\n      return `The CSS attribute \"${decl.prop}\" does not support \"!important\"`\n    }\n  },\n  'percentages': {\n    rule: function (decl, platform) {\n      return config.neexLintWeex() && (!platform || platform == 'weex') && /%\\s*$/g.test(decl.value);\n    },\n    msg: function (decl, platform) {\n      return `The CSS attribute \"${decl.prop}\" does not support percentages`;\n    }\n  },\n  'lineHeight': {\n    rule: function (decl, platform) {\n      return config.neexLintWeex() && (!platform || platform == 'weex') && decl.prop == 'line-height' && /^\\d+$/.test(decl.value);\n    },\n    msg: function (decl) {\n      return `The CSS attribute \"${decl.prop}\" does not support the number type unit`;\n    }\n  },\n  'cpx': {\n    rule: function (decl, platform) {\n      return config.getRuleOption('cpx-support') && !platform && /\\d+\\s*(rpx|px)\\s*$/g.test(decl.value);\n    },\n    msg: function (decl) {\n      return `The CSS attribute \"${decl.prop}\" must use \\'cpx\\' as it\\'s unit`;\n    }\n  },\n  'display': {\n    rule: function (decl, platform) {\n      return config.neexLintWeex() && (!platform || platform == 'weex') && decl.prop == 'display' && (decl.value == 'none' || decl.value == 'inline-block');\n    },\n    msg: function (decl) {\n      return 'The CSS attribute \"display\" does not support \"' + decl.value + '\" as it\\'s value';\n    }\n  }\n  // 'flex': {\n  //   rule: function (decl, platform) {\n  //     if (config.neexLintWeex() && (!platform || platform === 'weex') && decl.prop == 'display' && decl.value == 'flex') {\n  //       let flag = true;\n  //       decl.parent.nodes.forEach(node => {\n  //         if (node.prop == 'flex-direction') {\n  //           flag = false;\n  //         }\n  //       });\n  //       return flag;\n  //     }\n  //   },\n  //   msg: function (decl) {\n  //     return 'When the CSS attribute \"display\" value is \"flex\", you need to add the attribute \"flex-direction\" at the same time';\n  //   }\n  // }\n};\n\nconst SELECTOR_MAP = {\n  'pseudo': {\n    rule: function (selector, platform) {\n      let flag = false;\n      if (config.neexLintWeex() && (!platform || platform == 'weex')) {\n        selector.replace(/\\:([^\\s]+)/g, (match, pseudo) => {\n          if (['active', 'focus', 'disabled', 'enabled'].indexOf(pseudo) == -1) {\n            flag = true;\n          }\n        });\n      }\n      return flag;\n    },\n    msg: function (selector) {\n      return 'The CSS selector \"' + selector + '\" only supports pseudo-classes of \"active, focus, disabled, enabled\"';\n    }\n  }\n};\n\n\nmodule.exports = (result) => {\n  if (result.style && result.style.ast) {\n    let platform = result.style.platform;\n    let root = result.style.ast;\n\n    root.walk((node) => {\n      (node.selectors || []).forEach(selector => {\n        Object.keys(SELECTOR_MAP).forEach(key => {\n          if (SELECTOR_MAP[key].rule(selector, platform)) {\n            result.style.messages.push({\n              line: node.source.start.line,\n              column: node.source.start.column,\n              token: node.value,\n              msg: SELECTOR_MAP[key].msg(selector)\n            });\n          }\n        });\n      });\n    });\n\n    root.walkDecls((decl) => {\n      Object.keys(RULER_MAP).forEach(key => {\n        let stylePolymorphic = false;\n        let media = decl.parent && decl.parent.parent;\n\n        if (media && media.name == 'media') {\n          if (new RegExp(/cml\\-type\\s*\\(\\s*[\\S]+\\s*\\)/g).test(media.params)) {\n            stylePolymorphic = true;\n          }\n        }\n\n        if (!stylePolymorphic && RULER_MAP[key].rule(decl, platform)) {\n          result.style.messages.push({\n            line: decl.source.start.line,\n            column: decl.source.start.column,\n            token: decl.value,\n            msg: RULER_MAP[key].msg(decl)\n          });\n        }\n      });\n    });\n\n    // polymorphic components forbid float property.\n    if (config.neexLintWeex() && platform === 'weex') {\n      detectFloatProp(root, result);\n    }\n    // single file components.\n    if (config.neexLintWeex() && (platform === undefined || platform === 'cml')) {\n      root.walkRules((rule) => {\n        if (!isMediaNode(rule.parent) || ~getCmlType(rule.parent.params).indexOf('weex')) {\n          detectFloatProp(rule, result);\n        }\n      });\n    }\n  }\n};\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/index.js",
    "content": "const jsAstParser = require('./lib/js-ast-parser');\nconst templateAstParser = require('./lib/template-ast-parser');\nconst jsonAstParser = require('./lib/json-ast-parser');\nconst commonEvents = require('../../config/common-events.json');\n\nclass TemplateChecker {\n\n  /**\n     * constructor\n     * @param {Object} trees\n     * {\n     *    templateAst: {},\n     *    scriptAst: {},\n     *    jsonAst: {}\n     * }\n     */\n  constructor(filePath = '', lintedResult = {}) {\n    this._filePath = filePath;\n    this._platform = lintedResult.template.platform;\n\n    this._templateAst = lintedResult.template.ast;\n    this._scriptAst = lintedResult.script.ast;\n    this._jsonAst = lintedResult.json.obj;\n\n    this._parsedTemplateResults = '';\n    this._parsedScriptResults = '';\n    this._usingComponents = '';\n\n    this.parseAllParts();\n  }\n\n  parseAllParts() {\n    this._usingComponents = jsonAstParser.getUsingComponents(this._jsonAst, this._filePath);\n    this._parsedScriptResults = jsAstParser.getParseResults(this._scriptAst);\n    this._parsedTemplateResults = templateAstParser.getParseResults(this._templateAst, {\n      usingComponents: Object.keys(this._usingComponents),\n      platform: this._platform\n    });\n  }\n\n  checkCustomizedComponents() {\n    let issues = [];\n    let usingComponents = this._usingComponents;\n    let customizedComponets = this._parsedTemplateResults.customizedComponents;\n\n    customizedComponets.forEach((component) => {\n      Object.entries(component).forEach((compInfo) => {\n        let compName = compInfo[0];\n        if (usingComponents[compName] && usingComponents[compName].isCml) {\n          let { props, events } = component[compName];\n          let { props: usingProps, events: usingEvents } = usingComponents[compName];\n          usingProps = usingProps\n            .map((prop) => prop.name)\n            .join('|');\n          usingEvents = usingEvents\n            .map((event) => event.name)\n            .concat(commonEvents.events)\n            .join('|');\n          usingProps = `|${usingProps}|`;\n          usingEvents = `|${usingEvents}|`;\n          props.filter((prop) => usingProps.indexOf('|' + prop.name + '|') === -1).forEach((prop) => {\n            issues.push({\n              line: prop.pos[0],\n              column: prop.pos[1],\n              token: prop.rawName,\n              msg: `The property \"${prop.rawName}\" is not a property of component \"${compName}\" which path is: ${usingComponents[compName].path}`\n            });\n          });\n\n          events.filter((event) => usingEvents.indexOf('|' + event.name + '|') === -1).forEach((event) => {\n            issues.push({\n              line: event.pos[0],\n              column: event.pos[1],\n              token: event.name,\n              msg: `The event \"${event.name}\" is not defined in component \"${compName}\" which path is: ${usingComponents[compName].path}`\n            });\n          });\n        }\n      });\n    });\n\n    return issues;\n  }\n\n  checkTemplateAndScript() {\n    let jsAstResults = this._parsedScriptResults;\n    let templateAstResults = this._parsedTemplateResults;\n    let issues = [];\n\n    templateAstResults.methods.forEach(method => {\n      if (jsAstResults.methods.indexOf(method.name) === -1) {\n        issues.push({\n          line: method.pos[0],\n          column: method.pos[1],\n          token: method.name,\n          msg: `method: \"${method.name}\" is not defined.`\n        });\n      }\n    });\n\n    templateAstResults.vars.forEach((varItem) => {\n      if (jsAstResults.vars.indexOf(varItem.name) === -1) {\n        issues.push({\n          line: varItem.pos[0],\n          column: varItem.pos[1],\n          token: varItem.name,\n          msg: `variable: \"${varItem.name}\" is not defined.`\n        });\n      }\n    });\n\n    return issues;\n  }\n\n  check() {\n    return [...this.checkCustomizedComponents(), ...this.checkTemplateAndScript()];\n  }\n}\n\nmodule.exports = TemplateChecker;\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/js-ast-parser.js",
    "content": "const CmlJsAstTreeParser = require('cml-js-parser');\nconst config = require('../../../config');\n\nfunction getParseResults(astTree) {\n  let parser = new CmlJsAstTreeParser({astTree}, config.getParserConfig().script);\n  return parser.getParseResults();\n}\n\nmodule.exports = {\n  getParseResults\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/json-ast-parser.js",
    "content": "const Parser = require('cml-component-parser');\nconst cmlUtils = require('chameleon-tool-utils');\nconst utils = require('../../../utils');\nconst config = require('../../../config');\n\nfunction getUsingComponents(jsonAst, filePath = '') {\n  let results = {};\n  let currentWorkspace = config.getCurrentWorkspace();\n  let interfaceParser = new Parser(null, config.getParserConfig().script, currentWorkspace);\n\n  if (jsonAst && jsonAst.base && jsonAst.base.usingComponents) {\n    Object\n      .entries(jsonAst.base.usingComponents)\n      .map((componentInfoPair) => {\n        return {\n          name: utils.toDash(componentInfoPair[0]),\n          path: componentInfoPair[1]\n        };\n      })\n      .filter((infoPair) => {\n        return !(infoPair.path.indexOf('plugin://') === 0);\n      })\n      .forEach((infoPair) => {\n        // filePath: is a full absolute path of the target template file\n        // inforPair.path: is the original path of base: {usingComponents: 'path/to/referenced component'}\n        let interfaceInfo = cmlUtils.findInterfaceFile(currentWorkspace, filePath, infoPair.path);\n        let componentInfo = cmlUtils.lintHandleComponentUrl(currentWorkspace, filePath, infoPair.path);\n        let useDefine = interfaceInfo;\n\n        if (!useDefine.filePath) {\n          if (componentInfo && componentInfo.filePath) {\n            useDefine = componentInfo;\n          }\n        }\n\n        results[infoPair.name] = {\n          path: useDefine.filePath\n        };\n        results[infoPair.name] = {\n          ...results[infoPair.name],\n          ...interfaceParser.resetPath(results[infoPair.name].path).getParseResults()\n        }\n\n        results[infoPair.name].isCml = !!interfaceInfo.filePath || componentInfo.isCml;\n        results[infoPair.name].isOrigin = !results[infoPair.name].isCml;\n        // if we can not get filePath then we delete this component, because the component is not well coded.\n        if (!useDefine.filePath) {\n          delete results[infoPair.name]\n        }\n      });\n  }\n  return results;\n}\n\nmodule.exports = {\n  getUsingComponents\n};\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/classes/customized-node.js",
    "content": "/**\n * A class represents a customized component.\n */\nclass CustomizedNode {\n  constructor(tag, lang = 'cml') {\n    this.lang = lang;\n    this.name = tag.name;\n    this.attribs = {...tag.attribs};\n  }\n\n  get attrs() {\n    let attrs = this.attribs;\n    return Object.keys(attrs).map((attrName) => {\n      return {\n        name: attrName,\n        namePos: attrs[attrName].nameLineCol,\n        value: attrs[attrName].value,\n        valuePos: attrs[attrName].valueLineCol\n      };\n    });\n  }\n}\n\nmodule.exports = CustomizedNode;\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/classes/rule-loader.js",
    "content": "class RuleLoader {\n  constructor(rules) {\n    this.rulesMap = {};\n    if (rules) {\n      this.addSubscribers(rules);\n    }\n  }\n\n  addSubscribers(rules) {\n    rules.forEach(function(rule) {\n      rule.subscribers = [];\n      rules.forEach((onRule) => {\n        if (onRule.on && ~onRule.on.indexOf(rule.name)) {\n          rule.subscribers.push(onRule);\n        }\n      });\n      this.rulesMap[rule.name] = rule;\n    }.bind(this));\n  }\n\n  getRuleByName(ruleName) {\n    return this.rulesMap[ruleName];\n  }\n}\n\nmodule.exports = RuleLoader;\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/classes/suspicious-node.js",
    "content": "/**\n * A class reprents nodes that are waiting for passing to getting variable rules.\n */\nclass SuspiciousNode {\n\n  constructor({name = '', rawValue = '', valuePos = [], lang = 'cml', scope = [], isTextNode = false}) {\n    this.name = name;\n    this.rawValue = rawValue;\n    this.valuePos = valuePos;\n    this.lang = lang;\n\n    /**\n     * loopScopes property is holding the for loop varibables. For example for v-for\n     * directive in vue.js, say v-for='(item , index) in array', then we will append an\n     * array with value:\n     * [item, index]\n     * into loopScopes property.\n     */\n    this.loopScopes = scope;\n    this.isTextNode = isTextNode;\n    this.isAttr = !this.isTextNode;\n  }\n}\n\nmodule.exports = SuspiciousNode;\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/index.js",
    "content": "const astTreeTraversal = require('./lib/ast-tree-traversal');\nconst suspiciousNodeDispatcher = require('./lib/suspicious-node-dispatcher');\nconst customizedNodeDispatcher = require('./lib/customized-node-dispatcher');\nconst options = require('./options');\n\n/**\n * Get all possible properties' value that may be a variable or a method name.\n * @param {Object} templateAst\n * @param {Object} usingComponents An array contains customized components' names\n * @returns {Object} {vars: [], methods: [], customizedComponents: {comp: {props: [], events: []}}}\n */\nfunction getParseResults(templateAst, {usingComponents = [], platform = 'cml'}) {\n  let rootTag = templateAst[0];\n  let templateLang = 'cml';\n\n  if (rootTag.attribs.lang && ~options.getOption('langs').indexOf(rootTag.attribs.lang.value = rootTag.attribs.lang.value.trim())) {\n    templateLang = rootTag.attribs.lang.value;\n  }\n\n  // ast tree traversal to get attribute nodes, textNodes and customized components.\n  let {components: customizedComponents, nodes} = astTreeTraversal.travel({\n    root: rootTag,\n    lang: templateLang,\n    platform,\n    usingComponents\n  });\n\n  let varandMethods = suspiciousNodeDispatcher.getResults(nodes);\n  let propandEvents = customizedNodeDispatcher.getResults(customizedComponents);\n\n  return {\n    vars: varandMethods.filter((node) => node.variable),\n    methods: varandMethods.filter((node) => node.method),\n    customizedComponents: propandEvents\n  };\n}\n\nmodule.exports = {\n  getParseResults\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/lib/ast-tree-traversal.js",
    "content": "const SuspiciousNode = require('../classes/suspicious-node');\nconst CustomizedNode = require('../classes/customized-node');\nconst Tools = require('../tools');\n\nlet _usingComponents = [];\nlet _platform = 'cml';\nlet _lang = 'cml';\n\nlet _customizedComponents = [];\nlet _allSuspiciousNodes = [];\n\n\nfunction _clean() {\n  _customizedComponents = [];\n  _allSuspiciousNodes = [];\n}\n\nfunction saveToCustomizedComponents(tag) {\n  (_usingComponents.indexOf(tag.name) > -1) && _customizedComponents.push(new CustomizedNode(tag, Tools.isOriginComponent(tag) ? _platform : _lang));\n}\n\nfunction saveToTextNodes(node, scope) {\n  if (Tools.isSuspiciousTextnode({lang: _lang, text: node.data})) {\n    _allSuspiciousNodes.push(new SuspiciousNode({\n      name: '',\n      rawValue: node.data,\n      valuePos: node.lineCol,\n      lang: _lang,\n      scope: scope,\n      isTextNode: true\n    }));\n  }\n}\n\nfunction saveToPossibleAttrs(attrs) {\n  _allSuspiciousNodes = _allSuspiciousNodes.concat(attrs.map(attr => {\n    return new SuspiciousNode({\n      name: attr.name,\n      rawValue: attr.value,\n      valuePos: attr.valueLineCol,\n      lang: attr.lang,\n      scope: attr.scope,\n      isTextNode: false\n    });\n  }));\n}\n\nfunction _travel(tag) {\n  if (tag.type === 'tag') {\n    saveToCustomizedComponents(tag);\n\n    !tag._cmlScopes && (tag._cmlScopes = []);\n    if (Tools.hasForLoopDirective({tag, lang: _lang})) {\n      tag._cmlScopes.push(Tools.getScopeFromTag({tag, lang: _lang}));\n    }\n\n    saveToPossibleAttrs(Object.keys(tag.attribs).map((item) => {\n      // becasue attribute's valueLineCol is actually calculated based on rawValue, so we need readjusting the column.\n      tag.attribs[item].rawValue && (tag.attribs[item].valueLineCol[1] = tag.attribs[item].valueLineCol[1] + tag.attribs[item].rawValue.indexOf(tag.attribs[item].value));\n      return {\n        name: item,\n        lang: Tools.isOriginComponent(tag) ? _platform : _lang,\n        scope: [...tag._cmlScopes],\n        value: tag.attribs[item].value,\n        valueLineCol: tag.attribs[item].valueLineCol\n      };\n    }));\n  }\n\n\n  if (tag.children && tag.children.length > 0) {\n    tag.children.filter((item) => {\n      if (item.type === 'text') {\n        saveToTextNodes(item, [...tag._cmlScopes]);\n      }\n      return item.type === 'tag';\n    }).forEach((childTag) => {\n      childTag._cmlScopes = [...tag._cmlScopes];\n      _travel(childTag);\n    });\n  }\n}\n\nfunction travel({root, lang = 'cml', platform = 'cml', usingComponents = []}) {\n\n  _usingComponents = usingComponents; _platform = platform; _lang = lang;\n\n  _clean();\n  // make a deep copy of root ast, so we won't effect oiriginal structure during our process.\n  _travel({...root});\n\n  return {\n    components: _customizedComponents,\n    nodes: _allSuspiciousNodes\n  };\n}\n\nmodule.exports = {\n  travel\n};\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/lib/customized-node-dispatcher.js",
    "content": "const rules = require('../rules/component');\nconst options = require('../options');\nconst RuleLoader = require('../classes/rule-loader');\n\nmodule.exports.getResults = function(nodes) {\n  let allOptions = options.getAllOptions();\n  let results = [];\n  let loader = new RuleLoader(rules);\n\n  nodes && nodes.forEach((node) => {\n    if (~options.getOption('langs').indexOf(node.lang)) {\n      let matchRule = loader.getRuleByName('attr');\n      if (matchRule) {\n        results = results.concat(matchRule.run(node, allOptions));\n      }\n    }\n  });\n\n  // attrResults && attrResults.forEach((compNode) => {\n  //   Object.assign(results, compNode);\n  // });\n\n  return results;\n}\n\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/lib/suspicious-node-dispatcher.js",
    "content": "const rules = require('../rules/template');\nconst options = require('../options');\nconst RuleLoader = require('../classes/rule-loader');\n\nmodule.exports.getResults = function(nodes) {\n  let allOptions = options.getAllOptions();\n  let results = [];\n  let loader = new RuleLoader(rules);\n\n  nodes && nodes.forEach((node) => {\n    if (~options.getOption('langs').indexOf(node.lang)) {\n      let matchRule = loader.getRuleByName(node.lang);\n      if (matchRule) {\n        results = results.concat(matchRule.run(node, allOptions));\n      }\n    }\n  });\n  return results;\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/options.js",
    "content": "const _options = {\n  langs: ['cml', 'vue'],\n  cmlSystemVarNames: ['$event', 'Math', 'Date'],\n  vueSystemVarNames: ['$event', 'Math', 'Date']\n}\n\nmodule.exports.getOption = function(optName) {\n  return _options[optName];\n}\n\nmodule.exports.getAllOptions = function() {\n  return {..._options};\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/rules/component/attr.js",
    "content": "const Tools = require('../../tools');\n\nmodule.exports = {\n  name: 'attr'\n}\n\nmodule.exports.run = function(node, opts) {\n  let subs = this.subscribers;\n  let result = {};\n  let attrResults = [];\n\n  subs && subs.forEach((sub) => {\n    if (Tools.isRuleMatch(node, sub)) {\n      node.attrs.forEach((attr) => {\n        attrResults = attrResults.concat(sub.run(attr, opts));\n      });\n    }\n  });\n\n  result[node.name] = {props: [], events: []};\n  attrResults.forEach((attNode) => {\n    if (attNode.prop) {\n      result[node.name].props.push(attNode);\n    } else {\n      result[node.name].events.push(attNode);\n    }\n  });\n\n  return [result];\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/rules/component/cml-method-node.js",
    "content": "const methodRegex = /c-bind:(\\w+)/;\n\nmodule.exports = {\n  name: 'cml-method-node',\n  on: 'cml',\n  filter: {\n    key: 'name',\n    run: function(value) {\n      return methodRegex.test(value);\n    }\n  }\n}\n\nmodule.exports.run = function(attr, opts) {\n  let methodName = methodRegex.exec(attr.name)[1];\n  return {\n    name: methodName,\n    pos: [attr.namePos[0], attr.namePos[1] + attr.name.indexOf(methodName)],\n    prop: false,\n    event: true\n  };\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/rules/component/cml-prop-node.js",
    "content": "const Tools = require('../../tools');\n\nmodule.exports = {\n  name: 'cml-prop-node',\n  on: 'cml',\n  filter: {\n    key: 'name',\n    run: function(value) {\n      return !~['id', 'class', 'style', 'ref'].indexOf(value) && !/data-(.+)/.test(value) && !/c-(.+)/.test(value);\n    }\n  }\n}\n\nmodule.exports.run = function(attr, opts) {\n  return {\n    rawName: attr.name,\n    name: Tools.dashtoCamelcase(attr.name),\n    pos: attr.namePos,\n    prop: true,\n    event: false\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/rules/component/cml.js",
    "content": "const Tools = require('../../tools');\n\nmodule.exports = {\n  name: 'cml',\n  on: ['attr'],\n  filter: {\n    key: 'lang',\n    run: function(value) {\n      return value === 'cml'\n    }\n  }\n}\n\nmodule.exports.run = function(attr, opts) {\n  let subs = this.subscribers;\n  let attrResults = [];\n\n  subs && subs.forEach((sub) => {\n    if (Tools.isRuleMatch(attr, sub)) {\n      attrResults = attrResults.concat(sub.run(attr, opts));\n    }\n  });\n\n  return attrResults;\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/rules/component/index.js",
    "content": "const bulk = require('bulk-require');\nconst ruleExports = bulk(__dirname, '!(index).js');\n\nmodule.exports = Object.values(ruleExports);\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/rules/component/vue-method-node.js",
    "content": "const methodRegex = /^(?:v-on:|v-once:|@)(\\w+)/;\n\nmodule.exports = {\n  name: 'vue-method-node',\n  on: 'vue',\n  filter: {\n    key: 'name',\n    run: function(value) {\n      return methodRegex.test(value);\n    }\n  }\n}\n\nmodule.exports.run = function(attr, opts) {\n  let methodName = methodRegex.exec(attr.name)[1];\n  return [{\n    name: methodName,\n    pos: [attr.namePos[0], attr.namePos[1] + attr.name.indexOf(methodName)],\n    prop: false,\n    event: true\n  }];\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/rules/component/vue-prop-node.js",
    "content": "const Tools = require('../../tools');\nconst propRegex = /^v-bind|^:/;\n\nmodule.exports = {\n  name: 'vue-prop-node',\n  on: 'vue',\n  filter: {\n    key: 'name',\n    run: function(value) {\n      return propRegex.test(value);\n    }\n  }\n}\n\nmodule.exports.run = function(attr, opts) {\n  let preArg = /^(?:\\:|v-bind:)([\\w-]*)/.exec(attr.name);\n  let props = [];\n  if (preArg) {\n    preArg = preArg[1];\n    props.push({\n      rawName: preArg,\n      name: Tools.dashtoCamelcase(preArg),\n      pos: [attr.namePos[0], attr.namePos[1] + attr.name.indexOf(preArg)],\n      prop: true,\n      event: false\n    });\n  } else {\n    props = Tools.getPropsFromObjectExpression(attr.value);\n    props.map((prop) => {\n      prop.rawName = prop.name;\n      prop.name = Tools.dashtoCamelcase(prop.name);\n      prop.pos = [attr.valuePos[0] + prop.pos[0] - 1, attr.valuePos[1] + prop.pos[1]];\n      prop.prop = true; prop.event = false;\n      return prop;\n    });\n  }\n  return props;\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/rules/component/vue.js",
    "content": "const Tools = require('../../tools');\n\nmodule.exports = {\n  name: 'vue',\n  on: ['attr'],\n  filter: {\n    key: 'lang',\n    run: function(value) {\n      return value === 'vue'\n    }\n  }\n}\n\nmodule.exports.run = function(attr, opts) {\n  let subs = this.subscribers;\n  let attrResults = [];\n\n  subs && subs.forEach((sub) => {\n    if (Tools.isRuleMatch(attr, sub)) {\n      attrResults = attrResults.concat(sub.run(attr, opts));\n    }\n  });\n\n  return attrResults;\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/rules/template/cml.js",
    "content": "const Tools = require('../../tools');\nconst options = require('../../options');\n\nmodule.exports = {\n  name: 'cml'\n}\n\nmodule.exports.run = function(node, opts) {\n  let subs = this.subscribers;\n  let results = [];\n  subs && subs.forEach((sub) => {\n    if (Tools.isRuleMatch(node, sub)) {\n      results = results.concat(sub.run(node, opts));\n    }\n  });\n\n  results = results.filter((item) => {\n    return options.getOption('cmlSystemVarNames').indexOf(item.name) === -1;\n  });\n\n  return results;\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/rules/template/index.js",
    "content": "const bulk = require('bulk-require');\nconst ruleExports = bulk(__dirname, '!(index).js');\n\nmodule.exports = Object.values(ruleExports);\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/rules/template/method-node.js",
    "content": "const Tools = require('../../tools');\nconst normalMethodRegex = /\\(.*\\)/;\n\nmodule.exports = {\n  name: 'mehtod-node',\n  on: ['cml', 'vue'],\n  filter: {\n    key: 'name',\n    run: function(value) {\n      return /^c-bind|^v-on|^v-once|^@/.test(value);\n    }\n  }\n}\n\n/** *\n * @return {Array} An array contains info about variables and methods.\n * {name: 'varibale', method: false, variable: true, pos: [line, column]}\n */\nmodule.exports.run = function(node, opts) {\n  let results = [];\n  let varsandMethods = [];\n  let loopScopes = Tools.flatArray(node.loopScopes);\n\n  // if current method only contains a method name without any parentheses, then we make one with argument literal string \"true\",\n  // which won't be recognized as a variable and can avoid a systax error when the method name is match with some keywords of Javascript.\n  if (!normalMethodRegex.test(node.rawValue)) {\n    node.rawValue += '(\"true\")';\n  }\n\n  varsandMethods = Tools.parseSingleExpression(node.rawValue);\n\n  results = varsandMethods.map((item) => {\n    item.pos = [item.pos[0] + node.valuePos[0] - 1, item.pos[1] + node.valuePos[1]];\n    return item;\n  });\n\n  if (loopScopes.length) {\n    results = results.filter(resNode => !~loopScopes.indexOf(resNode.name));\n  }\n\n  return results;\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/rules/template/mustache-node.js",
    "content": "const Tools = require('../../tools');\n\nconst mustacheRegex = /{{(.*?)}}/g;\n\nmodule.exports = {\n  name: 'mustache-node',\n  on: ['cml', 'vue'],\n  filter: {\n    key: 'rawValue',\n    run: function(value) {\n      return mustacheRegex.test(value);\n    }\n  }\n}\n\n/** *\n * @return {Array} An array contains info about variables and methods.\n * {name: 'varibale', method: false, variable: true, pos: [line, column]}\n */\nmodule.exports.run = function(node, opts) {\n  let results = [];\n  let expressionResults = [];\n  let loopScopes = Tools.flatArray(node.loopScopes);\n\n  node.rawValue && node.rawValue.replace(mustacheRegex, (match, expressionStr, offset) => {\n    expressionResults = expressionResults.concat(Tools.parseSingleExpression(expressionStr));\n    expressionResults.map((resNode) => {\n      resNode.pos[1] = resNode.pos[1] + offset + match.indexOf(expressionStr);\n      return resNode;\n    });\n  });\n  // reset positons of variables and methods based on rawValue.\n  results = expressionResults.map((resNode) => {\n    resNode.pos = Tools.getVarOffsetPosFromText(node.rawValue, resNode.name, resNode.pos[1]);\n    resNode.pos = [resNode.pos[0] + node.valuePos[0], resNode.pos[0] > 0 ? (resNode.pos[1] + 1) : (resNode.pos[1] + node.valuePos[1])];\n    return resNode;\n  });\n\n  if (loopScopes.length) {\n    results = results.filter(resNode => !~loopScopes.indexOf(resNode.name));\n  }\n\n  return results;\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/rules/template/vue-directive-node.js",
    "content": "const Tools = require('../../tools');\n\nmodule.exports = {\n  name: 'vue-directive-node',\n  on: ['vue'],\n  filter: {\n    key: 'name',\n    run: function(value) {\n      return ~['v-else-if', 'v-for', 'v-html', 'v-if', 'v-model', 'v-show', 'v-text'].indexOf(value) || /^:|^v-bind/.test(value);\n    }\n  }\n}\n\nmodule.exports.run = function(node, opts) {\n  let results = [];\n  let varsandMethods = [];\n  let loopScopes = Tools.flatArray(node.loopScopes);\n\n  varsandMethods = Tools.parseSingleExpression(node.rawValue);\n\n  results = varsandMethods.map((item) => {\n    item.pos = [item.pos[0] + node.valuePos[0] - 1, item.pos[1] + node.valuePos[1]];\n    return item;\n  });\n\n  if (loopScopes.length) {\n    results = results.filter(resNode => !~loopScopes.indexOf(resNode.name));\n  }\n\n  return results;\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/rules/template/vue.js",
    "content": "const Tools = require('../../tools');\nconst options = require('../../options');\n\nmodule.exports = {\n  name: 'vue'\n}\n\nmodule.exports.run = function(node, opts) {\n  let subs = this.subscribers;\n  let results = [];\n  subs && subs.forEach((sub) => {\n    if (Tools.isRuleMatch(node, sub)) {\n      results = results.concat(sub.run(node, opts));\n    }\n  });\n\n  results = results.filter((item) => {\n    return options.getOption('vueSystemVarNames').indexOf(item.name) === -1;\n  });\n\n  return results;\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/tools/dash-to-camelcase.js",
    "content": "module.exports.dashtoCamelcase = function(str = '') {\n  return str && str.replace(/-(\\w)/g, (all, letter) => letter.toUpperCase());\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/tools/flat-array.js",
    "content": "module.exports.flatArray = function(arr) {\n  let tempArr = [];\n  if (Array.isArray(arr)) {\n    arr.forEach((item) => {\n      if (Array.isArray(item)) {\n        tempArr.push(...item);\n      } else {\n        tempArr.push(item);\n      }\n    });\n  }\n  return tempArr;\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/tools/get-offset-pos-from-text.js",
    "content": "module.exports.getVarOffsetPosFromText = function (text = '', varName = '', offset = 0) {\n  if (!text || !varName) {return [1, 0];}\n  let preText = text.substr(0, text.indexOf(varName, offset));\n  let lines = preText.split('\\n');\n  return [lines.length - 1, lines[lines.length - 1].length];\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/tools/get-props-from-object-expression.js",
    "content": "const bablePaser = require('@babel/parser');\n\n/**\n * @return {Array} [{name: 'propName', pos: [line, columm]}]\n */\nmodule.exports.getPropsFromObjectExpression = function(expressionStr) {\n  let props = [];\n\n  try {\n    let expression = bablePaser.parseExpression(expressionStr);\n    if (expression.type === 'ObjectExpression') {\n      expression.properties && expression.properties.forEach((prop) => {\n        if (prop.key.type === 'Identifier') {\n          props.push({\n            name: prop.key.name,\n            pos: [prop.loc.start.line, prop.loc.start.column]\n          });\n        }\n        if (prop.key.type === 'StringLiteral') {\n          props.push({\n            name: prop.key.value,\n            pos: [prop.loc.start.line, prop.loc.start.column + prop.key.extra.raw.indexOf(prop.key.value)]\n          });\n        }\n      });\n    }\n  } catch (err) {\n    console.log(err);\n  }\n\n  return props;\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/tools/index.js",
    "content": "const bulk = require('bulk-require');\nconst toolExports = bulk(__dirname, '!(index).js');\nlet tools = {};\n\nObject.values(toolExports).forEach(tool => {\n  Object.assign(tools, tool);\n});\n\nmodule.exports = tools;\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/tools/is-origin-component.js",
    "content": "module.exports.isOriginComponent = function(tag) {\n  return tag ? /^origin-\\w+/.test(tag.name) : false;\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/tools/is-suspicious-textnode.js",
    "content": "const suspiciousRegexes = {\n  cml: /{{(.*?)}}/g,\n  vue: /{{(.*?)}}/g,\n  wx: /{{(.*?)}}/g\n};\n\nmodule.exports.isSuspiciousTextnode = function({lang = 'cml', text = ''}) {\n  return suspiciousRegexes[lang].test(text);\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/tools/loop-scope-handler.js",
    "content": "const bablePaser = require('@babel/parser');\n\nconst forLoopDirectives = {\n  vue: {\n    for: 'v-for'\n  },\n  cml: {\n    for: 'c-for',\n    item: 'c-for-item',\n    index: 'c-for-index'\n  },\n  wx: {\n    for: 'wx:for',\n    item: 'wx:for-item',\n    index: 'wx:for-index'\n  }\n};\n\nmodule.exports.hasForLoopDirective = function({tag = {}, lang = 'cml'}) {\n  return tag.attribs ? ~Object.keys(tag.attribs).indexOf(forLoopDirectives[lang]['for']) : false;\n}\n\n/**\n * @return {Array} scope [itemName, indexName]\n */\nmodule.exports.getScopeFromTag = function({tag = {}, lang = 'cml'}) {\n  let scope = [];\n\n  if (lang === 'vue') {\n    let expressionNode = {};\n\n    try {\n      expressionNode = bablePaser.parseExpression(tag.attribs[forLoopDirectives[lang]['for']].value);\n    } catch (err) {\n      console.trace(err);\n    }\n\n    // if (expressionNode.type === 'Identifier') {\n    //   scope.push(...['item', 'index']);\n    // }\n    if (expressionNode.type === 'BinaryExpression') {\n      if (expressionNode.left.type === 'SequenceExpression') {\n        expressionNode.left.expressions.forEach((identifierNode) => {\n          if (identifierNode.type === 'Identifier') {\n            scope.push(identifierNode.name);\n          }\n        });\n      }\n      if (expressionNode.left.type === 'Identifier') {\n        scope.push(expressionNode.left.name);\n      }\n    }\n  } else if (lang === 'cml' || lang === 'wx') {\n    if (tag.attribs[forLoopDirectives[lang].item]) {\n      scope.push(tag.attribs[forLoopDirectives[lang].item].value);\n    } else {\n      scope.push('item');\n    }\n    if (tag.attribs[forLoopDirectives[lang].index]) {\n      scope.push(tag.attribs[forLoopDirectives[lang].index].value);\n    } else {\n      scope.push('index');\n    }\n  }\n\n  return scope;\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/tools/parse-single-expression.js",
    "content": "const parser = require('@babel/parser');\nconst traverse = require('@babel/traverse')['default'];\n\nconst objectBlockStatement = /^\\s*{(.*)}\\s*$/;\nconst fakePrefix = 'cml=';\n\n/**\n * @param {Object} loc\n * @param {Boolean} isFakeBlock\n */\nfunction getStartPos(loc, isFakeBlock = false) {\n  let pos = [0, 0];\n  // loc.start.column begins with 0\n  if (loc && loc.start) {\n    if (isFakeBlock) {\n      pos = [loc.start.line, loc.start.column - fakePrefix.length];\n    } else {\n      pos = [loc.start.line, loc.start.column];\n    }\n  }\n  return pos;\n}\n\nfunction getVarFromIdentifier(node, isFakeBlock, method = false) {\n  return {\n    name: node.name,\n    method: method,\n    variable: !method,\n    pos: getStartPos(node.loc, isFakeBlock)\n  };\n}\n\n\nmodule.exports.parseSingleExpression = function(expressinoStr = '') {\n  let nodes = [];\n  let ast = null;\n  let isFakeBlock = false;\n\n  /**\n   * !!We are using babel parser to get an ast of current expression, which takes experssion as\n   * an entire program. So when we pass something like {a:1,b:3} this will be considered as\n   * a blockstatement and obviously it contains a syntax error.\n   * So we wrap the expression we assingment expression in those particular cases.\n   */\n  if (objectBlockStatement.test(expressinoStr)) {\n    expressinoStr = fakePrefix + expressinoStr;\n    isFakeBlock = true;\n  }\n\n  try {\n    ast = parser.parse(expressinoStr);\n  } catch (err) {\n    console.trace(err);\n  }\n\n  ast && traverse(ast, {\n    Identifier(path) {\n      if (path.parent.type === 'ExpressionStatement') {\n        nodes.push(getVarFromIdentifier(path.node, isFakeBlock));\n      }\n    },\n    MemberExpression(path) {\n      if (path.get('object').isIdentifier()) {\n        nodes.push(getVarFromIdentifier(path.node.object, isFakeBlock));\n      }\n      if (path.get('property').isIdentifier() && path.node.computed) {\n        nodes.push(getVarFromIdentifier(path.node.property, isFakeBlock));\n      }\n    },\n    LogicalExpression(path) {\n      if (path.get('left').isIdentifier()) {\n        nodes.push(getVarFromIdentifier(path.node.left, isFakeBlock));\n      }\n      if (path.get('right').isIdentifier()) {\n        nodes.push(getVarFromIdentifier(path.node.right, isFakeBlock));\n      }\n    },\n    BinaryExpression(path) {\n      if (path.get('left').isIdentifier()) {\n        nodes.push(getVarFromIdentifier(path.node.left, isFakeBlock));\n      }\n      if (path.get('right').isIdentifier()) {\n        nodes.push(getVarFromIdentifier(path.node.right, isFakeBlock));\n      }\n    },\n    LogicalExpression(path) {\n      if (path.get('left').isIdentifier()) {\n        nodes.push(getVarFromIdentifier(path.node.left, isFakeBlock));\n      }\n      if (path.get('right').isIdentifier()) {\n        nodes.push(getVarFromIdentifier(path.node.right, isFakeBlock));\n      }\n    },\n    SequenceExpression(path) {\n      path.get('expressions').forEach((ele) => {\n        if (ele.isIdentifier()) {\n          nodes.push(getVarFromIdentifier(ele.node, isFakeBlock));\n        }\n      });\n    },\n    ConditionalExpression(path) {\n      ['test', 'alternate', 'consequent'].forEach((key) => {\n        if (path.get(key).isIdentifier()) {\n          nodes.push(getVarFromIdentifier(path.node[key], isFakeBlock));\n        }\n      });\n    },\n    CallExpression(path) {\n      if (path.get('callee').isIdentifier()) {\n        nodes.push(getVarFromIdentifier(path.node.callee, isFakeBlock, true));\n      }\n      path.get('arguments').forEach((arg) => {\n        if (arg.isIdentifier()) {\n          nodes.push(getVarFromIdentifier(arg.node, isFakeBlock));\n        }\n      });\n    },\n    ArrayExpression(path) {\n      path.get('elements').forEach((ele) => {\n        if (ele.isIdentifier()) {\n          nodes.push(getVarFromIdentifier(ele.node, isFakeBlock));\n        }\n      });\n    },\n    ObjectExpression(path) {\n      path.get('properties').forEach((ele) => {\n        if (ele.isIdentifier()) {\n          nodes.push(getVarFromIdentifier(ele.node, isFakeBlock));\n        }\n      });\n    }\n  });\n\n  return nodes;\n}\n"
  },
  {
    "path": "packages/chameleon-linter/checkers/template/lib/template-ast-parser/tools/rule-filter-match.js",
    "content": "module.exports.isRuleMatch = function(node, rule) {\n  return node && rule && rule.filter && rule.filter.run(node[rule.filter.key]);\n}\n"
  },
  {
    "path": "packages/chameleon-linter/classes/message.js",
    "content": "/**\n * A class represents an error message.\n */\nclass Message {\n  constructor({ line = undefined, column = undefined, token = '', msg = '' }) {\n    this.line = line;\n    this.column = column;\n    this.token = token;\n    this.msg = msg || 'An unknown error occurred'\n  }\n}\n\nmodule.exports = Message;\n"
  },
  {
    "path": "packages/chameleon-linter/config/.cmllintrc",
    "content": "{\n  // 核心文件检查\n  'core-files-check': true,\n\n  // cml文件校验\n  'cml-files-check': true,\n\n  // 接口文件校验\n  'interface-files-check': true,\n\n  'cpx-support': true,\n  \n  'platforms': ['weex', 'wx', 'web', 'baidu', 'alipay']\n}\n"
  },
  {
    "path": "packages/chameleon-linter/config/built-in-components/index.js",
    "content": "const fs = require('fs');\nconst config = require('../../config');\nconst Parser = require('cml-component-parser');\nconst parser = new Parser(null, config.getParserConfig().script);\n\nlet getCml = function () {\n  let result = {};\n  let inDir = config.getCurrentWorkspace() + '/node_modules/chameleon-ui-builtin/components';\n\n  if (fs.existsSync(inDir)) {\n    Parser.flatEntrance(inDir).forEach(filterFile => {\n      let content = parser.resetPath(filterFile).getJsonResultsWithComponentName();\n      content && (result[content.name] = content.content);\n    });\n  }\n  return result;\n}\n\nmodule.exports = {\n  getCml\n};\n"
  },
  {
    "path": "packages/chameleon-linter/config/common-events.json",
    "content": "{\n  \"events\": [\"tap\", \"click\", \"touchstart\", \"touchmove\", \"touchend\"]\n}"
  },
  {
    "path": "packages/chameleon-linter/config/fakeComps/index.js",
    "content": "const list = [{\n  name: 'app',\n  allowAttrs: {\n    vars: ['routerConfig'],\n    methods: [],\n    props: [{\n      name: 'routerConfig',\n      required: false\n    }],\n    events: []\n  }\n}];\n\nmodule.exports = list;\n"
  },
  {
    "path": "packages/chameleon-linter/config/globalVars.js",
    "content": "const globalVars = {\n  WEEX: ['weex', 'global'],\n  WX: ['wx', 'global'],\n  BAIDU: ['swan', 'global'],\n  ALIPAY: ['my', 'global'],\n  QQ: ['qq', 'global'],\n  TT: ['tt', 'global'],\n  WEB: [\n    'postMessage', 'blur', 'focus', 'close', 'frames', 'self',\n    'window', 'parent', 'opener', 'top', 'length', 'closed',\n    'location', 'document', 'origin', 'name', 'history',\n    'locationbar', 'menubar', 'personalbar', 'scrollbars',\n    'statusbar', 'toolbar', 'status', 'frameElement', 'navigator',\n    'customElements', 'external', 'screen', 'innerWidth',\n    'innerHeight', 'scrollX', 'pageXOffset', 'scrollY',\n    'pageYOffset', 'screenX', 'screenY', 'outerWidth', 'outerHeight',\n    'devicePixelRatio', 'clientInformation', 'screenLeft',\n    'screenTop', 'defaultStatus', 'defaultstatus', 'styleMedia',\n    'onanimationend', 'onanimationiteration', 'onanimationstart',\n    'onsearch', 'ontransitionend', 'onwebkitanimationend',\n    'onwebkitanimationiteration', 'onwebkitanimationstart',\n    'onwebkittransitionend', 'isSecureContext', 'onabort', 'onblur',\n    'oncancel', 'oncanplay', 'oncanplaythrough', 'onchange', 'onclick',\n    'onclose', 'oncontextmenu', 'oncuechange', 'ondblclick', 'ondrag',\n    'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart',\n    'ondrop', 'ondurationchange', 'onemptied', 'onended', 'onerror',\n    'onfocus', 'oninput', 'oninvalid', 'onkeydown', 'onkeypress',\n    'onkeyup', 'onload', 'onloadeddata', 'onloadedmetadata',\n    'onloadstart', 'onmousedown', 'onmouseenter', 'onmouseleave',\n    'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel',\n    'onpause', 'onplay', 'onplaying', 'onprogress', 'onratechange', 'onreset',\n    'onresize', 'onscroll', 'onseeked', 'onseeking', 'onselect', 'onstalled',\n    'onsubmit', 'onsuspend', 'ontimeupdate', 'ontoggle', 'onvolumechange',\n    'onwaiting', 'onwheel', 'onauxclick', 'ongotpointercapture',\n    'onlostpointercapture', 'onpointerdown', 'onpointermove',\n    'onpointerup', 'onpointercancel', 'onpointerover', 'onpointerout',\n    'onpointerenter', 'onpointerleave', 'onafterprint', 'onbeforeprint',\n    'onbeforeunload', 'onhashchange', 'onlanguagechange', 'onmessage',\n    'onmessageerror', 'onoffline', 'ononline', 'onpagehide', 'onpageshow',\n    'onpopstate', 'onrejectionhandled', 'onstorage', 'onunhandledrejection',\n    'onunload', 'performance', 'stop', 'open', 'alert', 'confirm', 'prompt',\n    'print', 'requestAnimationFrame', 'cancelAnimationFrame', 'requestIdleCallback',\n    'cancelIdleCallback', 'captureEvents', 'releaseEvents', 'getComputedStyle',\n    'matchMedia', 'moveTo', 'moveBy', 'resizeTo', 'resizeBy', 'getSelection', 'find',\n    'webkitRequestAnimationFrame', 'webkitCancelAnimationFrame', 'fetch',\n    'btoa', 'atob', 'createImageBitmap', 'scroll', 'scrollTo', 'scrollBy',\n    'onappinstalled', 'onbeforeinstallprompt', 'crypto', 'ondevicemotion',\n    'ondeviceorientation', 'ondeviceorientationabsolute', 'indexedDB',\n    'webkitStorageInfo', 'sessionStorage', 'localStorage', 'chrome',\n    'visualViewport', 'speechSynthesis', 'webkitRequestFileSystem',\n    'webkitResolveLocalFileSystemURL', 'openDatabase', 'applicationCache',\n    'caches', 'whichAnimationEvent', 'animationendEvent', 'infinity',\n    'SETTING', 'AppView', 'ExtensionOptions', 'ExtensionView', 'WebView',\n    'iconPath', '_app', '_ZOOM_', 'Feed', 'md5', '$', 'jQuery', 'Search',\n    'windmill', 'Lethargy', 'alertTimeOut', 'supportApps', 'lethargyX',\n    'lethargyY', 'iView', 'onModuleResLoaded', 'iEditDelete', 'infinityDrag',\n    'i', 'array', 'TEMPORARY', 'PERSISTENT', 'addEventListener',\n    'removeEventListener', 'dispatchEvent'\n  ]\n};\n\nmodule.exports = globalVars;\n"
  },
  {
    "path": "packages/chameleon-linter/config/index.js",
    "content": "let fs = require('fs');\nlet path = require('path');\nlet parserConfig = require('./parser-config');\nlet config = {};\nlet currentWorkspace;\n\n/**\n * 获取lint的配置\n *\n * @param  {string} workspace 工作空间\n * @return {Object}           配置\n */\nlet getLintConfig = (workspace) => {\n  let config = {};\n  let cfgFilePath = path.resolve(workspace, '.cmllintrc');\n  let defaultCfgFilePath = path.resolve(__filename, '../.cmllintrc');\n  let defaultConfig = {};\n  let defaultCfgContent = fs.readFileSync(defaultCfgFilePath);\n  defaultConfig = (new Function('return ' + defaultCfgContent))();\n\n  if (fs.existsSync(cfgFilePath)) {\n    try {\n      let cfgContent = fs.readFileSync(cfgFilePath);\n      let userConfig = (new Function('return ' + cfgContent))();\n      config = Object.assign({}, defaultConfig, userConfig);\n    }\n    catch (e) {\n      config = defaultConfig;\n    }\n  }\n  else {\n    config = defaultConfig;\n  }\n  return config;\n}\n\n/**\n * 初始化\n *\n * @param  {string} workspace 工作空间\n */\nlet init = (workspace) => {\n  currentWorkspace = workspace;\n  config = getLintConfig(workspace);\n};\n\n/**\n * 获取当前的工作空间\n *\n * @return {string} 工作空间\n */\nlet getCurrentWorkspace = () => {\n  return currentWorkspace;\n};\n\n/**\n * 获取规则数据\n *\n * @param  {string} ruleName 规则名称\n * @return {Object}          规则内容\n */\nlet getRuleOption = (ruleName) => {\n  return config[ruleName];\n};\n\nlet isChameleonProject = () => {\n  let cmlCfgFilePath = path.resolve(currentWorkspace, './chameleon.config.js');\n\n  if (!fs.existsSync(cmlCfgFilePath)) {\n    return false\n  }\n  return true;\n};\n\nlet getParserConfig = () => {\n  return parserConfig;\n}\n\nlet getPlatforms = () => {\n  return config.platforms;\n};\n\nlet getCurrentProjectPlatforms = () => {\n  let defaultPlatforms = getPlatforms();\n  \n  if (global.cml) {\n    return global.cml.config.get().platforms || defaultPlatforms;\n  }\n  return defaultPlatforms;\n};\n\nlet neexLintWeex = () => {\n  let platforms = getCurrentProjectPlatforms();\n  if (platforms.indexOf('weex') > -1) {\n    return true;\n  }\n  return false;\n}\n\nmodule.exports = {\n  init,\n  getCurrentWorkspace,\n  getRuleOption,\n  isChameleonProject,\n  getParserConfig,\n  getPlatforms,\n  neexLintWeex\n}\n"
  },
  {
    "path": "packages/chameleon-linter/config/parser-config.js",
    "content": "module.exports = {\n  script: {\n    sourceType: 'module',\n    allowImportExportEverywhere: true, // consistent with espree\n    allowReturnOutsideFunction: true,\n    allowSuperOutsideMethod: true,\n    ranges: true,\n    tokens: true,\n    plugins: [\n      'flow',\n      'asyncGenerators',\n      'bigInt',\n      'classProperties',\n      'classPrivateProperties',\n      'classPrivateMethods',\n      'doExpressions',\n      'dynamicImport',\n      'exportDefaultFrom',\n      'exportNamespaceFrom',\n      'functionBind',\n      'functionSent',\n      'importMeta',\n      'logicalAssignment',\n      'nullishCoalescingOperator',\n      'numericSeparator',\n      'objectRestSpread',\n      'optionalCatchBinding',\n      'optionalChaining',\n      'throwExpressions'\n    ]\n  },\n  style: {\n    rules: {\n      'block-no-empty': null,\n      'selector-max-compound-selectors': 1,\n      'selector-type-no-unknown': [true, {\n        'ignore': ['custom-elements'],\n        'ignoreTypes': ['page']\n      }]\n    }\n  }\n};\n"
  },
  {
    "path": "packages/chameleon-linter/config/tag-embed-rules.json",
    "content": "{\n    \"text\": {\n        \"required\": \"\",\n        \"excludes\": \"\",\n        \"includes\": [\"text\"]\n    },\n    \"scroller\": {\n        \"required\": \"\",\n        \"excludes\": [\"textarea\",\"video\"],\n        \"includes\": \"\"\n    },\n    \"list\": {\n        \"required\": \"\",\n        \"excludes\": [\"textarea\",\"video\"],\n        \"includes\": \"\"\n    },\n    \"video\": {\n        \"required\": \"\",\n        \"excludes\": \"\",\n        \"includes\": [\"text\"]\n    }\n}\n"
  },
  {
    "path": "packages/chameleon-linter/config/white-list/cml-white-list.js",
    "content": "/**\n * tags: Technically, it only holds all availiable tags that cml has.\n*/\nmodule.exports = {\n  attrs: ['c-if', 'c-else', 'c-else-if', 'c-for', 'c-for-index', 'c-for-item', 'c-model', 'c-text', 'c-show', 'c-bind', 'c-catch', 'c-key', 'c-animation'],\n  tags: [\n    'template',\n    'view',\n    'text',\n    'block',\n    'scroller',\n    'list',\n    'cell',\n    'image',\n    'switch',\n    'video',\n    'input',\n    'textarea',\n    'richtext',\n    'button',\n    'radio',\n    'checkbox',\n    'page',\n    'router-view',\n    'cover-view',\n    'slot',\n    'aside',\n    'col',\n    'container',\n    'foot',\n    'head',\n    'main',\n    'row',\n    'carousel',\n    'carousel-item',\n    'component'\n  ]\n}\n"
  },
  {
    "path": "packages/chameleon-linter/config/white-list/index.js",
    "content": "const cmlWhiteList = require('./cml-white-list');\nconst vueWhiteList = require('./vue-white-list');\nconst webWhiteList = require('./web-white-list');\nconst weexWhiteList = require('./weex-white-list');\nconst wxWhiteList = require('./wx-white-list');\n\nmodule.exports = {\n  web: webWhiteList,\n  vue: vueWhiteList,\n  wx: wxWhiteList,\n  weex: weexWhiteList,\n  cml: cmlWhiteList\n}\n\nmodule.exports.getAllowedTags = function() {\n  return this.cml.tags;\n}\n\nmodule.exports.getForbiddenAttrsByLang = function(lang = 'cml') {\n  return (lang === 'cml') ? this.vue.attrs : this.cml.attrs;\n}\n"
  },
  {
    "path": "packages/chameleon-linter/config/white-list/vue-white-list.js",
    "content": "/**\n * tags: Technically, it only holds tags that are not a html tag.\n*/\nmodule.exports = {\n  attrs: ['v-if', 'v-else', 'v-else-if', 'v-for', 'v-on', 'v-bind', 'v-html', 'v-show', 'v-model', 'v-pre', 'v-once', 'slot-scope'],\n  tags: ['template', 'view', 'text', 'block', 'scroller', 'list', 'cell', 'image', 'switch', 'video', 'input', 'button', 'radio', 'checkbox', 'page', 'router-view', 'slot']\n}\n"
  },
  {
    "path": "packages/chameleon-linter/config/white-list/web-white-list.js",
    "content": "module.exports = {\n  attrs: ['accesskey', 'class', 'contenteditable', 'contextmenu', 'dir', 'draggable', 'dropzone', 'hidden', 'id', 'lang', 'spellcheck', 'style', 'tabindex', 'title', 'translate'], // \"data-*\"\n  tags: ['a', 'abbr', 'acronym', 'address', 'applet', 'area', 'article', 'aside', 'audio', 'b', 'base', 'basefont', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'command', 'datalist', 'dd', 'del', 'details', 'dir', 'div', 'dfn', 'dialog', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'map', 'mark', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noframes', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strike', 'strong', 'style', 'slot', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']\n}\n"
  },
  {
    "path": "packages/chameleon-linter/config/white-list/weex-white-list.js",
    "content": "module.exports = {\n  attrs: ['v-if', 'v-else', 'v-else-if', 'v-for', 'v-on', 'v-bind', 'v-html', 'v-show', 'v-model', 'v-pre', 'v-once', 'slot-scope', 'is'],\n  tags: ['a', 'div', 'image', 'indicator', 'input', 'list', 'cell', 'recycle-list', 'loading', 'refresh', 'scroller', 'slider', 'textarea', 'text', 'richtext', 'video', 'waterfall', 'web']\n}\n"
  },
  {
    "path": "packages/chameleon-linter/config/white-list/wx-white-list.js",
    "content": "/**\n * tags: Technically, it only holds tags that are not a html tag.\n * attrs: Attributes that only existing in mini-app can be listed here.\n*/\nmodule.exports = {\n  attrs: ['wx:if', 'wx:elif', 'wx:else', 'wx:for', 'wx:for-item', 'wx:for-index', 'wx:key', 'bindtap', 'catchtap'],\n  tags: [\n    'template',\n    'view',\n    'block',\n    'scroll-view',\n    'swiper',\n    'movable-view',\n    'movable-area',\n    'cover-view',\n    'cover-image',\n    'icon',\n    'text',\n    'rich-text',\n    'progress',\n    'lable',\n    'input',\n    'form',\n    'checkbox',\n    'picker',\n    'picker-view',\n    'radio',\n    'switch',\n    'slider',\n    'textarea',\n    'navigator',\n    'functional-page-navigator',\n    'camera',\n    'live-player',\n    'live-pusher',\n    'map',\n    'open-data',\n    'web-view',\n    'ad',\n    'official-account',\n    'slot'\n  ]\n}\n"
  },
  {
    "path": "packages/chameleon-linter/docs/cml-file-specification.md",
    "content": "# cml文件规范\n\n```\n├── components\n│   ├── c-title\n│   │   ├── c-title.web.cml\n│   │   ├── c-title.weex.cml\n│   │   └── c-title.wx.cml\n```\n"
  },
  {
    "path": "packages/chameleon-linter/docs/components/buildin/button.md",
    "content": "# button \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|text|String| |\n|size|String| |\n|type|String| |\n|disabled|Boolean| |\n|btnStyle|String| |\n|textStyle|String| |\n|disabledStyle|String| |\n|c-bind:onclick|EventHandle|事件返回参数 eventDetail [类型: EventDetail] <br/> 其中 EventDetail 的定义为 <br/>&emsp;{type: String , disabled: Boolean}<br/>|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/buildin/checkbox.md",
    "content": "# checkbox \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|checked|Boolean| |\n|label|String| |\n|disabled|Boolean| |\n|position|String| |\n|groupIndex|Number| |\n|c-bind:changeevent|EventHandle|待填写|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/buildin/input.md",
    "content": "# input \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|value|String| |\n|type|String| |\n|placeholder|String| |\n|disabled|Boolean| |\n|focus|Boolean| |\n|maxlength|Number| |\n|returnKeyType|String| |\n|placerHolderColor|String| |\n|inputStyle|String| |\n|c-bind:inputevent|EventHandle|事件返回参数 eventDetail [类型: inputEventDetail] <br/> 其中 inputEventDetail 的定义为 <br/>&emsp;{value: String}<br/>|\n|c-bind:blurevent|EventHandle|事件未定义返回参数|\n|c-bind:focusevent|EventHandle|事件未定义返回参数|\n|c-bind:confirmevent|EventHandle|事件未定义返回参数|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/buildin/list.md",
    "content": "# list \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|bottomOffset|Number| |\n|c-bind:customscroll|EventHandle|事件返回参数 eventDetail [类型: scrollDetail] <br/> 其中 scrollDetail 的定义为 <br/>&emsp;{scrollHeight: Number , scrollLeft: Number , scrollTop: Number , scrollWidth: Number}<br/>|\n|c-bind:scrolltobottom|EventHandle|事件返回参数 eventDetail [类型: bottomDetail] <br/> 其中 bottomDetail 的定义为 <br/>&emsp;{direction: String}<br/>|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/buildin/page.md",
    "content": "# page \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|title|String| |\n|c-bind:back|EventHandle|事件未定义返回参数|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/buildin/radio.md",
    "content": "# radio \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|checked|Boolean| |\n|label|String| |\n|disabled|Boolean| |\n|position|String| |\n|groupIndex|Number| |\n|c-bind:changeevent|EventHandle|待填写|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/buildin/richtext.md",
    "content": "# richtext \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|richData|richData|其中 richData 的定义为 <br/>&emsp;{message: String , rich_message: richMessageArray}<br/>其中 richMessageArray 的定义为 <br/>&emsp;[richConfig]<br/>其中 richConfig 的定义为 <br/>&emsp;{color: String , font_size: Number , start: Number , end: Number}|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/buildin/scroller.md",
    "content": "# scroller \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|cstyle|String| |\n|bottomOffset|Number| |\n|scrollDirection|String| |\n|c-bind:customscroll|EventHandle|事件返回参数 eventDetail [类型: scrollEventDetail] <br/> 其中 scrollEventDetail 的定义为 <br/>&emsp;{deltaX: Number , deltaY: Number , scrollHeight: Number , scrollLeft: Number , scrollTop: Number , scrollWidth: Number}<br/>|\n|c-bind:scrolltobottom|EventHandle|事件返回参数 eventDetail [类型: scrolltobottomEventDetail] <br/> 其中 scrolltobottomEventDetail 的定义为 <br/>&emsp;{direction: String}<br/>|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/buildin/switch.md",
    "content": "# switch \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|checked|Boolean| |\n|disabled|Boolean| |\n|label|String| |\n|c-bind:changeevent|EventHandle|事件返回参数 eventDetail [类型: valueDetail] <br/> 其中 valueDetail 的定义为 <br/>&emsp;{value: Boolean}<br/>|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/buildin/textarea.md",
    "content": "# textarea \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|value|String| |\n|type|String| |\n|placeholder|String| |\n|disabled|Boolean| |\n|focus|Boolean| |\n|maxlength|Number| |\n|returnKeyType|String| |\n|placerHolderColor|String| |\n|inputStyle|String| |\n|rows|Number| |\n|c-bind:inputevent|EventHandle|事件返回参数 eventDetail [类型: inputEventDetail] <br/> 其中 inputEventDetail 的定义为 <br/>&emsp;{value: String}<br/>|\n|c-bind:blurevent|EventHandle|事件未定义返回参数|\n|c-bind:focusevent|EventHandle|事件未定义返回参数|\n|c-bind:confirmevent|EventHandle|事件未定义返回参数|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/buildin/video.md",
    "content": "# video \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|controls|Boolean| |\n|autoplay|Boolean| |\n|loop|Boolean| |\n|src|String| |\n|c-bind:customstart|EventHandle|事件未定义返回参数|\n|c-bind:custompause|EventHandle|事件未定义返回参数|\n|c-bind:customfinish|EventHandle|事件未定义返回参数|\n|c-bind:customfail|EventHandle|事件未定义返回参数|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-actionsheet.md",
    "content": "# c-actionsheet \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|show|Boolean| |\n|title|String| |\n|cancelTxt|String| |\n|headerStyle|String| |\n|cancelStyle|String| |\n|contentStyle|String| |\n|activeStyle|String| |\n|data|Array| |\n|pickerStyle|Boolean| |\n|active|Number| |\n|c-bind:cancel|EventHandle|待填写|\n|c-bind:select|EventHandle|待填写|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-aside.md",
    "content": "# c-aside \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|asideStyle|String| |"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-checkbox-group.md",
    "content": "# c-checkbox-group \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|option|Array| |\n|position|String| |\n|horizontal|Boolean| |\n|c-bind:groupchange|EventHandle|待填写|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-col.md",
    "content": "# c-col \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|width|Number| |\n|height|Number| |\n|backgroundColor|String| |\n|margin|Number| |"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-container.md",
    "content": "# c-container \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|direction|String| |"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-dialog.md",
    "content": "# c-dialog \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|show|Boolean| |\n|mask|Boolean| |\n|title|String| |\n|content|String| |\n|type|String| |\n|showClose|Boolean| |\n|closeSrc|String| |\n|cancelText|String| |\n|confirmText|String| |\n|iconType|String| |\n|iconUrl|String| |\n|iconStyle|Object| |\n|c-bind:show|EventHandle|待填写|\n|c-bind:cancel|EventHandle|待填写|\n|c-bind:confirm|EventHandle|待填写|\n|c-bind:close|EventHandle|待填写|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-foot.md",
    "content": "# c-foot \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|footStyle|String| |"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-form-item.md",
    "content": "# c-form-item \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|label|String| |\n|justify|String| |\n|align|String| |\n|labelClass|String| |\n|labelStyle|Object| |\n|contentClass|String| |\n|contentStyle|Object| |\n|errorClass|String| |\n|errorStyle|Object| |\n|rules|Array| |\n|required|Boolean| |\n|feedback|String| |\n|validateStatus|String| |"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-form.md",
    "content": "# c-form \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|model|Object| |\n|labelWidth|String| |\n|labelPosition|String| |\n|rules|Array| |\n|inline|Boolean| |\n|submit|Function| |"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-head.md",
    "content": "# c-head \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|headStyle|String| |"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-main.md",
    "content": "# c-main \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|mainStyle|String| |"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-picker-item.md",
    "content": "# c-picker-item \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|data|ArrayType|其中 ArrayType 的定义为 <br/>&emsp;[String]|\n|defaultIndex|Number| |\n|height|Number| |\n|textAlign|String| |\n|c-bind:selectchange|EventHandle|事件返回参数 eventDetail [类型: EventDetail] <br/> 其中 EventDetail 的定义为 <br/>&emsp;{index: Number}<br/>|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-picker-panel.md",
    "content": "# c-picker-panel \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|show|Boolean| |\n|height|Number| |\n|title|String| |\n|headerHeight|Number| |\n|cancelBtnStyle|String| |\n|confirmBtnStyle|String| |\n|c-bind:cancel|EventHandle|事件未定义返回参数|\n|c-bind:confirm|EventHandle|事件未定义返回参数|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-picker.md",
    "content": "# c-picker \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|show|Boolean| |\n|height|Number| |\n|headerHeight|Number| |\n|textAlign|String| |\n|dataScrollerHeight|Number| |\n|data|Array| |\n|defaultIndex|Number| |\n|cancelBtnStyle|String| |\n|confirmBtnStyle|String| |\n|c-bind:cancel|EventHandle|待填写|\n|c-bind:confirm|EventHandle|待填写|\n|c-bind:selectchange|EventHandle|待填写|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-popup.md",
    "content": "# c-popup \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|mask|Boolean| |\n|show|Boolean| |\n|center|Boolean| |\n|position|String| |\n|c-bind:close|EventHandle|待填写|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-radio-group.md",
    "content": "# c-radio-group \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|option|Array| |\n|position|String| |\n|horizontal|Boolean| |\n|c-bind:groupchange|EventHandle|待填写|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-refresh.md",
    "content": "# c-refresh \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|display|Boolean| |\n|direction|String| |\n|customUi|Boolean| |\n|c-bind:refreshevent|EventHandle|事件返回参数 eventDetail [类型: valueDetail] <br/> 其中 valueDetail 的定义为 <br/>&emsp;{value: Boolean}<br/>|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-row.md",
    "content": "# c-row \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|justify|String| |\n|align|String| |\n|height|Number| |\n|wrap|Boolean| |\n|margin|Number| |"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-tab-pane-item.md",
    "content": ""
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-tab-pane.md",
    "content": "# c-tab-pane \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|tabs|Array| |\n|activeLabel|Array| |"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-tabs-item.md",
    "content": "# c-tabs-item \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|tab|Object| |\n|inline|Boolean| |\n|activeLabel|String| |\n|activeLabelStyle|String| |\n|c-bind:tabclick|EventHandle|待填写|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-tabs.md",
    "content": "# c-tabs \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|tabs|Array| |\n|activeLabel|String| |\n|inline|Boolean| |\n|lineStyle|String| |\n|activeLabelStyle|String| |\n|c-bind:tabclick|EventHandle|待填写|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-tip.md",
    "content": "# c-tip \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|show|Boolean| |\n|direction|String| |\n|closeUrl|String| |\n|offsetLeft|Number| |\n|offsetTop|Number| |\n|offsetRight|Number| |\n|offsetBottom|Number| |\n|c-bind:close|EventHandle|待填写|"
  },
  {
    "path": "packages/chameleon-linter/docs/components/chameleon-ui/c-toast.md",
    "content": "# c-toast \n---\n\n|属性名|类型|说明|\n| ------ | ------ | ------ |\n|type|String| |\n|message|String| |\n|duration|Number| |\n|show|Boolean| |\n|mask|Boolean| |\n|needIcon|Boolean| |\n|c-bind:show|EventHandle|待填写|"
  },
  {
    "path": "packages/chameleon-linter/docs/directory-specification.md",
    "content": "# 目录规范\n\n```\n├── chameleon.config.js                 //项目的配置文件\n├── dist                                //打包产出目录\n├── mock                                //模拟数据目录\n├── node_modules                        //npm包依赖\n├── package.json\n└── src                                 //项目源代码\n    ├── app                             //app入口\n    ├── components                      //组件文件夹\n    ├── pages                           //页面文件夹\n    ├── router.config.json              //路由配置文件\n    └── store                           //全局状态管理\n```\n"
  },
  {
    "path": "packages/chameleon-linter/docs/interface-specification.md",
    "content": "# 接口校验语法\n\n\n> 接口是一系列方法的声明，是一些方法特征的集合，一个接口只有方法的特征没有方法的实现，因此这些方法可以在不同的地方被不同的类实现，而这些实现可以具有不同的行为（功能）进行沟通。\n\n## 类型说明\n**\b注意：建议定义类型的时候取值为 Number String Boolean Null Undefined(Void) Object Array Function Date RegExp**\n\n目前chameleon接口定义支持简单类型和复合类型。\n\n其中简单类型包括以下类型：\n\n- Number(number)\n- String(string)\n- Boolean(bool)\n- Undefined(void)\n- Null\n\n\n复合类型包括以下类型：\n\n- Function\n- Object\n- Array\n- Date\n- RegExp\n- Promise\n\n## 接口语法\n\n接口的使用分两个过程：\n\n1. 定义一个接口。\n2. 定义实现接口的类。\n\n### 接口定义\n\n#### 范式:\n\n    interface [接口名称] {\n        // 接口中的属性\n        [属性名称]: [类型],\n\n        // 接口中的方法\n        [方法名称]([传入参数1名称]: [传入参数1类型], [传入参数2名称]: [传入参数2类型], ...): [返回类型]\n    }\n\n#### 举例：\n\n    // 一个名为interface1的接口\n    interface interface1 {\n      // foo1: 传入分别为string和number的两个数据，返回值类型为string值\n      foo1(a: string, b: number): string;\n\n      // foo2: 传入分别为string和Callback(上文定义)的两个数据，返回值类型为bool值\n      foo2(c: string, d: Callback): string;\n    }\n\n### 实现接口（定义类）\n\n#### 范式：\n\n    class [类名称] implaments [接口名称] {\n\n        // 实现接口中的属性\n        [属性名称]: [类型]\n\n        // 实现接口中的方法\n        [方法名称]([传入参数1名称], [传入参数2名称], ...) {\n          return [返回值];\n        }\n    }\n\n#### 举例：\n\n    // 实现一个名称为Clazz，实现上文定义的interface1接口\n    class Clazz implaments interface1 {\n\n        // 实现interface1定义的foo1方法，输入值和输出值要满足定义\n        foo1(a, b) {\n            return 'hello ' + a + ' : ' + (b + 1);\n        }\n\n        // 实现interface1定义的foo2方法，输入值和输出值要满足定义\n        foo2(c, d) {\n            return 'balabala...';\n        }\n    }\n\n\n\n## 复合类型的定义范式\n\n    type [类型名称] = [类型定义]\n\n不同的复合类型，类型定义也不相同，下面会对三种复合类型做详细说明。\n\n### Function类型定义\n\n#### 范式:\n\n    type [Function类型名称] = ([传入参数1名称]: [传入参数1类型], [传入参数2名称]: [传入参数2类型], ...) => [返回类型]\n\n#### 举例：\n\n    // 定义一个传参分别为number,string,bool类型的三个参数，返回值为number的函数类型\n    type Callback = (a: number, b: string, c: bool) => number;\n\n### Object类型定义\n\n#### 范式：\n\n    type [Object类型名称] = {\n        [属性名称1]: [类型1],\n        [属性名称2]: [类型2]\n    }\n\n#### 举例：\n\n    // 定义含有a,b,c三个属性的复合类型\n    type Scheme = {\n        a: string,\n        b: bool,\n        c: number\n    }\n\n\n### Array类型定义\n\n#### 范式：\n\n    type [Array类型名称] = [\n      [类型1]\n    ]\n\n#### 举例：\n\n    // 定义名称为arrayType1的数组类型，数组元素为number类型\n    type arrayType1 = [\n        number\n    ]\n\n## 复合类型中的相互嵌套\n\nFunction、Object、Array三种复合类型可以互相嵌套：\n\n\n    // 定义一个传参分别为number,string,bool类型的三个参数，返回值为number的函数类型\n    type Callback = (a: number, b: string, c: bool) => number;\n\n    // 定义名称为arrayType1的数组类型，数组元素为number类型\n    type arrayType1 = [\n        number\n    ]\n\n    // 定义名称为Scheme的，含有Array类型和Function类型属性的Object类型\n    type Scheme = {\n        a: arrayType1,\n        b: Callback,\n    }\n\n    // 定义名称为Plan，含有Scheme类型和Callback的属性的Object类型\n    type Plan = {\n        a: string,\n        b: Scheme,\n        c: Callback\n    }\n\n    // 定义名称为arrayType1类型，元素为Plan类型\n    type arrayType1 = [\n        Plan\n    ]\n### Promise 类型的定义\n\n对于 async函数，由于该函数调用之后的返回值是 Promise对象，所以这样的函数的返回值要声明成 Promise;\n\n```javascript\ninterface EntryInterface {\n  appEntry(): Promise;\n  appEntry2() : Promise;\n}\n```\n\n在 methods 中\n```javascript\nclass Method implements EntryInterface {\n  async appEntry(num) {\n  }\n  appEntry2(){\n    return new Promise((resolve,reject) => {\n      setTimeout(resolve,2000);\n    })\n  }\n}\n```\n\n### Date 类型的定义\n\n如果函数参数或者返回值是 Date 数据类型，那么可以按照下面的方式进行定义；\n```javascript\ninterface EntryInterface {\n  handleDate(d:Date) : Date\n}\n```\n\n```javascript\nclass Method implements EntryInterface {\n  handleDate(d){\n    return new Date();\n  }\n}\n```\n## RegExp 类型的定义\n如果函数参数或者返回值是 RegExp 数据类型，那么可以按照下面的方式进行定义；\n```javascript\ninterface EntryInterface {\n  handleDate(d:RegExp) : RegExp\n}\n```\n\n```javascript\nclass Method implements EntryInterface {\n  handleDate(r){\n    return new RegExp();\n  }\n}\n```\n"
  },
  {
    "path": "packages/chameleon-linter/docs/templates/template-functionalities.md",
    "content": "## 模板校验功能点\n该文档汇集模板校验支持所有检查点。\n\n\n### 模板语言校验\n模板可以指定模板语言，指定方式为在 template 标签上指定 lang 属性， 其合法值为 \"cml\" 和 \"vue\"。\n\n校验点:\n\n+ template 可以忽略 lang 属性，此时其默认值为 cml\n+ template lang 属性如果指定，则必须为  \"cml\" 或者 \"vue\"\n\n> 报错信息：'the tag template lang attribute: \"<%= lang %>\" is not valid'.\n\n### 模板 template 标签校验\n校验点：每个模板只能\b切必须有一对 template 根标签。\n\n> 报错信息：\"Each template can only have one group of template tags.\"\n\n### 模板内 tags \b校验\n每个模板都有一个模板语言和一个平台类型，其中模板语言由 template 的 lang 属性指定，平台类型由模板文件的文件名解析出来。\n对于多态组件平台类型可以直接从文件名解析出来， 比如 index.web.cml, index.weex.cml, index.wx.cml 对应的平台类型分别为 web, weex, wx。\n对于单文件组件，由于其模板要跨三端，故模板中只能使用 chameleon 原生支持的内建标签。\n\n校验点：\n\n+ 单文件组件只能使用 chameleon 内建标签，使用非内建标签\b校验不通过。\n    - chameleon 内建标签有: ['template','view','text','block','scroller','list','cell','image','switch','video','input','button','radio','checkbox', 'page', 'router-view', 'slot']\n\n+ 多态组件可以使用 chameleon 内建标签加\b上各\b平台类型所支持的原生标签，使用其他标签验证不同过。\n    - web 平台原生支持标签: [\"a\",\"abbr\",\"acronym\",\"address\",\"applet\",\"area\",\"article\",\"aside\",\"audio\",\"b\",\"base\",\"basefont\",\"bdi\",\"bdo\",\"big\",\"blockquote\",\"body\",\"br\",\"button\",\"canvas\",\"caption\",\"center\",\"cite\",\"code\",\"col\",\"colgroup\",\"command\",\"datalist\",\"dd\",\"del\",\"details\",\"dir\",\"div\",\"dfn\",\"dialog\",\"dl\",\"dt\",\"em\",\"embed\",\"fieldset\",\"figcaption\",\"figure\",\"font\",\"footer\",\"form\",\"frame\",\"frameset\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"head\",\"header\",\"hr\",\"html\",\"i\",\"iframe\",\"img\",\"input\",\"ins\",\"kbd\",\"keygen\",\"label\",\"legend\",\"li\",\"link\",\"map\",\"mark\",\"menu\",\"menuitem\",\"meta\",\"meter\",\"nav\",\"noframes\",\"noscript\",\"object\",\"ol\",\"optgroup\",\"option\",\"output\",\"p\",\"param\",\"pre\",\"progress\",\"q\",\"rp\",\"rt\",\"ruby\",\"s\",\"samp\",\"script\",\"section\",\"select\",\"small\",\"source\",\"span\",\"strike\",\"strong\",\"style\",\"slot\",\"sub\",\"summary\",\"sup\",\"table\",\"tbody\",\"td\",\"textarea\",\"tfoot\",\"th\",\"thead\",\"time\",\"title\",\"tr\",\"track\",\"tt\",\"u\",\"ul\",\"var\",\"video\",\"wbr\"]\n    - weex 平台原生支持标签: ['a','div','image','indicator','input','list','cell','recycle-list','loading','refresh','scroller','slider','textarea','text','richtext','video','waterfall','web']\n    - wx 平台原生支持标签: ['template','view','block','scroll-view','swiper','movable-view','movable-area','cover-view','cover-image','icon','text','rich-text','progress','lable','input','form','checkbox','picker','picker-view','radio','switch','slider','textarea','navigator','functional-page-navigator','camera','live-player','live-pusher','map','open-data','web-view','ad','official-account','slot']\n\n> 报错信息：'tag: \"<%= tag %>\" is either not allowed in this template or not referenced as a component'\n\n### 模板指令校验\n\b\b每个模板可以使用的指令由模板语言和平台类型共同决定。\n\n校验点：\n\n+ 单文件模板只能使用模板语言对应的指令，使用模板语言指令之外的指令校验不通过\n    - lang='cml' 支持的指令：['c-if','c-else','c-else-if','c-for','c-for-index','c-for-item','c-model','c-text','c-show','c-bind','c-catch','c-key']\n    - lang='vue' 支持的指令：['v-if','v-else','v-else-if','v-for','v-on','v-bind','v-html','v-show','v-model','v-pre','v-once','slot-scope','is','@',':']\n+ 多态组件可以使用**模板语言指令**加**平台原生指令**，使用此外其他指令校验不通过\n    - web 平台支持指令：无模板指令\n    - weex 平台支持指令\b同 vue.js 框架： ['v-if','v-else','v-else-if','v-for','v-on','v-bind','v-html','v-show','v-model','v-pre','v-once','slot-scope','is','@',':']\n    - wx 平台支持指令：['wx:if','wx:elif','wx:else','wx:for','wx:for-item','wx:for-index','wx:key','bindtap','catchtap']\n\n> 报错信息：'attribute name: \"<%= name %>\" is not allowed in this template'\n\n### 组件属性和事件名称校验\n在使用组件的时，会对使用过程中属性名和\b绑定的事件名称进行校验。组件属性校验分为内建组件与自定义组件两部分。\n\n校验点：\n\n+ 内建组件:使用的属性名和绑定事件必须在组件内有定义否则校验不通过\n    - \bchameleon 内建组件有：['view','text','scroller','list','cell','image','switch','video','input','button','radio','checkbox', 'page', 'router-view']\n+ 自定义组件:模板\b校验时和根据 usingComponents \b配置解析对应组件，使用\b组件时属性名和事件名必须在组件内有定义否则校验不通过。\n\n> 报错信息：\n> \"The property <%= propName %> is not a property of component <%= componentName %> which path is: <%= componentPath %>\"\n\n\n> 报错信息：\n> \"The event <%= eventName %> is not defined in component <%= componentName %> which path is: <%= componentPath %>\"\n\n### 内置组件嵌套规则校验\n在使用 chameleon 内置组件时，内置组件之间需要遵循一定的嵌套关系。\n\n\b校验点：\n\n+ text 组件\n    - text 组件不能够包含任何子组件\n+ scroller 组件\n    - scroller 组件不能包含\b textarea 或者 video 组件\n+ list\n    - list 组件不能包含\b textarea 或者 video 组件\n+ video\n    - video 组件如果包含子组件，那么只能是 text 组件\n\n> 报错信息\n> 'tag \"<%= parent %>\" can not have any child elements, therefor tag \"<%= forbiddenTag %>\" is not allowed as it\\'s children'\n\n> 报错信息\n> 'tag \"<%= parent %>\" can only have \"<%= elements %>\" as it\\'s child elements, therefor tag \"<%= forbiddenTag %>\" is not allowed as it\\'s children'\n\n> 报错信息\n> 'tag \"<%= parent %>\" can not have  \"<%= forbiddenTag %>\" as it\\'s child elements, and element in this list: \"<%= elements %>\" is forbidden as well'\n"
  },
  {
    "path": "packages/chameleon-linter/docs/templates/template-internal.md",
    "content": "# 模板校验说明\n\n### \b\b模板\b语法\b校验\n模板\b校验\b通过\b自定义修改 npm module [htmllint](https://github.com/htmllint/htmllint) 实现。\n\n#### 校验规则\n##### 标签校验\n标签校验采用白名单机制，即只有在给定的标签列表里的\b标签才能使用。\b校验代码入口 [linters/template/index.js](../linters/template/index.js)\n\n\b\b校验白名单由三部分组成：\b\n- cml 或者 vue 模板支持的标签: [cml 模板支持的标签](../linters/template/config/cml-white-list.js) | [vue 模板支持的标签](../linters/template/config/vue-white-list.js)\n- 三端平台对应的 native 标签: [\bwx 小程序原生支持标签](../linters/template/config/wx-white-list.js) | [weex 原生支持的标签](../linters/template/config/weex-white-list.js) | [web 原生支持标签](../linters/template/config/web-white-list.js)\n- \b模板中通过 usingComponents 配置引入的自定义标签\n\n白名单获取规则：\n\n假设当前组件名为 index 那么对应三端的模板文件分别为 index.web.cml | index.weex.cml | index.wx.cml 对应三端百名单组成\n- index.web.cml\n    + template 的 lang 为 cml: \bcml 支持的标签 + 模板中自定义的标签 + web 原生支持的标签\n    + template 的 lang 为 vue: vue 支持的标签 + 模板中自定义的标签 + web 原生支持的标签\n- index.weex.cml\n    + template 的 lang 为 cml: cml 支持的标签 + 模板中自定义的标签 + weex 原生支持的标签\n    + template 的 lang 为 vue: vue 支持的标签 + 模板中自定义的标签 + weex 原生支持的标签\n- index.wx.cml\n    + template 的 lang 为 cml: cml 支持的标签 + 模板中自定义的标签 + wx 原生支持的标签\n    + template 的 lang 为 vue: vue 支持的标签 + 模板中自定义的标签 + wx 原生支持的标签\n\n使用\b方法：\n\n给 htmllint 新加 ruler: tag-white-list.js 并且增加配置项 tag-only-allowed-names 用于接收\b标签白名单。\n使用时只需要传入配置项 options['tag-only-allowed-names] = ['view','template', ...] 即可。\n\n##### 属性校验\n属性校验通过黑名单机制实现，同样是基于 npm module [htmllint](https://github.com/htmllint/htmllint) 实现。\n\n属性校验的两种方式：\n- 通过设置 htmllint 的 attr-bans \b直接添加\b禁止的属性列表，比如: cml 模板禁止 v-if | v-show | v-for 等。\n- 通过给 htmllint 新加的 ruler:  attr-name-forbidden.js，给定一个正则表达式来\b匹配禁止的事件绑定\b以及自定属性绑定指令，比如: cml 模板禁止 v-bind:src | :src | v-on:click | @click 等。\n\n两种方式可以通过把 attr-bans 的列表和 attr-name-fordden ruler 的\b正则表达式合并为一个表达式来统一，为了语义清晰目前使用的是两种方式并存互补的形式。\n\n黑名单获取规则：\n目前需要校验的只有两类指令 cml 与 类vue 指令。现阶段校验 lang 为 cml 的模板时，要求模板里不能出现 vue 的指令，lang 为 vue 时不能出现 cml 的指令。\n\n使用方法：\n在使用时给\b attr-bans \b配置指令黑名单，给 attr-name-forbidden-regex 传入匹配非法指令的正则表达式。 具体代参见 [cml-htmllinter 配置项](../linters/template/index.js)\n\n\n### 模板事件与\b模板变量\b校验\n\n#### 校验规则\n\b校验规则要求，模板里使用的事件方法和变量名要在 script \b的\b class 有相应的定义。\n\n##### script class 定义方法名和变量名获取\n具体提取方法参见源码：[js-ast-parser.js](../checkers/template/lib/js-ast-parser.js) | [template-ast-parser.js](../checkers/template/lib/template-ast-parser.js)\n- 方法名: 方法名从 class 定义中 methods 属性提取\n- 变量名: 从 class 定义中 props、data、computed 属性中提取\n\n##### template 模板中方法名和变量名获取\n- 方法名\n    + template lang 为 cml: 从 c-bind 、 c-catch 指令对应的\b属性值获取\n    + template lang 为 vue: 从 v-on、 v-once 、 @ 指令对应的属性值获取\n- 变量名\n    + template lang 为 cml: 从 \b属性值由 {{}} 给出的表达式中获取\n    + template lang 为 vue: 从 v-if、v-show、v-else-if、v-model、: 等\b直接绑定数据值得指令获取，具\b提参见 [template-ast-parser.js](../checkers/template/lib/template-ast-parser.js)\n\n### \b资料\n[htmllint](https://github.com/htmllint/htmllint)\n[htmlparser2](https://github.com/fb55/htmlparser2)\ncml-htmllinter"
  },
  {
    "path": "packages/chameleon-linter/docs/templates/template.md",
    "content": "### 模板书写规范\nchameleon 模板书写规范尊从 HTML5 基本规范。\n\n## 模板规范\n\b\bchameleon 支持三端(三种 native 环境)，每个组件在每个\b环境对应有一个模板。模板命名格式  `组件名称+端名称.cml` 比如：c-\btitle 组件\n```\n├── components\n│   ├── c-title                              \n│   │   ├── c-title.web.cml                          \n│   │   ├── c-title.weex.cml                        \n│   │   └── c-title.wx.cml \n```\n\n其中： c-title.web.cml 为 web 端模板，c-title.weex.cml 为 iOS、Android 端，c-title.wx.cml 为微信小程序端。\n\n本节模板规范就是指对这三个模板\b文件的\b编写规范。\n\n### 模板语言指定\n\b\b每个端的模板都可以并且必须选择两种语法规范中的一个，cml 语法规范 或者 类 vue 语法规范。指定语法规范的方式为在根节点 template 标签\b上给属性 lang 指定 \"cml\" 或者 \"vue\"。\n\n列如指定模板为 cml 语法规范\n\n```\n<template lang=\"cml\"></template>\n```\n\n> 注意：每个模板只能够有一个根节点并且必须为 template 标签，template 便签每个模板只能有一个。\n\n### 模板标签使用规范\n每个模板可以使用的标签，由模板语言、模板所属的 native 环境以及自定义组件三部分共同\b组成。 \n若模板语言为 cml 的模板，除自定义组件的标签还可以使用 chamelon 支持的\b便签以及对应 native 环境的原始\b组件标签。\n若模板语言为类 vue 的模板，截止目前[2018-11-05] chamelon 在类 vue 模板语言下能够使用的标签和模板语言为 cml 的模板一致。\n\n> chamelon 支持的标签有: template、view、text、block、scroller、list、cell、image、switch、video、input、button、radio、checkbox\n\n#### 举例\n仍以 c-title 组件为例，假设各个模板都有自定义\b组件配置\n```\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"tickets\": \"/components/ticket/index\"\n    }\n  }\n}\n</script>\n```\n+ c-title.web.cml\n    - 可以使用 chameleon 支持的 view、text、block 等基本标签，web 原生标签 div、p、span 等,以及自定义组件 tickets。\n+ c-title.weex.cml\n    - 可以使用 chameleon 支持的 view、text、block 等基本标签，weex \b\b\b\b支持的标签，以及自定义组件 tickets。如果以 vue 作为 weex 使用的前端框架，那么 weex 支持的标签基本和 vue 框架支持的标签基本一致，其中有部分不支持的标签比如：transition 标签，具体请参见 weex 文档。\n+ c-title.wx.cml\n    - 可以使用 chameleon 支持的 view、text、block 等基本标签，wx 原生标签比如 swiper、movable-area、cover-view、web-view  等,以及自定义组件 tickets。\n\n### 模板指令使用规范\n\n每个模板可使用的指令由模板\b语言支持的指令和 native 环境支持的指令两部分构成。不同模板\b语言的模板之间不能相互使用彼此的指令。\blang = \"cml\" 时不能使用 类 vue 语法的指令，lang = \"vue\" 时不能使用 chameleon 的指令。\n\n+ \b模板语言为 cml 时支持的指令有：c-if、c-else、c-else-if、c-for、c-for-index、c-for-item、c-model、c-text、c-show、c-bind、c-catch\n+ 模板语言为类 vue 时支持的指令有：v-if、v-else、v-else-if、v-for、v-on、v-bind、v-html、v-show、v-model、v-pre、v-once、slot-scope、is、@、:\n\n> 类 vue 语法支持上述列表中的指令，其他 vue.js 的指令如 v-cloak 是不支持的。\n\n#### 举例\n\b若模板语言为 \"cml\" 即 template 标签\b lang 属性为 \"cml\"，\bnative 环境为微信小程序。还是以 c-title 组件为例，那么此时对应的是 c-title.wx.cml 模板。\n```\nc-title.wx.cml:\n\n<template lang=\"cml\">\n    <view c-if=\"{{showMessage}}\">{{messageText}}</view>\n    <picker-view></picker-view>\n</template>\n```\n那么模板里可以使用 chameleon 支持的指令: c-if、c-else、c-else-if、c-for、c-for-index、c-for-item、c-model、c-text、c-show、c-bind、c-catch, 以及微信小程序原生支持的指令 wx:if、wx:elif、wx:else、wx:for、wx:for-item、wx:for-index、wx:key、bindtap、catchtap。"
  },
  {
    "path": "packages/chameleon-linter/file-spec.js",
    "content": "const fs = require('fs');\nconst chalk = require('chalk');\n\n\nconst utils = require('./utils');\nconst linters = require('./linters');\nconst checkers = require('./checkers');\nconst config = require('./config');\n\n\n/**\n * 文件语法检查\n *\n * @param  {Object}  parts 片段列表\n * @return {Promise}       promise\n */\nconst lintCmlFile = async (parts) => {\n  let result = {};\n\n  // 语法检查\n  for (let partName of ['json', 'interface', 'template', 'script', 'style']) {\n    let part = parts[partName];\n\n    // 不存在的片段直接跳过\n    if (!part) {\n      continue;\n    }\n\n    switch (partName) {\n      // 模板\n      case 'template':\n        if (result.json && result.json.obj) {\n          result.template = await linters.templatelint(part, result.json.obj);\n        }\n        break;\n\n      // 接口\n      case 'interface':\n        result['interface'] = await linters.scriptlint(part);\n        break;\n\n      // 脚本\n      case 'script':\n        result.script = await linters.scriptlint(part);\n        break;\n\n      // json\n      case 'json':\n        result.json = await linters.jsonlint(part);\n        break;\n\n      // 样式\n      case 'style':\n        result.style = await linters.stylelint(part);\n        break;\n\n      default:\n\n        break;\n    }\n    result[partName] = result[partName] || {};\n    result[partName].start = part.line;\n    result[partName].type = part.type;\n    result[partName].file = part.file;\n    result[partName].platform = part.platformType;\n  }\n\n  return result;\n}\n\n/**\n * 文件逻辑检查\n *\n * @param  {Object}  lintedResult 语法校验后的结果\n * @param  {string}  filepath     文件路径\n * @return {Promise}              promise\n */\nconst checkFile = async (lintedResult, filepath) => {\n  // 校验style\n  checkers.style(lintedResult);\n\n  // 校验json\n  checkers.json(lintedResult);\n\n  // 校验脚本\n  checkers.script(lintedResult);\n\n  // 模板校验 BEGIN\n  if (\n    lintedResult.template && lintedResult.template.ast &&\n    lintedResult.script && lintedResult.script.ast &&\n    lintedResult.json && lintedResult.json.obj\n  ) {\n    let templateChecker = new checkers.Template(filepath, lintedResult);\n    lintedResult.template.messages.push(...templateChecker.check());\n  }\n  // 模板校验 END\n\n  return lintedResult;\n};\n\n/**\n * 处理过程\n *\n * @param  {string}   filepath   文件路径\n * @return {Promise}             promise\n */\nconst checkFileContent = async (filepath) => {\n  let parts = utils.getCmlParts(filepath);\n  let result = await lintCmlFile(parts);\n  result = await checkFile(result, filepath);\n\n  return result;\n};\n\n/**\n * 检查CML文件格式\n *\n * @param  {string} filepath 文件路径\n * @return {Object}          校验结果\n */\nconst checkCMLFileSpecification = async (filepath) => {\n  let platforms = config.getPlatforms();\n  let result = {\n    core: {\n      messages: []\n    }\n  };\n  if (new RegExp('([^/]*?)\\.(' + platforms.join('|') + ')\\.cml$', 'g').test(filepath)) {\n    let interfaceFile = filepath.replace(new RegExp('\\.(' + platforms.join('|') + ')\\.cml$', 'g'), '.interface');\n    if (!fs.existsSync(interfaceFile)) {\n      result.core.messages.push(chalk.red('[error]') + ' file: ' + interfaceFile + ' is not exist!');\n    }\n    // cml多文件格式\n    else {\n      Object.assign(result, await checkFileContent(filepath));\n    }\n  }\n  // cml单文件格式\n  else {\n    Object.assign(result, await checkFileContent(filepath));\n  }\n  return result;\n}\n\n/**\n * 检查接口文件规范\n *\n * @param  {string}  filepath 文件路径\n * @return {Promise}          promise\n */\nconst checkInterfaceFileSpecification = async (filepath) => {\n  let {parts, messages} = utils.getInterfaceParts(filepath);\n  let result = {};\n  let keys = Object.keys(parts);\n\n  if (messages.length == 0 && keys.length > 1) {\n    for (let key in parts) {\n      if (parts.hasOwnProperty(key)) {\n        let part = parts[key];\n        result[key] = await linters.scriptlint(part);\n        result[key] = result[key] || {};\n        result[key].start = part.line;\n        result[key].type = part.type;\n        result[key].file = part.file;\n        result[key].platform = part.platformType;\n      }\n    }\n    // 校验脚本\n    checkers.script(result);\n    return result;\n  }\n  else {\n    return {\n      core: {\n        type: 'core',\n        messages,\n        file: filepath\n      }\n    };\n  }\n}\n\n/**\n * 校验文件格式\n *\n * @param  {string}  filepath 文件路径\n * @param  {string}  filetype 文件类型\n * @return {Promise}          promise\n */\nconst checkFileSpecification = async (filepath, filetype) => {\n\n  if (filetype == 'cml') {\n    return checkCMLFileSpecification(filepath);\n  }\n  else if (filetype == 'interface') {\n    return checkInterfaceFileSpecification(filepath);\n  }\n};\n\n\nmodule.exports = checkFileSpecification;\nmodule.exports.lintCmlFile = lintCmlFile;\nmodule.exports.checkFile = checkFile;\n"
  },
  {
    "path": "packages/chameleon-linter/file-structure.js",
    "content": "const fs = require('fs');\nconst path = require('path');\nconst chalk = require('chalk');\nconst config = require('./config');\n\n/**\n * 文件列表\n *\n * @type {Array}\n */\nconst fileList = [\n  'chameleon.config.js',\n  'src/app/app.cml',\n  'src/router.config.json'\n];\n\n/**\n * 校验文件是否存在\n *\n * @return {Object}         校验结果\n */\nconst checkFilesExist = () => {\n  let currentWorkspace = config.getCurrentWorkspace();\n\n  let messages = [];\n  let result = {core: {messages}};\n\n  fileList.forEach(filepath => {\n    let fileExist = fs.existsSync(path.resolve(currentWorkspace, filepath));\n\n    if (!fileExist) {\n      messages.push(chalk.red('[error]') + ' file: ' + filepath + ' is not exist!');\n    }\n  });\n  return result;\n};\n\nmodule.exports = checkFilesExist;\n"
  },
  {
    "path": "packages/chameleon-linter/index.js",
    "content": "const glob = require('glob');\nconst fileStruture = require('./file-structure');\nconst fileSpec = require('./file-spec');\nconst utils = require('./utils');\nconst config = require('./config');\nconst chalk = require('chalk');\n\n// process.on('uncaughtException', function (err) {\n//   console.log(err);\n// });\n\n\n// process.on('unhandledRejection', error => {\n//   // Will print \"unhandledRejection err is not defined\"\n//   console.log('unhandledRejection', error.message);\n// });\n\n/**\n * 获取cml文件列表\n *\n * @return {array} 文件列表\n */\nconst getCMLFileList = () => {\n  return new Promise((resolve, reject) => {\n    glob('src/**/*.cml', {}, function (er, files) {\n      resolve(files);\n    });\n  });\n};\n\n\n/**\n * 获取interface文件列表\n *\n * @return {Array} 文件列表\n */\nconst getInterfaceList = () => {\n  return new Promise((resolve, reject) => {\n    glob('src/**/*.interface', {}, function (er, files) {\n      resolve(files);\n    });\n  });\n}\n\nmodule.exports = async (currentWorkspace, needOutputWarnings = true) => {\n  await config.init(currentWorkspace);\n\n  if (!config.isChameleonProject()) {\n    console.log(chalk.red('[ERROR] ') + 'The current project is not a chameleon project!');\n    return;\n  }\n  let results = [];\n\n  if (config.getRuleOption('core-files-check')) {\n    // 1. 校验目录结构\n    results.push(fileStruture());\n  }\n\n  // 2. 检查所有的cml文件\n  if (config.getRuleOption('cml-files-check')) {\n    let files = await getCMLFileList();\n    for (let filepath of files) {\n      let result = await fileSpec(filepath, 'cml');\n      if (result && Object.keys(result).length) {\n        results.push(result);\n      }\n    }\n  }\n\n  // 3. 检查所有的interface文件\n  if (config.getRuleOption('interface-files-check')) {\n    let interfaces = await getInterfaceList();\n    for (let filepath of interfaces) {\n      let result = await fileSpec(filepath, 'interface');\n      if (result && Object.keys(result).length) {\n        results.push(result);\n      }\n    }\n  }\n\n  // 4. 检查其他文件\n  // todo\n\n  // 5. 输出\n  if (needOutputWarnings) {\n    console.log(chalk.cyan('[INFO] ') + 'Syntax check results:');\n    let hasOutput = false;\n    results.forEach((result) => {\n      if (utils.outputWarnings(result)) {\n        hasOutput = true;\n      }\n    });\n    if (!hasOutput) {\n      console.log('Congratulations! Everything is OK!');\n    }\n  }\n  return results;\n};\n"
  },
  {
    "path": "packages/chameleon-linter/linters/index.js",
    "content": "module.exports = {\n  stylelint: require('./style'),\n  templatelint: require('./template'),\n  scriptlint: require('./script'),\n  jsonlint: require('./json')\n};\n\n"
  },
  {
    "path": "packages/chameleon-linter/linters/json.js",
    "content": "const jsonlint = require('json-lint');\nconst config = require('../config/parser-config');\nconst parse = require('@babel/parser').parse;\n\nmodule.exports = async (part) => {\n  let messages = [];\n  let result = jsonlint(part.content, {\n    comments: false\n  });\n\n\n  if (result.error) {\n    messages.push({\n      line: result.line,\n      column: result.character,\n      token: result.c,\n      msg: result.error\n    });\n  }\n\n  const opts = config.script;\n\n  let obj = null;\n\n  try {\n    obj = (new Function('return ' + part.content.replace(/^\\n*/g, '') + ';'))();\n  }\n  catch (e) {}\n\n  return {\n    start: part.line,\n    ast: result.error ? null : parse('module.exports = \\n' + part.content, opts),\n    obj: obj,\n    messages\n  };\n};\n"
  },
  {
    "path": "packages/chameleon-linter/linters/script.js",
    "content": "const parse = require('@babel/parser').parse;\nconst config = require('../config/parser-config');\nconst traverse = require('@babel/traverse')['default'];\nconst globalVars = require('../config/globalVars');\nconst uniq = require('lodash.uniq');\n\nconst Map = {\n  watch: 'watcher',\n  computed: 'computed property',\n  methods: 'method'\n};\n\nfunction checkArrowFun(path) {\n  let messages = [];\n  if (path.node) {\n    let properties = path.get('value').get('properties');\n    switch (path.node.key.name) {\n      case 'watch':\n      case 'computed':\n      case 'methods':\n        if (properties.forEach) {\n          (properties || []).forEach(property => {\n            messages = messages.concat(handleProperty(property, path.node.key.name));\n          });\n        }\n        break;\n      case 'beforeCreate':\n      case 'created':\n      case 'beforeMount':\n      case 'mounted':\n      case 'beforeDestroy':\n      case 'destroyed':\n        messages = messages.concat(handleProperty(path, path.node.key.name));\n        break;\n      default:\n        break;\n    }\n  }\n  return messages;\n}\n\nfunction handleProperty(property, propertyName) {\n  let messages = [];\n  if (property.get('value').isArrowFunctionExpression()) {\n    let node = property.get('key').node;\n    let name = node.name;\n    messages.push({\n      line: node.loc.start.line,\n      column: node.loc.start.column + 1,\n      msg: Map[propertyName]\n        ? (Map[propertyName] + ' \"' + name + '\" cannot be used as an arrow function')\n        : ('lifecycle hook \"' + name + '\" cannot be used as an arrow function')\n    });\n  }\n  return messages;\n}\n\nfunction getForbiddenGlobalTokens(platform = 'all') {\n  let tokenList = [];\n  platform = platform.toUpperCase();\n\n  Object.keys(globalVars).forEach(key => {\n    if (platform === 'ALL' || key !== platform) {\n      tokenList = tokenList.concat(globalVars[key]);\n    }\n  });\n\n  tokenList = uniq(tokenList);\n\n  return tokenList;\n}\n\n\nfunction checkGlobal(path, tokenList) {\n  let messages = [];\n\n  let programScope = path.scope;\n\n  Object.keys(programScope.globals).forEach(tokenName => {\n    if (~tokenList.indexOf(tokenName)) {\n      messages.push({\n        line: programScope.globals[tokenName].loc.start.line,\n        column: programScope.globals[tokenName].loc.start.column,\n        token: tokenName,\n        msg: 'global variable: \"' + tokenName + '\" should not be used in this file'\n      });\n    }\n  });\n\n  return messages;\n}\n\n/**\n * 校验语法\n *\n * @param  {Object} part 片段\n * @return {Object}      语法检查结果\n */\nconst checkSyntax = function (part) {\n  let messages = [];\n  const opts = config.script;\n  let ast;\n  let tokenList = [];\n  try {\n    ast = parse(part.content, opts);\n  }\n  catch (err) {\n    messages.push({\n      line: err.loc.line,\n      column: err.loc.column + 1,\n      msg: err.message.replace(/ \\((\\d+):(\\d+)\\)$/, '')\n    });\n  }\n  try {\n    tokenList = getForbiddenGlobalTokens(part.platformType || 'all');\n    traverse(ast, {\n      // check arrow function: we do not allow arrow functions in life cycle hooks.\n      ClassProperty(path) {\n        messages = messages.concat(checkArrowFun(path));\n      },\n      // check global variables: we shall never use any platform specified global variables such as wx, global, window etc.\n      Program(path) {\n        messages = messages.concat(checkGlobal(path, tokenList));\n      }\n    });\n  }\n  catch (e) {\n    console.log(e);\n  }\n\n\n  return {\n    start: part.line,\n    ast,\n    messages\n  };\n}\n\nmodule.exports = function (part) {\n  return checkSyntax(part);\n};\n"
  },
  {
    "path": "packages/chameleon-linter/linters/style.js",
    "content": "const stylelint = require('stylelint');\nconst stylus = require('stylus/lib/stylus');\nconst config = require('../config');\nconst parserConfig = require('../config/parser-config');\nconst postcss = require('postcss');\nconst converter = require('stylus-converter');\nconst path = require('path');\n\nmodule.exports = async (part) => {\n  return new Promise(function (resolve, reject) {\n    let messages = [];\n    if (config.neexLintWeex() && (!part.platformType || part.platformType == 'weex')) {\n      parserConfig.style.rules['selector-max-compound-selectors'] = 1;\n    }\n    else {\n      parserConfig.style.rules['selector-max-compound-selectors'] = 0;\n    }\n    let lang = part.params.lang || 'less';\n    if (lang == 'stylus') {\n      stylus.render(part.content, {...{\n        paths: [path.dirname(path.resolve(config.getCurrentWorkspace(), part.file))]\n      }, ...parserConfig.style}, function (err) {\n        if (err) {\n          let isImportStyl = err.filename && (path.extname(err.filename) === '.styl');\n          let message = {\n            line: isImportStyl ? 0 : err.lineno,\n            column: isImportStyl ? 0 : err.column,\n            msg: err.message\n          };\n          // guess line coloumn from err message\n          if (err.lineno === undefined) {\n            err.message.replace(/stylus:\\s*(\\d+):\\s*(\\d+)/g, (match, line, column) => {\n              message.line = +line;\n              message.column = +column;\n            });\n          }\n          messages.push(message);\n        }\n        let ast;\n        try {\n          let sassCode = converter.converter(part.content, {conver: 'sass', autoprefixer: false});\n          sassCode = sassCode.replace(/\\n\\s*\\}/g, '}');\n          ast = postcss.parse(sassCode);\n        }\n        catch (e) {     \n          ast = null;\n        }\n\n        resolve({\n          start: part.line,\n          ast: ast,\n          messages\n        });\n      });\n    }\n    else {\n      let options = {\n        code: part.content,\n        config: parserConfig.style\n      };\n      if (~['less', 'sass', 'scss'].indexOf(lang)) {\n        options.syntax = lang;\n      }\n      stylelint\n        .lint(options)\n        .then(function(result) {\n          if (result.errored) {\n            result.results.forEach(result => {\n              result.errored && result.warnings.forEach(warn => {\n                messages.push({\n                  line: warn.line,\n                  column: warn.column,\n                  msg: warn.text.replace(/\\(.*?\\)$/g, '')\n                });\n              });\n            });\n          }\n\n          let ast;\n          try {\n            ast = postcss.parse(part.content);\n          }\n          catch (e) {\n            ast = null;\n          }\n\n          resolve({\n            start: part.line,\n            ast: ast,\n            messages\n          });\n        });\n    }\n  })\n\n};\n"
  },
  {
    "path": "packages/chameleon-linter/linters/template.js",
    "content": "const path = require('path');\nconst htmllint = require('cml-htmllint');\nconst config = require('../config');\nconst whiteListConifg = require('../config/white-list');\nconst builtinComponents = require('../config/built-in-components');\nconst tagEmbedRules = require('../config/tag-embed-rules.json');\nconst fakeComps = require('../config/fakeComps');\n\nconst utils = require('../utils');\nconst linter = new htmllint.Linter();\n\nconst CML_METHODNAME_REGEX = /(?:c-bind:|c-catch:)(\\w+)/;\nconst VUE_METHODNAME_REGEX = /(?:v-on:|v-once:|@)(\\w+)/;\nconst VUE_PROP_REGEX = /(?:v-bind:|:)((?:\\w|-)+)/;\n\nconst APP_ENTRANCE_FILENAME = 'app.cml';\n\n/**\n * Parse json ast and retrive the custumized component names.\n * @param {Object} jsonAst\n * @returns An array contains all the component names. ej. [{name: 'view',  isOrigin: true}, {name:'picker', isOrigin: false}]\n */\nfunction getCustimizedTags(jsonAst, {platform = '', templatePath = ''}) {\n  let result = []; let componentsObj = {};\n\n  if (jsonAst) {\n    let baseJson = jsonAst.base || {};\n    let platformJson = {};\n    if (platform) {\n      platformJson = jsonAst[platform] || {};\n    }\n    Object.assign(componentsObj, baseJson.usingComponents, platformJson.usingComponents);\n  }\n\n  result = Object.entries(componentsObj)\n    .map((infoPair) => {\n      let [name, basePath] = infoPair;\n      return {\n        name: utils.toDash(name),\n        isOrigin: !utils.isCmlComponent(path.resolve(config.getCurrentWorkspace(), templatePath), basePath)\n      }\n    });\n\n  return result;\n}\n\n\n/**\n * Getting options for html linter.\n * @params {Object}\n *  platformType: 'web'|'wx'|'weex' | ''   // '' stands for single file component\n *  lang: 'cml'|'vue'\n *  custimizedTags: tags appeding by usingComponents.\n */\nfunction getLintOptions(params) {\n  let options = {\n    'line-no-trailing-whitespace': false,\n    'line-end-style': false,\n    'attr-name-style': false,\n    'indent-width': false,\n    'class-style': 'none',\n    'template-req-lang': false,\n    'attr-quote-style': 'quoted',\n    'spec-char-escape': false,\n    'attr-req-value': false,\n    'tag-close': true // ignoring tag close detection for now, a better solution will be provide in the future.\n  };\n  options['template-lang-allows'] = ['cml', 'vue'];\n  options['template-lang'] = params.lang;\n  options['attr-bans'] = whiteListConifg.getForbiddenAttrsByLang(params.lang);\n\n  options['tag-only-allowed-names'] = whiteListConifg\n    .getAllowedTags()\n    .concat(params.custimizedTags\n      .map((tag) => {\n        return tag.name;\n      }));\n\n  // origin components that are referenced by usingComponents.\n  options['origin-tag-list'] = params.custimizedTags\n    .filter((tag) => {\n      return tag.isOrigin;\n    })\n    .map((tag) => {\n      return tag.name;\n    });\n\n\n  // options associated with directives.\n  if (params.lang === 'vue') {\n    options['directive-name-forbidden-regex'] = /^(c-(?:bind|catch)(?!\\w))/;\n  } else {\n    options['directive-name-forbidden-regex'] = /^((?:v-(?:bind|on|once)(?!\\w))|:|@)/;\n    options['text-ignore-regex'] = /{{(.*?)}}/;\n  }\n  options['cml-directives'] = whiteListConifg.getForbiddenAttrsByLang('vue');\n  options['cml-valid-value-regex'] = /^\\s*{{.*}}\\s*$/;\n\n  // built-in components configurations.\n  options['component-allow-attr'] = builtinComponents.getCml();\n  if (params.lang === 'cml') {\n    options['component-event-regex'] = CML_METHODNAME_REGEX;\n    options['component-prop-regex'] = false;\n  } else {\n    options['component-event-regex'] = VUE_METHODNAME_REGEX;\n    options['component-prop-regex'] = VUE_PROP_REGEX;\n  }\n\n  // built-in embed tags' rules\n  options['tag-embed-tags'] = tagEmbedRules;\n\n  // origin components rules\n  options['origin-tag-forbiden-directive-regex'] = new RegExp('^(' + whiteListConifg.getForbiddenAttrsByLang('vue').join('|') + ')');\n\n  return options;\n}\n\n/**\n * A temporary solution for application entrance file app.cml\n * @param {Object} options lint options\n */\nfunction addFakeComp(options, comp) {\n  if (options['component-allow-attr']) {\n    options['component-allow-attr'][comp.name] = comp.allowAttrs;\n  }\n  if (options['tag-only-allowed-names']) {\n    options['tag-only-allowed-names'].push(comp.name);\n  }\n}\n\nfunction isAppEntranceFile(file) {\n  return file && path.basename(file) === APP_ENTRANCE_FILENAME;\n}\n\n/**\n * @part {Object}\n *  line: line offset of template part.\n *  rawContent: the whole tempalte string.\n *  platformType:'web'|'wx'|'weex'\n *  params: {\n *    lang:'cml'\n *  }\n * @jsonAst {Object} An ast of json part.\n */\nmodule.exports = (part, jsonAst) => {\n\n\n  return new Promise(async (resolve, reject) => {\n    let ast = {}; let messages = []; let lintResults = []; let lintOptions = {}; let templateMatches = [];\n\n    part.params.lang || (part.params.lang = 'cml');\n\n    ast = linter.parser.parse(part.rawContent);\n    templateMatches = part.rawContent.match(/<\\/?\\s*?template/ig);\n\n    // eslint-disable-next-line no-magic-numbers\n    if (!templateMatches || templateMatches.length !== 2) {\n      return resolve({\n        start: part.line,\n        ast,\n        messages: [{\n          line: part.line + 1,\n          column: 0,\n          token: 'template',\n          msg: 'Each template can only have one group of template tags'\n        }]\n      });\n    }\n\n    lintOptions = getLintOptions({\n      ...part.params,\n      platformType: part.platformType || 'cml',\n      ...{custimizedTags: getCustimizedTags(jsonAst, {\n        templatePath: part.file,\n        platform: part.platformType\n      })}\n    });\n\n    // adding fake comps\n    const allowedFakeComps = ['component'];\n    if (isAppEntranceFile(part.file)) {\n      allowedFakeComps.push('app');\n    }\n    fakeComps && fakeComps.forEach((comp) => {\n      if (~allowedFakeComps.indexOf(comp.name)) {\n        addFakeComp(lintOptions, comp);\n      }\n    });\n\n    lintResults = await htmllint(part.rawContent, lintOptions);\n\n    lintResults && lintResults.forEach((item) => {\n      messages.push({\n        line: item.line,\n        column: item.column,\n        token: htmllint.messages.guessToken(item),\n        msg: htmllint.messages.renderIssue(item)\n      });\n    });\n\n    resolve({\n      start: part.line,\n      ast,\n      messages\n    });\n  });\n};\n"
  },
  {
    "path": "packages/chameleon-linter/package.json",
    "content": "{\n  \"name\": \"chameleon-linter\",\n  \"version\": \"1.0.8\",\n  \"description\": \"cml规范校验工具\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"nyc ./node_modules/mocha/bin/mocha ./test/**/*.test.js --timeout=3000\",\n    \"non-report-test\": \"./node_modules/mocha/bin/mocha ./test/template/checker/template-lib-template.test.js\",\n    \"break-non-report\": \"./node_modules/mocha/bin/mocha --inspect-brk  ./test/template/linter/**/*.test.js\"\n  },\n  \"bin\": {\n    \"cml-linter\": \"./bin/cli.js\"\n  },\n  \"keywords\": [\n    \"linter\",\n    \"cml\",\n    \"chameleon\"\n  ],\n  \"author\": \"Chameleon-Team\",\n  \"email\": \"ChameleonCore@didiglobal.com\",\n  \"license\": \"Apache\",\n  \"dependencies\": {\n    \"@babel/parser\": \"^7.1.3\",\n    \"@babel/traverse\": \"^7.1.4\",\n    \"bulk-require\": \"^1.0.1\",\n    \"chalk\": \"^2.4.1\",\n    \"chameleon-tool-utils\": \"1.0.8\",\n    \"cml-component-parser\": \"1.0.8\",\n    \"cml-htmllint\": \"1.0.8\",\n    \"cml-js-parser\": \"1.0.8\",\n    \"commander\": \"^2.19.0\",\n    \"glob\": \"^7.1.3\",\n    \"json-lint\": \"^0.1.0\",\n    \"lodash.filter\": \"^4.6.0\",\n    \"lodash.groupby\": \"^4.6.0\",\n    \"lodash.map\": \"^4.6.0\",\n    \"lodash.uniq\": \"^4.5.0\",\n    \"postcss\": \"^7.0.5\",\n    \"stylelint\": \"^9.7.0\",\n    \"stylus\": \"^0.54.5\",\n    \"stylus-converter\": \"^0.8.1\",\n    \"traverse\": \"^0.6.6\"\n  },\n  \"devDependencies\": {\n    \"chai\": \"^4.2.0\",\n    \"mocha\": \"*\",\n    \"nyc\": \"^13.1.0\"\n  },\n  \"gitHead\": \"5ddcde4330774710f7646559446e008f7785ce00\"\n}"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/json/nonstandard.cml",
    "content": "<script cml-type=\"json\">\n{\n  \"weex\": {\n    \"usingComponents\": {\n    }\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/json/nonstandard.interface",
    "content": "<script cml-type=\"interface\">\n/*\n定义一个inteface用于描述组件的属性和事件\n1、 如果区分组件属性和事件？\n通过类型来区分，事件为函数类型，属性为非函数类型\n2、 如何定义组件属性\n给interface添加同名的属性即可，指定类型\n3、 如何定义组件事件\n以事件名称为key值给interface定义属性，该属性是一个函数类型，返回值为void，\n定义函数的第一个参数为自定义事件传递的detail对象类型\n*/\n\n//定义事件detail对象的参数\ntype changeStatusDetail = {\n  index: Number,\n  status: Boolean\n}\ntype indexDetail = {\n  index: Number\n}\ninterface CTodoitemInterface {\n  index: Number,\n  completed: Boolean,\n  text: String,\n  changestatus(eventDetail: changeStatusDetail): void;\n  delete(eventDetail: indexDetail): void;\n  top(eventDetail: indexDetail): void;\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/json/nonstandard.weex.cml",
    "content": "<template>\n<view class=\"border\">\n  <c-scroller class=\"scroller\" scroll-direction=\"horizontal\">\n    <view class=\"checkbox-wrap\">\n      <c-checkbox width=\"{{40}}\" checked=\"{{completed}}\" c-bind:checkclick=\"checkclick\"></c-checkbox>\n    </view>\n    <text class=\"{{completed ? 'completed-show' : 'text-show'}}\" c-bind:tap=\"checkclick\">{{text}}</text>\n    <view class=\"option-wrap\">\n      <view class=\"option-flex-wrap\">\n        <text class=\"top-btn\" c-bind:tap=\"top\">置顶</text>\n        <text class=\"delete-btn\" c-bind:tap=\"delete\">删除</text>\n      </view>\n    </view>\n  </c-scroller>\n</view>\n</template>\n<script>\nclass CTodoitem implements CTodoitemInterface   {\n  props = {\n    index: {\n      type: Number\n    },\n    completed: {\n      type: Boolean\n    },\n    text: {\n      type: String\n    }\n  }\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n    checkclick() {\n      this.$cmlEmit('changestatus', {\n        index: this.index,\n        status: !this.completed\n      })\n    },\n    delete() {\n      this.$cmlEmit('delete', {\n        index: this.index\n      })\n    },\n    top() {\n      this.$cmlEmit('top', {\n        index: this.index\n      });\n    }\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.border {\n  border-bottom: 1px solid #ccc;\n  height: 100px;\n}\n.scroller {\n  width: 600px;\n  height: 100px;\n  white-space: nowrap;\n}\n.checkbox-wrap {\n  width: 80px;\n  height: 100px;\n  padding-left: 10px;\n  padding-top: 30px;\n  display: inline-block;\n  box-sizing: border-box;\n  float: left;\n}\n.completed-show {\n  float: left;\n  width: 520px;\n  font-size: 32px;\n  color: #999;\n  height: 100px;\n  line-height: 100px;\n  text-decoration: line-through;\n}\n.text-show {\n  float: left;\n  width: 520px;\n  font-size: 32px;\n  color: #666;\n  height: 100px;\n  line-height: 100px;\n}\n.option-wrap {\n  display: inline-block;\n}\n.option-flex-wrap {\n  display: flex;\n  flex-direction: row;\n}\n.top-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #61c7fc;\n}\n.delete-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #aaa;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-scroller\": \"chameleon-ui-builtin/components/scroller/scroller\"\n    }\n  },\n  \"weex\": {\n    \"usingComponents\": {\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/json/nonstandard.wx.cml",
    "content": "<template>\n<view class=\"border\">\n  <c-scroller class=\"scroller\" scroll-direction=\"horizontal\">\n    <view class=\"checkbox-wrap\">\n      <c-checkbox width=\"{{40}}\" checked=\"{{completed}}\" c-bind:checkclick=\"checkclick\"></c-checkbox>\n    </view>\n    <text class=\"{{completed ? 'completed-show' : 'text-show'}}\" c-bind:tap=\"checkclick\">{{text}}</text>\n    <view class=\"option-wrap\">\n      <view class=\"option-flex-wrap\">\n        <text class=\"top-btn\" c-bind:tap=\"top\">置顶</text>\n        <text class=\"delete-btn\" c-bind:tap=\"delete\">删除</text>\n      </view>\n    </view>\n  </c-scroller>\n</view>\n</template>\n<script>\nclass CTodoitem implements CTodoitemInterface   {\n  props = {\n    index: {\n      type: Number\n    },\n    completed: {\n      type: Boolean\n    },\n    text: {\n      type: String\n    }\n  }\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n    checkclick() {\n      this.$cmlEmit('changestatus', {\n        index: this.index,\n        status: !this.completed\n      })\n    },\n    delete() {\n      this.$cmlEmit('delete', {\n        index: this.index\n      })\n    },\n    top() {\n      this.$cmlEmit('top', {\n        index: this.index\n      });\n    }\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.border {\n  border-bottom: 1px solid #ccc;\n  height: 100px;\n}\n.scroller {\n  width: 600px;\n  height: 100px;\n  white-space: nowrap;\n}\n.checkbox-wrap {\n  width: 80px;\n  height: 100px;\n  padding-left: 10px;\n  padding-top: 30px;\n  display: inline-block;\n  box-sizing: border-box;\n  float: left;\n}\n.completed-show {\n  float: left;\n  width: 520px;\n  font-size: 32px;\n  color: #999;\n  height: 100px;\n  line-height: 100px;\n  text-decoration: line-through;\n}\n.text-show {\n  float: left;\n  width: 520px;\n  font-size: 32px;\n  color: #666;\n  height: 100px;\n  line-height: 100px;\n}\n.option-wrap {\n  display: inline-block;\n}\n.option-flex-wrap {\n  display: flex;\n  flex-direction: row;\n}\n.top-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #61c7fc;\n}\n.delete-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #aaa;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n\n  },\n  \"wx\": {\n\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    },\n    \"component\": true\n  },\n  \"weex\": {\n    \"usingComponents\": {\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/json/standard.cml",
    "content": "<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  },\n  \"weex\": {\n\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/global-variable/standard.interface",
    "content": "<script cml-type=\"interface\">\n/*\n定义一个inteface用于描述组件的属性和事件\n1、 如果区分组件属性和事件？\n通过类型来区分，事件为函数类型，属性为非函数类型\n2、 如何定义组件属性\n给interface添加同名的属性即可，指定类型\n3、 如何定义组件事件\n以事件名称为key值给interface定义属性，该属性是一个函数类型，返回值为void，\n定义函数的第一个参数为自定义事件传递的detail对象类型\n*/\n\n//定义事件detail对象的参数\ntype changeStatusDetail = {\n  index: Number,\n  status: Boolean\n}\ntype indexDetail = {\n  index: Number\n}\ninterface CTodoitemInterface {\n  index: Number,\n  completed: Boolean,\n  text: String,\n  changestatus(eventDetail: changeStatusDetail): void;\n  delete(eventDetail: indexDetail): void;\n  top(eventDetail: indexDetail): void;\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/global-variable/standard.web.cml",
    "content": "<template>\n<view class=\"border\">\n  <c-scroller class=\"scroller\" scroll-direction=\"horizontal\">\n    <view class=\"checkbox-wrap\">\n      <c-checkbox width=\"{{40}}\" checked=\"{{completed}}\" c-bind:checkclick=\"checkclick\"></c-checkbox>\n    </view>\n    <text class=\"{{completed ? 'completed-show' : 'text-show'}}\" c-bind:tap=\"checkclick\">{{text}}</text>\n    <view class=\"option-wrap\">\n      <view class=\"option-flex-wrap\">\n        <text class=\"top-btn\" c-bind:tap=\"top\">置顶</text>\n        <text class=\"delete-btn\" c-bind:tap=\"delete\">删除</text>\n      </view>\n    </view>\n  </c-scroller>\n</view>\n</template>\n<script>\nclass CTodoitem implements CTodoitemInterface   {\n  props = {\n    index: {\n      type: Number\n    },\n    completed: {\n      type: Boolean\n    },\n    text: {\n      type: String\n    }\n  }\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n    checkclick() {\n      this.$cmlEmit('changestatus', {\n        index: this.index,\n        status: !this.completed\n      })\n    },\n    delete() {\n      this.$cmlEmit('delete', {\n        index: this.index\n      })\n    },\n    top() {\n      this.$cmlEmit('top', {\n        index: this.index\n      });\n    }\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.border {\n  border-bottom: 1px solid #ccc;\n  height: 100px;\n}\n.scroller {\n  width: 600px;\n  height: 100px;\n}\n.checkbox-wrap {\n  width: 70px;\n  height: 100px;\n  margin-left: 10px;\n  justify-content: center;\n}\n.completed-show {\n  width: 520px;\n  font-size: 32px;\n  color: #999;\n  height: 100px;\n  line-height: 100px;\n  text-decoration: line-through;\n}\n.text-show {\n  width: 520px;\n  font-size: 32px;\n  color: #666;\n  height: 100px;\n  line-height: 100px;\n}\n.option-flex-wrap {\n  display: flex;\n  flex-direction: row;\n}\n.top-btn {\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #61c7fc;\n}\n.delete-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #aaa;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-scroller\": \"chameleon-ui-builtin/components/scroller/scroller\",\n      \"c-checkbox\": \"/components/c-checkbox/c-checkbox\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/global-variable/standard.weex.cml",
    "content": "<template>\n<view class=\"border\">\n  <c-scroller class=\"scroller\" scroll-direction=\"horizontal\">\n    <view class=\"checkbox-wrap\">\n      <c-checkbox width=\"{{40}}\" checked=\"{{completed}}\" c-bind:checkclick=\"checkclick\"></c-checkbox>\n    </view>\n    <text class=\"{{completed ? 'completed-show' : 'text-show'}}\" c-bind:tap=\"checkclick\">{{text}}</text>\n    <view class=\"option-wrap\">\n      <view class=\"option-flex-wrap\">\n        <text class=\"top-btn\" c-bind:tap=\"top\">置顶</text>\n        <text class=\"delete-btn\" c-bind:tap=\"delete\">删除</text>\n      </view>\n    </view>\n  </c-scroller>\n</view>\n</template>\n<script>\nclass CTodoitem implements CTodoitemInterface   {\n  props = {\n    index: {\n      type: Number\n    },\n    completed: {\n      type: Boolean\n    },\n    text: {\n      type: String\n    }\n  }\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n    checkclick() {\n      this.$cmlEmit('changestatus', {\n        index: this.index,\n        status: !this.completed\n      })\n    },\n    delete() {\n      this.$cmlEmit('delete', {\n        index: this.index\n      })\n    },\n    top() {\n      this.$cmlEmit('top', {\n        index: this.index\n      });\n    }\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.border {\n  border-bottom: 1px solid #ccc;\n  height: 100px;\n}\n.scroller {\n  width: 600px;\n  height: 100px;\n}\n.checkbox-wrap {\n  width: 70px;\n  height: 100px;\n  margin-left: 10px;\n  justify-content: center;\n}\n.completed-show {\n  width: 520px;\n  font-size: 32px;\n  color: #999;\n  height: 100px;\n  line-height: 100px;\n  text-decoration: line-through;\n}\n.text-show {\n  width: 520px;\n  font-size: 32px;\n  color: #666;\n  height: 100px;\n  line-height: 100px;\n}\n.option-flex-wrap {\n  display: flex;\n  flex-direction: row;\n}\n.top-btn {\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #61c7fc;\n}\n.delete-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #aaa;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-scroller\": \"chameleon-ui-builtin/components/scroller/scroller\",\n      \"c-checkbox\": \"/components/c-checkbox/c-checkbox\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/global-variable/standard.wx.cml",
    "content": "<template>\n<view class=\"border\">\n  <c-scroller class=\"scroller\" scroll-direction=\"horizontal\">\n    <view class=\"checkbox-wrap\">\n      <c-checkbox width=\"{{40}}\" checked=\"{{completed}}\" c-bind:checkclick=\"checkclick\"></c-checkbox>\n    </view>\n    <text class=\"{{completed ? 'completed-show' : 'text-show'}}\" c-bind:tap=\"checkclick\">{{text}}</text>\n    <view class=\"option-wrap\">\n      <view class=\"option-flex-wrap\">\n        <text class=\"top-btn\" c-bind:tap=\"top\">置顶</text>\n        <text class=\"delete-btn\" c-bind:tap=\"delete\">删除</text>\n      </view>\n    </view>\n  </c-scroller>\n</view>\n</template>\n<script>\nclass CTodoitem implements CTodoitemInterface   {\n  props = {\n    index: {\n      type: Number\n    },\n    completed: {\n      type: Boolean\n    },\n    text: {\n      type: String\n    }\n  }\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n    checkclick() {\n      this.$cmlEmit('changestatus', {\n        index: this.index,\n        status: !this.completed\n      })\n    },\n    delete() {\n      this.$cmlEmit('delete', {\n        index: this.index\n      })\n    },\n    top() {\n      this.$cmlEmit('top', {\n        index: this.index\n      });\n    }\n  }\n\n  beforeCreate() {\n    window.location.href = 'http://www.baidu.com';\n  }\n\n  created() {\n\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.border {\n  border-bottom: 1px solid #ccc;\n  height: 100px;\n}\n.scroller {\n  width: 600px;\n  height: 100px;\n  white-space: nowrap;\n}\n.checkbox-wrap {\n  width: 80px;\n  height: 100px;\n  padding-left: 10px;\n  padding-top: 30px;\n  display: inline-block;\n  box-sizing: border-box;\n  float: left;\n}\n.completed-show {\n  float: left;\n  width: 520px;\n  font-size: 32px;\n  color: #999;\n  height: 100px;\n  line-height: 100px;\n  text-decoration: line-through;\n}\n.text-show {\n  float: left;\n  width: 520px;\n  font-size: 32px;\n  color: #666;\n  height: 100px;\n  line-height: 100px;\n}\n.option-wrap {\n  display: inline-block;\n}\n.option-flex-wrap {\n  display: flex;\n  flex-direction: row;\n}\n.top-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #61c7fc;\n}\n.delete-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #aaa;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-scroller\": \"chameleon-ui-builtin/components/scroller/scroller\",\n      \"c-checkbox\": \"/components/c-checkbox/c-checkbox\"\n    }\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    },\n    \"component\": true\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/include/include-interface-fail.interface",
    "content": "<include src=\"./origin-interface-fail.interface\"></include>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/include/include-src-cml-fail.interface",
    "content": "<include src=\"./origin-interface.interface\"></include>\n\n<script cml-type=\"someplatform\" src='./someplatform.cml'>\n</script>"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/include/include-src-cml-mis-prop-fail.interface",
    "content": "<include src=\"./origin-comp-interface.interface\"></include>\n\n\n<script cml-type=\"someplatform\" src=\"./src/someplatform-mis-prop.cml\"></script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/include/include-src-js-class-name-fail.interface",
    "content": "<include src=\"./origin-interface.interface\"></include>\n\n<script cml-type=\"someplatform\" src=\"./src/someplatform-mis-class.js\">\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/include/include-src-js-fail.interface",
    "content": "<include src=\"./origin-interface.interface\"></include>\n\n<script cml-type=\"someplatform\" src='./someplatform.js'>\n</script>"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/include/include-src-js-mis-prop-fail.interface",
    "content": "<include src=\"./origin-interface.interface\"></include>\n\n<script cml-type=\"someplatform\" src=\"./src/someplatform-mis-prop.js\">\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/include/origin-comp-interface.interface",
    "content": "<script cml-type=\"interface\">\n/*\n定义一个inteface用于描述组件的属性和事件\n1、 如何区分组件属性和事件？\n通过类型来区分，事件为函数类型，属性为非函数类型\n2、 如何定义组件属性\n给interface添加同名的属性即可，指定类型\n3、 如何定义组件事件\n以事件名称为key值给interface定义属性，该属性是一个函数类型，返回值为void，\n定义函数的第一个参数为自定义事件传递的detail对象类型\n*/\n\n//定义事件detail对象的参数\ntype EventDetail = {\n  value: String\n}\ninterface ExtendCompInterface {\n  name: String,\n  age: Number,\n  onshow(eventDetail: EventDetail): void;\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/include/origin-interface.interface",
    "content": "<script cml-type=\"interface\">\ninterface OnlyInterfaceInterface {\n  getMsg(msg: String): String;\n  setTitle(title: String): void;\n}\n\n</script>\n\n<script cml-type=\"web\">\n\nclass Method implements OnlyInterfaceInterface {\n  getMsg(msg) {\n    return 'web:' + msg;\n  }\n  setTitle(title) {\n    return true;\n  }\n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"weex\">\n\nclass Method implements OnlyInterfaceInterface {\n  getMsg(msg) {\n    return 'weex:' + msg;\n  }\n  setTitle(title) {\n    return true;\n  }  \n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"wx\">\n\nclass Method implements OnlyInterfaceInterface {\n  getMsg(msg) {\n    return 'wx:' + msg;\n  }\n  setTitle(title) {\n    return true;\n  }  \n}\n\nexport default new Method();\n</script>\n\n\n\n\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/include/src/someplatform-mis-class.js",
    "content": "class Method implements ExtendInterfaceInterface {\n  getMsg(msg) {\n    return 'web:' + msg;\n  }\n}\n\nexport default new Method();\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/include/src/someplatform-mis-prop.cml",
    "content": "<template>\n  <view>\n    <text>{{name}}</text>\n  </view>\n</template>\n\n<script>\n\nclass ExtendCompInclude implements ExtendCompInterface {\n  props = {\n    name: {\n      type: String,\n      default: '默认值'\n    }\n  }\n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch = {\n  }\n\n  methods = {\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n    this.$cmlEmit('onshow',{\n      value: this.name\n    })\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new ExtendCompInclude();\n</script>\n\n<style >\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {}\n  }\n}\n</script>"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/include/src/someplatform-mis-prop.js",
    "content": "class Method implements OnlyInterfaceInterface {\n  getMsg(msg) {\n    return 'web:' + msg;\n  }\n}\n\nexport default new Method();\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/interfaces/prop-not-defined.interface",
    "content": "<script cml-type=\"interface\">\ninterface IntgInterface {\n  platform: String;\n  getMsg(msg: String): String;\n}\n\n</script>\n\n<script cml-type=\"web\">\n\nclass Method implements IntgInterface {\n  platform = 'web';\n  getMsg(msg) {\n    return msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"weex\">\n\nclass Method implements IntgInterface {\n  getMsg(msg) {\n    return msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"wx\">\n\nclass Method implements IntgInterface {\n  platform = 'wx';\n  getMsg(msg) {\n    return msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n\n\n\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/no-global-variable/standard.interface",
    "content": "<script cml-type=\"interface\">\n/*\n定义一个inteface用于描述组件的属性和事件\n1、 如果区分组件属性和事件？\n通过类型来区分，事件为函数类型，属性为非函数类型\n2、 如何定义组件属性\n给interface添加同名的属性即可，指定类型\n3、 如何定义组件事件\n以事件名称为key值给interface定义属性，该属性是一个函数类型，返回值为void，\n定义函数的第一个参数为自定义事件传递的detail对象类型\n*/\n\n//定义事件detail对象的参数\ntype changeStatusDetail = {\n  index: Number,\n  status: Boolean\n}\ntype indexDetail = {\n  index: Number\n}\ninterface CTodoitemInterface {\n  index: Number,\n  completed: Boolean,\n  text: String,\n  changestatus(eventDetail: changeStatusDetail): void;\n  delete(eventDetail: indexDetail): void;\n  top(eventDetail: indexDetail): void;\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/no-global-variable/standard.web.cml",
    "content": "<template>\n<view class=\"border\">\n  <c-scroller class=\"scroller\" scroll-direction=\"horizontal\">\n    <view class=\"checkbox-wrap\">\n      <c-checkbox width=\"{{40}}\" checked=\"{{completed}}\" c-bind:checkclick=\"checkclick\"></c-checkbox>\n    </view>\n    <text class=\"{{completed ? 'completed-show' : 'text-show'}}\" c-bind:tap=\"checkclick\">{{text}}</text>\n    <view class=\"option-wrap\">\n      <view class=\"option-flex-wrap\">\n        <text class=\"top-btn\" c-bind:tap=\"top\">置顶</text>\n        <text class=\"delete-btn\" c-bind:tap=\"delete\">删除</text>\n      </view>\n    </view>\n  </c-scroller>\n</view>\n</template>\n<script>\nclass CTodoitem implements CTodoitemInterface   {\n  props = {\n    index: {\n      type: Number\n    },\n    completed: {\n      type: Boolean\n    },\n    text: {\n      type: String\n    }\n  }\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n    checkclick() {\n      this.$cmlEmit('changestatus', {\n        index: this.index,\n        status: !this.completed\n      })\n    },\n    delete() {\n      this.$cmlEmit('delete', {\n        index: this.index\n      })\n    },\n    top() {\n      this.$cmlEmit('top', {\n        index: this.index\n      });\n    }\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.border {\n  border-bottom: 1px solid #ccc;\n  height: 100px;\n}\n.scroller {\n  width: 600px;\n  height: 100px;\n}\n.checkbox-wrap {\n  width: 70px;\n  height: 100px;\n  margin-left: 10px;\n  justify-content: center;\n}\n.completed-show {\n  width: 520px;\n  font-size: 32px;\n  color: #999;\n  height: 100px;\n  line-height: 100px;\n  text-decoration: line-through;\n}\n.text-show {\n  width: 520px;\n  font-size: 32px;\n  color: #666;\n  height: 100px;\n  line-height: 100px;\n}\n.option-flex-wrap {\n  display: flex;\n  flex-direction: row;\n}\n.top-btn {\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #61c7fc;\n}\n.delete-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #aaa;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-scroller\": \"chameleon-ui-builtin/components/scroller/scroller\",\n      \"c-checkbox\": \"/components/c-checkbox/c-checkbox\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/no-global-variable/standard.weex.cml",
    "content": "<template>\n<view class=\"border\">\n  <c-scroller class=\"scroller\" scroll-direction=\"horizontal\">\n    <view class=\"checkbox-wrap\">\n      <c-checkbox width=\"{{40}}\" checked=\"{{completed}}\" c-bind:checkclick=\"checkclick\"></c-checkbox>\n    </view>\n    <text class=\"{{completed ? 'completed-show' : 'text-show'}}\" c-bind:tap=\"checkclick\">{{text}}</text>\n    <view class=\"option-wrap\">\n      <view class=\"option-flex-wrap\">\n        <text class=\"top-btn\" c-bind:tap=\"top\">置顶</text>\n        <text class=\"delete-btn\" c-bind:tap=\"delete\">删除</text>\n      </view>\n    </view>\n  </c-scroller>\n</view>\n</template>\n<script>\nclass CTodoitem implements CTodoitemInterface   {\n  props = {\n    index: {\n      type: Number\n    },\n    completed: {\n      type: Boolean\n    },\n    text: {\n      type: String\n    }\n  }\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n    checkclick() {\n      this.$cmlEmit('changestatus', {\n        index: this.index,\n        status: !this.completed\n      })\n    },\n    delete() {\n      this.$cmlEmit('delete', {\n        index: this.index\n      })\n    },\n    top() {\n      this.$cmlEmit('top', {\n        index: this.index\n      });\n    }\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.border {\n  border-bottom: 1px solid #ccc;\n  height: 100px;\n}\n.scroller {\n  width: 600px;\n  height: 100px;\n}\n.checkbox-wrap {\n  width: 70px;\n  height: 100px;\n  margin-left: 10px;\n  justify-content: center;\n}\n.completed-show {\n  width: 520px;\n  font-size: 32px;\n  color: #999;\n  height: 100px;\n  line-height: 100px;\n  text-decoration: line-through;\n}\n.text-show {\n  width: 520px;\n  font-size: 32px;\n  color: #666;\n  height: 100px;\n  line-height: 100px;\n}\n.option-flex-wrap {\n  display: flex;\n  flex-direction: row;\n}\n.top-btn {\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #61c7fc;\n}\n.delete-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #aaa;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-scroller\": \"chameleon-ui-builtin/components/scroller/scroller\",\n      \"c-checkbox\": \"/components/c-checkbox/c-checkbox\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/no-global-variable/standard.wx.cml",
    "content": "<template>\n<view class=\"border\">\n  <c-scroller class=\"scroller\" scroll-direction=\"horizontal\">\n    <view class=\"checkbox-wrap\">\n      <c-checkbox width=\"{{40}}\" checked=\"{{completed}}\" c-bind:checkclick=\"checkclick\"></c-checkbox>\n    </view>\n    <text class=\"{{completed ? 'completed-show' : 'text-show'}}\" c-bind:tap=\"checkclick\">{{text}}</text>\n    <view class=\"option-wrap\">\n      <view class=\"option-flex-wrap\">\n        <text class=\"top-btn\" c-bind:tap=\"top\">置顶</text>\n        <text class=\"delete-btn\" c-bind:tap=\"delete\">删除</text>\n      </view>\n    </view>\n  </c-scroller>\n</view>\n</template>\n<script>\n\nlet window = {};\n\nclass CTodoitem implements CTodoitemInterface   {\n  props = {\n    index: {\n      type: Number\n    },\n    completed: {\n      type: Boolean\n    },\n    text: {\n      type: String\n    }\n  }\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n    checkclick() {\n      this.$cmlEmit('changestatus', {\n        index: this.index,\n        status: !this.completed\n      })\n    },\n    delete() {\n      this.$cmlEmit('delete', {\n        index: this.index\n      })\n    },\n    top() {\n      this.$cmlEmit('top', {\n        index: this.index\n      });\n    }\n  }\n\n  beforeCreate() {\n    window.location.href = 'http://www.baidu.com';\n  }\n\n  created() {\n\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.border {\n  border-bottom: 1px solid #ccc;\n  height: 100px;\n}\n.scroller {\n  width: 600px;\n  height: 100px;\n  white-space: nowrap;\n}\n.checkbox-wrap {\n  width: 80px;\n  height: 100px;\n  padding-left: 10px;\n  padding-top: 30px;\n  display: inline-block;\n  box-sizing: border-box;\n  float: left;\n}\n.completed-show {\n  float: left;\n  width: 520px;\n  font-size: 32px;\n  color: #999;\n  height: 100px;\n  line-height: 100px;\n  text-decoration: line-through;\n}\n.text-show {\n  float: left;\n  width: 520px;\n  font-size: 32px;\n  color: #666;\n  height: 100px;\n  line-height: 100px;\n}\n.option-wrap {\n  display: inline-block;\n}\n.option-flex-wrap {\n  display: flex;\n  flex-direction: row;\n}\n.top-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #61c7fc;\n}\n.delete-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #aaa;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-scroller\": \"chameleon-ui-builtin/components/scroller/scroller\",\n      \"c-checkbox\": \"/components/c-checkbox/c-checkbox\"\n    }\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    },\n    \"component\": true\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/nointerface/nonstandard.wx.cml",
    "content": "<template>\n<view class=\"border\">\n  <c-scroller class=\"scroller\" scroll-direction=\"horizontal\">\n    <view class=\"checkbox-wrap\">\n      <c-checkbox width=\"{{40}}\" checked=\"{{completed}}\" c-bind:checkclick=\"checkclick\"></c-checkbox>\n    </view>\n    <text class=\"{{completed ? 'completed-show' : 'text-show'}}\" c-bind:tap=\"checkclick\">{{text}}</text>\n    <view class=\"option-wrap\">\n      <view class=\"option-flex-wrap\">\n        <text class=\"top-btn\" c-bind:tap=\"top\">置顶</text>\n        <text class=\"delete-btn\" c-bind:tap=\"delete\">删除</text>\n      </view>\n    </view>\n  </c-scroller>\n</view>\n</template>\n<script>\nclass CTodoitem implements CTodoitemInterface   {\n  props = {\n    index: {\n      type: Number\n    },\n    completed: {\n      type: Boolean\n    },\n    text: {\n      type: String\n    }\n  }\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n    checkclick() {\n      this.$cmlEmit('changestatus', {\n        index: this.index,\n        status: !this.completed\n      })\n    },\n    delete() {\n      this.$cmlEmit('delete', {\n        index: this.index\n      })\n    },\n    top() {\n      this.$cmlEmit('top', {\n        index: this.index\n      });\n    }\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n    \n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.border {\n  border-bottom: 1px solid #ccc;\n  height: 100px;\n}\n.scroller {\n  width: 600px;\n  height: 100px;\n  white-space: nowrap;\n}\n.checkbox-wrap {\n  width: 80px;\n  height: 100px;\n  padding-left: 10px;\n  padding-top: 30px; \n  display: inline-block;\n  box-sizing: border-box;\n  float: left;\n}\n.completed-show {\n  float: left;\n  width: 520px;\n  font-size: 32px;\n  color: #999;\n  height: 100px;\n  line-height: 100px;\n  text-decoration: line-through;\n}\n.text-show {\n  float: left;\n  width: 520px;\n  font-size: 32px;\n  color: #666;\n  height: 100px;\n  line-height: 100px;\n}\n.option-wrap {\n  display: inline-block;\n}\n.option-flex-wrap {\n  display: flex;\n  flex-direction: row;\n}\n.top-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #61c7fc;\n}\n.delete-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #aaa;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-scroller\": \"chameleon-ui-builtin/components/scroller/scroller\",\n      \"c-checkbox\": \"/components/c-checkbox/c-checkbox\"\n    }\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    },\n    \"component\": true\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/nonstandard.cml",
    "content": "<template>\n  <view class=\"checkbox-wrap\" style=\"{{wrapStyle}}\" c-bind:tap=\"click\">\n    <view class=\"box\" style=\"{{boxStyle}}\"></view>\n  </view>\n</template>\n<script>\nclass CCheckbox   {\n  props = {\n    checked: {\n      type: Boolean,\n      default: false\n    },\n    color: {\n      type: String,\n      default: '#61c7fc'\n    },\n    width: {\n      type: Number,\n      default: 50\n    }\n  }\n  data = {\n  }\n\n  computed = {\n    wrapStyle() {\n      return this.$cmlStyle({\n        'width': this.width  + 'px',\n        'height': this.width  + 'px',\n        'border-radius': this.width  + 'px',\n        'border': `1px solid ${this.color}`\n      })\n    },\n    boxStyle() {\n      if (this.checked) {\n        return this.$cmlStyle({\n          'width': this.width * 0.8 + 'px',\n          'height': this.width * 0.8 + 'px',\n          'background': this.color,\n          'border-radius': this.width + 'px'\n        })\n      } else {\n        return this.$cmlStyle({\n          'width': '0px',\n          'height': '0px',\n          'border-radius': this.width + 'px',\n          'background': this.color\n        })\n      }\n    }\n  }\n\n  watch  = {\n  }\n\n  methods = {\n    click() {\n      this.$cmlEmit('checkclick')\n    }\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CCheckbox();\n</script>\n<style scoped>\n.checkbox-wrap {\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n  position: relative;\n}\n.checkbox-wrap::after{\n  content: \"\";\n  position: absolute;\n  left: -5px;\n  right: -5px;\n  top: -5px;\n  bottom: -5px;\n}\n.box {\n  transition-property: width, height;\n  transition-duration: 0.1s;\n  transition-delay: 0s;\n  transition-timing-function: ease-in-out;\n  transition: all .1s ease-in-out;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  },\n  \"wx\": {\n    \"navigationBarTitleText\": \"index\",\n    \"backgroundTextStyle\": \"dark\",\n    \"backgroundColor\": \"#E2E2E2\",\n    \"component\": true\n\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/properties-methods/event-not-defined.interface",
    "content": "<script cml-type=\"interface\">\n/*\n定义一个inteface用于描述组件的属性和事件\n1、 如果区分组件属性和事件？\n通过类型来区分，事件为函数类型，属性为非函数类型\n2、 如何定义组件属性\n给interface添加同名的属性即可，指定类型\n3、 如何定义组件事件\n以事件名称为key值给interface定义属性，该属性是一个函数类型，返回值为void，\n定义函数的第一个参数为自定义事件传递的detail对象类型\n*/\n\n//定义事件detail对象的参数\ntype changeStatusDetail = {\n  index: Number,\n  status: Boolean\n}\ntype indexDetail = {\n  index: Number\n}\ninterface CTodoitemInterface {\n  index: Number,\n  completed: Boolean,\n  text: String,\n  delete(eventDetail: indexDetail): void;\n  top(eventDetail: indexDetail): void;\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/properties-methods/event-not-defined.web.cml",
    "content": "<template>\n<view class=\"border\">\n</view>\n</template>\n<script>\nconst eventName = 'refOne';\n\nclass CTodoitem implements CTodoitemInterface   {\n  props = {\n    index: {\n      type: Number\n    },\n    completed: {\n      type: Boolean\n    },\n    text: {\n      type: String\n    }    \n  }\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n  }\n\n  beforeCreate() {\n    this.$cmlEmit('delete');\n  }\n\n  created() {\n    this.$cmlEmit('create');\n  }\n\n  beforeMount() {\n    this.$cmlEmit(eventName);\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.border {\n  border-bottom: 1px solid #ccc;\n  height: 100px;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/properties-methods/property-not-defined.interface",
    "content": "<script cml-type=\"interface\">\n/*\n定义一个inteface用于描述组件的属性和事件\n1、 如果区分组件属性和事件？\n通过类型来区分，事件为函数类型，属性为非函数类型\n2、 如何定义组件属性\n给interface添加同名的属性即可，指定类型\n3、 如何定义组件事件\n以事件名称为key值给interface定义属性，该属性是一个函数类型，返回值为void，\n定义函数的第一个参数为自定义事件传递的detail对象类型\n*/\n\n//定义事件detail对象的参数\ntype changeStatusDetail = {\n  index: Number,\n  status: Boolean\n}\ntype indexDetail = {\n  index: Number\n}\ninterface CTodoitemInterface {\n  index: Number,\n  completed: Boolean,\n  text: String,\n  delete(eventDetail: indexDetail): void;\n  top(eventDetail: indexDetail): void;\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/properties-methods/property-not-defined.wx.cml",
    "content": "<template>\n<view class=\"border\">\n</view>\n</template>\n<script>\nclass CTodoitem implements CTodoitemInterface   {\n  props = {\n    index: {\n      type: Number\n    },\n    completed: {\n      type: Boolean\n    }\n  }\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n  }\n\n  beforeCreate() {\n    this.$cmlEmit('delete');\n  }\n\n  created() {\n    this.$cmlEmit('top');\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.border {\n  border-bottom: 1px solid #ccc;\n  height: 100px;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/standard/standard.interface",
    "content": "<script cml-type=\"interface\">\n/*\n定义一个inteface用于描述组件的属性和事件\n1、 如果区分组件属性和事件？\n通过类型来区分，事件为函数类型，属性为非函数类型\n2、 如何定义组件属性\n给interface添加同名的属性即可，指定类型\n3、 如何定义组件事件\n以事件名称为key值给interface定义属性，该属性是一个函数类型，返回值为void，\n定义函数的第一个参数为自定义事件传递的detail对象类型\n*/\n\n//定义事件detail对象的参数\ntype changeStatusDetail = {\n  index: Number,\n  status: Boolean\n}\ntype indexDetail = {\n  index: Number\n}\ninterface CTodoitemInterface {\n  index: Number,\n  completed: Boolean,\n  text: String,\n  changestatus(eventDetail: changeStatusDetail): void;\n  delete(eventDetail: indexDetail): void;\n  top(eventDetail: indexDetail): void;\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/standard/standard.web.cml",
    "content": "<template>\n<view class=\"border\">\n  <c-scroller class=\"scroller\" scroll-direction=\"horizontal\">\n    <view class=\"checkbox-wrap\">\n      <c-checkbox width=\"{{40}}\" checked=\"{{completed}}\" c-bind:checkclick=\"checkclick\"></c-checkbox>\n    </view>\n    <text class=\"{{completed ? 'completed-show' : 'text-show'}}\" c-bind:tap=\"checkclick\">{{text}}</text>\n    <view class=\"option-wrap\">\n      <view class=\"option-flex-wrap\">\n        <text class=\"top-btn\" c-bind:tap=\"top\">置顶</text>\n        <text class=\"delete-btn\" c-bind:tap=\"delete\">删除</text>\n      </view>\n    </view>\n  </c-scroller>\n</view>\n</template>\n<script>\nclass CTodoitem implements CTodoitemInterface   {\n  props = {\n    index: {\n      type: Number\n    },\n    completed: {\n      type: Boolean\n    },\n    text: {\n      type: String\n    }\n  }\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n    checkclick() {\n      this.$cmlEmit('changestatus', {\n        index: this.index,\n        status: !this.completed\n      })\n    },\n    delete() {\n      this.$cmlEmit('delete', {\n        index: this.index\n      })\n    },\n    top() {\n      this.$cmlEmit('top', {\n        index: this.index\n      });\n    }\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.border {\n  border-bottom: 1px solid #ccc;\n  height: 100px;\n}\n.scroller {\n  width: 600px;\n  height: 100px;\n}\n.checkbox-wrap {\n  width: 70px;\n  height: 100px;\n  margin-left: 10px;\n  justify-content: center;\n}\n.completed-show {\n  width: 520px;\n  font-size: 32px;\n  color: #999;\n  height: 100px;\n  line-height: 100px;\n  text-decoration: line-through;\n}\n.text-show {\n  width: 520px;\n  font-size: 32px;\n  color: #666;\n  height: 100px;\n  line-height: 100px;\n}\n.option-flex-wrap {\n  display: flex;\n  flex-direction: row;\n}\n.top-btn {\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #61c7fc;\n}\n.delete-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #aaa;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-scroller\": \"chameleon-ui-builtin/components/scroller/scroller\",\n      \"c-checkbox\": \"/components/c-checkbox/c-checkbox\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/standard/standard.weex.cml",
    "content": "<template>\n<view class=\"border\">\n  <c-scroller class=\"scroller\" scroll-direction=\"horizontal\">\n    <view class=\"checkbox-wrap\">\n      <c-checkbox width=\"{{40}}\" checked=\"{{completed}}\" c-bind:checkclick=\"checkclick\"></c-checkbox>\n    </view>\n    <text class=\"{{completed ? 'completed-show' : 'text-show'}}\" c-bind:tap=\"checkclick\">{{text}}</text>\n    <view class=\"option-wrap\">\n      <view class=\"option-flex-wrap\">\n        <text class=\"top-btn\" c-bind:tap=\"top\">置顶</text>\n        <text class=\"delete-btn\" c-bind:tap=\"delete\">删除</text>\n      </view>\n    </view>\n  </c-scroller>\n</view>\n</template>\n<script>\nclass CTodoitem implements CTodoitemInterface   {\n  props = {\n    index: {\n      type: Number\n    },\n    completed: {\n      type: Boolean\n    },\n    text: {\n      type: String\n    }\n  }\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n    checkclick() {\n      this.$cmlEmit('changestatus', {\n        index: this.index,\n        status: !this.completed\n      })\n    },\n    delete() {\n      this.$cmlEmit('delete', {\n        index: this.index\n      })\n    },\n    top() {\n      this.$cmlEmit('top', {\n        index: this.index\n      });\n    }\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.border {\n  border-bottom: 1px solid #ccc;\n  height: 100px;\n}\n.scroller {\n  width: 600px;\n  height: 100px;\n}\n.checkbox-wrap {\n  width: 70px;\n  height: 100px;\n  margin-left: 10px;\n  justify-content: center;\n}\n.completed-show {\n  width: 520px;\n  font-size: 32px;\n  color: #999;\n  height: 100px;\n  line-height: 100px;\n  text-decoration: line-through;\n}\n.text-show {\n  width: 520px;\n  font-size: 32px;\n  color: #666;\n  height: 100px;\n  line-height: 100px;\n}\n.option-flex-wrap {\n  display: flex;\n  flex-direction: row;\n}\n.top-btn {\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #61c7fc;\n}\n.delete-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #aaa;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-scroller\": \"chameleon-ui-builtin/components/scroller/scroller\",\n      \"c-checkbox\": \"/components/c-checkbox/c-checkbox\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/standard/standard.wx.cml",
    "content": "<template>\n<view class=\"border\">\n  <c-scroller class=\"scroller\" scroll-direction=\"horizontal\">\n    <view class=\"checkbox-wrap\">\n      <c-checkbox width=\"{{40}}\" checked=\"{{completed}}\" c-bind:checkclick=\"checkclick\"></c-checkbox>\n    </view>\n    <text class=\"{{completed ? 'completed-show' : 'text-show'}}\" c-bind:tap=\"checkclick\">{{text}}</text>\n    <view class=\"option-wrap\">\n      <view class=\"option-flex-wrap\">\n        <text class=\"top-btn\" c-bind:tap=\"top\">置顶</text>\n        <text class=\"delete-btn\" c-bind:tap=\"delete\">删除</text>\n      </view>\n    </view>\n  </c-scroller>\n</view>\n</template>\n<script>\nclass CTodoitem implements CTodoitemInterface   {\n  props = {\n    index: {\n      type: Number\n    },\n    completed: {\n      type: Boolean\n    },\n    text: {\n      type: String\n    }\n  }\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n    checkclick() {\n      this.$cmlEmit('changestatus', {\n        index: this.index,\n        status: !this.completed\n      })\n    },\n    delete() {\n      this.$cmlEmit('delete', {\n        index: this.index\n      })\n    },\n    top() {\n      this.$cmlEmit('top', {\n        index: this.index\n      });\n    }\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n    \n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.border {\n  border-bottom: 1px solid #ccc;\n  height: 100px;\n}\n.scroller {\n  width: 600px;\n  height: 100px;\n  white-space: nowrap;\n}\n.checkbox-wrap {\n  width: 80px;\n  height: 100px;\n  padding-left: 10px;\n  padding-top: 30px; \n  display: inline-block;\n  box-sizing: border-box;\n  float: left;\n}\n.completed-show {\n  float: left;\n  width: 520px;\n  font-size: 32px;\n  color: #999;\n  height: 100px;\n  line-height: 100px;\n  text-decoration: line-through;\n}\n.text-show {\n  float: left;\n  width: 520px;\n  font-size: 32px;\n  color: #666;\n  height: 100px;\n  line-height: 100px;\n}\n.option-wrap {\n  display: inline-block;\n}\n.option-flex-wrap {\n  display: flex;\n  flex-direction: row;\n}\n.top-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #61c7fc;\n}\n.delete-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #aaa;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-scroller\": \"chameleon-ui-builtin/components/scroller/scroller\",\n      \"c-checkbox\": \"/components/c-checkbox/c-checkbox\"\n    }\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    },\n    \"component\": true\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/checker/cml/script/standard.cml",
    "content": "<template>\n  <view class='root'>\n    <view c-if=\"{{hasApplyList}}\" class=\"scroll-container\"></view>\n    <view c-else class=\"error-container\">\n      <view calss=\"error-container\">\n        <view class=\"error-img\">\n          <!-- <image style=\"width: 100px;height:100px;\" src=\"{{errorImg}}\"></image> -->\n        </view>\n        <view class=\"error-desc\">\n          <text class=\"error-text\">暂无申请记录</text>\n        </view>\n      </view>\n    </view>\n  </view>\n</template>\n<script>\nclass ApplyRecord   {\n  props = {\n    pageData:{\n      type:Object,\n      default(){\n        return {}\n      }\n    }\n  }\n\n  data = {\n    count:'tedas',\n    errorImg:require('../img/icon.png'),\n  }\n\n  computed = {\n    hasApplyList(){\n      return this.pageData.has_apply_list == 1;\n    },\n    applyList(){\n      return this.pageData.apply_list;\n    },\n    leftTimes(){\n      return this.pageData.left_times;\n    }\n  }\n}\n\nexport default new ApplyRecord();\n</script>\n<style scoped>\n.root{\n  position:absolute;\n  top:88px;\n  bottom:0;\n  left:0;\n  right:0;\n  background-color:#f7f7f7;\n}\n\n.scroll-container{\n  position:absolute;\n  top:0px;\n  bottom:0;\n  left:0;\n  right:0;\n  margin-top:20px;\n}\n.error-container{\n  position:absolute;\n  top:0px;\n  bottom:0;\n  left:0;\n  right:0;\n  display:flex;\n  align-content: center;\n  justify-content: center;\n}\n.error-container{\n  width:750px;\n}\n.error-img{\n  display:flex;\n  flex-direction:row;\n  justify-content: center;\n  align-items:center;\n  margin-bottom:30px;\n}\n.error-desc{\n  display:flex;\n  flex-direction:row;\n  justify-content: center;\n  align-items:center;\n}\n.error-text{\n  font-size:28px;\n  color:#333;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n\n  },\n  \"wx\": {\n    \"navigationBarTitleText\": \"index\",\n    \"backgroundTextStyle\": \"dark\",\n    \"backgroundColor\": \"#E2E2E2\",\n    \"component\": true\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/cml.test.js",
    "content": "const config = require('../config');\nconst jsonLinter = require('../linters/json');\nconst styleLinter = require('../linters/style');\nconst scriptLinter = require('../linters/script');\nconst checkers = require('../checkers/index');\nconst utils = require('../utils');\nconst fileSpec = require('../file-spec');\nconst chai = require('chai');\nconst assert = chai.assert;\nconst expect = chai.expect;\nconst path = require('path');\n\ndescribe('cml', function() {\n\n\n  describe('lint-json', function() {\n    before(async function() {\n      config.init(path.resolve(__dirname, '../linter/cml/json/'));\n    });\n    it('json-standard', async function() {\n      const cmlPath = path.resolve(__dirname, './linter/cml/json/standard.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await jsonLinter(parts.json);\n      assert.equal(result.messages.length, 0);\n    });\n\n    it('json-no-quotes', async function() {\n      const cmlPath = path.resolve(__dirname, './linter/cml/json/no-quotes.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await jsonLinter(parts.json);\n      expect(result.messages).to.deep.equal([{\n        line: 9,\n        column: 7,\n        token: 'b',\n        msg: 'Unknown Character \\'b\\', expecting a string for key statement.'\n      }]);\n    });\n\n    it('json-no-bracket', async function() {\n      const cmlPath = path.resolve(__dirname, './linter/cml/json/no-bracket.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await jsonLinter(parts.json);\n      expect(result).to.deep.equal({\n        start: 1,\n        ast: null,\n        obj: null,\n        messages: [\n          {\n            line: 16,\n            column: 0,\n            token: '\\n',\n            msg: 'EOF Error, expecting closing \\'}\\'.'\n          }\n        ]\n      });\n    });\n\n    it('json-no-comma', async function() {\n      const cmlPath = path.resolve(__dirname, './linter/cml/json/no-comma.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await jsonLinter(parts.json);\n      expect(result).to.deep.equal({\n        start: 1,\n        ast: null,\n        obj: null,\n        messages: [\n          {\n            line: 7,\n            column: 3,\n            token: '\"',\n            msg: 'Unknown Character \\'\"\\', expecting a comma or a closing \\'}\\''\n          }\n        ]\n      });\n    });\n  });\n\n\n  describe('lint-style', function () {\n    before(async function() {\n      config.init(path.resolve(__dirname, '../linter/cml/style/'));\n    });\n    it('style-standard', async function () {\n      const cmlPath = path.resolve(__dirname, './linter/cml/style/standard.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await styleLinter(parts.style);\n      assert.equal(result.messages.length, 0);\n    });\n\n    it('style-no-bracket', async function () {\n      const cmlPath = path.resolve(__dirname, './linter/cml/style/no-bracket.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await styleLinter(parts.style);\n\n      expect(result.messages).to.deep.equal([{\n        line: 4,\n        column: 1,\n        msg: 'Unclosed block '\n      }]);\n    });\n\n    // 支持嵌套(未来)\n    it('style-nest', async function () {\n      const cmlPath = path.resolve(__dirname, './linter/cml/style/nest.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await styleLinter(parts.style);\n      expect(result.messages).to.deep.equal([{\n        line: 11,\n        column: 3,\n        msg: 'Expected \".app-root .a\" to have no more than 1 compound selector ' }\n      ]);\n    });\n\n    // 支持stylus\n    it('style-stylus', async function () {\n      const cmlPath = path.resolve(__dirname, './linter/cml/style/standard.stylus.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await styleLinter(parts.style);\n      expect(result.messages).to.deep.equal([]);\n    });\n    // 支持stylus 错误情况\n    it('style-stylus-error', async function () {\n      const cmlPath = path.resolve(__dirname, './linter/cml/style/no-standard.stylus.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await styleLinter(parts.style);\n      expect(result.messages).to.deep.equal([\n        {\n          'column': 3,\n          'line': 7,\n          'msg': 'stylus:7:3\\n    3| /*只作用于 web body下的first-child 节点*/\\n    4| .app-root\\n    5|   position:\\n    6|   top: 0px;\\n    7|   bottom: 0px;\\n--------^\\n    8|   left: 0px;\\n    9|   right: 0px;\\n   10| \\n\\nexpected \\\"indent\\\", got \\\";\\\"\\n'\n        }\n      ]);\n    });\n    // 支持stylus\n    it('style-important', async function () {\n      const cmlPath = path.resolve(__dirname, './linter/cml/style/no-standard-important.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await styleLinter(parts.style);\n      expect(result.messages).to.deep.equal([]);\n    });\n    // 缺少分号\n    it('style-no-semicolon', async function () {\n      const cmlPath = path.resolve(__dirname, './linter/cml/style/no-semicolon.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await styleLinter(parts.style);\n      expect(result.messages).to.deep.equal(\n        [\n          {\n            column: 8,\n            line: 6,\n            msg: 'Missed semicolon '\n          }\n        ]\n      );\n    });\n  });\n\n  describe('lint-script', function () {\n\n    it('standard', async function () {\n      const cmlPath = path.resolve(__dirname, './linter/cml/script/standard.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await scriptLinter(parts.script);\n      assert.equal(result.messages.length, 0);\n    });\n\n    it('nonstandard', async function () {\n      const cmlPath = path.resolve(__dirname, './linter/cml/script/nonstandard.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await scriptLinter(parts.script);\n      expect(result.messages).to.deep.equal([\n        {\n          line: 12,\n          column: 3,\n          msg: 'Unexpected token, expected \",\"'\n        }\n      ]);\n    });\n    it('nonstandard-arrow', async function () {\n      const cmlPath = path.resolve(__dirname, './linter/cml/script/nonstandard-arrow.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await scriptLinter(parts.script);\n      expect(result.messages).to.deep.equal(\n        [\n          {\n            'column': 5,\n            'line': 19,\n            'msg': 'computed property \"hasApplyList\" cannot be used as an arrow function'\n          },\n          {\n            'column': 3,\n            'line': 30,\n            'msg': 'lifecycle hook \"mounted\" cannot be used as an arrow function'\n          }\n        ]\n      );\n    });\n    it('syntax-error', async function () {\n      const projectRoot = path.resolve(__dirname, './template/docs/');\n      config.init(projectRoot);\n\n      const cmlPath = path.resolve(__dirname, './linter/cml/cml/syntaxError/standard.weex.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await fileSpec.lintCmlFile(parts);\n      checkers.script(result);\n      expect(result.script.messages).to.deep.equal([\n        {\n          'column': 3,\n          'line': 14,\n          'msg': 'Unexpected token, expected \\\",\\\"'\n        }\n      ]);\n    });\n  });\n\n  describe('lint-cml-file', function () {\n    it('standard-single-file-spec', async function () {\n      const projectRoot = path.resolve(__dirname, './checker/cml/cml');\n      config.init(projectRoot);\n\n      const cmlPath = path.resolve(__dirname, './linter/cml/cml/standard.cml');\n      const result = await fileSpec(cmlPath, 'cml');\n\n      let flag = false;\n      Object.keys(result).forEach(key => {\n        if (result[key].messages.length) {\n          flag = true;\n        }\n      });\n\n      assert.equal(flag, false);\n    });\n    it('standard-single-file', async function () {\n      const projectRoot = path.resolve(__dirname, './template/docs/');\n      config.init(projectRoot);\n      const cmlPath = path.resolve(__dirname, './linter/cml/cml/standard.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await fileSpec.lintCmlFile(parts);\n\n      let flag = false;\n      Object.keys(result).forEach(key => {\n        if (result[key].messages.length) {\n          flag = true;\n        }\n      });\n\n      assert.equal(flag, false);\n    });\n    it('standard-multi-file', async function () {\n      const projectRoot = path.resolve(__dirname, './template/docs/');\n      config.init(projectRoot);\n\n      const cmlPath = path.resolve(__dirname, './linter/cml/cml/standard/standard.wx.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await fileSpec.lintCmlFile(parts);\n      let flag = false;\n      Object.keys(result).forEach(key => {\n        if (result[key].messages.length) {\n          flag = true;\n        }\n      });\n\n      assert.equal(flag, false);\n    });\n    it('nonstandard', async function () {\n      const cmlPath = path.resolve(__dirname, './linter/cml/cml/nonstandard.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await fileSpec.lintCmlFile(parts);\n\n      let flag = false;\n      Object.keys(result).forEach(key => {\n        if (result[key].messages.length) {\n          flag = true;\n        }\n      });\n      assert.equal(flag, true);\n    });\n  });\n\n  describe('check-json', function () {\n    it('standard', async function () {\n      const cmlPath = path.resolve(__dirname, './checker/cml/json/standard.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await fileSpec.lintCmlFile(parts);\n      checkers.json(result);\n\n      expect(result.json.messages).to.deep.equal([]);\n    });\n    it('nonstandard', async function () {\n      const cmlPath = path.resolve(__dirname, './checker/cml/json/nonstandard.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await fileSpec.lintCmlFile(parts);\n      checkers.json(result);\n\n      expect(result.json.messages).to.deep.equal([\n        {\n          'column': 4,\n          'line': 4,\n          'msg': 'Useless fields: weex.usingComponents',\n          'token': 'weex.usingComponents'\n        }\n      ]);\n    });\n    it('nonstandard-distinguish-platform', async function () {\n      const cmlPath = path.resolve(__dirname, './checker/cml/json/nonstandard.wx.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await fileSpec.lintCmlFile(parts);\n      checkers.json(result);\n      expect(result.json.messages).to.deep.equal([{\n        'column': 2,\n        'line': 16,\n        'msg': 'Useless fields: weex',\n        'token': 'weex'\n      }]);\n    });\n\n\n    it('nonstandard-component-was-not-found', async function () {\n      const projectRoot = path.resolve(__dirname, './checker/cml/json');\n      config.init(projectRoot);\n\n      const cmlPath = path.resolve(__dirname, './checker/cml/json/nonstandard.weex.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await fileSpec.lintCmlFile(parts);\n      checkers.json(result);\n      expect(result.json.messages).to.deep.equal([{\n        column: 20,\n        line: 5,\n        msg: 'component: [chameleon-ui-builtin/components/scroller/scroller] is not found',\n        token: 'base.usingComponents.c-scroller'\n      }]);\n    });\n  });\n  describe('check-script', function () {\n    before(function() {\n      const projectRoot = path.resolve(__dirname, './checker/cml/script');\n      config.init(projectRoot);\n    });\n    it('standard', async function () {\n      const cmlPath = path.resolve(__dirname, './checker/cml/script/standard/standard.wx.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await fileSpec.lintCmlFile(parts);\n      checkers.script(result);\n\n      expect(result.script.messages).to.deep.equal([]);\n    });\n    it('global-variable', async function () {\n      const cmlPath = path.resolve(__dirname, './checker/cml/script/global-variable/standard.wx.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await fileSpec.lintCmlFile(parts);\n      checkers.script(result);\n      assert.equal(result.script.messages.length, 1);\n    });\n    it('no-global-variable', async function () {\n      const cmlPath = path.resolve(__dirname, './checker/cml/script/no-global-variable/standard.wx.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await fileSpec.lintCmlFile(parts);\n      checkers.script(result);\n      assert.equal(result.script.messages.length, 0);\n    });\n    it('global-variable-xx', async function () {\n      const cmlPath = path.resolve(__dirname, './checker/cml/script/standard.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      const result = await fileSpec.lintCmlFile(parts);\n      checkers.script(result);\n      assert.equal(result.script.messages.length, 0);\n    });\n    it('property-not-defined', async function() {\n      const cmlPath = path.resolve(__dirname, './checker/cml/script/properties-methods/property-not-defined.wx.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      let result = await fileSpec.lintCmlFile(parts);\n      checkers.script(result);\n      assert.equal(result['interface'].messages.length, 1);\n      expect(result['interface'].messages[0]).to.include({\n        line: 24,\n        column: 2,\n        token: 'text'\n      });\n    });\n    it('event-not-defined', async function() {\n      const cmlPath = path.resolve(__dirname, './checker/cml/script/properties-methods/event-not-defined.web.cml');\n      const parts = utils.getCmlParts(cmlPath);\n      let result = await fileSpec.lintCmlFile(parts);\n      checkers.script(result);\n      assert.equal(result['interface'].messages.length, 1);\n      expect(result['interface'].messages[0]).to.include({\n        line: 26,\n        column: 2,\n        token: 'top'\n      });\n      assert.equal(result.script.messages.length, 2);\n      expect(result.script.messages).to.deep.equal([{\n        line: 33,\n        column: 18,\n        token: 'create',\n        msg: 'event \"create\" is not defined in interface file \"properties-methods/event-not-defined.interface\"'\n      }, {\n        line: 37,\n        column: 18,\n        token: 'refOne',\n        msg: 'event \"refOne\" is not defined in interface file \"properties-methods/event-not-defined.interface\"'\n      }]);\n    });\n    it('interface-prop-not-defined', async function() {\n      const cmlPath = path.resolve(__dirname, './checker/cml/script/interfaces/prop-not-defined.interface');\n      const result = await fileSpec(cmlPath, 'interface');\n      expect(result['interface'].messages).to.have.lengthOf(1);\n      expect(result['interface'].messages[0]).to.include({\n        line: 3,\n        column: 2,\n        token: 'platform'\n      });\n    });\n  });\n  describe('check-interface-include', async function() {\n    before(async function() {\n      config.init(path.resolve(__dirname, './checker/cml/script/'));\n    });\n    it('should fail because of not found include interface file', async function() {\n      const interfacePath = path.resolve(__dirname, './checker/cml/script/include/include-interface-fail.interface');\n      const result = await fileSpec(interfacePath, 'interface');\n      expect(result).to.have.property('core');\n      expect(result.core.messages[0].msg).to.contain('include/include-interface-fail.interface');\n      expect(result.core.file).to.equal(interfacePath);\n    });\n    it('should fail because of not found include src js file', async function() {\n      const interfacePath = path.resolve(__dirname, './checker/cml/script/include/include-src-js-fail.interface');\n      const result = await fileSpec(interfacePath, 'interface');\n      expect(result).to.have.property('core');\n      expect(result.core.messages[0].msg).to.contain('someplatform.js');\n      expect(result.core.file).to.equal(interfacePath);\n    });\n    it('should fail because of not found include src cml file', async function() {\n      const interfacePath = path.resolve(__dirname, './checker/cml/script/include/include-src-cml-fail.interface');\n      const result = await fileSpec(interfacePath, 'interface');\n      expect(result).to.have.property('core');\n      expect(result.core.messages[0].msg).to.contain('someplatform.cml');\n      expect(result.core.file).to.equal(interfacePath);\n    });\n    it('should fail test because class name mismatch', async function() {\n      const interfacePath = path.resolve(__dirname, './checker/cml/script/include/include-src-js-class-name-fail.interface');\n      const result = await fileSpec(interfacePath, 'interface');\n      expect(result['interface'].messages[0].msg).to.contain('ExtendInterfaceInterface');\n    });\n    it('should fail test because missing prop', async function() {\n      const interfacePath = path.resolve(__dirname, './checker/cml/script/include/include-src-js-mis-prop-fail.interface');\n      const result = await fileSpec(interfacePath, 'interface');\n      expect(result['interface'].messages[0].token).to.equal('setTitle');\n      expect(result['interface'].messages[0].msg).to.contain('someplatform-mis-prop.js');\n    });\n    it('should fail test because missing prop in someplatform cml file', async function() {\n      const interfacePath = path.resolve(__dirname, './checker/cml/script/include/include-src-cml-mis-prop-fail.interface');\n      const result = await fileSpec(interfacePath, 'interface');\n      expect(result['interface'].messages[0].token).to.equal('age');\n      expect(result['interface'].messages[0].msg).to.contain('someplatform-mis-prop.cml');\n    });\n  });\n});\n"
  },
  {
    "path": "packages/chameleon-linter/test/config.test.js",
    "content": "const config = require('../config');\nconst assert = require('chai').assert;\nconst path = require('path');\n\ndescribe('lintrc', function() {\n  describe('lintrc-check', function() {\n    it('standard', function() {\n      const projectRoot = path.resolve(__dirname, './lintrc/standard');\n      config.init(projectRoot);\n      assert.equal(config.getRuleOption('core-files-check'), false);\n    });\n    it('nonstandard', function() {\n      const projectRoot = path.resolve(__dirname, './lintrc/nonstandard');\n      config.init(projectRoot);\n      assert.equal(config.getRuleOption('core-files-check'), true);\n    });\n  });\n});\n"
  },
  {
    "path": "packages/chameleon-linter/test/core/standard/chameleon.config.js",
    "content": "\n// 设置静态资源的线上路径\nconst publicPath = 'https://static.chameleon.com/pinche/hkcml';\n// 设置api请求前缀\nconst apiPrefix = 'https://api.chameleon.com';\n\ncml.config.merge({\n  cmlComponents: [\n    'chameleon-ui',\n  ],\n  buildInfo: {\n    wxAppId: '123456',\n    wxEntryPage: '',\n    webPath: 'https://api.chameleon.com/h5/commentinfo'\n  },\n  check: {\n    enable: true,\n    enableTypes: ['Object', 'Array', 'Nullable']\n  },\n  wx: {\n    dev: {\n    },\n    build: {\n      apiPrefix\n    }\n  },\n  web: {\n    dev: {\n      analysis: false,\n      console: false\n    },\n    build: {\n      analysis: false,\n      publicPath: `${publicPath}/web/`,\n      apiPrefix\n    }\n  },\n  weex: {\n    dev: {\n    },\n    build: {\n      publicPath: `${publicPath}/weex/`,\n      apiPrefix\n    },\n    custom: {\n      publicPath: `${publicPath}/wx/`,\n      apiPrefix\n    }\n  }\n})\n"
  },
  {
    "path": "packages/chameleon-linter/test/core/standard/src/app/app.cml",
    "content": "<template>\n  <view class=\"app-root\">\n    <router-view></router-view>\n  </view>\n</template>\n<script>\n  import store from '../store/index.js';\n  import cml from 'chameleon-api';\n  import _interface from './app.interface';\n  export default {\n    data: {\n\n    },\n    computed: {\n    },\n    watch: {\n    },\n    methods: {\n\n    },\n    beforeCreate: function(res) {\n\n    },\n    created: function(res) {\n      _interface.appEntry();\n    },\n    beforeMount: function(res) {\n    },\n    mounted: function(res) {\n    },\n    beforeDestroy: function(res) {\n    },\n    destroyed: function(res) {\n    }\n  }\n</script>\n<style scoped>\n/* reset */\n/*只作用于 web body下的first-child 节点*/\n.app-root {\n  position: absolute;\n  top: 0px;\n  bottom: 0px;\n  left: 0px;\n  right: 0px;\n}\n\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"weex\": {\n    \"usingComponents\": {\n    }\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/core/standard/src/router.config.json",
    "content": "{\n  \"mode\": \"history\",\n  \"domain\": \"https://api.chameleon.com\",\n  \"routes\":[\n    {\n      \"url\": \"/beatles/h5/user/user/homev2\",\n      \"path\": \"pages/index/index\",\n      \"name\": \"我的主页\",\n      \"mock\": \"index.php\"\n    },\n    {\n      \"url\": \"/beatles/h5/errorpage\",\n      \"path\": \"pages/error_page/error_page\",\n      \"name\": \"出错啦\",\n      \"mock\": \"errorpage.php\"\n    }\n  ]\n}"
  },
  {
    "path": "packages/chameleon-linter/test/core/standard/src/store/index.js",
    "content": "import actions from './actions'\nimport getters from './getters'\nimport state from './state'\nimport mutations from './mutations'\n\nimport createStore from \"chameleon-store\";\n\nexport default createStore({\n  actions,\n  getters,\n  state,\n  mutations\n})\n"
  },
  {
    "path": "packages/chameleon-linter/test/core.test.js",
    "content": "const config = require('../config');\nconst fileStruture = require('../file-structure');\nconst assert = require('chai').assert;\nconst path = require('path');\n\ndescribe('core', function() {\n  describe('core-file-check', function() {\n    it('standard', function() {\n      const projectRoot = path.resolve(__dirname, './core/standard');\n      config.init(projectRoot);\n      const result = fileStruture();\n      assert.equal(result.core.messages.length, 0);\n    });\n\n    it('nonstandard', function() {\n      const projectRoot = path.resolve(__dirname, './core/nonstandard');\n      config.init(projectRoot);\n      const result = fileStruture();\n      assert.equal(result.core.messages.length, 3);\n    });\n\n    it('checkproject', function() {\n      const projectRoot = path.resolve(__dirname, './core/nonstandard');\n      config.init(projectRoot);\n      const result = config.isChameleonProject();\n      assert.equal(result, false);\n    });\n\n\n  });\n});\n"
  },
  {
    "path": "packages/chameleon-linter/test/interface/common.interface",
    "content": "<script cml-type=\"interface\">\ninterface CommonInterface {\n  initShare(_queryData: Object): void;\n  back() :void;\n}\n\n</script>\n\n<script cml-type=\"web\">\nimport ban_wxShare from 'ban_wxshare';\nimport ua from 'didi-ua';\nclass Method implements CommonInterface {\n  initShare(_queryData){\n\t\tif (_queryData.fr == 'webapp') {\n\t\t\tban_wxShare.wxshare();\n\t\t}\n  }\n\n  back() {\n    if (ua.browser.name.isDidi()) {\n      cml.close();\n    } else {\n      window.history.go(-1);\n    }\n  }\n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"weex\">\n\nclass Method implements CommonInterface {\n  initShare(){}\n  back() {\n    cml.close();\n  }\n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"wx\">\n\nclass Method implements CommonInterface {\n  initShare(){}\n  back() {}\n}\n\nexport default new Method();\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/interface.test.js",
    "content": "const config = require('../config');\nconst utils = require('../utils');\nconst fileSpec = require('../file-spec');\nconst chai = require('chai');\nconst assert = chai.assert;\nconst should = chai.should;\nconst expect = chai.expect;\nconst path = require('path');\n\ndescribe('interface', function() {\n  describe('lint-interface', function() {\n    it('interface-standard', async function() {\n      const interfacePath = path.resolve(__dirname, './interface/common.interface');\n      const result = await fileSpec(interfacePath, 'interface');\n      let flag = false;\n      Object.keys(result).forEach(key => {\n        if (result[key].messages.length) {\n          flag = true;\n        }\n      });\n      assert.equal(flag, false);\n    });\n\n  });\n});\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/cml/nointerface/standard.web.cml",
    "content": "<template>\n<view class=\"border\">\n  <c-scroller class=\"scroller\" scroll-direction=\"horizontal\">\n    <view class=\"checkbox-wrap\">\n      <c-checkbox width=\"{{40}}\" checked=\"{{completed}}\" c-bind:checkclick=\"checkclick\"></c-checkbox>\n    </view>\n    <text class=\"{{completed ? 'completed-show' : 'text-show'}}\" c-bind:tap=\"checkclick\">{{text}}</text>\n    <view class=\"option-wrap\">\n      <view class=\"option-flex-wrap\">\n        <text class=\"top-btn\" c-bind:tap=\"top\">置顶</text>\n        <text class=\"delete-btn\" c-bind:tap=\"delete\">删除</text>\n      </view>\n    </view>\n  </c-scroller>\n</view>\n</template>\n<script>\nclass CTodoitem implements CTodoitemInterface   {\n  props = {\n    index: {\n      type: Number\n    },\n    completed: {\n      type: Boolean\n    },\n    text: {\n      type: String\n    }\n  }\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n    checkclick() {\n      this.$cmlEmit('changestatus', {\n        index: this.index,\n        status: !this.completed\n      })\n    },\n    delete() {\n      this.$cmlEmit('delete', {\n        index: this.index\n      })\n    },\n    top() {\n      this.$cmlEmit('top', {\n        index: this.index\n      });\n    }\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.border {\n  border-bottom: 1px solid #ccc;\n  height: 100px;\n}\n.scroller {\n  width: 600px;\n  height: 100px;\n}\n.checkbox-wrap {\n  width: 70px;\n  height: 100px;\n  margin-left: 10px;\n  justify-content: center;\n}\n.completed-show {\n  width: 520px;\n  font-size: 32px;\n  color: #999;\n  height: 100px;\n  line-height: 100px;\n  text-decoration: line-through;\n}\n.text-show {\n  width: 520px;\n  font-size: 32px;\n  color: #666;\n  height: 100px;\n  line-height: 100px;\n}\n.option-flex-wrap {\n  display: flex;\n  flex-direction: row;\n}\n.top-btn {\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #61c7fc;\n}\n.delete-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #aaa;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-scroller\": \"chameleon-ui-builtin/components/scroller/scroller\",\n      \"c-checkbox\": \"/components/c-checkbox/c-checkbox\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/cml/nonstandard.cml",
    "content": "<template>\n  <view class='root'>\n    <view c-if=\"{{hasApplyList}}\" class=\"scroll-container\">\n\n    <view c-else class=\"error-container\">\n      <view calss=\"error-container\">\n        <view class=\"error-img\">\n          <image style=\"width: 100px;height:100px;\" src=\"{{errorImg}}\"></image>\n        </view>\n        <view class=\"error-desc\">\n          <text class=\"error-text\">暂无申请记录</text>\n        </view>\n      </view>\n    </view>\n  </view><template>\n    <view class=\"checkbox-wrap\" style=\"{{wrapStyle}}\" c-bind:tap=\"click\">\n      <view class=\"box\" style=\"{{boxStyle}}\"></view>\n    </view>\n  </template>\n  <script>\n  class CCheckbox   {\n    props = {\n      checked: {\n        type: Boolean,\n        default: false\n      },\n      color: {\n        type: String,\n        default: '#61c7fc'\n      },\n      width: {\n        type: Number,\n        default: 50\n      }\n    }\n    data = {\n    }\n\n    computed = {\n      wrapStyle() {\n        return this.$cmlStyle({\n          'width': this.width  + 'px',\n          'height': this.width  + 'px',\n          'border-radius': this.width  + 'px',\n          'border': `1px solid ${this.color}`\n        })\n      },\n      boxStyle() {\n        if (this.checked) {\n          return this.$cmlStyle({\n            'width': this.width * 0.8 + 'px',\n            'height': this.width * 0.8 + 'px',\n            'background': this.color,\n            'border-radius': this.width + 'px'\n          })\n        } else {\n          return this.$cmlStyle({\n            'width': '0px',\n            'height': '0px',\n            'border-radius': this.width + 'px',\n            'background': this.color\n          })\n        }\n      }\n    }\n\n    watch  = {\n    }\n\n    methods = {\n      click() {\n        this.$cmlEmit('checkclick')\n      }\n    }\n\n    beforeCreate() {\n    }\n\n    created() {\n    }\n\n    beforeMount() {\n    }\n\n    mounted() {\n    }\n\n    beforeDestroy() {\n    }\n\n    destroyed() {\n    }\n  }\n\n  export default new CCheckbox();\n  </script>\n  <style scoped>\n  .checkbox-wrap {\n    display: flex;\n    flex-direction: column;\n    justify-content: center;\n    align-items: center;\n    position: relative;\n  }\n  .checkbox-wrap::after{\n    content: \"\";\n    position: absolute;\n    left: -5px;\n    right: -5px;\n    top: -5px;\n    bottom: -5px;\n  }\n  .box {\n    transition-property: width, height;\n    transition-duration: 0.1s;\n    transition-delay: 0s;\n    transition-timing-function: ease-in-out;\n    transition: all .1s ease-in-out;\n  }\n  </style>\n  <script cml-type=\"json\">\n  {\n    \"base\": {\n      \"usingComponents\": {\n      }\n    },\n    \"wx\": {\n      \"navigationBarTitleText\": \"index\",\n      \"backgroundTextStyle\": \"dark\",\n      \"backgroundColor\": \"#E2E2E2\",\n      \"component\": true\n\n    }\n  }\n  </script>\n\n</template>\n<script>\nclass ApplyRecord   {\n  props = {\n    pageData:{\n      type:Object,\n      default(){\n        return {}\n      }\n    }\n  }\n\n  data = {\n    count:'tedas',\n    errorImg:require('../img/icon.png'),\n  }\n\n  computed = {\n    hasApplyList(){\n      return this.pageData.has_apply_list == 1;\n    },\n    applyList(){\n      return this.pageData.apply_list;\n    },\n    leftTimes(){\n      return this.pageData.left_times;\n    }\n  }\n}\n\nexport default new ApplyRecord();\n</script>\n<style scoped>\n.root{\n  position:absolute;\n  top:88px;\n  bottom:0;\n  left:0;\n  right:0;\n  background-color:#f7f7f7;\n}\n\n.scroll-container{\n  position:absolute;\n  top:0px;\n  bottom:0;\n  left:0;\n  right:0;\n  margin-top:20px;\n}\n.error-container{\n  position:absolute;\n  top:0px;\n  bottom:0;\n  left:0;\n  right:0;\n  display:flex;\n  align-content: center;\n  justify-content: center;\n}\n.error-container{\n  width:750px;\n}\n.error-img{\n  display:flex;\n  flex-direction:row;\n  justify-content: center;\n  align-items:center;\n  margin-bottom:30px;\n}\n.error-desc{\n  display:flex;\n  flex-direction:row;\n  justify-content: center;\n  align-items:center;\n}\n.error-text{\n  font-size:28px;\n  color:#333;\n}\n</style>\n<script cml-type=\"json\">\n{\n    \"base\": {\n        \"usingComponents\": {\n        }\n    },\n    \"wx\": {\n        \"navigationBarTitleText\": \"index\",\n        \"backgroundTextStyle\": \"dark\",\n        \"backgroundColor\": \"#E2E2E2\",\n        \"component\": true\n    }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/cml/standard/standard.interface",
    "content": "<script cml-type=\"interface\">\n/*\n定义一个inteface用于描述组件的属性和事件\n1、 如果区分组件属性和事件？\n通过类型来区分，事件为函数类型，属性为非函数类型\n2、 如何定义组件属性\n给interface添加同名的属性即可，指定类型\n3、 如何定义组件事件\n以事件名称为key值给interface定义属性，该属性是一个函数类型，返回值为void，\n定义函数的第一个参数为自定义事件传递的detail对象类型\n*/\n\n//定义事件detail对象的参数\ntype changeStatusDetail = {\n  index: Number,\n  status: Boolean\n}\ntype indexDetail = {\n  index: Number\n}\ninterface CTodoitemInterface {\n  index: Number,\n  completed: Boolean,\n  text: String,\n  changestatus(eventDetail: changeStatusDetail): void;\n  delete(eventDetail: indexDetail): void;\n  top(eventDetail: indexDetail): void;\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/cml/standard/standard.web.cml",
    "content": "<template>\n<view class=\"border\">\n  <c-scroller class=\"scroller\" scroll-direction=\"horizontal\">\n    <view class=\"checkbox-wrap\">\n      <c-checkbox width=\"{{40}}\" checked=\"{{completed}}\" c-bind:checkclick=\"checkclick\"></c-checkbox>\n    </view>\n    <text class=\"{{completed ? 'completed-show' : 'text-show'}}\" c-bind:tap=\"checkclick\">{{text}}</text>\n    <view class=\"option-wrap\">\n      <view class=\"option-flex-wrap\">\n        <text class=\"top-btn\" c-bind:tap=\"top\">置顶</text>\n        <text class=\"delete-btn\" c-bind:tap=\"delete\">删除</text>\n      </view>\n    </view>\n  </c-scroller>\n</view>\n</template>\n<script>\nclass CTodoitem implements CTodoitemInterface   {\n  props = {\n    index: {\n      type: Number\n    },\n    completed: {\n      type: Boolean\n    },\n    text: {\n      type: String\n    }\n  }\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n    checkclick() {\n      this.$cmlEmit('changestatus', {\n        index: this.index,\n        status: !this.completed\n      })\n    },\n    delete() {\n      this.$cmlEmit('delete', {\n        index: this.index\n      })\n    },\n    top() {\n      this.$cmlEmit('top', {\n        index: this.index\n      });\n    }\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.border {\n  border-bottom: 1px solid #ccc;\n  height: 100px;\n}\n.scroller {\n  width: 600px;\n  height: 100px;\n}\n.checkbox-wrap {\n  width: 70px;\n  height: 100px;\n  margin-left: 10px;\n  justify-content: center;\n}\n.completed-show {\n  width: 520px;\n  font-size: 32px;\n  color: #999;\n  height: 100px;\n  line-height: 100px;\n  text-decoration: line-through;\n}\n.text-show {\n  width: 520px;\n  font-size: 32px;\n  color: #666;\n  height: 100px;\n  line-height: 100px;\n}\n.option-flex-wrap {\n  display: flex;\n  flex-direction: row;\n}\n.top-btn {\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #61c7fc;\n}\n.delete-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #aaa;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-scroller\": \"chameleon-ui-builtin/components/scroller/scroller\",\n      \"c-checkbox\": \"/components/c-checkbox/c-checkbox\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/cml/standard/standard.weex.cml",
    "content": "<template>\n<view class=\"border\">\n  <c-scroller class=\"scroller\" scroll-direction=\"horizontal\">\n    <view class=\"checkbox-wrap\">\n      <c-checkbox width=\"{{40}}\" checked=\"{{completed}}\" c-bind:checkclick=\"checkclick\"></c-checkbox>\n    </view>\n    <text class=\"{{completed ? 'completed-show' : 'text-show'}}\" c-bind:tap=\"checkclick\">{{text}}</text>\n    <view class=\"option-wrap\">\n      <view class=\"option-flex-wrap\">\n        <text class=\"top-btn\" c-bind:tap=\"top\">置顶</text>\n        <text class=\"delete-btn\" c-bind:tap=\"delete\">删除</text>\n      </view>\n    </view>\n  </c-scroller>\n</view>\n</template>\n<script>\nclass CTodoitem implements CTodoitemInterface   {\n  props = {\n    index: {\n      type: Number\n    },\n    completed: {\n      type: Boolean\n    },\n    text: {\n      type: String\n    }\n  }\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n    checkclick() {\n      this.$cmlEmit('changestatus', {\n        index: this.index,\n        status: !this.completed\n      })\n    },\n    delete() {\n      this.$cmlEmit('delete', {\n        index: this.index\n      })\n    },\n    top() {\n      this.$cmlEmit('top', {\n        index: this.index\n      });\n    }\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.border {\n  border-bottom: 1px solid #ccc;\n  height: 100px;\n}\n.scroller {\n  width: 600px;\n  height: 100px;\n}\n.checkbox-wrap {\n  width: 70px;\n  height: 100px;\n  margin-left: 10px;\n  justify-content: center;\n}\n.completed-show {\n  width: 520px;\n  font-size: 32px;\n  color: #999;\n  height: 100px;\n  line-height: 100px;\n  text-decoration: line-through;\n}\n.text-show {\n  width: 520px;\n  font-size: 32px;\n  color: #666;\n  height: 100px;\n  line-height: 100px;\n}\n.option-flex-wrap {\n  display: flex;\n  flex-direction: row;\n}\n.top-btn {\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #61c7fc;\n}\n.delete-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #aaa;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-scroller\": \"chameleon-ui-builtin/components/scroller/scroller\",\n      \"c-checkbox\": \"/components/c-checkbox/c-checkbox\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/cml/standard/standard.wx.cml",
    "content": "<template>\n<view class=\"border\">\n  <c-scroller class=\"scroller\" scroll-direction=\"horizontal\">\n    <view class=\"checkbox-wrap\">\n      <c-radio></c-radio>\n    </view>\n    <text class=\"{{completed ? 'completed-show' : 'text-show'}}\" c-bind:tap=\"checkclick\">{{text}}</text>\n    <view class=\"option-wrap\">\n      <view class=\"option-flex-wrap\">\n        <text class=\"top-btn\" c-bind:tap=\"top\">置顶</text>\n        <text class=\"delete-btn\" c-bind:tap=\"delete\">删除</text>\n      </view>\n    </view>\n  </c-scroller>\n</view>\n</template>\n<script>\nclass CTodoitem implements CTodoitemInterface   {\n  props = {\n    index: {\n      type: Number\n    },\n    completed: {\n      type: Boolean\n    },\n    text: {\n      type: String\n    }\n  }\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n    checkclick() {\n      this.$cmlEmit('changestatus', {\n        index: this.index,\n        status: !this.completed\n      })\n    },\n    delete() {\n      this.$cmlEmit('delete', {\n        index: this.index\n      })\n    },\n    top() {\n      this.$cmlEmit('top', {\n        index: this.index\n      });\n    }\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n    \n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.border {\n  border-bottom: 1px solid #ccc;\n  height: 100px;\n}\n.scroller {\n  width: 600px;\n  height: 100px;\n  white-space: nowrap;\n}\n.checkbox-wrap {\n  width: 80px;\n  height: 100px;\n  padding-left: 10px;\n  padding-top: 30px; \n  display: inline-block;\n  box-sizing: border-box;\n  float: left;\n}\n.completed-show {\n  float: left;\n  width: 520px;\n  font-size: 32px;\n  color: #999;\n  height: 100px;\n  line-height: 100px;\n  text-decoration: line-through;\n}\n.text-show {\n  float: left;\n  width: 520px;\n  font-size: 32px;\n  color: #666;\n  height: 100px;\n  line-height: 100px;\n}\n.option-wrap {\n  display: inline-block;\n}\n.option-flex-wrap {\n  display: flex;\n  flex-direction: row;\n}\n.top-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #61c7fc;\n}\n.delete-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #aaa;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-scroller\": \"chameleon-ui-builtin/components/scroller/scroller\",\n      \"c-radio\": \"/components/radio/radio\"\n    }\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    },\n    \"component\": true\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/cml/standard.cml",
    "content": "<template>\n  <view class='root'>\n    <view c-if=\"{{hasApplyList}}\" class=\"scroll-container\"></view>\n    <view c-else class=\"error-container\">\n      <view calss=\"error-container\">\n        <view class=\"error-img\">\n          <!-- <image style=\"width: 100px;height:100px;\" src=\"{{errorImg}}\"></image> -->\n        </view>\n        <view class=\"error-desc\">\n          <text class=\"error-text\">暂无申请记录</text>\n        </view>\n      </view>\n    </view>\n  </view>\n</template>\n<script>\nclass ApplyRecord   {\n  props = {\n    pageData:{\n      type:Object,\n      default(){\n        return {}\n      }\n    }\n  }\n\n  data = {\n    count:'tedas',\n    errorImg:require('../img/icon.png'),\n  }\n\n  computed = {\n    hasApplyList(){\n      return this.pageData.has_apply_list == 1;\n    },\n    applyList(){\n      return this.pageData.apply_list;\n    },\n    leftTimes(){\n      return this.pageData.left_times;\n    }\n  }\n}\n\nexport default new ApplyRecord();\n</script>\n<style scoped>\n.root{\n  position:absolute;\n  top:88cpx;\n  bottom:0;\n  left:0;\n  right:0;\n  background-color:#f7f7f7;\n}\n\n.scroll-container{\n  position:absolute;\n  top:0cpx;\n  bottom:0;\n  left:0;\n  right:0;\n  margin-top:20cpx;\n}\n.error-container{\n  position:absolute;\n  top:0cpx;\n  bottom:0;\n  left:0;\n  right:0;\n  display:flex;\n  flex-direction:row;\n  align-content: center;\n  justify-content: center;\n}\n.error-container{\n  width:750cpx;\n}\n.error-img{\n  display:flex;\n  flex-direction:row;\n  justify-content: center;\n  align-items:center;\n  margin-bottom:30cpx;\n}\n.error-desc{\n  display:flex;\n  flex-direction:row;\n  justify-content: center;\n  align-items:center;\n}\n.error-text{\n  font-size:28cpx;\n  color:#333;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n\n  },\n  \"wx\": {\n    \"navigationBarTitleText\": \"index\",\n    \"backgroundTextStyle\": \"dark\",\n    \"backgroundColor\": \"#E2E2E2\",\n    \"component\": true\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/cml/syntaxError/standard.interface",
    "content": "<script cml-type=\"interface\">\n/*\n定义一个inteface用于描述组件的属性和事件\n1、 如果区分组件属性和事件？\n通过类型来区分，事件为函数类型，属性为非函数类型\n2、 如何定义组件属性\n给interface添加同名的属性即可，指定类型\n3、 如何定义组件事件\n以事件名称为key值给interface定义属性，该属性是一个函数类型，返回值为void，\n定义函数的第一个参数为自定义事件传递的detail对象类型\n*/\n\n//定义事件detail对象的参数\ntype changeStatusDetail = {\n  index: Number,\n  status: Boolean\n}\ntype indexDetail = {\n  index: Number\n}\ninterface CTodoitemInterface {\n  index: Number,\n  completed: Boolean,\n  text: String,\n  changestatus(eventDetail: changeStatusDetail): void;\n  delete(eventDetail: indexDetail): void;\n  top(eventDetail: indexDetail): void;\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/cml/syntaxError/standard.web.cml",
    "content": "<template>\n<view class=\"border\">\n  <c-scroller class=\"scroller\" scroll-direction=\"horizontal\">\n    <view class=\"checkbox-wrap\">\n      <c-checkbox width=\"{{40}}\" checked=\"{{completed}}\" c-bind:checkclick=\"checkclick\"></c-checkbox>\n    </view>\n    <text class=\"{{completed ? 'completed-show' : 'text-show'}}\" c-bind:tap=\"checkclick\">{{text}}</text>\n    <view class=\"option-wrap\">\n      <view class=\"option-flex-wrap\">\n        <text class=\"top-btn\" c-bind:tap=\"top\">置顶</text>\n        <text class=\"delete-btn\" c-bind:tap=\"delete\">删除</text>\n      </view>\n    </view>\n  </c-scroller>\n</view>\n</template>\n<script>\nclass CTodoitem implements CTodoitemInterface   {\n  props = {\n    index: {\n      type: Number\n    },\n    completed: {\n      type: Boolean\n    },\n    text: {\n      type: String\n    }\n  }\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n    checkclick() {\n      this.$cmlEmit('changestatus', {\n        index: this.index,\n        status: !this.completed\n      })\n    },\n    delete() {\n      this.$cmlEmit('delete', {\n        index: this.index\n      })\n    },\n    top() {\n      this.$cmlEmit('top', {\n        index: this.index\n      });\n    }\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.border {\n  border-bottom: 1px solid #ccc;\n  height: 100px;\n}\n.scroller {\n  width: 600px;\n  height: 100px;\n}\n.checkbox-wrap {\n  width: 70px;\n  height: 100px;\n  margin-left: 10px;\n  justify-content: center;\n}\n.completed-show {\n  width: 520px;\n  font-size: 32px;\n  color: #999;\n  height: 100px;\n  line-height: 100px;\n  text-decoration: line-through;\n}\n.text-show {\n  width: 520px;\n  font-size: 32px;\n  color: #666;\n  height: 100px;\n  line-height: 100px;\n}\n.option-flex-wrap {\n  display: flex;\n  flex-direction: row;\n}\n.top-btn {\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #61c7fc;\n}\n.delete-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #aaa;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-scroller\": \"chameleon-ui-builtin/components/scroller/scroller\",\n      \"c-checkbox\": \"/components/c-checkbox/c-checkbox\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/cml/syntaxError/standard.weex.cml",
    "content": "<template>\n<view class=\"border\">\n  <c-scroller class=\"scroller\" scroll-direction=\"horizontal\">\n    <view class=\"checkbox-wrap\">\n      <c-checkbox width=\"{{40}}\" checked=\"{{completed}}\" c-bind:checkclick=\"checkclick\"></c-checkbox>\n    </view>\n    <text class=\"{{completed ? 'completed-show' : 'text-show'}}\" c-bind:tap=\"checkclick\">{{text}}</text>\n    <view class=\"option-wrap\">\n      <view class=\"option-flex-wrap\">\n        <text class=\"top-btn\" c-bind:tap=\"top\">置顶</text>\n        <text class=\"delete-btn\" c-bind:tap=\"delete\">删除</text>\n      </view>\n    </view>\n  </c-scroller>\n</view>\n</template>\n<script>\nclass CTodoitem implements CTodoitemInterface   {\n  props = {\n    index: {\n      type: Number\n    },\n    completed: {\n      type: Boolean\n    },\n    text: {\n      type: String\n    }\n  \n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n    checkclick() {\n      this.$cmlEmit('changestatus', {\n        index: this.index,\n        status: !this.completed\n      })\n    },\n    delete() {\n      this.$cmlEmit('delete', {\n        index: this.index\n      })\n    },\n    top() {\n      this.$cmlEmit('top', {\n        index: this.index\n      });\n    }\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.border {\n  border-bottom: 1px solid #ccc;\n  height: 100px;\n}\n.scroller {\n  width: 600px;\n  height: 100px;\n}\n.checkbox-wrap {\n  width: 70px;\n  height: 100px;\n  margin-left: 10px;\n  justify-content: center;\n}\n.completed-show {\n  width: 520px;\n  font-size: 32px;\n  color: #999;\n  height: 100px;\n  line-height: 100px;\n  text-decoration: line-through;\n}\n.text-show {\n  width: 520px;\n  font-size: 32px;\n  color: #666;\n  height: 100px;\n  line-height: 100px;\n}\n.option-flex-wrap {\n  display: flex;\n  flex-direction: row;\n}\n.top-btn {\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #61c7fc;\n}\n.delete-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #aaa;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-scroller\": \"chameleon-ui-builtin/components/scroller/scroller\",\n      \"c-checkbox\": \"/components/c-checkbox/c-checkbox\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/cml/syntaxError/standard.wx.cml",
    "content": "<template>\n<view class=\"border\">\n  <c-scroller class=\"scroller\" scroll-direction=\"horizontal\">\n    <view class=\"checkbox-wrap\">\n      <c-checkbox width=\"{{40}}\" checked=\"{{completed}}\" c-bind:checkclick=\"checkclick\"></c-checkbox>\n    </view>\n    <text class=\"{{completed ? 'completed-show' : 'text-show'}}\" c-bind:tap=\"checkclick\">{{text}}</text>\n    <view class=\"option-wrap\">\n      <view class=\"option-flex-wrap\">\n        <text class=\"top-btn\" c-bind:tap=\"top\">置顶</text>\n        <text class=\"delete-btn\" c-bind:tap=\"delete\">删除</text>\n      </view>\n    </view>\n  </c-scroller>\n</view>\n</template>\n<script>\nclass CTodoitem implements CTodoitemInterface   {\n  props = {\n    index: {\n      type: Number\n    },\n    completed: {\n      type: Boolean\n    },\n    text: {\n      type: String\n    }\n  }\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n    checkclick() {\n      this.$cmlEmit('changestatus', {\n        index: this.index,\n        status: !this.completed\n      })\n    },\n    delete() {\n      this.$cmlEmit('delete', {\n        index: this.index\n      })\n    },\n    top() {\n      this.$cmlEmit('top', {\n        index: this.index\n      });\n    }\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n    \n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.border {\n  border-bottom: 1px solid #ccc;\n  height: 100px;\n}\n.scroller {\n  width: 600px;\n  height: 100px;\n  white-space: nowrap;\n}\n.checkbox-wrap {\n  width: 80px;\n  height: 100px;\n  padding-left: 10px;\n  padding-top: 30px; \n  display: inline-block;\n  box-sizing: border-box;\n  float: left;\n}\n.completed-show {\n  float: left;\n  width: 520px;\n  font-size: 32px;\n  color: #999;\n  height: 100px;\n  line-height: 100px;\n  text-decoration: line-through;\n}\n.text-show {\n  float: left;\n  width: 520px;\n  font-size: 32px;\n  color: #666;\n  height: 100px;\n  line-height: 100px;\n}\n.option-wrap {\n  display: inline-block;\n}\n.option-flex-wrap {\n  display: flex;\n  flex-direction: row;\n}\n.top-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #61c7fc;\n}\n.delete-btn {\n  display: inline-block;\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #aaa;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-scroller\": \"chameleon-ui-builtin/components/scroller/scroller\",\n      \"c-checkbox\": \"/components/c-checkbox/c-checkbox\"\n    }\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    },\n    \"component\": true\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/json/.cmllintrc",
    "content": "{\n  // 核心文件检查\n  'core-files-check': true,\n\n  // cml文件校验\n  'cml-files-check': true,\n\n  // 接口文件校验\n  'interface-files-check': true,\n\n  'cpx-support': true,\n  \n  'platforms': ['weex', 'wx', 'web', 'baidu', 'alipay']\n}\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/json/no-bracket.cml",
    "content": "<script cml-type=\"json\">\n{\n  \"weex\": {\n    \"usingComponents\": {\n    \n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/json/no-comma.cml",
    "content": "<script cml-type=\"json\">\n{\n  \"weex\": {\n    \"usingComponents\": {\n    }\n  }\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/json/no-quotes.cml",
    "content": "<script cml-type=\"json\">\n{\n  \"weex\": {\n    \"usingComponents\": {\n    }\n  },\n  \"wx\": {\n    \"window\": {\n      backgroundTextStyle: \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/json/standard.cml",
    "content": "<script cml-type=\"json\">\n{\n  \"weex\": {\n    \"usingComponents\": {\n    }\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/script/nonstandard-arrow.cml",
    "content": "<template>\n  <view class='root'>\n    <view c-if=\"{{hasApplyList}}\" class=\"scroll-container\"><view/>\n\n    <view c-else class=\"error-container\">\n      <view calss=\"error-container\">\n        <view class=\"error-img\">\n          <image style=\"width: 100px;height:100px;\" src=\"{{errorImg}}\"></image>\n        </view>\n        <view class=\"error-desc\">\n          <text class=\"error-text\">暂无申请记录</text>\n        </view>\n      </view>\n    </view>\n\n  </view>\n</template>\n<script>\nclass ApplyRecord   {\n  props = {\n    pageData:{\n      type:Object,\n      default(){\n        return {}\n      }\n    }\n  }\n\n\n  data = {\n    count:'tedas',\n    errorImg:require('../img/icon.png'),\n  }\n\n  computed = {\n    hasApplyList: () => {\n      return this.pageData.has_apply_list == 1;\n    },\n    applyList(){\n      return this.pageData.apply_list;\n    },\n    leftTimes(){\n      return this.pageData.left_times;\n    }\n  }\n\n  mounted = () => {\n    \n  }\n}\n\nexport default new ApplyRecord();\n</script>\n<style scoped>\n.root{\n  position:absolute;\n  top:88px;\n  bottom:0;\n  left:0;\n  right:0;\n  background-color:#f7f7f7;\n}\n\n.scroll-container{\n  position:absolute;\n  top:0px;\n  bottom:0;\n  left:0;\n  right:0;\n  margin-top:20px;\n}\n.error-container{\n  position:absolute;\n  top:0px;\n  bottom:0;\n  left:0;\n  right:0;\n  display:flex;\n  align-content: center;\n  justify-content: center;\n}\n.error-container{\n  width:750px;\n}\n.error-img{\n  display:flex;\n  flex-direction:row;\n  justify-content: center;\n  align-items:center;\n  margin-bottom:30px;\n}\n.error-desc{\n  display:flex;\n  flex-direction:row;\n  justify-content: center;\n  align-items:center;\n}\n.error-text{\n  font-size:28px;\n  color:#333;\n}\n</style>\n<script cml-type=\"json\">\n{\n    \"base\": {\n        \"usingComponents\": {\n          \"record-item\":\"./record-item\"\n        }\n    },\n    \"wx\": {\n        \"navigationBarTitleText\": \"index\",\n        \"backgroundTextStyle\": \"dark\",\n        \"backgroundColor\": \"#E2E2E2\",\n        \"component\": true\n    }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/script/nonstandard.cml",
    "content": "<template>\n  <view class='root'>\n    <view c-if=\"{{hasApplyList}}\" class=\"scroll-container\"><view/>\n\n    <view c-else class=\"error-container\">\n      <view calss=\"error-container\">\n        <view class=\"error-img\">\n          <image style=\"width: 100px;height:100px;\" src=\"{{errorImg}}\"></image>\n        </view>\n        <view class=\"error-desc\">\n          <text class=\"error-text\">暂无申请记录</text>\n        </view>\n      </view>\n    </view>\n\n  </view>\n</template>\n<script>\nclass ApplyRecord   {\n  props = {\n    pageData:{\n      type:Object,\n      default(){\n        return {}\n      }\n    }\n  \n\n  data = {\n    count:'tedas',\n    errorImg:require('../img/icon.png'),\n  }\n\n  computed = {\n    hasApplyList(){\n      return this.pageData.has_apply_list == 1;\n    },\n    applyList(){\n      return this.pageData.apply_list;\n    },\n    leftTimes(){\n      return this.pageData.left_times;\n    }\n  }\n}\n\nexport default new ApplyRecord();\n</script>\n<style scoped>\n.root{\n  position:absolute;\n  top:88px;\n  bottom:0;\n  left:0;\n  right:0;\n  background-color:#f7f7f7;\n}\n\n.scroll-container{\n  position:absolute;\n  top:0px;\n  bottom:0;\n  left:0;\n  right:0;\n  margin-top:20px;\n}\n.error-container{\n  position:absolute;\n  top:0px;\n  bottom:0;\n  left:0;\n  right:0;\n  display:flex;\n  align-content: center;\n  justify-content: center;\n}\n.error-container{\n  width:750px;\n}\n.error-img{\n  display:flex;\n  flex-direction:row;\n  justify-content: center;\n  align-items:center;\n  margin-bottom:30px;\n}\n.error-desc{\n  display:flex;\n  flex-direction:row;\n  justify-content: center;\n  align-items:center;\n}\n.error-text{\n  font-size:28px;\n  color:#333;\n}\n</style>\n<script cml-type=\"json\">\n{\n    \"base\": {\n        \"usingComponents\": {\n          \"record-item\":\"./record-item\"\n        }\n    },\n    \"wx\": {\n        \"navigationBarTitleText\": \"index\",\n        \"backgroundTextStyle\": \"dark\",\n        \"backgroundColor\": \"#E2E2E2\",\n        \"component\": true\n    }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/script/standard.cml",
    "content": "<script>\nclass ApplyRecord {\n  props = {\n    pageData:{\n      type:Object,\n      default(){\n        return {}\n      }\n    }\n  }\n\n  data = {\n    count:'tedas',\n    errorImg:require('../img/icon.png'),\n  }\n\n  computed = {\n    hasApplyList(){\n      return this.pageData.has_apply_list == 1;\n    },\n    applyList(){\n      return this.pageData.apply_list;\n    },\n    leftTimes(){\n      return this.pageData.left_times;\n    }\n  }\n}\n\nexport default new ApplyRecord();\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/style/.cmllintrc",
    "content": "{\n  // 核心文件检查\n  'core-files-check': true,\n\n  // cml文件校验\n  'cml-files-check': true,\n\n  // 接口文件校验\n  'interface-files-check': true,\n\n  'cpx-support': true,\n  \n  'platforms': ['weex', 'wx', 'web', 'baidu', 'alipay']\n}\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/style/nest.cml",
    "content": "<style scoped>\n/* reset */\n/*只作用于 web body下的first-child 节点*/\n.app-root {\n  position: absolute;\n  top: 0px;\n  bottom: 0px;\n  left: 0px;\n  right: 0px;\n\n  .a {\n    ssss: key;\n  }\n}\n\n\n@media (-webkit-min-device-pixel-ratio: 3) {\n    .border-1px:after {\n        width: 300%;\n        height: 300%;\n        border-radius: 6px;\n        -webkit-transform: scale(.333) translateZ(0);\n        transform: scale(.333) translateZ(0);\n    }\n    .border-top-1px:before {\n        width: 300%;\n        -webkit-transform: scale(.333) translateZ(0);\n        transform: scale(.333) translateZ(0);\n    }\n    .border-right-1px:after {\n        height: 300%;\n        -webkit-transform: scale(.333) translateZ(0);\n        transform: scale(.333) translateZ(0);\n    }\n    .border-bottom-1px:after {\n        width: 300%;\n        -webkit-transform: scale(.333) translateZ(0);\n        transform: scale(.333) translateZ(0);\n    }\n    .border-left-1px:before {\n        height: 300%;\n        -webkit-transform: scale(.333) translateZ(0);\n        transform: scale(.333) translateZ(0);\n    }\n}\n\n@media (min-device-pixel-ratio: 3) {\n    .border-1px:after {\n        width: 300%;\n        height: 300%;\n        border-radius: 6px;\n        -webkit-transform: scale(.333) translateZ(0);\n        transform: scale(.333) translateZ(0);\n    }\n    .border-top-1px:before {\n        width: 300%;\n        -webkit-transform: scale(.333) translateZ(0);\n        transform: scale(.333) translateZ(0);\n    }\n    .border-right-1px:after {\n        height: 300%;\n        -webkit-transform: scale(.333) translateZ(0);\n        transform: scale(.333) translateZ(0);\n    }\n    .border-bottom-1px:after {\n        width: 300%;\n        -webkit-transform: scale(.333) translateZ(0);\n        transform: scale(.333) translateZ(0);\n    }\n    .border-left-1px:before {\n        height: 300%;\n        -webkit-transform: scale(.333) translateZ(0);\n        transform: scale(.333) translateZ(0);\n    }\n}\n\n.border-none:before, .border-none:after {\n    display: none;\n}\n\n</style>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/style/no-bracket.cml",
    "content": "<style scoped>\n/* reset */\n/*只作用于 web body下的first-child 节点*/\n.app-root {\n  position: absolute;\n  top: 0px;\n  bottom: 0px;\n  left: 0px;\n  right: 0px;\n\n\n\n</style>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/style/no-semicolon.cml",
    "content": "<style scoped>\n/* reset */\n/*只作用于 web body下的first-child 节点*/\n.app-root {\n  position: absolute;\n  top: 0px\n  bottom: 0px;\n  left: 0px;\n  right: 0px;\n}\n\n\n</style>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/style/no-standard-important.cml",
    "content": "<style scoped lang=\"stylus\">\n/* reset */\n/*只作用于 web body下的first-child 节点*/\n.app-root {\n  position: absolute !important;\n  top: 0px;\n  bottom: 0px;\n  left: 0px;\n  right: 0px;\n}\n\n\n</style>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/style/no-standard.stylus.cml",
    "content": "<style scoped lang=\"stylus\">\n/* reset */\n/*只作用于 web body下的first-child 节点*/\n.app-root\n  position:\n  top: 0px;\n  bottom: 0px;\n  left: 0px;\n  right: 0px;\n</style>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/style/standard.cml",
    "content": "<style scoped>\n/* reset */\n/*只作用于 web body下的first-child 节点*/\n.app-root {\n  position: absolute;\n  top: 0px;\n  bottom: 0px;\n  left: 0px;\n  right: 0px;\n}\n\n\n</style>\n"
  },
  {
    "path": "packages/chameleon-linter/test/linter/cml/style/standard.stylus.cml",
    "content": "<style scoped lang=\"stylus\">\n/* reset */\n/*只作用于 web body下的first-child 节点*/\n.app-root {\n  top: 0px;\n  bottom: 0px;\n  left: 0px;\n  right: 0px;\n}\n</style>\n"
  },
  {
    "path": "packages/chameleon-linter/test/lintrc/nonstandard/.cmllintrc",
    "content": "{\n  \n"
  },
  {
    "path": "packages/chameleon-linter/test/lintrc/standard/.cmllintrc",
    "content": "{\n  'core-files-check': false,\n}\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/checker/template-lib-class.test.js",
    "content": "const path = require('path');\nconst chai = require('chai');\nconst expect = chai.expect;\nconst linters = require('../../../linters');\nconst checkers = require('../../../checkers');\nconst utils = require('../../../utils');\nconst config = require('../../../config');\nconst jsonAstParser = require('../../../checkers/template/lib/json-ast-parser');\nconst jsAstParser = require('../../../checkers/template/lib/js-ast-parser');\nconst templateAstParser = require('../../../checkers/template/lib/template-ast-parser');\n\ndescribe('template lib check', function() {\n  let parts = {};\n  let parseResults = {};\n  let filepath = path.resolve(__dirname, '../docs/check/success/index-lib-check-implements.cml');\n  let usingComponents = {};\n  let parsedScriptResults = {};\n  let parsedTemplateResults = {};\n\n  before(async function() {\n    config.init(path.resolve(__dirname, '../docs/check/success'));\n    parts = utils.getCmlParts(filepath);\n    parseResults.script = await linters.scriptlint(parts.script);\n    parseResults.json = await linters.jsonlint(parts.json);\n    parseResults.template = await linters.templatelint(parts.template, parseResults.json.obj);\n  });\n\n  it('should pass json ast parser', function() {\n    usingComponents = jsonAstParser.getUsingComponents(parseResults.json.obj, filepath);\n  });\n\n  it('should pass js ast parser', function() {\n    parsedScriptResults = jsAstParser.getParseResults(parseResults.script.ast);\n  });\n\n  it('should pass template parser', function() {\n    parsedTemplateResults = templateAstParser.getParseResults(parseResults.template.ast, Object.keys(usingComponents));\n  })\n});\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/checker/template-lib-export.test.js",
    "content": "const path = require('path');\nconst chai = require('chai');\nconst expect = chai.expect;\nconst linters = require('../../../linters');\nconst checkers = require('../../../checkers');\nconst utils = require('../../../utils');\nconst config = require('../../../config');\nconst jsonAstParser = require('../../../checkers/template/lib/json-ast-parser');\nconst jsAstParser = require('../../../checkers/template/lib/js-ast-parser');\nconst templateAstParser = require('../../../checkers/template/lib/template-ast-parser');\n\ndescribe('template lib check', function() {\n  let parts = {};\n  let parseResults = {};\n  let filepath = path.resolve(__dirname, '../docs/check/success/index-lib-check-export.cml');\n  let usingComponents = {};\n  let parsedScriptResults = {};\n  let parsedTemplateResults = {};\n\n  before(async function() {\n    config.init(path.resolve(__dirname, '../docs/check/success'));\n    parts = utils.getCmlParts(filepath);\n    parseResults.script = await linters.scriptlint(parts.script);\n    parseResults.json = await linters.jsonlint(parts.json);\n    parseResults.template = await linters.templatelint(parts.template, parseResults.json.obj);\n  });\n\n  it('should pass json ast parser', function() {\n    usingComponents = jsonAstParser.getUsingComponents(parseResults.json.obj, filepath);\n  });\n\n  it('should pass js ast parser', function() {\n    parsedScriptResults = jsAstParser.getParseResults(parseResults.script.ast);\n  });\n\n  it('should pass template parser', function() {\n    parsedTemplateResults = templateAstParser.getParseResults(parseResults.template.ast, Object.keys(usingComponents));\n  })\n});\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/checker/template-lib-js.test.js",
    "content": "const path = require('path');\nconst chai = require('chai');\nconst expect = chai.expect;\nconst utils = require('../../../utils');\nconst config = require('../../../config');\nconst linters = require('../../../linters');\n\nconst jsAstParser = require('../../../checkers/template/lib/js-ast-parser');\n\n\nasync function getParseResults(filepath) {\n  let parts = {};\n  let parseResults = {};\n  filepath = path.resolve(__dirname, filepath);\n\n  parts = utils.getCmlParts(filepath);\n  parseResults.script = await linters.scriptlint(parts.script);\n  parseResults.json = await linters.jsonlint(parts.json);\n  parseResults.template = await linters.templatelint(parts.template, parseResults.json.obj);\n\n  return {parseResults, filepath};\n}\n\ndescribe('template lib js', function() {\n  before(function() {\n    config.init(path.resolve(__dirname));\n  });\n\n  it('should pass template lib js: class model', async function() {\n    let filepath = '../docs/check/success/index-lib-js-class.cml';\n    let {parseResults} = await getParseResults(filepath);\n    let results = jsAstParser.getParseResults(parseResults.script.ast);\n    expect(results).to.have.deep.property('vars', ['show', 'dataOne', 'computedOne', 'computedTwo']);\n    expect(results).to.have.deep.property('methods', ['onTap', 'onClick']);\n  });\n\n  it('should pass template lib js: export model', async function() {\n    let filepath = '../docs/check/success/index-lib-js-export.cml';\n    let {parseResults} = await getParseResults(filepath);\n    let results = jsAstParser.getParseResults(parseResults.script.ast);\n    expect(results).to.have.deep.property('vars', ['show', 'dataOne', 'computedOne', 'computedTwo', 'computedShow', 'getterHide']);\n    expect(results).to.have.deep.property('methods', ['onTap', 'onClick']);\n  });\n});\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/checker/template-lib-json.test.js",
    "content": "const path = require('path');\nconst chai = require('chai');\nconst expect = chai.expect;\nconst utils = require('../../../utils');\nconst config = require('../../../config');\nconst linters = require('../../../linters');\n\nconst jsonAstParser = require('../../../checkers/template/lib/json-ast-parser');\n\nasync function getParseResults(filepath) {\n  let parts = {};\n  let parseResults = {};\n  filepath = path.resolve(__dirname, filepath);\n\n  parts = utils.getCmlParts(filepath);\n  parseResults.script = await linters.scriptlint(parts.script);\n  parseResults.json = await linters.jsonlint(parts.json);\n  parseResults.template = await linters.templatelint(parts.template, parseResults.json.obj);\n\n  return {parseResults, filepath};\n}\n\ndescribe('template lib json', function() {\n  let scrollerPath = path.resolve(__dirname, '../docs/components/scroller/scroller.interface');\n  let radioPath = path.resolve(__dirname, '../docs/components/radio/radio.cml');\n\n  before(async function() {\n    config.init(path.resolve(__dirname));\n  });\n\n  it('should pass template lib json process: polymorphic model', async function() {\n    let filepath = '../docs/check/success/index-lib-json-polymorphic.cml';\n    let {parseResults, filepath: fullFilePath} = await getParseResults(filepath);\n    let results = jsonAstParser.getUsingComponents(parseResults.json.obj, fullFilePath);\n    expect(results).to.have.property('c-scroller');\n    expect(results['c-scroller']).to.have.deep.property('vars', ['cstyle', 'bottomOffset', 'scrollDirection']);\n    expect(results['c-scroller']).to.have.deep.property('methods', ['customscroll', 'scrolltobottom']);\n    expect(results['c-scroller']).to.have.nested.property('events[0].name', 'customscroll');\n    expect(results['c-scroller']).to.have.property('path', scrollerPath);\n  });\n\n  it('should pass template lib json process: single file model', async function() {\n    let filepath = '../docs/check/success/index-lib-json-single.cml';\n    let {parseResults, filepath: fullFilePath} = await getParseResults(filepath);\n    let results = jsonAstParser.getUsingComponents(parseResults.json.obj, fullFilePath);\n    expect(results).to.have.property('c-radio');\n    expect(results['c-radio']).to.have.deep.property('vars', ['checked']);\n    expect(results['c-radio']).to.have.deep.property('methods', ['check']);\n    expect(results['c-radio']).to.have.nested.property('events[0].name', 'radiocheked');\n    expect(results['c-radio']).to.have.property('path', radioPath);\n  });\n\n  it('should pass plugin:// prefix component test', async function() {\n    let filepath = '../docs/check/success/index-lib-check-plugin.cml';\n    let {parseResults, filepath: fullFilePath} = await getParseResults(filepath);\n    let results = jsonAstParser.getUsingComponents(parseResults.json.obj, fullFilePath);\n    expect(results).to.have.property('c-radio');\n    expect(results).to.not.have.property('c-plugin');\n  })\n});\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/checker/template-lib-template.test.js",
    "content": "const path = require('path');\nconst chai = require('chai');\nconst expect = chai.expect;\nconst utils = require('../../../utils');\nconst config = require('../../../config');\nconst linters = require('../../../linters');\n\nconst jsonAstParser = require('../../../checkers/template/lib/json-ast-parser');\nconst templateAstParser = require('../../../checkers/template/lib/template-ast-parser');\n\n\nasync function getParseResults(filepath) {\n  let parts = {};\n  let parseResults = {};\n  filepath = path.resolve(__dirname, filepath);\n\n  parts = utils.getCmlParts(filepath);\n  parseResults.script = await linters.scriptlint(parts.script);\n  parseResults.json = await linters.jsonlint(parts.json);\n  parseResults.template = await linters.templatelint(parts.template, parseResults.json.obj);\n\n  return {parseResults, filepath};\n}\n\ndescribe('template lib template', function() {\n  before(async function() {\n    config.init(path.resolve(__dirname));\n  });\n\n  it('should pass template ast parse process: cml', async function() {\n    let filepath = '../docs/check/success/index-lib-template-cml.cml';\n    let {parseResults, filepath: fullFilePath} = await getParseResults(filepath);\n    let usingComponents = jsonAstParser.getUsingComponents(parseResults.json.obj, fullFilePath)\n    let results = templateAstParser.getParseResults(parseResults.template.ast, {\n      usingComponents: Object.keys(usingComponents),\n      platform: 'cml'\n    });\n    expect(results).to.have.deep.property('methods', [{\n      name: 'onTap',\n      method: true,\n      variable: false,\n      pos: [8, 66]\n    }, {\n      name: 'onScroll',\n      method: true,\n      variable: false,\n      pos: [8, 90]\n    }], 'methods mismatch');\n    expect(results).to.have.deep.property('vars', [{\n      name: 'messages',\n      method: false,\n      variable: true,\n      pos: [2, 18]\n    }, {\n      name: 'show',\n      method: false,\n      variable: true,\n      pos: [5, 17]\n    }, {\n      name: 'childView',\n      method: false,\n      variable: true,\n      pos: [6, 24]\n    }, {\n      name: 'child',\n      method: false,\n      variable: true,\n      pos: [6, 36]\n    }, {\n      name: 'disX',\n      method: false,\n      variable: true,\n      pos: [8, 46]\n    }, {\n      name: 'logicLeft',\n      method: false,\n      variable: true,\n      pos: [9, 23]\n    }, {\n      name: 'logicRight',\n      method: false,\n      variable: true,\n      pos: [9, 36]\n    }], 'variables mismatch');\n    expect(results.customizedComponents[0]['show-scroller']).to.have.deep.property('props', [{\n      event: false,\n      name: 'scrollX',\n      rawName: 'scroll-x',\n      prop: true,\n      pos: [8, 34]\n    }], 'customized component properties check fail');\n\n    expect(results.customizedComponents[0]['show-scroller']).to.have.deep.property('events', [{\n      name: 'tap',\n      event: true,\n      pos: [8, 61],\n      prop: false\n    }, {\n      name: 'onscroll',\n      event: true,\n      pos: [8, 80],\n      prop: false\n    }]);\n  });\n\n  it('should pass template ast parse process: vue', async function() {\n    let filepath = '../docs/check/success/index-lib-template-vue.cml';\n    let {parseResults, filepath: fullFilePath} = await getParseResults(filepath);\n    let usingComponents = jsonAstParser.getUsingComponents(parseResults.json.obj, fullFilePath)\n    let results = templateAstParser.getParseResults(parseResults.template.ast, {\n      usingComponents: Object.keys(usingComponents),\n      platform: 'vue'\n    });\n    expect(results).to.have.deep.property('methods', [{\n      name: 'onTap',\n      method: true,\n      variable: false,\n      pos: [8, 57]\n    }, {\n      name: 'onScroll',\n      method: true,\n      variable: false,\n      pos: [8, 81]\n    }], 'methods mismatch');\n    expect(results).to.have.deep.property('vars', [{\n      name: 'messages',\n      method: false,\n      variable: true,\n      pos: [2, 32]\n    }, {\n      name: 'show',\n      method: false,\n      variable: true,\n      pos: [5, 15]\n    }, {\n      name: 'childView',\n      method: false,\n      variable: true,\n      pos: [6, 23]\n    }, {\n      name: 'child',\n      method: false,\n      variable: true,\n      pos: [6, 35]\n    }, {\n      name: 'disX',\n      method: false,\n      variable: true,\n      pos: [8, 41]\n    }], 'variables mismatch');\n    expect(results.customizedComponents[0]['show-scroller']).to.have.deep.property('props', [{\n      event: false,\n      name: 'scrollX',\n      rawName: 'scroll-x',\n      prop: true,\n      pos: [8, 31]\n    }], 'customized component properties check fail');\n\n    expect(results.customizedComponents[0]['show-scroller']).to.have.deep.property('events', [{\n      name: 'tap',\n      event: true,\n      pos: [8, 52],\n      prop: false\n    }, {\n      name: 'onscroll',\n      event: true,\n      pos: [8, 71],\n      prop: false\n    }]);\n  });\n});\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/checker/template.test.js",
    "content": "const path = require('path');\nconst chai = require('chai');\nconst expect = chai.expect;\nconst config = require('../../../config');\nconst linters = require('../../../linters');\nconst checkers = require('../../../checkers');\nconst utils = require('../../../utils');\n\nasync function getParseResults(filepath) {\n  let parts = {};\n  let parseResults = {};\n  filepath = path.resolve(__dirname, filepath);\n\n  parts = utils.getCmlParts(filepath);\n  parseResults.script = await linters.scriptlint(parts.script);\n  parseResults.json = await linters.jsonlint(parts.json);\n  parseResults.template = await linters.templatelint(parts.template, parseResults.json.obj);\n\n  return {parseResults, filepath};\n}\n\nfunction resortIssues(issues = []) {\n  return issues.sort((pre, next) => {\n    return pre.line * 1000 + pre.column - next.line * 1000 - next.column;\n  });\n}\n\ndescribe('template check', function() {\n  let scrollerPath = path.resolve(__dirname, '../docs/components/scroller/scroller.interface');\n\n  before(function() {\n    config.init(path.resolve(__dirname));\n  });\n\n  describe('template language: cml', async function() {\n    it('should report variable and method not defined error', async function() {\n      let filepath = '../docs/check/fail/index-vars-methods-cml.cml';\n      let {parseResults, filepath: fullFilePath} = await getParseResults(filepath);\n      let templateChecker = new checkers.Template(fullFilePath, parseResults);\n      expect(resortIssues(templateChecker.check())).to.be.an.instanceOf(Array).to.deep.equal([{\n        line: 2,\n        column: 17,\n        msg: 'variable: \"showFirstView\" is not defined.',\n        token: 'showFirstView'\n      }, {\n        line: 2,\n        column: 33,\n        msg: 'variable: \"show\" is not defined.',\n        token: 'show'\n      }, {\n        line: 2,\n        column: 40,\n        msg: 'variable: \"hidden\" is not defined.',\n        token: 'hidden'\n      }, {\n        line: 3,\n        column: 23,\n        msg: 'method: \"onTap\" is not defined.',\n        token: 'onTap'\n      }]);\n    });\n\n    it('should report props and events not defined error', async function() {\n      let filepath = '../docs/check/fail/index-props-events-cml.cml';\n      let {parseResults, filepath: fullFilePath} = await getParseResults(filepath);\n      let templateChecker = new checkers.Template(fullFilePath, parseResults);\n      expect(resortIssues(templateChecker.check())).to.be.an.instanceOf(Array).to.deep.equal([{\n        line: 2,\n        column: 43,\n        msg: `The property \"top-offset\" is not a property of component \"show-scroller\" which path is: ${scrollerPath}`,\n        token: 'top-offset'\n      }, {\n        line: 2,\n        column: 104,\n        msg: `The event \"scrolltotop\" is not defined in component \"show-scroller\" which path is: ${scrollerPath}`,\n        token: 'scrolltotop'\n      }]);\n    });\n  });\n\n  describe('template language: vue', async function() {\n    it('should report variable and method not defined error', async function() {\n      let filepath = '../docs/check/fail/index-vars-methods-vue.cml';\n      let {parseResults, filepath: fullFilePath} = await getParseResults(filepath);\n      let templateChecker = new checkers.Template(fullFilePath, parseResults);\n      expect(resortIssues(templateChecker.check())).to.be.an.instanceOf(Array).to.deep.equal([{\n        line: 2,\n        column: 15,\n        msg: 'variable: \"showFirstView\" is not defined.',\n        token: 'showFirstView'\n      }, {\n        line: 2,\n        column: 31,\n        msg: 'variable: \"show\" is not defined.',\n        token: 'show'\n      }, {\n        line: 2,\n        column: 38,\n        msg: 'variable: \"hidden\" is not defined.',\n        token: 'hidden'\n      }, {\n        line: 2,\n        column: 65,\n        msg: 'variable: \"font\" is not defined.',\n        token: 'font'\n      }, {\n        line: 3,\n        column: 21,\n        msg: 'method: \"onTap\" is not defined.',\n        token: 'onTap'\n      }]);\n    });\n\n    it('should report props and events not defined error', async function() {\n      let filepath = '../docs/check/fail/index-props-events-vue.cml';\n      let {parseResults, filepath: fullFilePath} = await getParseResults(filepath);\n      let templateChecker = new checkers.Template(fullFilePath, parseResults);\n      expect(resortIssues(templateChecker.check())).to.be.an.instanceOf(Array).to.deep.equal([{\n        line: 4,\n        column: 12,\n        msg: `The property \"top-offset\" is not a property of component \"show-scroller\" which path is: ${scrollerPath}`,\n        token: 'top-offset'\n      }, {\n        line: 6,\n        column: 10,\n        msg: `The event \"scrolltotop\" is not defined in component \"show-scroller\" which path is: ${scrollerPath}`,\n        token: 'scrolltotop'\n      }, {\n        line: 7,\n        column: 15,\n        msg: `The property \"data-show\" is not a property of component \"show-scroller\" which path is: ${scrollerPath}`,\n        token: 'data-show'\n      }]);\n    });\n  });\n});\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/check/fail/index-props-events-cml.cml",
    "content": "<template lang=\"cml\">\n  <show-scroller bottom-offset=\"{{true}}\" top-offset=\"{{false}}\" c-bind:scrolltobottom=\"onTrue\" c-bind:scrolltotop=\"onFlase\"></show-scroller>\n</template>\n\n<script>\n  class App {\n    data = {\n    }\n    created(res) {\n\n    }\n    computed = {\n\n    }\n\n    methods =  {\n      onTrue() {\n        return true;\n      },\n      onFlase() {\n        return true;\n      }\n    }\n  }\n  export default new App();\n</script>\n\n<style scoped>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"show-scroller\": \"../../components/scroller/scroller\"\n    }\n  },\n  \"weex\": {\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/check/fail/index-props-events-vue.cml",
    "content": "<template lang=\"vue\">\n  <show-scroller \n    :bottom-offset=\"true\" \n    v-bind:top-offset=\"false\" \n    @scrolltobottom=\"onTrue\" \n    v-on:scrolltotop=\"onFlase\"\n    v-bind=\"{'data-show': true}\"\n  ></show-scroller>\n</template>\n\n<script>\n  class App {\n    data = {\n    }\n    created(res) {\n\n    }\n    computed = {\n\n    }\n\n    methods =  {\n      onTrue() {\n        return true;\n      },\n      onFlase() {\n        return true;\n      }\n    }\n  }\n  export default new App();\n</script>\n\n<style scoped>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"show-scroller\": \"../../components/scroller/scroller\"\n    }\n  },\n  \"weex\": {\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/check/fail/index-props-methods-polymorphic.cml",
    "content": "<template lang=\"cml\">\n\n</template>\n\n<script>\n  class App {\n    data = {\n      \n    }\n    created(res) {\n\n    }\n    computed = {\n    }\n\n    methods =  {\n    }\n  }\n  export default new App();\n</script>\n\n<style scoped>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  },\n  \"weex\": {\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/check/fail/index-props-methods-single.cml",
    "content": "<template lang=\"cml\">\n\n</template>\n\n<script>\n  class App {\n    data = {\n      \n    }\n    created(res) {\n\n    }\n    computed = {\n    }\n\n    methods =  {\n    }\n  }\n  export default new App();\n</script>\n\n<style scoped>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  },\n  \"weex\": {\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/check/fail/index-vars-events.cml",
    "content": "<template lang=\"cml\">\n  <view c-if=\"{{showFirstView}}\">\n    <view c-bind:tap=\"onTap\"></view>\n  </view>\n</template>\n\n<script>\n  class App {\n    data = {\n    }\n    created(res) {\n\n    }\n    computed = {\n    }\n\n    methods =  {\n    }\n  }\n  export default new App();\n</script>\n\n<style scoped>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  },\n  \"weex\": {\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/check/fail/index-vars-methods-cml.cml",
    "content": "<template lang=\"cml\">\n  <view c-if=\"{{showFirstView ? show : hidden}}\">\n    <view c-bind:tap=\"onTap\"></view>\n  </view>\n</template>\n\n<script>\n  class App {\n    data = {\n    }\n    created(res) {\n\n    }\n    computed = {\n    }\n\n    methods =  {\n    }\n  }\n  export default new App();\n</script>\n\n<style scoped>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  },\n  \"weex\": {\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/check/fail/index-vars-methods-vue.cml",
    "content": "<template lang=\"vue\">\n  <view v-if=\"showFirstView ? show : hidden\" :style=\"{fontSize: font + 'px'}\">\n    <view v-on:tap=\"onTap\"></view>\n  </view>\n</template>\n\n<script>\n  class App {\n    data = {\n    }\n    created(res) {\n\n    }\n    computed = {\n    }\n\n    methods =  {\n    }\n  }\n  export default new App();\n</script>\n\n<style scoped>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  },\n  \"weex\": {\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/check/success/index-lib-check-class.cml",
    "content": "<template lang=\"cml\">\n  <view c-if=\"{{showFirstView}}\">\n    <view c-bind:tap=\"onTap\"></view>\n  </view>\n</template>\n\n<script>\n  class App {\n    props = {\n      showFirstView: {\n        type: Boolean,\n        default: true\n      }\n    }\n    data = {\n      dataOne: true\n    }\n    created(res) {\n\n    }\n    computed = {\n    }\n\n    methods =  {\n      onTap() {\n        return true;\n      }\n    }\n  }\n  export default new App();\n</script>\n\n<style scoped>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"show-component\": \"../../components/show-component/scroller\"\n    }\n  },\n  \"weex\": {\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/check/success/index-lib-check-export.cml",
    "content": "<template lang=\"cml\">\n  <view c-if=\"{{showFirstView}}\">\n    <view c-bind:tap=\"onTap\"></view>\n  </view>\n</template>\n\n<script>\n  export default {\n    props: {\n      showFirstView: {\n        type: Boolean,\n        default: true\n      }\n    },\n    data: {\n      dataOne: true\n    },\n    created(res) {\n\n    },\n    computed: {\n    },\n    methods:  {\n      onTap() {\n        return true;\n      }\n    }\n  };\n</script>\n\n<style scoped>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"show-component\": \"../../components/show-component/scroller\"\n    }\n  },\n  \"weex\": {\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/check/success/index-lib-check-implements.cml",
    "content": "<template>\n  <view class=\"warning\" c-bind:tap=\"clickOpen\" data-url=\"{{data.url}}\">\n    <view class=\"half\">\n      <image class=\"tips\" src=\"./mess.png\" />\n      <rich-text class=\"warning-text\" options=\"{{data.notify_title}}\" />\n    </view>\n    <view class=\"half half-right\">\n      <text class=\"immediately-view\">立即查看</text>\n      <image class=\"arrow\" src=\"https://static.chameleon.com/pinche/gift/resource/0c4a8d1daa93d7966f15db1fa84c7307-arrow.png\" />\n    </view>\n  </view>\n</template>\n\n<script>\nimport cml from 'chameleon-api';\nimport mainInterface from '../../pages/index/index.interface';\nimport { host, sendLog } from '../../config';\n\nclass Toast implements ToastInterface {\n  props = {\n    data: {\n      type: Object,\n      default: null,\n    },\n    userInfo: {\n      type: Object,\n      default: null,\n    },\n  }\n  data = {\n    MAP: {\n      dina: 'dina',\n    },\n  }\n  beforeCreate() {\n    sendLog('beat_p_weizhang_sw');\n  }\n  methods = {\n    clickOpen(e) {\n      cml.post({\n        url: `${host}/beatles/homeapi/home/driver/click`,\n        data: {\n          action: 1,\n          uid: this.userInfo.uid,\n          token: this.userInfo.token,\n        },\n      }).then(() => {\n        this.$cmlEmit('cleared');\n      });\n\n      this.open(e.currentTarget.dataset.url);\n      sendLog('beat_p_weizhang_ck');\n    },\n    open(url) {\n      const newUrl = url.includes('?') ? `${url}&token=${this.userInfo.token}` : `${url}?token=${this.userInfo.token}`;\n      mainInterface.open(newUrl);\n    },\n  }\n}\n\n\n\nexport default new Toast()\n</script>\n\n<style scoped>\n.warning {\n  height: 100px;\n  background-color: white;\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  padding-left: 34px;\n  border-radius: 4px;\n  padding-right: 32px;\n  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.08);\n  margin-top: 20px\n}\n\n.tips {\n  width: 24px;\n  height: 27px;\n}\n\n.arrow {\n  width: 15px;\n  height: 25px;\n  margin-left: 17px;\n}\n\n.warning-text {\n  margin-left: 11px;\n}\n\n.half {\n  flex: 1;\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n}\n\n.half-right {\n  justify-content: flex-end;\n}\n\n.immediately-view {\n  font-size: 24px;\n  color: grey;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"rich-text\": \"../../components/richText/richText\",\n      \"rich-text-title\" : \"../../components/richTextTitle/richTextTitle\"\n    }\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    },\n    \"component\": true\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/check/success/index-lib-check-plugin.cml",
    "content": "<template>\n  <view>\n    <c-radio></c-radio>\n    <c-plugin></c-plugin>\n  </view>\n</template>\n\n<script>\n\nclass Toast implements ToastInterface {\n  props = {\n\n  }\n  data = {\n\n  }\n  beforeCreate() {\n\n  }\n  methods = {\n\n  }\n}\n\nexport default new Toast()\n</script>\n\n<style scoped>\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-radio\": \"../../components/radio/radio\",\n      \"c-plugin\": \"plugin://components/radio/radio\"\n    }\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    },\n    \"component\": true\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/check/success/index-lib-check-vue-class.cml",
    "content": "<template lang=\"vue\">\n  <view v-if=\"showFirstView\">\n    <view @tap=\"onTap\"></view>\n  </view>\n</template>\n\n<script>\n  class App {\n    props = {\n      showFirstView: {\n        type: Boolean,\n        default: true\n      }\n    }\n    data = {\n      dataOne: true\n    }\n    created(res) {\n\n    }\n    computed = {\n    }\n\n    methods =  {\n      onTap() {\n        return true;\n      }\n    }\n  }\n  export default new App();\n</script>\n\n<style scoped>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"show-component\": \"../../components/show-component/scroller\"\n    }\n  },\n  \"weex\": {\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/check/success/index-lib-js-class.cml",
    "content": "<template lang=\"cml\">\n  <view></view>\n</template>\n\n<script>\n  class App {\n    props = {\n      show: {\n        type: Boolean,\n        default: true\n      }\n    }\n    data = {\n      dataOne: true\n    }\n    created(res) {\n\n    }\n    computed = {\n      computedOne() {\n        return true;\n      },\n      computedTwo: function () {\n        return true;\n      }\n    }\n\n    methods =  {\n      onTap() {\n        return true;\n      },\n      onClick: function(e) {\n\n      }\n    }\n  }\n  export default new App();\n</script>\n\n<style scoped>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  },\n  \"weex\": {\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/check/success/index-lib-js-export.cml",
    "content": "<template lang=\"cml\">\n  <view></view>\n</template>\n\n<script>\n  import { mapGetters } from 'chameleon-store';\n  import { gettersShow, getterHide } from 'getter-types';\n\n  export default {\n    props: {\n      show: {\n        type: Boolean,\n        default: true\n      }\n    },\n    data: {\n      dataOne: true\n    },\n    created(res) {\n\n    },\n    computed: {\n      computedOne() {\n        return true;\n      },\n      computedTwo: function () {\n        return true;\n      },\n      ...mapGetters({\n        computedShow: gettersShow,\n        getterHide\n      })\n    },\n    methods:  {\n      onTap() {\n        return true;\n      },\n      onClick: function(e) {\n        return true;\n      }\n    }\n  };\n</script>\n\n<style scoped>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  },\n  \"weex\": {\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/check/success/index-lib-json-polymorphic.cml",
    "content": "<template>\n  <c-scroller></c-scroller>\n</template>\n\n<script>\n\nclass Toast implements ToastInterface {\n  props = {\n\n  }\n  data = {\n\n  }\n  beforeCreate() {\n\n  }\n  methods = {\n\n  }\n}\n\nexport default new Toast()\n</script>\n\n<style scoped>\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-scroller\": \"../../components/scroller/scroller\"\n    }\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    },\n    \"component\": true\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/check/success/index-lib-json-single.cml",
    "content": "<template>\n  <c-radio></c-radio>\n</template>\n\n<script>\n\nclass Toast implements ToastInterface {\n  props = {\n\n  }\n  data = {\n\n  }\n  beforeCreate() {\n\n  }\n  methods = {\n\n  }\n}\n\nexport default new Toast()\n</script>\n\n<style scoped>\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-radio\": \"../../components/radio/radio\"\n    }\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    },\n    \"component\": true\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/check/success/index-lib-template-cml.cml",
    "content": "<template lang=\"cml\">\n  <view c-for=\"{{messages}}\" c-for-item=\"msg\" c-for-index=\"index\">\n    <text>{{msg}}</text>\n  </view>\n  <view c-if=\"{{show}}\">\n    <view data-attr=\"{{childView ? child : 'strChild'}}\"></view>\n  </view>\n  <show-scroller c-if=\"{{true}}\" scroll-x=\"{{disX}}\" c-bind:tap=\"onTap\" c-bind:onscroll=\"onScroll\"></show-scroller>\n  <view logic-prop=\"{{logicLeft || logicRight}}\"></view>\n</template>\n\n<script>\n\nclass Toast implements ToastInterface {\n  props = {\n\n  }\n  data = {\n\n  }\n  beforeCreate() {\n\n  }\n  methods = {\n\n  }\n}\n\nexport default new Toast()\n</script>\n\n<style scoped>\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"show-scroller\": \"../../components/scroller/scroller\"\n    }\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    },\n    \"component\": true\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/check/success/index-lib-template-vue.cml",
    "content": "<template lang=\"vue\">\n  <view v-for=\"(msg, index) in messages\">\n    <text>{{msg}}</text>\n  </view>\n  <view v-if=\"show\">\n    <view :data-attr=\"childView ? child : 'strChild'\"></view>\n  </view>\n  <show-scroller v-if=\"true\" :scroll-x=\"disX\" v-on:tap=\"onTap\" v-once:onscroll=\"onScroll\"></show-scroller>\n</template>\n\n<script>\n\nclass Toast implements ToastInterface {\n  props = {\n\n  }\n  data = {\n\n  }\n  beforeCreate() {\n\n  }\n  methods = {\n\n  }\n}\n\nexport default new Toast()\n</script>\n\n<style scoped>\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"show-scroller\": \"../../components/scroller/scroller\"\n    }\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    },\n    \"component\": true\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/components/c-checkbox/c-checkbox.cml",
    "content": "<template>\n<view class=\"cml-checkbox\">\n  <view class=\"cml-checkbox-wrap\" c-bind:tap=\"changeCheck\">\n    <view class=\"cml-checkbox-check\" style=\"{{ checkStyle }}\">\n      <view class=\"{{ checkClass }}\">\n        <image class=\"inner-icon\" src=\"{{ checkImg }}\" />\n      </view>\n    </view>\n    <text class=\"cml-checkbox-label\" >{{ label }}</text>\n  </view>\n</view>\n</template>\n<script>\nclass Checkbox   {\n  props = {\n    checked: {\n      type: Boolean,\n      default: false\n    },\n    label: {\n      type: String\n    },\n    disabled: {\n      type: Boolean,\n      default: false\n    },\n    position: {\n      type: String,\n      default: 'left'\n    },\n    groupIndex: {\n      type: Number,\n      default: -1\n    }\n  }\n  data = {\n    checkedImg: require('./images/selected.png'),\n    uncheckImg: require('./images/unselected.png'),\n    innerChecked:false\n  }\n\n  computed = {\n    checkStyle () {\n      let style = '';\n      if (this.disabled) {\n        style += 'opacity:0.5;'\n      }\n      if (this.position == 'right') {\n        style += 'position:absolute;right:0;margin-right:45px;'\n      } else {\n        style += 'margin-right:13px;'\n      }\n      return style;\n    },\n    checkImg () {\n      return this.innerChecked? this.checkedImg: this.uncheckImg;\n    },\n    checkClass () {\n      if (this.disabled) {\n        return  'cml-checkbox-disabled'\n      }\n      return this.innerChecked? 'cml-checkbox-checked': 'cml-checkbox-uncheck';\n    },\n  }\n\n  watch  = {\n    checked(newChecked) {\n      this.innerChecked = newChecked;\n    }\n  }\n\n  methods = {\n    changeCheck () {\n      if (this.disabled) return;\n      this.innerChecked = !this.innerChecked\n      let value = {\n        value: this.innerChecked\n      }\n      if (this.groupIndex !== -1) {\n        value.index = this.groupIndex\n      }\n\n      this.$cmlEmit('changeevent', value);\n    }\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n    let { checked } = this\n    this.innerChecked = checked\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new Checkbox();\n</script>\n<style scoped>\n.cml-checkbox {\n  margin: 10px;\n}\n.cml-checkbox-wrap {\n  padding:11px 0;\n  word-break: break-word;\n  word-wrap: break-word;\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  line-height: 1.5;\n  position: relative;\n}\n.cml-checkbox-checked {\n  width:32px;\n  height:32px;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n}\n.cml-checkbox-uncheck {\n  width:32px;\n  height:32px;\n  display:flex;\n  justify-content: center;\n  align-items: center;\n}\n\n.cml-checkbox-label {\n  color:#666;\n  font-weight: 400;\n  font-size: 32px;\n}\n.inner-icon {\n  width:32px;\n  height:32px;\n}\n</style>\n<script cml-type=\"json\">\n{\n    \"base\": {\n        \"usingComponents\": {\n        }\n    },\n    \"wx\": {\n        \"navigationBarTitleText\": \"index\",\n        \"backgroundTextStyle\": \"dark\",\n        \"backgroundColor\": \"#E2E2E2\",\n        \"component\": true\n\n    }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/components/radio/radio.cml",
    "content": "<template>\n  <view></view>\n</template>\n<script>\nclass Radio  {\n  props = {\n\t  checked: {\n\t\t  type: Boolean,\n\t\t  default: false\n\t  }\n  }\n\n  data = {\n\n  }\n\n  methods = {\n    check() {\n\t\t\tthis.$cmlEmit('radiocheked', e.detail)\n      return true;\n    }\n  }\n}\nexport default new Radio;\n</script>\n<style scoped>\n\n</style>\n<script cml-type=\"json\">\n{\n\t\"base\": {\n\t\t\"usingComponents\": {\n\t\t}\n\t},\n\t\"wx\": {\n\t\t\"navigationBarTitleText\": \"index\",\n\t\t\"backgroundTextStyle\": \"dark\",\n\t\t\"backgroundColor\": \"#E2E2E2\",\n\t\t\"component\": true\n\t}\n}\n</script>"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/components/scroller/scroller.interface",
    "content": "<script cml-type=\"interface\">\n/*\n定义一个inteface用于描述组件的属性和事件\n1、 如果区分组件属性和事件？\n通过类型来区分，事件为函数类型，属性为非函数类型\n2、 如何定义组件属性\n给interface添加同名的属性即可，指定类型\n3、 如何定义组件事件\n以事件名称为key值给interface定义属性，该属性是一个函数类型，返回值为void，\n定义函数的第一个参数为自定义事件传递的detail对象类型\n*/\n\n//定义事件detail对象的参数\ntype scrollEventDetail = {\n  deltaX: Number,\n  deltaY: Number,\n  scrollHeight: Number,\n  scrollLeft: Number,\n  scrollTop: Number,\n  scrollWidth: Number\n}\n\ntype scrolltobottomEventDetail = {\n  direction: String\n}\n\ninterface ScrollerInterface {\n  cstyle: String,\n  bottomOffset: Number,\n  scrollDirection: String,\n  customscroll(eventDetail: scrollEventDetail): void;\n  scrolltobottom(eventDetail: scrolltobottomEventDetail): void;\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/components/scroller/scroller.web.cml",
    "content": "<template>\n  <scroller\n    ref=\"c-scroller\"\n    style=\"{{afterStyle}}\"\n    class=\"{{afterClass}}\"\n    show-scrollbar=\"false\"\n    scroll-direction=\"{{scrollDirection}}\"\n    loadmoreoffset=\"{{bottomOffset}}\"\n    offset-accuracy=\"10\"\n    c-bind:loadmore=\"onBottom\"\n    c-bind:scroll=\"onScroll\"\n  >\n    <slot>\n\n    </slot>\n  </scroller>\n</template>\n<script>\n class Scroller implements ScrollerInterface {\n    props = {\n      cstyle: {\n        type: String,\n        default: ''\n      },\n      bottomOffset: {\n        // 距底部/右边多远时（单位px），触发 scrolltolower 事件\n        type: Number,\n        default: 0\n      },\n      scrollDirection: {\n        // 可选为 horizontal 或者 vertical，默认值为 vertical 。定义滚动的方向。\n        type: String,\n        default: 'vertical'\n      }\n    }\n    data = {\n    }\n    computed ={\n      afterStyle() {\n        // let styl = this.scrollDirection === 'horizontal'\n        //         ? `${this.cstyle};flex-direction:row;`\n        //         : `${this.cstyle};flex-direction:column;`\n\n        return this.$cmlStyle('flex:1;' + this.cstyle)\n      },\n      afterClass() {\n        return this.scrollDirection === 'horizontal'\n                ? 'flex-row'\n                : 'flex-column'\n      }\n    }\n    watch = {\n    }\n    methods = {\n      onScroll(e) {\n        let detail = e.detail;\n        detail.deltaX = detail.deltaX || 0;\n        detail.deltaY = detail.deltaY || 0;\n        this.$cmlEmit('customscroll', detail)\n      },\n      onBottom(e) {\n        this.$refs['c-scroller'].resetLoadmore()\n\n        this.$cmlEmit('scrolltobottom', e.detail)\n      }\n    }\n  }\n\n  export default new Scroller();\n\n</script>\n\n<style scoped>\n.flex-row {\n  flex-direction: row;\n}\n.flex-column {\n  flex-direction: column;\n}\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  }\n}\n</script>\n\n\n\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/components/scroller/scroller.weex.cml",
    "content": "<template>\n  <scroller\n    ref=\"c-scroller\"\n    style=\"{{afterStyle}}\"\n    class=\"{{afterClass}}\"\n    show-scrollbar=\"false\"\n    scroll-direction=\"{{scrollDirection}}\"\n    loadmoreoffset=\"{{bottomOffset}}\"\n    offset-accuracy=\"10\"\n    c-bind:loadmore=\"onBottom\"\n    c-bind:scroll=\"onScroll\"\n  >\n    <slot>\n\n    </slot>\n  </scroller>\n</template>\n<script>\n\n class Scroller implements ScrollerInterface {\n    props = {\n      cstyle: {\n        type: String,\n        default: ''\n      },\n      bottomOffset: {\n        // 距底部/右边多远时（单位px），触发 scrolltolower 事件\n        type: Number,\n        default: 0\n      },\n      scrollDirection: {\n        // 可选为 horizontal 或者 vertical，默认值为 vertical 。定义滚动的方向。\n        type: String,\n        default: 'vertical'\n      }\n    }\n    data = {\n    }\n    computed ={\n      afterStyle() {\n        // let styl = this.scrollDirection === 'horizontal'\n        //         ? `${this.cstyle};flex-direction:row;`\n        //         : `${this.cstyle};flex-direction:column;`\n\n        return this.$cmlStyle('flex:1;' + this.cstyle)\n      },\n      afterClass() {\n        return this.scrollDirection === 'horizontal'\n                ? 'flex-row'\n                : 'flex-column'\n      }\n    }\n    watch = {\n    }\n    methods = {\n      onScroll(e) {\n        let detail = e.detail;\n        detail.deltaX = detail.deltaX || 0;\n        detail.deltaY = detail.deltaY || 0;\n        this.$cmlEmit('customscroll', detail)\n      },\n      onBottom(e) {\n        this.$refs['c-scroller'].resetLoadmore()\n\n        this.$cmlEmit('scrolltobottom', e.detail)\n      }\n    }\n\n  }\n\n  export default new Scroller();\n\n\n\n\n\n</script>\n\n<style scoped>\n.flex-row {\n  flex-direction: row;\n}\n.flex-column {\n  flex-direction: column;\n}\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/components/scroller/scroller.wx.cml",
    "content": "<template>\n  <scroll-view\n    scroll-x=\"{{ scrollDirection === 'horizontal' }}\"\n    scroll-y=\"{{ scrollDirection === 'vertical' }}\"\n    lower-threshold=\"{{bottomOffset}}\"\n    scroll-with-animation=\"true\"\n    enable-back-to-top=\"true\"\n    c-bind:scrolltolower=\"onBottom\"\n    c-bind:scroll=\"onScroll\"\n    class=\"cml-scroller\"\n    style=\"{{cmtStyle}}\"\n  >\n      <slot>\n\n      </slot>\n  </scroll-view>\n</template>\n<script>\n class Scroller implements ScrollerInterface {\n    props = {\n      cstyle: {\n        type: String,\n        default: ''\n      },\n      bottomOffset: {\n        // 距底部/右边多远时（单位px），触发 scrolltolower 事件\n        type: Number,\n        default: 0\n      },\n      scrollDirection: {\n        // 可选为 horizontal 或者 vertical，默认值为 vertical 。定义滚动的方向。\n        type: String,\n        default: 'vertical'\n      }\n    }\n    data = {\n      style: ''\n    }\n    computed = {\n      cmtStyle () {\n        return this.$cmlStyle(this.style + ';' + this.cstyle)\n      }\n    }\n    watch = {\n    }\n    methods = {\n      onScroll(e) {\n        let detail = e.detail;\n        detail.deltaX = detail.deltaX || 0;\n        detail.deltaY = detail.deltaY || 0;\n        this.$cmlEmit('customscroll', detail)\n      },\n      onBottom(e) {\n        this.$cmlEmit('scrolltobottom', e.detail)\n      }\n    }\n    mounted () {\n      let query = wx.createSelectorQuery().in(this);\n      query.select('.cml-scroller').boundingClientRect((rect) => {\n        if (rect) {\n          let windowHeight = wx.getSystemInfoSync().windowHeight\n          let height = windowHeight - rect.top\n          this.style = `height:${height*2}px;`\n        }\n      }).exec()\n    }\n  }\n\n  export default new Scroller();\n\n</script>\n\n<style scoped>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    },\n    \"component\": true\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/components/show-component/scroller.interface",
    "content": "<script cml-type=\"interface\">\n/*\n定义一个inteface用于描述组件的属性和事件\n1、 如果区分组件属性和事件？\n通过类型来区分，事件为函数类型，属性为非函数类型\n2、 如何定义组件属性\n给interface添加同名的属性即可，指定类型\n3、 如何定义组件事件\n以事件名称为key值给interface定义属性，该属性是一个函数类型，返回值为void，\n定义函数的第一个参数为自定义事件传递的detail对象类型\n*/\n\n//定义事件detail对象的参数\ntype scrollEventDetail = {\n  deltaX: Number,\n  deltaY: Number,\n  scrollHeight: Number,\n  scrollLeft: Number,\n  scrollTop: Number,\n  scrollWidth: Number\n}\n\ntype scrolltobottomEventDetail = {\n  direction: String\n}\n\ninterface ScrollerInterface {\n  cstyle: String,\n  bottomOffset: Number,\n  scrollDirection: String,\n  customscroll(eventDetail: scrollEventDetail): void;\n  scrolltobottom(eventDetail: scrolltobottomEventDetail): void;\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/components/show-component/scroller.web.cml",
    "content": "<template>\n  <scroller\n    ref=\"c-scroller\"\n    style=\"{{afterStyle}}\"\n    class=\"{{afterClass}}\"\n    show-scrollbar=\"false\"\n    scroll-direction=\"{{scrollDirection}}\"\n    loadmoreoffset=\"{{bottomOffset}}\"\n    offset-accuracy=\"10\"\n    c-bind:loadmore=\"onBottom\"\n    c-bind:scroll=\"onScroll\"\n  >\n    <slot>\n\n    </slot>\n  </scroller>\n</template>\n<script>\n class Scroller implements ScrollerInterface {\n    props = {\n      cstyle: {\n        type: String,\n        default: ''\n      },\n      bottomOffset: {\n        // 距底部/右边多远时（单位px），触发 scrolltolower 事件\n        type: Number,\n        default: 0\n      },\n      scrollDirection: {\n        // 可选为 horizontal 或者 vertical，默认值为 vertical 。定义滚动的方向。\n        type: String,\n        default: 'vertical'\n      }\n    }\n    data = {\n    }\n    computed ={\n      afterStyle() {\n        // let styl = this.scrollDirection === 'horizontal'\n        //         ? `${this.cstyle};flex-direction:row;`\n        //         : `${this.cstyle};flex-direction:column;`\n\n        return this.$cmlStyle('flex:1;' + this.cstyle)\n      },\n      afterClass() {\n        return this.scrollDirection === 'horizontal'\n                ? 'flex-row'\n                : 'flex-column'\n      }\n    }\n    watch = {\n    }\n    methods = {\n      onScroll(e) {\n        let detail = e.detail;\n        detail.deltaX = detail.deltaX || 0;\n        detail.deltaY = detail.deltaY || 0;\n        this.$cmlEmit('customscroll', detail)\n      },\n      onBottom(e) {\n        this.$refs['c-scroller'].resetLoadmore()\n\n        this.$cmlEmit('scrolltobottom', e.detail)\n      }\n    }\n  }\n\n  export default new Scroller();\n\n</script>\n\n<style scoped>\n.flex-row {\n  flex-direction: row;\n}\n.flex-column {\n  flex-direction: column;\n}\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  }\n}\n</script>\n\n\n\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/components/show-component/scroller.weex.cml",
    "content": "<template>\n  <scroller\n    ref=\"c-scroller\"\n    style=\"{{afterStyle}}\"\n    class=\"{{afterClass}}\"\n    show-scrollbar=\"false\"\n    scroll-direction=\"{{scrollDirection}}\"\n    loadmoreoffset=\"{{bottomOffset}}\"\n    offset-accuracy=\"10\"\n    c-bind:loadmore=\"onBottom\"\n    c-bind:scroll=\"onScroll\"\n  >\n    <slot>\n\n    </slot>\n  </scroller>\n</template>\n<script>\n\n class Scroller implements ScrollerInterface {\n    props = {\n      cstyle: {\n        type: String,\n        default: ''\n      },\n      bottomOffset: {\n        // 距底部/右边多远时（单位px），触发 scrolltolower 事件\n        type: Number,\n        default: 0\n      },\n      scrollDirection: {\n        // 可选为 horizontal 或者 vertical，默认值为 vertical 。定义滚动的方向。\n        type: String,\n        default: 'vertical'\n      }\n    }\n    data = {\n    }\n    computed ={\n      afterStyle() {\n        // let styl = this.scrollDirection === 'horizontal'\n        //         ? `${this.cstyle};flex-direction:row;`\n        //         : `${this.cstyle};flex-direction:column;`\n\n        return this.$cmlStyle('flex:1;' + this.cstyle)\n      },\n      afterClass() {\n        return this.scrollDirection === 'horizontal'\n                ? 'flex-row'\n                : 'flex-column'\n      }\n    }\n    watch = {\n    }\n    methods = {\n      onScroll(e) {\n        let detail = e.detail;\n        detail.deltaX = detail.deltaX || 0;\n        detail.deltaY = detail.deltaY || 0;\n        this.$cmlEmit('customscroll', detail)\n      },\n      onBottom(e) {\n        this.$refs['c-scroller'].resetLoadmore()\n\n        this.$cmlEmit('scrolltobottom', e.detail)\n      }\n    }\n\n  }\n\n  export default new Scroller();\n\n\n\n\n\n</script>\n\n<style scoped>\n.flex-row {\n  flex-direction: row;\n}\n.flex-column {\n  flex-direction: column;\n}\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/components/show-component/scroller.wx.cml",
    "content": "<template>\n  <scroll-view\n    scroll-x=\"{{ scrollDirection === 'horizontal' }}\"\n    scroll-y=\"{{ scrollDirection === 'vertical' }}\"\n    lower-threshold=\"{{bottomOffset}}\"\n    scroll-with-animation=\"true\"\n    enable-back-to-top=\"true\"\n    c-bind:scrolltolower=\"onBottom\"\n    c-bind:scroll=\"onScroll\"\n    class=\"cml-scroller\"\n    style=\"{{cmtStyle}}\"\n  >\n      <slot>\n\n      </slot>\n  </scroll-view>\n</template>\n<script>\n class Scroller implements ScrollerInterface {\n    props = {\n      cstyle: {\n        type: String,\n        default: ''\n      },\n      bottomOffset: {\n        // 距底部/右边多远时（单位px），触发 scrolltolower 事件\n        type: Number,\n        default: 0\n      },\n      scrollDirection: {\n        // 可选为 horizontal 或者 vertical，默认值为 vertical 。定义滚动的方向。\n        type: String,\n        default: 'vertical'\n      }\n    }\n    data = {\n      style: ''\n    }\n    computed = {\n      cmtStyle () {\n        return this.$cmlStyle(this.style + ';' + this.cstyle)\n      }\n    }\n    watch = {\n    }\n    methods = {\n      onScroll(e) {\n        let detail = e.detail;\n        detail.deltaX = detail.deltaX || 0;\n        detail.deltaY = detail.deltaY || 0;\n        this.$cmlEmit('customscroll', detail)\n      },\n      onBottom(e) {\n        this.$cmlEmit('scrolltobottom', e.detail)\n      }\n    }\n    mounted () {\n      let query = wx.createSelectorQuery().in(this);\n      query.select('.cml-scroller').boundingClientRect((rect) => {\n        if (rect) {\n          let windowHeight = wx.getSystemInfoSync().windowHeight\n          let height = windowHeight - rect.top\n          this.style = `height:${height*2}px;`\n        }\n      }).exec()\n    }\n  }\n\n  export default new Scroller();\n\n</script>\n\n<style scoped>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    },\n    \"component\": true\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/docs/components/single/single.cml",
    "content": "<template>\n  <view></view>\n</template>\n<script>\nclass Radio  {\n  props = {\n\n  }\n\n  data = {\n\n  }\n\n  methods = {\n    \n  }\n}\nexport default Radio;\n</script>\n<style scoped>\n\n</style>\n<script cml-type=\"json\">\n{\n    \"base\": {\n        \"usingComponents\": {\n        }\n    },\n    \"wx\": {\n        \"navigationBarTitleText\": \"index\",\n        \"backgroundTextStyle\": \"dark\",\n        \"backgroundColor\": \"#E2E2E2\",\n        \"component\": true\n    }\n}\n</script>"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/fail/built-in-embed-rule-excludes-error.js",
    "content": "module.exports = [{\n  desc: 'should fail built-in components emebed rule: excludes check',\n  input: {\n    part: {\n      line: 0,\n      rawContent: '<template>\\n<scroller>\\n<textarea></textarea>\\n</scroller>\\n</template>',\n      params: {\n        lang: ''\n      }\n    },\n    jsonAst: {}\n  },\n  output: {\n    start: 0,\n    messages: [{\n      line: 2,\n      column: 1,\n      msg: 'tag \"scroller\" can not have  \"textarea\" as it\\'s direct children or descendant(s), and element in this list: \"textarea or video\" is forbidden as well',\n      token: ''\n    }]\n  }\n}];\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/fail/built-in-embed-rule-includes-error.js",
    "content": "module.exports = [{\n  desc: 'should fail built-in components emebed rule: includes check',\n  input: {\n    part: {\n      line: 0,\n      rawContent: '<template>\\n<video>\\n<text></text><textarea></textarea>\\n</video>\\n</template>',\n      params: {\n        lang: ''\n      }\n    },\n    jsonAst: {}\n  },\n  output: {\n    start: 0,\n    messages: [{\n      line: 2,\n      column: 1,\n      msg: 'tag \"video\" can only have \"text\" as it\\'s direct children or descendant(s), therefor tag \"textarea\" is not allowed as it\\'s direct children or descendant(s)',\n      token: ''\n    }]\n  }\n}];\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/fail/built-in-props-error.js",
    "content": "module.exports = [{\n  desc: 'should fail built-in props check',\n  input: {\n    part: {\n      line: 0,\n      rawContent: \"<template lang='cml'>\\n<button close-type='{{shouldClose}}' c-bind:up='{{onUp}}'></button>\\n</template>\",\n      params: {\n        lang: ''\n      }\n    },\n    jsonAst: {}\n  },\n  output: {\n    start: 0,\n    messages: [{\n      line: 2,\n      column: 9,\n      msg: 'component \"button\" doesn\\'t have a defined property named \"close-type\"',\n      token: 'button'\n    }, {\n      line: 2,\n      column: 38,\n      msg: 'component \"button\" doesn\\'t have a defined event named \"up\"',\n      token: 'button'\n    }]\n  }\n}];\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/fail/built-in-props-lang-vue-error.js",
    "content": "module.exports = [{\n  desc: 'should fail built-in props check with vue-like template language',\n  input: {\n    part: {\n      line: 0,\n      rawContent: \"<template lang='vue'>\\n<button v-bind:close-type='{{shouldClose}}' @up='{{onUp}}'></button>\\n</template>\",\n      params: {\n        lang: 'vue'\n      }\n    },\n    jsonAst: {}\n  },\n  output: {\n    start: 0,\n    messages: [{\n      line: 2,\n      column: 9,\n      msg: 'component \"button\" doesn\\'t have a defined property named \"close-type\"',\n      token: 'button'\n    }, {\n      line: 2,\n      column: 45,\n      msg: 'component \"button\" doesn\\'t have a defined event named \"up\"',\n      token: 'button'\n    }]\n  }\n}];\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/fail/directive-cml-error.js",
    "content": "module.exports = [{\n  desc: 'should fail directive check with cml template language',\n  input: {\n    part: {\n      line: 0,\n      rawContent: \"<template lang='cml'>\\n<view v-if='{{true}}' v-bind:onclick='onClick'></view>\\n</template>\",\n      params: {\n        lang: 'cml'\n      }\n    },\n    jsonAst: {}\n  },\n  output: {\n    start: 0,\n    messages: [{\n      line: 2,\n      column: 7,\n      msg: 'directive \"v-if\" is not allowed to be used in this template, as the template language is set to \"cml\"',\n      token: 'v-if'\n    }, {\n      line: 2,\n      column: 23,\n      msg: 'directive \"v-bind\" is not allowed to be used in this template, as the template language is set to \"cml\"',\n      token: 'v-bind'\n    }]\n  }\n}];\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/fail/directive-vue-error.js",
    "content": "module.exports = [{\n  desc: 'should fail directive check with vue-like template language',\n  input: {\n    part: {\n      line: 0,\n      rawContent: \"<template lang='vue'>\\n<view c-if='{{true}}' c-bind:onclick='onClick'></view>\\n</template>\",\n      params: {\n        lang: 'vue'\n      }\n    },\n    jsonAst: {}\n  },\n  output: {\n    start: 0,\n    messages: [{\n      line: 2,\n      column: 7,\n      msg: 'directive \"c-if\" is not allowed to be used in this template, as the template language is set to \"vue\"',\n      token: 'c-if'\n    }, {\n      line: 2,\n      column: 23,\n      msg: 'directive \"c-bind\" is not allowed to be used in this template, as the template language is set to \"vue\"',\n      token: 'c-bind'\n    }]\n  }\n}];\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/fail/index.js",
    "content": "const bulk = require('bulk-require');\nconst casesExports = bulk(__dirname, '!(index).js');\n\nconst entries = Object.keys(casesExports);\n\nmodule.exports = entries.reduce((cases, currentEntry) => {\n  return cases.concat(casesExports[currentEntry]);\n}, []);\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/fail/lang-error.js",
    "content": "module.exports = [{\n  desc: 'should fail template lang error',\n  input: {\n    part: {\n      line: 0,\n      rawContent: \"<template lang='web'></template>\",\n      params: {\n        lang: ''\n      },\n      file: '/src/app.cml'\n    },\n    jsonAst: {}\n  },\n  output: {\n    start: 0,\n    messages: [{\n      line: 1,\n      column: 16,\n      msg: 'the tag template lang attribute: \"web\" is not valid',\n      token: ''\n    }]\n  }\n}];\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/fail/origin-component-cml-directive-forbiden-error.js",
    "content": "module.exports = [{\n  desc: 'should fail chamelon built-in directives check for origin components',\n  input: {\n    part: {\n      line: 0,\n      rawContent: \"<template lang='cml'>\\n<origin-view c-bind:onclick='onClick'></origin-view>\\n</template>\",\n      params: {\n        lang: 'cml'\n      }\n    },\n    jsonAst: {}\n  },\n  output: {\n    start: 0,\n    messages: [{\n      line: 2,\n      column: 14,\n      msg: 'tag \"origin-view\" is prefixed with \"origin-\" directive, so it\\'s not allowed to use a chameleon built-in directive:\"c-bind\"',\n      token: 'origin-view'\n    }]\n  }\n}];\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/fail/origin-component-skip-rules-error.js",
    "content": "module.exports = [{\n  desc: 'should fail origin component skip emebed rule: excludes check',\n  input: {\n    part: {\n      line: 0,\n      rawContent: '<template>\\n<origin-scroller>\\n<textarea><text><view></view></text></textarea>\\n</origin-scroller>\\n</template>',\n      params: {\n        lang: ''\n      }\n    },\n    jsonAst: {}\n  },\n  output: {\n    start: 0,\n    messages: [{\n      line: 3,\n      column: 11,\n      msg: 'tag \"text\" can only have \"text\" as it\\'s direct children or descendant(s), therefor tag \"view\" is not allowed as it\\'s direct children or descendant(s)',\n      token: ''\n    }]\n  }\n}];\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/fail/platform-specific-tags-error.js",
    "content": "module.exports = [{\n  desc: 'should fail platform specific tags check',\n  input: {\n    part: {\n      line: 0,\n      rawContent: '<template>\\n<scroll-view></scroll-view>\\n</template>',\n      platformType: 'cml',\n      params: {\n        lang: 'cml'\n      }\n    },\n    jsonAst: {}\n  },\n  output: {\n    start: 0,\n    messages: [{\n      line: 2,\n      column: 1,\n      msg: 'tag: \"scroll-view\" is either not allowed in this template or not referenced as a component',\n      token: 'scroll-view'\n    }]\n  }\n}];\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/fail/template-tag-error.js",
    "content": "module.exports = [{\n  desc: 'should fail template tag check',\n  input: {\n    part: {\n      line: 0,\n      rawContent: '<template><template></template></template>',\n      params: {\n        lang: ''\n      }\n    },\n    jsonAst: {}\n  },\n  output: {\n    start: 0,\n    messages: [{\n      line: 1,\n      column: 0,\n      msg: 'Each template can only have one group of template tags',\n      token: 'template'\n    }]\n  }\n}];\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/fail/usingcomponent-ref-error.js",
    "content": "module.exports = [{\n  desc: 'should fail usingComponents check',\n  input: {\n    part: {\n      line: 0,\n      rawContent: '<template><c-geerup></c-geerup></template>',\n      params: {\n        lang: ''\n      }\n    },\n    jsonAst: {}\n  },\n  output: {\n    start: 0,\n    messages: [{\n      line: 1,\n      column: 11,\n      msg: 'tag: \"c-geerup\" is either not allowed in this template or not referenced as a component',\n      token: 'c-geerup'\n    }]\n  }\n}];\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/pass/built-in-embed-rule-excludes-pass.js",
    "content": "module.exports = [{\n  desc: 'should pass built-in components emebed rule: excludes check',\n  input: {\n    part: {\n      line: 0,\n      rawContent: '<template>\\n<scroller>\\n<text></text>\\n</scroller>\\n</template>',\n      params: {\n        lang: ''\n      }\n    },\n    jsonAst: {}\n  },\n  output: {\n    start: 0,\n    messages: []\n  }\n}];\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/pass/built-in-embed-rule-includes-pass.js",
    "content": "module.exports = [{\n  desc: 'should pass built-in components emebed rule: includes check',\n  input: {\n    part: {\n      line: 0,\n      rawContent: '<template>\\n<video>\\n<text></text>\\n</video>\\n</template>',\n      params: {\n        lang: ''\n      }\n    },\n    jsonAst: {}\n  },\n  output: {\n    start: 0,\n    messages: []\n  }\n}];\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/pass/built-in-props-lang-vue-pass.js",
    "content": "module.exports = [{\n  desc: 'should pass built-in props check with vue-like template language',\n  input: {\n    part: {\n      line: 0,\n      rawContent: \"<template lang='vue'>\\n<button :text='{{shouldClose}}' :size='medium' :type='white' :disabled='{{true}}' :btn-style='{{btnStyle}}' :text-style='{{textStyle}}' :disabled-style='{{disabledStyle}}' v-on:onclick='onClick'></button>\\n</template>\",\n      params: {\n        lang: 'vue'\n      }\n    },\n    jsonAst: {}\n  },\n  output: {\n    start: 0,\n    messages: []\n  }\n}];\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/pass/built-in-props-pass.js",
    "content": "module.exports = [{\n  desc: 'should pass built-in props check',\n  input: {\n    part: {\n      line: 0,\n      rawContent: [\"<template lang='cml'>\",\n        \"<button text='{{shouldClose}}' size='medium' type='white' disabled='{{true}}' btn-style='{{btnStyle}}' text-style='{{textStyle}}' disabled-style='{{disabledStyle}}' c-bind:onclick='onClick'></button>\",\n        '</template>'].join('\\n'),\n      params: {\n        lang: ''\n      }\n    },\n    jsonAst: {}\n  },\n  output: {\n    start: 0,\n    messages: []\n  }\n}];\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/pass/component-is-pass.js",
    "content": "module.exports = [{\n  desc: 'should pass component is attribute check',\n  input: {\n    part: {\n      line: 0,\n      rawContent: [\"<template lang='vue\",\n        \"<component :is='currentComp' class='comp-normal' :class='comp-directive'></button>\",\n        '</template>'].join('\\n'),\n      params: {\n        lang: ''\n      }\n    },\n    jsonAst: {}\n  },\n  output: {\n    start: 0,\n    messages: []\n  }\n}];\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/pass/index.js",
    "content": "const bulk = require('bulk-require');\nconst passExports = bulk(__dirname, '!(index).js');\n\nconst entries = Object.keys(passExports);\n\nmodule.exports = entries.reduce((cases, currentEntry) => {\n  if (currentEntry === 'tag-close') {\n    return cases.concat(passExports[currentEntry]);\n  } else {\n    return cases;\n  }\n}, []);\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/pass/lang-pass.js",
    "content": "module.exports = [{\n  desc: 'should pass template lang error',\n  input: {\n    part: {\n      line: 0,\n      rawContent: \"<template lang='cml'></template>\",\n      params: {\n        lang: ''\n      }\n    },\n    jsonAst: {}\n  },\n  output: {\n    start: 0,\n    messages: []\n  }\n}];\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/pass/origin-component-skip-rules-pass.js",
    "content": "module.exports = [{\n  desc: 'origin component passes emebed rule: excludes check',\n  input: {\n    part: {\n      line: 0,\n      rawContent: '<template>\\n<scroller origin>\\n<textarea></textarea>\\n</scroller>\\n</template>',\n      params: {\n        lang: ''\n      }\n    },\n    jsonAst: {}\n  },\n  output: {\n    start: 0,\n    messages: []\n  }\n}];\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/pass/platform-specific-tags-pass.js",
    "content": "module.exports = [{\n  desc: 'should pass platform specific tags check',\n  input: {\n    part: {\n      line: 0,\n      rawContent: '<template>\\n<scroll-view></scroll-view>\\n</template>',\n      platformType: 'wx',\n      params: {\n        lang: 'cml'\n      }\n    },\n    jsonAst: {}\n  },\n  output: {\n    start: 0,\n    messages: []\n  }\n}];\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/pass/tag-close.js",
    "content": "module.exports = [{\n  desc: 'should pass tag-close check',\n  input: {\n    part: {\n      line: 0,\n      rawContent: [\"<template lang='cml'>\",\n        '<input></input>',\n        '</template>'].join('\\n'),\n      params: {\n        lang: ''\n      }\n    },\n    jsonAst: {}\n  },\n  output: {\n    start: 0,\n    messages: []\n  }\n}];\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/cases/pass/usingcomponent-ref-pass.js",
    "content": "module.exports = [{\n  desc: 'should pass usingComponents check',\n  input: {\n    part: {\n      line: 0,\n      rawContent: '<template><c-geerup></c-geerup></template>',\n      params: {\n        lang: ''\n      }\n    },\n    jsonAst: {\n      base: {\n        usingComponents: {\n          'c-geerup': 'path/to/geerup'\n        }\n      }\n    }\n  },\n  output: {\n    start: 0,\n    messages: []\n  }\n}];\n"
  },
  {
    "path": "packages/chameleon-linter/test/template/linter/template.test.js",
    "content": "const chai = require('chai');\nconst path = require('path');\nconst expect = chai.expect;\nconst templateLinter = require('../../../linters/template');\nconst config = require('../../../config');\n\nlet failCases = require('./cases/fail');\nlet passCases = require('./cases/pass');\n\ndescribe('template lint', function() {\n\n  before(function() {\n    config.init(path.resolve(__dirname, '../docs'));\n  });\n\n  describe('fail cases', function() {\n    failCases.forEach(function(caseItem) {\n      it(caseItem.desc, async function() {\n        let results = await templateLinter(caseItem.input.part, caseItem.input.jsonAst);\n        expect(results).to.have.property('messages').to.be.an.instanceOf(Array).to.deep.equal(caseItem.output.messages);\n      });\n    });\n  });\n\n  describe('pass cases', function() {\n    passCases.forEach(function(caseItem) {\n      it(caseItem.desc, async function() {\n        let results = await templateLinter(caseItem.input.part, caseItem.input.jsonAst);\n        expect(results).to.have.property('messages').to.be.an.instanceOf(Array).to.deep.equal(caseItem.output.messages);\n      });\n    });\n  });\n});\n"
  },
  {
    "path": "packages/chameleon-linter/test/utils.test.js",
    "content": "const utils = require('../utils');\nconst assert = require('chai').assert;\n\ndescribe('utils', function() {\n  it('toDash', function() {\n    let result = utils.toDash('abcDefGhi');\n    assert.equal(result, 'abc-def-ghi');\n  });\n});\n"
  },
  {
    "path": "packages/chameleon-linter/utils.js",
    "content": "const fs = require('fs');\nconst path = require('path');\nconst chalk = require('chalk');\nconst groupBy = require('lodash.groupby');\nconst filter = require('lodash.filter');\nconst map = require('lodash.map');\nconst cliUtils = require('chameleon-tool-utils');\nconst config = require('./config');\nconst Message = require('./classes/message');\n\nlet isCmlComponent = (templatePath, usingPath) => {\n  let currentWorkspace = config.getCurrentWorkspace();\n  let interfaceInfo = cliUtils.findInterfaceFile(currentWorkspace, templatePath, usingPath);\n  let componentInfo = cliUtils.lintHandleComponentUrl(currentWorkspace, templatePath, usingPath);\n  return !!interfaceInfo.filePath || (componentInfo && componentInfo.isCml);\n}\n\nlet toSrcPath = (filePath = '') => {\n  return (filePath && path.isAbsolute(filePath)) ? path.relative(config.getCurrentWorkspace(), filePath) : filePath;\n}\n\n/**\n * 转换成驼峰写法\n *\n * @param  {string} variable 变量名称\n * @return {string}          变量驼峰命名\n */\nlet toCamelCase = variable => variable.replace(/-(\\w)/g, (all, letter) => letter.toUpperCase());\n\n/**\n *\n * @param {String} str target string\n */\nconst toDash = (str) => {\n  return str.replace(/([A-Z])/g, (match, caps) => {\n    return '-' + caps.toLowerCase();\n  });\n};\n\n/**\n * 获取全部的部分\n *\n * @param  {string} content   内容\n * @param  {string} platform  平台\n * @return {Array}            数组\n */\nlet getCmlFileParts = (filepath, platform) => {\n  let content = fs.readFileSync(filepath, 'utf8');\n  let parts = cliUtils.splitParts({content});\n  let result = {};\n\n  map(parts, (values, key) => {\n    switch (key) {\n      case 'script':\n        if (values.length) {\n          values.forEach(value => {\n            // interface | json\n            if (value.attrs && value.cmlType) {\n              result[value.cmlType] = value;\n              result[value.cmlType].type = value.cmlType;\n            }\n            else {\n              result[key] = value;\n            }\n          });\n        }\n        break;\n      default:\n        if (values.length) {\n          result[key] = values[0];\n        }\n        break;\n    }\n\n    map(result, (value, type) => {\n      let params = {};\n\n      map(result[type].attrs, (attr, key) => {\n        params[toCamelCase(key)] = attr;\n      });\n\n      Object.assign(result[type], {\n        params: params,\n        line: result[type].startLine,\n        file: filepath,\n        platformType: platform,\n        rawContent: result[type].tagContent\n      });\n    });\n  });\n\n  return result;\n};\n\n/**\n * 获取所有的片段\n *\n * @param  {string} filepath 文件路径\n * @return {Objhect}         文件片段表\n */\nlet getCmlParts = filepath => {\n  let parts = {};\n  let platforms = config.getPlatforms();\n  let platform;\n  let result = new RegExp('([^/]*?)\\.(' + platforms.join('|') + ')\\.cml$', 'g').exec(filepath);\n  if (result) {\n    let interfaceFile = filepath.replace(new RegExp('\\.(' + platforms.join('|') + ')\\.cml$', 'ig'), '.interface');\n    platform = result[2];\n    if (fs.existsSync(interfaceFile)) {\n      Object.assign(parts, getCmlFileParts(interfaceFile));\n    }\n  }\n  Object.assign(parts, getCmlFileParts(filepath, platform));\n  return parts;\n};\n\n\nlet getInterfaceParts = filepath => {\n  let _result = {\n    parts: {},\n    messages: []\n  };\n  let lastFilePath = filepath;\n\n  _retrieveParts(filepath);\n\n  function _retrieveParts(interfaceFilePath) {\n    // terminate condition\n    if (!fs.existsSync(interfaceFilePath)) {\n      _result.messages.push(new Message({\n        msg: `The file: \"${toSrcPath(interfaceFilePath)}\" referenced by file: \"${toSrcPath(lastFilePath)}\" was not found`\n      }));\n      return;\n    }\n\n    const content = fs.readFileSync(interfaceFilePath, 'utf8');\n    const parts = cliUtils.splitParts({content});\n    // search parts.script array for interface defination and platform specific definations.\n    if (parts.script) {\n      parts.script.forEach(item => {\n        let errMsg = null;\n        let extraPartInfo = {\n          params: {},\n          line: item.startLine,\n          file: interfaceFilePath,\n          rawContent: item.tagContent,\n          platformType: item.cmlType\n        };\n        // for interface portion we should keep the origin filepath\n        if (item.cmlType === 'interface') {\n          extraPartInfo.file = filepath;\n        }\n        // check src references for platform definations\n        if (item.cmlType != 'interface' && item.attrs && item.attrs.src) {\n          const targetScriptPath = path.resolve(path.dirname(interfaceFilePath), item.attrs.src);\n          // the referenced source is a js file\n          if (/.js$/.test(item.attrs.src)) {\n            if (!fs.existsSync(targetScriptPath)) {\n              errMsg = new Message({\n                line: item.line,\n                column: item.tagContent.indexOf(item.attrs.src) + 1,\n                token: item.attrs.src,\n                msg: `The javascript file: \"${toSrcPath(targetScriptPath)}\" specified with attribute src was not found`\n              });\n            } else {\n              extraPartInfo.content = extraPartInfo.rawContent = extraPartInfo.tagContent = fs.readFileSync(targetScriptPath, 'utf8');\n              extraPartInfo.file = targetScriptPath;\n            }\n          }\n          // the referenced source is a cml file\n          if (/.cml$/.test(item.attrs.src)) {\n            if (!fs.existsSync(targetScriptPath)) {\n              errMsg = new Message({\n                line: item.line,\n                column: item.tagContent.indexOf(item.attrs.src) + 1,\n                token: item.attrs.src,\n                msg: `The cml file: \"${toSrcPath(targetScriptPath)}\" specified with attribute src was not found`\n              });\n            } else {\n              const cmlFileContent = fs.readFileSync(targetScriptPath, 'utf8');\n              const cmlParts = cliUtils.splitParts({content: cmlFileContent});\n              const scriptPart = cmlParts.script ? cmlParts.script.filter(part => {\n                return part.type === 'script';\n              }) : null;\n              if (scriptPart && scriptPart.length) {\n                extraPartInfo.content = extraPartInfo.rawContent = extraPartInfo.tagContent = scriptPart[0].content;\n                extraPartInfo.file = targetScriptPath;\n                item.cmlType = 'script';\n              } else {\n                errMsg = new Message({\n                  line: item.line,\n                  column: item.tagContent.indexOf(item.attrs.src) + 1,\n                  token: item.attrs.src,\n                  msg: `The referenced file: \"${toSrcPath(targetScriptPath)}\" may not has a script portion`\n                });\n              }\n            }\n          }\n        }\n        // previous cmlType defination has a higher priority.\n        if (!errMsg && !_result.parts[item.cmlType]) {\n          _result.parts[item.cmlType] = {...item, ...extraPartInfo};\n        }\n        if (errMsg) {\n          _result.messages.push(errMsg);\n        }\n      });\n    }\n    // search parts.customBlocks array for include defination which may contains another interface file.\n    let include = null;\n    if (parts.customBlocks) {\n      parts.customBlocks.forEach(item => {\n        if (item.type === 'include') {\n          include = item;\n        }\n      });\n    }\n    if (include && include.attrs && include.attrs.src) {\n      let newFilePath = path.resolve(path.dirname(interfaceFilePath), include.attrs.src);\n      lastFilePath = interfaceFilePath;\n      return _retrieveParts(newFilePath);\n    }\n    return;\n  }\n\n  return _result;\n}\n\n\n/**\n * 输出出错信息\n *\n * @param  {Object} result    出错信息对象\n * @param  {string} filepath  文件路径\n */\nlet outputWarnings = (result) => {\n  let flag = false;\n  result = filter(Object.values(result), (item) => {\n    if (!item.messages || (item.messages && item.messages.length == 0)) {\n      return false;\n    }\n    flag = true;\n    return true;\n  });\n  result = groupBy(result, 'file');\n  for (let key of Object.keys(result)) {\n    if (key !== 'undefined') {\n      console.log(chalk.yellow('[file]') + ': ' + key);\n    }\n    result[key]\n      .sort((a, b) => {\n        return a.start - b.start;\n      })\n      .forEach((item) => {\n        if (item.type) {\n          console.log(chalk.red(item.type + (item.platform ? (' [' + item.platform + ']') : '') + ' errors:'));\n        }\n\n        item.messages\n          .sort((preMsg, nextMsg) => {\n            if (preMsg.line == undefined || preMsg.column == undefined || nextMsg.line == undefined || nextMsg.column == undefined) {\n              return 0;\n            }\n            return (preMsg.line - nextMsg.line) * 10000 + (preMsg.column - nextMsg.column);\n          })\n          .forEach((message) => {\n            if (message.line !== undefined && item.start !== undefined && message.column !== undefined) {\n              console.log('[' + chalk.cyan(message.line + item.start - 1) + ' (line), ' + chalk.cyan(message.column) + ' (column)]' + ' ' + message.msg);\n            }\n            else {\n              console.log(message.msg);\n            }\n          });\n      });\n    // 保留！！！需要输出一个空行\n    console.log('');\n  }\n  return flag;\n};\n\nmodule.exports = {\n  getCmlParts,\n  getInterfaceParts,\n  outputWarnings,\n  toDash,\n  isCmlComponent,\n  toSrcPath\n};\n"
  },
  {
    "path": "packages/chameleon-loader/.eslintrc",
    "content": "/* eslint-enable */\n{\n  \"globals\": {\n      \"cml\": false\n  },\n  \"env\": {\n      \"browser\": true,\n      \"node\": true,\n      \"commonjs\": true,\n      \"amd\": true,\n      \"es6\": true,\n      \"mocha\": true\n  },\n  \"parserOptions\": {\n      \"ecmaVersion\": 6,\n      \"sourceType\": \"module\", \n      \"ecmaFeatures\": {\n          \"globalReturn\": true,\n          \"impliedStrict\": true,\n          \"jsx\": true,\n          \"modules\": true,\n          \"spread\": true,\n          \"restParams\": true,\n          \"objectLiteralComputedProperties\": true,\n          \"destructuring\": true\n      }\n  },\n  \"plugins\": [\n\n  ],\n  \"extends\": [\n      \"eslint:recommended\"\n  ],\n\n\n  \"rules\": {\n\n     \n      \"no-cond-assign\": 2,\n      \"no-console\": 0,\n      \n      \"no-constant-condition\": 2,\n      \"no-control-regex\": 2,\n      \"comma-dangle\": [1, \"never\"],\n      \"no-debugger\": 2,\n      \"no-dupe-args\": 2,\n      \"no-dupe-keys\": 2,\n      \"no-duplicate-case\": 2,\n      \"no-empty\": 2,\n      \"no-empty-character-class\": 2,\n      \"no-ex-assign\": 2,\n      \"no-extra-boolean-cast\": 2,\n      \"no-extra-parens\": 0,\n      \"no-extra-semi\": 2,\n      \"no-func-assign\": 2,\n      \"no-inner-declarations\": [2, \"functions\"],\n      \"no-invalid-regexp\": 2,\n      \"no-irregular-whitespace\": 2,\n      \"no-negated-in-lhs\": 2,\n      \"no-obj-calls\": 2,\n      \"no-prototype-builtins\": 0,\n      \"no-regex-spaces\": 2,\n      \"no-sparse-arrays\": 2,\n      \"no-unexpected-multiline\": 2,\n      \"no-unreachable\": 2,\n      \"use-isnan\": 2,\n      \"valid-jsdoc\": 0,\n      \"valid-typeof\": 2,\n\n\n      \"accessor-pairs\": 2,\n      \"array-callback-return\": 0,\n      \"block-scoped-var\": 0,\n      \"complexity\": [2, 30],\n      \"consistent-return\": 0,\n      \"curly\": [2, \"all\"],\n      \"default-case\": 2,\n      \"dot-location\": [2, \"property\"],\n      \"dot-notation\": [2, {\n          \"allowKeywords\": false\n      }],\n      \"eqeqeq\": [0, \"allow-null\"],\n      \"guard-for-in\": 2,\n      \"no-alert\": 0,\n      \"no-caller\": 2,\n      \"no-case-declarations\": 2,\n      \"no-div-regex\": 2,\n      \"no-else-return\": 0,\n      \"no-empty-function\": 2,\n      \"no-empty-pattern\": 2,\n      \"no-eq-null\": 1,\n      \"no-eval\": 2,\n      \"no-extend-native\": 2,\n      \"no-extra-bind\": 2,\n      \"no-extra-label:\": 0,\n      \"no-fallthrough\": 2,\n      \"no-floating-decimal\": 2,\n      \"no-implicit-coercion\": 0,\n      \"no-implicit-globals\": 1,\n      \"no-implied-eval\": 2,\n      \"no-invalid-this\": 0,\n      \"no-iterator\": 2,\n      \"no-labels\": 2,\n      \"no-lone-blocks\": 2,\n      \"no-loop-func\": 1,\n      \"no-magic-numbers\": [1, {\n          \"ignore\": [0, -1, 1]\n      }],\n      \"no-multi-spaces\": 2,\n      \"no-multi-str\": 2,\n      \"no-native-reassign\": 2,\n      \"no-new\": 2,\n      // 禁止对 Function 对象使用 new 操作符\n      \"no-new-func\": 0,\n      // 禁止对 String，Number 和 Boolean 使用 new 操作符\n      \"no-new-wrappers\": 2,\n      // 禁用八进制字面量\n      \"no-octal\": 2,\n      // 禁止在字符串中使用八进制转义序列\n      \"no-octal-escape\": 2,\n      // 不允许对 function 的参数进行重新赋值\n      \"no-param-reassign\": 0,\n      // 禁用 __proto__ 属性\n      \"no-proto\": 2,\n      // 禁止使用 var 多次声明同一变量\n      \"no-redeclare\": 2,\n      // 禁用指定的通过 require 加载的模块\n      \"no-return-assign\": 0,\n      // 禁止使用 javascript: url\n      \"no-script-url\": 0,\n      // 禁止自我赋值\n      \"no-self-assign\": 2,\n      // 禁止自身比较\n      \"no-self-compare\": 2,\n      // 禁用逗号操作符\n      \"no-sequences\": 2,\n      // 禁止抛出非异常字面量\n      \"no-throw-literal\": 2,\n      // 禁用一成不变的循环条件\n      \"no-unmodified-loop-condition\": 2,\n      // 禁止出现未使用过的表达式\n      \"no-unused-expressions\": 0,\n      // 禁用未使用过的标签\n      \"no-unused-labels\": 2,\n      // 禁止不必要的 .call() 和 .apply()\n      \"no-useless-call\": 2,\n      // 禁止不必要的字符串字面量或模板字面量的连接\n      \"no-useless-concat\": 0,\n      // 禁用不必要的转义字符\n      \"no-useless-escape\": 0,\n      // 禁用 void 操作符\n      \"no-void\": 0,\n      // 禁止在注释中使用特定的警告术语\n      \"no-warning-comments\": 0,\n      // 禁用 with 语句\n      \"no-with\": 2,\n      // 强制在parseInt()使用基数参数\n      \"radix\": 2,\n      // 要求所有的 var 声明出现在它们所在的作用域顶部\n      \"vars-on-top\": 0,\n      // 要求 IIFE 使用括号括起来\n      \"wrap-iife\": [2, \"any\"],\n      // 要求或禁止 “Yoda” 条件\n      \"yoda\": [2, \"never\"],\n      // 要求或禁止使用严格模式指令\n      \"strict\": 0,\n\n\n      //////////////\n      // 变量声明 //\n      //////////////\n\n      // 要求或禁止 var 声明中的初始化(初值)\n      \"init-declarations\": 0,\n      // 不允许 catch 子句的参数与外层作用域中的变量同名\n      \"no-catch-shadow\": 0,\n      // 禁止删除变量\n      \"no-delete-var\": 2,\n      // 不允许标签与变量同名\n      \"no-label-var\": 2,\n      // 禁用特定的全局变量\n      \"no-restricted-globals\": 0,\n      // 禁止 var 声明 与外层作用域的变量同名\n      \"no-shadow\": 0,\n      // 禁止覆盖受限制的标识符\n      \"no-shadow-restricted-names\": 2,\n      // 禁用未声明的变量，除非它们在 /*global */ 注释中被提到\n      \"no-undef\": 2,\n      // 禁止将变量初始化为 undefined\n      \"no-undef-init\": 2,\n      // 禁止将 undefined 作为标识符\n      \"no-undefined\": 0,\n      // 禁止出现未使用过的变量\n      \"no-unused-vars\": [2, {\n          \"vars\": \"all\",\n          \"args\": \"none\"\n      }],\n      // 不允许在变量定义之前使用它们\n      \"no-use-before-define\": 0,\n\n      //////////////////////////\n      // Node.js and CommonJS //\n      //////////////////////////\n\n      // require return statements after callbacks\n      \"callback-return\": 0,\n      // 要求 require() 出现在顶层模块作用域中\n      \"global-require\": 1,\n      // 要求回调函数中有容错处理\n      \"handle-callback-err\": [2, \"^(err|error)$\"],\n      // 禁止混合常规 var 声明和 require 调用\n      \"no-mixed-requires\": 0,\n      // 禁止调用 require 时使用 new 操作符\n      \"no-new-require\": 2,\n      // 禁止对 __dirname 和 __filename进行字符串连接\n      \"no-path-concat\": 0,\n      // 禁用 process.env\n      \"no-process-env\": 0,\n      // 禁用 process.exit()\n      \"no-process-exit\": 0,\n      // 禁用同步方法\n      \"no-sync\": 0,\n\n      //////////////\n      // 风格指南 //\n      //////////////\n\n      // 指定数组的元素之间要以空格隔开(, 后面)， never参数：[ 之前和 ] 之后不能带空格，always参数：[ 之前和 ] 之后必须带空格\n      \"array-bracket-spacing\": [2, \"never\"],\n      // 禁止或强制在单行代码块中使用空格(禁用)\n      \"block-spacing\": [1, \"never\"],\n      //强制使用一致的缩进 第二个参数为 \"tab\" 时，会使用tab，\n      // if while function 后面的{必须与if在同一行，java风格。\n      \"brace-style\": [2, \"1tbs\", {\n          \"allowSingleLine\": true\n      }],\n      // 双峰驼命名格式\n      \"camelcase\": 2,\n      // 控制逗号前后的空格\n      \"comma-spacing\": [2, {\n          \"before\": false,\n          \"after\": true\n      }],\n      // 控制逗号在行尾出现还是在行首出现 (默认行尾)\n      // http://eslint.org/docs/rules/comma-style\n      \"comma-style\": [2, \"last\"],\n      //\"SwitchCase\" (默认：0) 强制 switch 语句中的 case 子句的缩进水平\n      // 以方括号取对象属性时，[ 后面和 ] 前面是否需要空格, 可选参数 never, always\n      \"computed-property-spacing\": [2, \"never\"],\n      // 用于指统一在回调函数中指向this的变量名，箭头函数中的this已经可以指向外层调用者，应该没卵用了\n      // e.g [0,\"that\"] 指定只能 var that = this. that不能指向其他任何值，this也不能赋值给that以外的其他值\n      \"consistent-this\": [1, \"that\"],\n      // 强制使用命名的 function 表达式\n      \"func-names\": 0,\n      // 文件末尾强制换行\n      \"eol-last\": 2,\n      \"indent\": [2, 2, {\n          \"SwitchCase\": 1\n      }],\n      // 强制在对象字面量的属性中键和值之间使用一致的间距\n      \"key-spacing\": [2, {\n          \"beforeColon\": false,\n          \"afterColon\": true\n      }],\n      // 强制使用一致的换行风格\n      \"linebreak-style\": [1, \"unix\"],\n      // 要求在注释周围有空行 ( 要求在块级注释之前有一空行)\n      \"lines-around-comment\": [1, {\n          \"beforeBlockComment\": true\n      }],\n      // 强制一致地使用函数声明或函数表达式，方法定义风格，参数：\n      // declaration: 强制使用方法声明的方式，function f(){} e.g [2, \"declaration\"]\n      // expression：强制使用方法表达式的方式，var f = function() {} e.g [2, \"expression\"]\n      // allowArrowFunctions: declaration风格中允许箭头函数。 e.g [2, \"declaration\", { \"allowArrowFunctions\": true }]\n      \"func-style\": 0,\n      // 强制回调函数最大嵌套深度 5层\n      \"max-nested-callbacks\": [1, 5],\n      // 禁止使用指定的标识符\n      \"id-blacklist\": 0,\n      // 强制标识符的最新和最大长度\n      \"id-length\": 0,\n      // 要求标识符匹配一个指定的正则表达式\n      \"id-match\": 0,\n      // 强制在 JSX 属性中一致地使用双引号或单引号\n      \"jsx-quotes\": 0,\n      // 强制在关键字前后使用一致的空格 (前后腰需要)\n      \"keyword-spacing\": 2,\n      // 强制一行的最大长度\n      \"max-len\": [1, 200],\n      // 强制最大行数\n      \"max-lines\": 0,\n      // 强制 function 定义中最多允许的参数数量\n      \"max-params\": [1, 7],\n      // 强制 function 块最多允许的的语句数量\n      \"max-statements\": [1, 200],\n      // 强制每一行中所允许的最大语句数量\n      \"max-statements-per-line\": 0,\n      // 要求构造函数首字母大写 （要求调用 new 操作符时有首字母大小的函数，允许调用首字母大写的函数时没有 new 操作符。）\n      \"new-cap\": [2, {\n          \"newIsCap\": true,\n          \"capIsNew\": false\n      }],\n      // 要求调用无参构造函数时有圆括号\n      \"new-parens\": 2,\n      // 要求或禁止 var 声明语句后有一行空行\n      \"newline-after-var\": 0,\n      // 禁止使用 Array 构造函数\n      \"no-array-constructor\": 2,\n      // 禁用按位运算符\n      \"no-bitwise\": 0,\n      // 要求 return 语句之前有一空行\n      \"newline-before-return\": 0,\n      // 要求方法链中每个调用都有一个换行符\n      \"newline-per-chained-call\": 1,\n      // 禁用 continue 语句\n      \"no-continue\": 0,\n      // 禁止在代码行后使用内联注释\n      \"no-inline-comments\": 0,\n      // 禁止 if 作为唯一的语句出现在 else 语句中\n      \"no-lonely-if\": 0,\n      // 禁止混合使用不同的操作符\n      \"no-mixed-operators\": 0,\n      // 不允许空格和 tab 混合缩进\n      \"no-mixed-spaces-and-tabs\": 2,\n      // 不允许多个空行\n      \"no-multiple-empty-lines\": [2, {\n          \"max\": 2\n      }],\n      // 不允许否定的表达式\n      \"no-negated-condition\": 0,\n      // 不允许使用嵌套的三元表达式\n      \"no-nested-ternary\": 0,\n      // 禁止使用 Object 的构造函数\n      \"no-new-object\": 2,\n      // 禁止使用一元操作符 ++ 和 --\n      \"no-plusplus\": 0,\n      // 禁止使用特定的语法\n      \"no-restricted-syntax\": 0,\n      // 禁止 function 标识符和括号之间出现空格\n      \"no-spaced-func\": 2,\n      // 不允许使用三元操作符\n      \"no-ternary\": 0,\n      // 禁用行尾空格\n      \"no-trailing-spaces\": 2,\n      // 禁止标识符中有悬空下划线_bar\n      \"no-underscore-dangle\": 0,\n      // 禁止可以在有更简单的可替代的表达式时使用三元操作符\n      \"no-unneeded-ternary\": 2,\n      // 禁止属性前有空白\n      \"no-whitespace-before-property\": 0,\n      // 强制花括号内换行符的一致性\n      \"object-curly-newline\": 0,\n      // 强制在花括号中使用一致的空格\n      \"object-curly-spacing\": 0,\n      // 强制将对象的属性放在不同的行上\n      \"object-property-newline\": 0,\n      // 强制函数中的变量要么一起声明要么分开声明\n      \"one-var\": [2, {\n          \"initialized\": \"never\"\n      }],\n      // 要求或禁止在 var 声明周围换行\n      \"one-var-declaration-per-line\": 0,\n      // 要求或禁止在可能的情况下要求使用简化的赋值操作符\n      \"operator-assignment\": 0,\n      // 强制操作符使用一致的换行符\n      \"operator-linebreak\": [2, \"after\", {\n          \"overrides\": {\n              \"?\": \"before\",\n              \":\": \"before\"\n          }\n      }],\n      // 要求或禁止块内填充\n      \"padded-blocks\": 0,\n      // 要求对象字面量属性名称用引号括起来\n      \"quote-props\": 0,\n      // 强制使用一致的反勾号、双引号或单引号\n      // \"quotes\": [2, \"single\", \"avoid-escape\"],\n      // 要求使用 JSDoc 注释\n      \"require-jsdoc\": 0,\n      // 要求或禁止使用分号而不是 ASI（这个才是控制行尾部分号的，）\n      \"semi\": [0, \"always\"],\n      // 强制分号之前和之后使用一致的空格\n      \"semi-spacing\": 0,\n      // 要求同一个声明块中的变量按顺序排列\n      \"sort-vars\": 0,\n      // 强制在块之前使用一致的空格\n      \"space-before-blocks\": [2, \"always\"],\n      // 强制在 function的左括号之前使用一致的空格\n      \"space-before-function-paren\": [0, \"always\"],\n      // 强制在圆括号内使用一致的空格\n      \"space-in-parens\": [2, \"never\"],\n      // 要求操作符周围有空格\n      \"space-infix-ops\": 2,\n      // 强制在一元操作符前后使用一致的空格\n      \"space-unary-ops\": [2, {\n          \"words\": true,\n          \"nonwords\": false\n      }],\n      // 强制在注释中 // 或 /* 使用一致的空格\n      \"spaced-comment\": [2, \"always\", {\n          \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n      }],\n      // 要求或禁止 Unicode BOM\n      \"unicode-bom\": 0,\n      // 要求正则表达式被括号括起来\n      \"wrap-regex\": 0,\n\n      //////////////\n      // ES6.相关 //\n      //////////////\n\n      // 要求箭头函数体使用大括号\n      \"arrow-body-style\": 2,\n      // 要求箭头函数的参数使用圆括号\n      \"arrow-parens\": 0,\n      \"arrow-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 强制在子类构造函数中用super()调用父类构造函数，TypeScrip的编译器也会提示\n      \"constructor-super\": 0,\n      // 强制 generator 函数中 * 号周围使用一致的空格\n      \"generator-star-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 禁止修改类声明的变量\n      \"no-class-assign\": 2,\n      // 不允许箭头功能，在那里他们可以混淆的比较\n      \"no-confusing-arrow\": 0,\n      // 禁止修改 const 声明的变量\n      \"no-const-assign\": 2,\n      // 禁止类成员中出现重复的名称\n      \"no-dupe-class-members\": 2,\n      // 不允许复制模块的进口\n      \"no-duplicate-imports\": 0,\n      // 禁止 Symbol 的构造函数\n      \"no-new-symbol\": 2,\n      // 允许指定模块加载时的进口\n      \"no-restricted-imports\": 0,\n      // 禁止在构造函数中，在调用 super() 之前使用 this 或 super\n      \"no-this-before-super\": 2,\n      // 禁止不必要的计算性能键对象的文字\n      \"no-useless-computed-key\": 0,\n      // 要求使用 let 或 const 而不是 var\n      \"no-var\": 0,\n      // 要求或禁止对象字面量中方法和属性使用简写语法\n      \"object-shorthand\": 0,\n      // 要求使用箭头函数作为回调\n      \"prefer-arrow-callback\": 0,\n      // 要求使用 const 声明那些声明后不再被修改的变量\n      \"prefer-const\": 0,\n      // 要求在合适的地方使用 Reflect 方法\n      \"prefer-reflect\": 0,\n      // 要求使用扩展运算符而非 .apply()\n      \"prefer-spread\": 0,\n      // 要求使用模板字面量而非字符串连接\n      \"prefer-template\": 0,\n      // Suggest using the rest parameters instead of arguments\n      \"prefer-rest-params\": 0,\n      // 要求generator 函数内有 yield\n      \"require-yield\": 0,\n      // enforce spacing between rest and spread operators and their expressions\n      \"rest-spread-spacing\": 0,\n      // 强制模块内的 import 排序\n      \"sort-imports\": 0,\n      // 要求或禁止模板字符串中的嵌入表达式周围空格的使用\n      \"template-curly-spacing\": 1,\n      // 强制在 yield* 表达式中 * 周围使用空格\n      \"yield-star-spacing\": 2\n  }\n}\n/* eslint-enable */"
  },
  {
    "path": "packages/chameleon-loader/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n.vscode\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\n\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\n# dist\ndist/\n"
  },
  {
    "path": "packages/chameleon-loader/.npmignore",
    "content": ".scripts/\ntest/\ngulpfile.js"
  },
  {
    "path": "packages/chameleon-loader/.scripts/version.js",
    "content": "/**\n * 用于钉钉推送版本信息\n*/\nmodule.exports = {\n  \n \n}\n"
  },
  {
    "path": "packages/chameleon-loader/LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2015-present Yuxi (Evan) You\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "packages/chameleon-loader/gulpfile.js",
    "content": "const gulp = require('gulp');\nconst uglify = require('gulp-uglify-es').default;\nconst through = require('through2');\nconst path = require('path');\nconst devPath = path.join(__dirname,'../chameleon-cli/node_modules/chameleon-loader/src')\nconst distPathMap = {\n  build: {\n    dist: 'dist',\n    interface: 'dist/interface-check'\n  },\n  dev: {\n    dist: devPath,\n    interface: path.join(devPath,'interface-check')\n  }\n}\n\nlet EntryTask = gulp.env._[0];\ngulp.task('before', function () {\n  gulp.src([\n    'lib/**/**.js',\n    '!lib/interface-check/**/**.js'\n  ])\n  .pipe(through.obj(function (file, encode, cb) {\n    var result = file.contents.toString()\n    result = result.replace(/@didi\\/chameleon\\-loader\\/lib\\//g,'chameleon-loader/src/');\n\n    // // 再次转为Buffer对象，并赋值给文件内容\n    file.contents = new Buffer(result)\n    // 以下是例行公事\n    this.push(file)\n    cb()\n  }))\n  .pipe(uglify({\n    parse: {\n      bare_returns: true,\n\n    },\n    mangle: {\n      toplevel: true\n    },\n    compress: {\n      drop_console: true,\n      drop_debugger: true\n    }\n  }))\n  .pipe(gulp.dest(distPathMap[EntryTask].dist));\n\n});\n\ngulp.task('build', ['before'],function () {\n  gulp.src('lib/interface-check/**/**.js')\n  .pipe(gulp.dest(distPathMap[EntryTask].interface));\n});\n\n\ngulp.task('dev', [\"build\"], function() {\n  gulp.watch('lib/**/**.js',['build']);\n})\n\n"
  },
  {
    "path": "packages/chameleon-loader/package.json",
    "content": "{\n  \"name\": \"chameleon-loader\",\n  \"version\": \"1.0.8\",\n  \"description\": \"chameleon cml文件处理loader\",\n  \"main\": \"src/index.js\",\n  \"directories\": {\n    \"lib\": \"lib\",\n    \"test\": \"test\"\n  },\n  \"scripts\": {\n    \"test\": \"mocha --recursive --reporter spec\",\n    \"cover\": \"istanbul cover --report lcov node_modules/mocha/bin/_mocha -- -R spec --recursive\",\n    \"eslint:fix\": \"eslint --ext .js  lib --fix\",\n    \"eslint\": \"eslint ./lib\"\n  },\n  \"dependencies\": {\n    \"@babel/parser\": \"7.1.2\",\n    \"@babel/types\": \"^7.3.4\",\n    \"babel-generator\": \"6.26.1\",\n    \"babel-traverse\": \"6.26.0\",\n    \"chameleon-template-parse\": \"1.0.8\",\n    \"chameleon-tool-utils\": \"1.0.8\",\n    \"consolidate\": \"0.14.0\",\n    \"de-indent\": \"1.0.2\",\n    \"fs-extra\": \"^7.0.1\",\n    \"hash-sum\": \"1.0.2\",\n    \"he\": \"1.1.0\",\n    \"loader-utils\": \"1.1.0\",\n    \"lru-cache\": \"4.1.1\",\n    \"mvvm-interface-parser\": \"1.0.8\",\n    \"resolve\": \"1.4.0\",\n    \"runtime-check\": \"1.0.8\",\n    \"source-map\": \"0.6.1\",\n    \"vue-style-loader\": \"4.0.1\"\n  },\n  \"devDependencies\": {\n    \"autoprefixer\": \"^7.2.5\",\n    \"babel-core\": \"^6.25.0\",\n    \"babel-loader\": \"^7.0.0\",\n    \"babel-preset-env\": \"^1.6.0\",\n    \"chai\": \"^4.1.0\",\n    \"coffee-loader\": \"^0.7.2\",\n    \"coffee-script\": \"^1.12.7\",\n    \"conventional-changelog-cli\": \"^1.3.22\",\n    \"coveralls\": \"^2.11.9\",\n    \"css-loader\": \"^0.28.4\",\n    \"eslint\": \"^3.19.0\",\n    \"eslint-plugin-vue-libs\": \"^1.2.0\",\n    \"extract-text-webpack-plugin\": \"^3.0.0\",\n    \"file-loader\": \"^1.1.5\",\n    \"gulp\": \"^3.9.1\",\n    \"gulp-uglify-es\": \"^1.0.4\",\n    \"istanbul\": \"^0.4.5\",\n    \"js-yaml\": \"^3.9.1\",\n    \"lint-staged\": \"^4.0.2\",\n    \"marked\": \"^0.3.12\",\n    \"memory-fs\": \"^0.4.1\",\n    \"mkdirp\": \"^0.5.1\",\n    \"mocha\": \"^4.0.1\",\n    \"node-libs-browser\": \"^2.0.0\",\n    \"normalize-newline\": \"^3.0.0\",\n    \"null-loader\": \"^0.1.1\",\n    \"pug\": \"^2.0.0-rc.2\",\n    \"raw-loader\": \"^0.5.1\",\n    \"skeleton-loader\": \"1.1.3\",\n    \"stylus\": \"^0.54.5\",\n    \"stylus-loader\": \"^3.0.1\",\n    \"sugarss\": \"^1.0.0\",\n    \"through2\": \"^3.0.0\",\n    \"url-loader\": \"^0.6.2\",\n    \"vue\": \"^2.5.0\",\n    \"vue-server-renderer\": \"^2.5.0\",\n    \"webpack\": \"^3.0.0\",\n    \"webpack-merge\": \"^4.1.1\",\n    \"yorkie\": \"^1.0.3\"\n  },\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"gitHead\": \"5ddcde4330774710f7646559446e008f7785ce00\"\n}"
  },
  {
    "path": "packages/chameleon-loader/src/cml-compile/handle-platform-css.js",
    "content": "\nconst postcss = require('postcss');\n// 原生组件引用的样式 @import './xxx'  不带平台样式后缀，less会默认添加less导致无法识别需要人工处理\nconst handleCssSuffix = postcss.plugin('handleCssSuffix', function(options) {\n  let {ext} = options;\n  return function(css, result) {\n    css.walkAtRules('import', function (rule) {\n      let params = rule.params;// ./xxx  引用的样式文件路径\n      // 注意这里取到的值是带引号的，比如 \"./xxx\"  './xxx' `./xxx`\n      params = params.replace(/\"|'|`/g, '');\n      if (!params.endsWith(ext)) {\n        rule.params = `\"${params}${ext}\"`\n      }\n    });\n  };\n})\nmodule.exports = function(source, options = {}) {\n  return postcss([handleCssSuffix(options)]).process(source).css;\n}\n"
  },
  {
    "path": "packages/chameleon-loader/src/cml-compile/json-handle.js",
    "content": "\nconst cmlUtils = require('chameleon-tool-utils');\n\nmodule.exports = function(loaderContext, jsonObject, cmlType, componentDeps) {\n  var jsonPath = loaderContext.resourcePath.replace(/(\\.cml|\\.wx\\.cml|\\.alipay\\.cml|\\.baidu\\.cml|\\.qq\\.cml|\\.tt\\.cml)$/, '.json')\n  var context = (loaderContext._compiler && loaderContext._compiler.context) || loaderContext.options.context || process.cwd()\n\n  if (jsonObject.usingComponents) {\n    let components = jsonObject.usingComponents;\n    Object.keys(components).forEach(key => {\n      let comPath = components[key];\n      let splitInfo = comPath.split('?');\n      comPath = splitInfo[0];\n      let {filePath, refUrl} = cmlUtils.handleComponentUrl(context, loaderContext.resourcePath, comPath, cmlType);\n      if (filePath) {\n        componentDeps.push(filePath);\n        components[key] = refUrl;\n      } else {\n        // plugin开头的小程序插件不做处理\n        if (components[key].indexOf('plugin://') !== 0) {\n          delete components[key];\n          cmlUtils.log.error(`can't find component:${refUrl} in ${loaderContext.resourcePath}`);\n        }\n      }\n    })\n  }\n  cmlUtils.addNpmComponents(jsonObject, jsonPath, cmlType, context);\n  return jsonObject;\n\n\n}\n"
  },
  {
    "path": "packages/chameleon-loader/src/cml-compile/runtime/app.js",
    "content": "import _cml_ from 'chameleon-runtime';\nmodule.exports = function(){\n  _cml_.createApp(exports.default).getOptions();\n}\n"
  },
  {
    "path": "packages/chameleon-loader/src/cml-compile/runtime/common/util.js",
    "content": "/* eslint-disable */\n/**\n * 原型上的方法放到对象上\n * @param  {Object} obj   待添加属性对象\n * @param  {Object} proto 差异方法\n * @return {Object}       修改后值\n */\nexport function copyProtoProperty(obj = {}) {\n  let EXPORT_OBJ = obj;\n  let EXPORT_PROTO = EXPORT_OBJ.__proto__;\n\n  if (EXPORT_PROTO.constructor !== Object) {\n    Object.getOwnPropertyNames(EXPORT_PROTO).forEach(key => {\n      if (!/constructor|prototype|length/ig.test(key)) {\n        // 原型上有自身没有的属性 放到自身上\n        if (!EXPORT_OBJ.hasOwnProperty(key)) {\n          EXPORT_OBJ[key] = EXPORT_PROTO[key]\n        }\n      }\n    })\n  }\n\n  return EXPORT_OBJ;\n}\n\n\n"
  },
  {
    "path": "packages/chameleon-loader/src/cml-compile/runtime/component.js",
    "content": "import _cml_ from 'chameleon-runtime';\n\nmodule.exports = function(){\n  _cml_.createComponent(exports.default).getOptions();\n}"
  },
  {
    "path": "packages/chameleon-loader/src/cml-compile/runtime/index.js",
    "content": "\nconst fs = require('fs');\nconst path = require('path');\nconst _ = module.exports = {} ;\n_.getMiniAppRunTimeSnippet = function (platform, type) {\n  return fs.readFileSync(path.join(__dirname, `./${type}.js`))\n}\n_.getVueRunTimeSnippet = function (platform, type) {\n  return fs.readFileSync(path.join(__dirname, `./web/${type}.js`))\n}\n\n"
  },
  {
    "path": "packages/chameleon-loader/src/cml-compile/runtime/page.js",
    "content": "import _cml_ from 'chameleon-runtime';\n\nmodule.exports = function(){\n  _cml_.createPage(exports.default).getOptions();\n}"
  },
  {
    "path": "packages/chameleon-loader/src/cml-compile/runtime/web/app.js",
    "content": "import _cml_ from 'chameleon-runtime';\nexports.default = _cml_.createApp(exports.default).getOptions()"
  },
  {
    "path": "packages/chameleon-loader/src/cml-compile/runtime/web/component.js",
    "content": "import _cml_ from 'chameleon-runtime';\n\nexports.default = _cml_.createComponent(exports.default).getOptions()"
  },
  {
    "path": "packages/chameleon-loader/src/cml-compile/runtime/web/page.js",
    "content": "import _cml_ from 'chameleon-runtime';\n\nexports.default = _cml_.createPage(exports.default).getOptions()"
  },
  {
    "path": "packages/chameleon-loader/src/cml-compile/runtime/web/util.js",
    "content": "/* eslint-disable */\n/**\n * 对象属性 `data` 的 映射\n * @param  {[type]} obj [description]\n * @return {[type]}     [description]\n */\nexport function genConfig(obj) {\n  Object.getOwnPropertyNames(obj).forEach(function(key) {\n    if (key === 'data') {\n      var _temp = obj['data']\n      obj['data'] = function() {\n        return {\n          ..._temp\n        }\n      }\n\n      return obj\n    }\n  })\n  return obj\n}\n\n/**\n * 添加处理动态style的方法\n * @param {*} obj \n */\n// export function addStyleHandle(obj) {\n//   obj.methods = obj.methods || {}\n//   obj.methods['__parseStyle'] = function(content) {\n//     return content\n//   }\n// }\n"
  },
  {
    "path": "packages/chameleon-loader/src/cml-compile/runtime/weex/util.js",
    "content": "/* eslint-disable */\n\n/**\n * 对象属性 `data` 的 映射\n * @param  {[type]} obj [description]\n * @return {[type]}     [description]\n */\nexport function genConfig(obj) {\n  Object.getOwnPropertyNames(obj).forEach(function(key) {\n    if (key === 'data') {\n      var _temp = obj['data']\n      obj['data'] = function() {\n        return {\n          ..._temp\n        }\n      }\n\n      return obj\n    }\n  })\n  return obj\n}\n\n/**\n * 添加处理动态style的方法\n * @param {*} obj \n */\n// export function addStyleHandle(obj) {\n//   obj.methods = obj.methods || {}\n//   obj.methods[weexStyle.methodKey] = function(content) {\n//     return weexStyle.weexStaticStyle(content)\n//   }\n// }\n"
  },
  {
    "path": "packages/chameleon-loader/src/cml-compile/runtime/wx/util.js",
    "content": "// const wxStyle = require('chameleon-loader/lib/cml-compile/wx-style-handle.js')\n\nfunction type(n) {\n  return Object.prototype.toString.call(n).slice(8, -1)\n}\n\nfunction middleware(obj, map, lifecycle) {\n  for (let key of Object.keys(map)) {\n    if (obj.hasOwnProperty(key)) {\n      obj['_' + key] = obj[key]\n      map['_' + key] = map[key]\n      delete obj[key]\n      delete map[key]\n    }\n  }\n}\n\n/**\n * 生命周期映射\n * @param  {Object} obj 待添加属性对象\n * @param  {Object} map 映射表\n * @param  {Object} lifecycle 生命周期序列 确保顺序遍历\n * @return {Object}     修改后值\n */\nexport function lifecycleHandler(obj, map, lifecycle) {\n  // 将生命周期 键名 处理成 ['_' + key]\n  lifecycle = lifecycle.map(key => '_' + key)\n\n  middleware(obj, map)\n\n  lifecycle.forEach(function(key) {\n    var mapVal = map[key]\n    var objVal = obj[key]\n\n    if (obj.hasOwnProperty(key)) {\n      if (obj.hasOwnProperty(mapVal)) {\n        if (type(obj[mapVal]) !== 'Array') {\n          obj[mapVal] = [obj[mapVal], objVal]\n        } else {\n          obj[mapVal].push(objVal)\n        }\n      } else {\n        obj[mapVal] = [objVal]\n      }\n      delete obj[key]\n    }\n  })\n  return obj\n}\n\n/**\n * 对象键名重定义\n * @param  {Object} obj     对象\n * @param  {String} oldKey    原键名\n * @param  {String} newKey 新键名\n * @return {Object}         新对象\n */\nexport function rename(obj, oldKey, newKey) {\n  Object.getOwnPropertyNames(obj).forEach(function(key) {\n    if (key === oldKey) {\n      obj[newKey] = obj[key]\n      delete obj[key]\n      return obj\n    }\n  })\n  return obj\n}\n\n/**\n * 处理组件props属性\n * @param  {Object} obj 组件options\n * @return {[type]}     [description]\n */\nexport function propsHandler(obj) {\n  if (obj.props) {\n\n    Object.getOwnPropertyNames(obj.props).forEach(function(name) {\n      let prop = obj.props[name]\n\n      if (type(prop) === 'Object' && prop.hasOwnProperty('default')) {\n        rename(prop, 'default', 'value')\n      }\n    })\n\n    rename(obj, 'props', 'properties')\n  }\n  return obj\n}\n\n/**\n * 添加处理动态style的方法\n * @param {*} obj\n */\n// export function addStyleHandle(obj) {\n//   obj.methods = obj.methods || {}\n//   obj.methods[wxStyle.methodKey] = function(content) {\n//     return wxStyle.wxStaticStyle(content)\n//   }\n// }\n"
  },
  {
    "path": "packages/chameleon-loader/src/cml-compile/wxml-selector.js",
    "content": "/* 这个文件用来处理原生小程序组件*/\n\nconst loaderUtils = require('loader-utils');\nconst fs = require('fs');\nconst cmlUtils = require('chameleon-tool-utils');\nconst path = require('path');\nconst handlePlatformCss = require('./handle-platform-css.js');\n\nmodule.exports = function(content) {\n  const self = this;// eslint-disable-line\n  const resource = this.resourcePath;\n  const extName = path.extname(resource);\n  const cssExt = {\n    '.wxml': '.wxss',\n    '.axml': '.acss',\n    '.swan': '.css',\n    '.qml': '.qss',\n    '.ttml': '.ttss'\n  }\n  const styles = cssExt[extName];\n  const query = loaderUtils.getOptions(this) || {}\n  const type = query.type;\n  let targetFilePath = '';\n  let output = '';\n  let extMap = {\n    script: '.js',\n    styles\n  }\n  // targetFilePath = resource.replace(/\\.wxml/, extMap[type]);\n  targetFilePath = resource.replace(new RegExp(`${extName}$`), extMap[type]);\n  if (!cmlUtils.isFile(targetFilePath)) {\n    throw new Error(`can't find ${targetFilePath}`)\n  } else {\n    self.addDependency(targetFilePath);\n    output = fs.readFileSync(targetFilePath, {encoding: 'utf-8'})\n  }\n  if (type === 'script') {\n    return `${output}\\n;\n    module.exports = function(){\\n\n    }`\n  }\n  if (output) {\n    output = handlePlatformCss(output, {filePath: this.resourcePath, ext: styles})\n  }\n  return output;\n\n}\n"
  },
  {
    "path": "packages/chameleon-loader/src/helpers.js",
    "content": "const querystring = require('querystring')\nconst loaderUtils = require('loader-utils')\nconst normalize = require('./utils/normalize')\n\n\nconst selectorPath = normalize.lib('selector')\nconst wxmlSelectorPath = normalize.lib('cml-compile/wxml-selector')\n\n// dep loaders\nconst styleLoaderPath = normalize.dep('vue-style-loader')\n\n// check whether default js loader exists\nconst hasBabel = true\nconst hasBuble = false\n\nconst rewriterInjectRE = /\\b(css(?:-loader)?(?:\\?[^!]+)?)(?:!|$)/\n\nconst defaultLang = {\n  template: 'html',\n  styles: 'css',\n  script: 'js'\n}\n\nconst postcssExtensions = [\n  'postcss', 'pcss', 'sugarss', 'sss'\n]\n\n// When extracting parts from the source vue file, we want to apply the\n// loaders chained before vue-loader, but exclude some loaders that simply\n// produces side effects such as linting.\nfunction getRawRequest (\n  { resource, loaderIndex, loaders },\n  excludedPreLoaders = /eslint-loader/\n) {\n  return loaderUtils.getRemainingRequest({\n    resource: resource,\n    loaderIndex: loaderIndex,\n    loaders: loaders.filter(loader => !excludedPreLoaders.test(loader.path))\n  })\n}\n\n// sass => sass-loader\n// sass-loader => sass-loader\n// sass?indentedSyntax!css => sass-loader?indentedSyntax!css-loader\nfunction ensureLoader (lang) {\n  return lang\n    .split('!')\n    .map(loader =>\n      loader.replace(\n        /^([\\w-]+)(\\?.*)?/,\n        (_, name, query) =>\n          (/-loader$/.test(name) ? name : name + '-loader') + (query || '')\n      )\n    )\n    .join('!')\n}\n\nfunction ensureBang (loader) {\n  if (loader.charAt(loader.length - 1) !== '!') {\n    return loader + '!'\n  } else {\n    return loader\n  }\n}\n\nfunction resolveLoaders (\n  options,\n  moduleId,\n  isProduction,\n  hasScoped,\n  hasComment,\n  hasFunctionalTemplate,\n  needCssSourceMap,\n  loaderContext\n) {\n  const JSLoader = (loaderContext._compiler.options.module.rules || []).find((rule) => (rule.test instanceof RegExp && rule.test.test('name.js')))\n  const JSLoaderConfig = (JSLoader.use || []).find((item) => item.loader === 'babel-loader')\n  options.loaders && (options.loaders.js = JSLoaderConfig)\n  let cssLoaderOptions = ''\n  if (needCssSourceMap) {\n    cssLoaderOptions += '?sourceMap'\n  }\n  if (isProduction) {\n    cssLoaderOptions += (cssLoaderOptions ? '&' : '?') + 'minimize'\n  }\n\n  const bubleTemplateOptions = Object.assign({}, options.buble)\n  bubleTemplateOptions.transforms = Object.assign({}, bubleTemplateOptions.transforms)\n  bubleTemplateOptions.transforms.stripWithFunctional = hasFunctionalTemplate\n\n  const bubleOptions = hasBuble && options.buble\n    ? '?' + JSON.stringify(options.buble)\n    : ''\n\n\n  const defaultLoaders = {\n    css: styleLoaderPath + '!' + 'css-loader' + cssLoaderOptions,\n    js: 'babel-loader'\n  }\n\n\n  return {\n    defaultLoaders,\n    loaders: Object.assign({}, defaultLoaders, options.loaders),\n    preLoaders: options.preLoaders || {},\n    postLoaders: options.postLoaders || {}\n  }\n}\n\nmodule.exports = function createHelpers (\n  loaderContext,\n  options,\n  moduleId,\n  parts,\n  isProduction,\n  hasScoped,\n  hasComment,\n  hasFunctionalTemplate,\n  needCssSourceMap,\n  fileType\n) {\n  // console.log(fileType)\n  const rawRequest = getRawRequest(loaderContext, options.excludedPreLoaders)\n  const {\n    defaultLoaders,\n    loaders,\n    preLoaders,\n    postLoaders\n  } = resolveLoaders(\n    options,\n    moduleId,\n    isProduction,\n    hasScoped,\n    hasComment,\n    hasFunctionalTemplate,\n    needCssSourceMap,\n    loaderContext\n  )\n\n  function getRequire (type, part, index, scoped) {\n    return 'require(' + getRequestString(type, part, index, scoped) + ')'\n  }\n\n  function getWxmlRequest(type) {\n    return 'require(' + getWxmlRequestString(type) + ')'\n  }\n\n  function getWxmlRequestString(type) {\n    const part = {}\n    const index = 0;\n    const scoped = false;\n\n    let loaderString = '!!' +\n    // get loader string for pre-processors\n    getLoaderString(type, part, index, scoped);\n\n    if (options.afterWxSelector) {\n      loaderString += // 微信端在selector 拼接差异化代码后做replace\n      stringifyLoaders(options.afterWxSelector) + '!' ;\n    }\n\n    loaderString +=\n    // select the corresponding part from the vue file\n    `${wxmlSelectorPath}?type=${type}!` +\n    // the url to the actual vue file, including remaining requests\n    rawRequest;\n\n\n    return loaderUtils.stringifyRequest(\n      loaderContext,\n      loaderString\n    )\n  }\n\n  function getImport (type, part, index, scoped) {\n    return (\n      'import __vue_' + type + '__ from ' +\n      getRequestString(type, part, index, scoped)\n    )\n  }\n\n  function getNamedExports (type, part, index, scoped) {\n    return (\n      'export * from ' +\n      getRequestString(type, part, index, scoped)\n    )\n  }\n\n  function getRequestString (type, part, index, scoped) {\n\n    let loaderString = '!!' +\n    // get loader string for pre-processors\n    getLoaderString(type, part, index, scoped);\n\n    if (options.afterWxSelector) {\n      loaderString += // 微信端在selector 拼接差异化代码后做replace\n      stringifyLoaders(options.afterWxSelector) + '!' ;\n    }\n\n    loaderString +=\n    // select the corresponding part from the vue file\n    getSelectorString(type, index || 0) +\n    // the url to the actual vue file, including remaining requests\n    rawRequest;\n\n\n    return loaderUtils.stringifyRequest(\n      loaderContext,\n      loaderString\n    )\n  }\n\n  function getRequireForSrc (type, impt, scoped) {\n    return 'require(' + getSrcRequestString(type, impt, scoped) + ')'\n  }\n\n  function getImportForSrc (type, impt, scoped) {\n    return (\n      'import __vue_' + type + '__ from ' +\n      getSrcRequestString(type, impt, scoped)\n    )\n  }\n\n  function getNamedExportsForSrc (type, impt, scoped) {\n    return (\n      'export * from ' +\n      getSrcRequestString(type, impt, scoped)\n    )\n  }\n\n  function getSrcRequestString (type, impt, scoped) {\n    return loaderUtils.stringifyRequest(\n      loaderContext,\n      '!!' + getLoaderString(type, impt, -1, scoped) + impt.src\n    )\n  }\n\n  function addCssModulesToLoader (loader, part, index) {\n    if (!part.module) {return loader}\n    const option = options.cssModules || {}\n    const DEFAULT_OPTIONS = {\n      modules: true\n    }\n    const OPTIONS = {\n      localIdentName: '[local]_[hash:base64:8]',\n      importLoaders: 1\n    }\n    return loader.replace(/((?:^|!)css(?:-loader)?)(\\?[^!]*)?/, (m, $1, $2) => {\n      // $1: !css-loader\n      // $2: ?a=b\n      const query = loaderUtils.parseQuery($2 || '?')\n      Object.assign(query, OPTIONS, option, DEFAULT_OPTIONS)\n      if (index > 0) {\n        // Note:\n        //   Class name is generated according to its filename.\n        //   Different <style> tags in the same .vue file may generate same names.\n        //   Append `_[index]` to class name to avoid this.\n        query.localIdentName += '_' + index\n      }\n      return $1 + '?' + JSON.stringify(query)\n    })\n  }\n\n  function buildCustomBlockLoaderString (attrs) {\n    const noSrcAttrs = Object.assign({}, attrs)\n    delete noSrcAttrs.src\n    const qs = querystring.stringify(noSrcAttrs)\n    return qs ? '?' + qs : qs\n  }\n\n  // stringify an Array of loader objects\n  function stringifyLoaders (loaders) {\n    return loaders\n      .map(\n        obj =>\n          obj && typeof obj === 'object' && typeof obj.loader === 'string'\n            ? obj.loader +\n              (obj.options ? '?' + JSON.stringify(obj.options) : '')\n            : obj\n      )\n      .join('!')\n  }\n\n  function getLoaderString (type, part, index, scoped) {\n    let loader = getRawLoaderString(type, part, index, scoped)\n    const lang = getLangString(type, part)\n    if (preLoaders[lang]) {\n      loader = loader + ensureBang(preLoaders[lang])\n    }\n    if (postLoaders[lang]) {\n      loader = ensureBang(postLoaders[lang]) + loader\n    }\n    return loader\n  }\n\n  function getLangString (type, { lang }) {\n    if (type === 'script' || type === 'template' || type === 'styles') {\n      return lang || defaultLang[type]\n    } else {\n      return type\n    }\n  }\n\n  function getRawLoaderString (type, part, index, scoped) {\n    let lang = part.lang || defaultLang[type]\n\n    let styleCompiler = ''\n    if (type === 'styles') {\n\n      // normalize scss/sass/postcss if no specific loaders have been provided\n      if (!loaders[lang]) {\n        if (postcssExtensions.indexOf(lang) !== -1) {\n          lang = 'css'\n        } else if (lang === 'sass') {\n          lang = 'sass?indentedSyntax'\n        } else if (lang === 'scss') {\n          lang = 'sass'\n        }\n      }\n    }\n\n    let loader = loaders[lang]\n\n    if (loader != null) {\n      if (Array.isArray(loader)) {\n        loader = stringifyLoaders(loader)\n      } else if (typeof loader === 'object') {\n        loader = stringifyLoaders([loader])\n      }\n      if (type === 'styles') {\n        // add css modules\n        loader = addCssModulesToLoader(loader, part, index)\n        // inject rewriter before css loader for extractTextPlugin use cases\n        if (rewriterInjectRE.test(loader)) {\n          loader = loader.replace(\n            rewriterInjectRE,\n            (m, $1) => ensureBang($1)\n          )\n        } else {\n          loader = ensureBang(loader)\n        }\n      }\n      // if user defines custom loaders for html, add template compiler to it\n      if (type === 'template' && loader.indexOf(defaultLoaders.html) < 0) {\n        loader = defaultLoaders.html + '!' + loader\n      }\n      return ensureBang(loader)\n    } else {\n      // unknown lang, infer the loader to be used\n      switch (type) {\n\n        case 'styles':\n          loader = addCssModulesToLoader(defaultLoaders.css, part, index)\n          return loader + '!' + styleCompiler + ensureBang(ensureLoader(lang))\n        case 'script':\n          return ensureBang(ensureLoader(lang))\n        default:\n          loader = loaders[type]\n          if (Array.isArray(loader)) {\n            loader = stringifyLoaders(loader)\n          }\n          return ensureBang(loader + buildCustomBlockLoaderString(part.attrs))\n      }\n    }\n  }\n\n  function getSelectorString (type, index) {\n    return (\n      selectorPath +\n      '?type=' +\n      (type === 'script' || type === 'template' || type === 'styles'\n        ? type\n        : 'customBlocks') +\n      '&index=' + index +\n      '&fileType=' + fileType +\n      '&media=' + options.media +\n      '&cmlType=' + options.cmlType +\n      '&isInjectBaseStyle=' + options.isInjectBaseStyle +\n      `&check=${JSON.stringify(options.check)}` +\n      '!'\n    )\n  }\n\n  return {\n    loaders,\n    getRequire,\n    getImport,\n    getNamedExports,\n    getRequireForSrc,\n    getImportForSrc,\n    getNamedExportsForSrc,\n    getRequestString,\n    getSrcRequestString,\n    getWxmlRequest\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-loader/src/index.js",
    "content": "module.exports = require('./loader');\n"
  },
  {
    "path": "packages/chameleon-loader/src/interface-check/check.js",
    "content": "\n/* eslint-disable */\n/**\n * cml多态组件 interface校验\n * 1 拿到interface的校验\n * 2 写好处理default对象的方法\n * 3 拼接代码\n */\nconst path = require('path');\nconst parser = require('@babel/parser');\nconst traverse = require('babel-traverse');\nconst generate = require(\"babel-generator\");\nconst {getDefines, parsePlugins} = require('runtime-check');\nconst cmlUtils = require('chameleon-tool-utils');\n\n/**\n * 处理ast导出表达式\n *\n * @param  {Object} ast ast\n * @return {Object}     ast\n */\nconst handlExport = function (ast) {\n  traverse[\"default\"](ast, {\n    enter(path) {\n      if (path.node.type === 'ExportDefaultDeclaration') {\n        // 拿到export ddefault new Method(); 这一行代码\n        let exportCode = generate[\"default\"](path.node);\n         // 拿到 new Method(); 这一段代码\n        let declarationCode = generate[\"default\"](path.node.declaration);\n        // 得到 export default __OBJECT__WARPPER__(new Method());\n        let codeSeg = exportCode.code.replace(declarationCode.code, '__CML__WRAPPER__(' + declarationCode.code + ', __CML_ERROR__, __enableTypes__, __INTERFAE__DEFINES__, __CML__DEFINES__)');\n        // 转成ast\n        let replacement = parser.parse(codeSeg, {\n          plugins: parsePlugins,\n          sourceType: 'module'\n        });\n        traverse[\"default\"].removeProperties(replacement);\n        // 替换\n        path.replaceWith(replacement.program.body[0]);\n        path.stop();\n      }\n    }\n  });\n\n  return ast;\n};\n\n/**\n *\n * @param {*} interfaceCode interface的代码\n * @param {*} cmlCode cml的代码\n * @param {*} interfacePath interface的文件路径\n * @param {*} cmlPath  cml的文件路径\n * @param {*} cmlType  web  weex\n * @param {*} enableTypes  启动的类型\n */\nfunction getCheckCode(interfaceCode, cmlCode, interfacePath, cmlPath, cmlType, enableTypes) {\n  let interfaceDefines = getDefines(interfaceCode, interfacePath).defines;\n  let interfaceNumber = Object.keys(interfaceDefines.interfaces).length;\n  if (interfaceNumber === 0) {\n    throw new Error(`${interfacePath}中未定义interface`)\n  } else if (interfaceNumber > 1) {\n    throw new Error(`${interfacePath}中只能定义一个interface`)\n  }\n\n  // 为了拿到expot 对象的class implements 的interface\n  let cmlDefines = getDefines(cmlCode, cmlPath);\n\n  const newCode = generate[\"default\"](handlExport(cmlDefines.ast)).code;\n  let result = '';\n  let wrapperCode = '';\n  if (interfacePath) {\n    interfacePath = path.resolve(interfacePath);\n    interfacePath = cmlUtils.handleWinPath(interfacePath);\n\n    result += `const __INTERFACE__FILEPATH=\"${interfacePath}\"`;\n  }\n  if (cmlType === 'weex') {\n    function throwError(content) {\n      var modal = weex.requireModule('modal')\n      modal.alert({\n        message: `文件位置: ${__INTERFACE__FILEPATH}\n                   ${content}`\n      })\n    }\n    result += `\n      const __CML_ERROR__ = ${throwError.toString()}\n    `\n  } else {\n    function throwError(content) {\n      throw new Error(`文件位置: ${__INTERFACE__FILEPATH}\n            ${content}`)\n    }\n    result += `\n      const __CML_ERROR__ = ${throwError.toString()}\n    `\n  }\n\n  const checkPath = path.resolve(__dirname, '../runtime/check.js');\n\n  result += `\n    const __enableTypes__ = ${JSON.stringify(enableTypes)}\n    const __INTERFAE__DEFINES__ = ${JSON.stringify(interfaceDefines, null, 2)};\n    const __CML__DEFINES__ = ${JSON.stringify(cmlDefines.defines, null, 2)};\n    const __CML__WRAPPER__ = require('${cmlUtils.handleRelativePath(cmlPath, checkPath)}');\n    ${newCode}\n  `\n  return result;\n\n}\n\nmodule.exports = {\n  getCheckCode\n}\n\n\n"
  },
  {
    "path": "packages/chameleon-loader/src/interface-check/getScriptCode.js",
    "content": "const cmlUtils = require('chameleon-tool-utils');\nconst getInterfaceCode = require('mvvm-interface-parser/lib/getInterfaceCode.js');\nconst {getCheckCode} = require('./check.js');\n\nfunction getScriptCode(loaderContext, cmlType, cmlCode, media, check = {}) {\n  let cmlPath = loaderContext.resourcePath;\n  // 多态cml组件获取接口校验部分代码  不根据文件名称判断 只能根据是否有interface文件\n  if (media === 'dev' && check.enable === true) {\n    let interfacePath = cmlUtils.RecordCml2Interface[cmlPath];\n    // 如果有interface文件\n    if (interfacePath) {\n      let {content: interfaceCode, devDeps: interfaceDevDeps, contentFilePath} = getInterfaceCode({interfacePath});\n      interfaceDevDeps.forEach(item => {\n        loaderContext.addDependency(item);\n      })\n      try {\n        cmlCode = getCheckCode(interfaceCode, cmlCode, contentFilePath, cmlPath, cmlType, check.enableTypes);\n      } catch (e) {\n        // 当有语法错误 babel parse会报错，报错信息不友好\n        cmlUtils.log.error(`chameleon-loader: ${cmlPath} or ${contentFilePath} syntax error！`)\n      }\n    }\n  }\n  return cmlCode;\n}\n\nmodule.exports = {\n  getScriptCode\n}\n"
  },
  {
    "path": "packages/chameleon-loader/src/load-icon.js",
    "content": "const _ = module.exports = {};\nconst path = require('path');\nconst cmlUtils = require('chameleon-tool-utils');\nconst fse = require('fs-extra');\n\n_.handleApptabbar = function(newJsonObj, filePath, type) {\n  filePath = path.dirname(filePath); // 得到 app.cml 文件所在目录\n  let tabbarIconPaths = _.getTabbarIconPaths(newJsonObj.tabBar, type);\n  if (tabbarIconPaths.length) {\n    tabbarIconPaths.forEach((item) => {\n      let rootDir = path.resolve(cml.projectRoot, `dist/${type}`);\n\n      let destIconPath = path.resolve(rootDir, item.finalPath); // 获取到要将icon拷贝的路径\n      let sourceIconPath = path.resolve(filePath, item.originPath) // 获取到原来的icon的路径\n      if (cmlUtils.isFile(sourceIconPath)) {\n        fse.copySync(sourceIconPath, destIconPath)\n      } else {\n        cmlUtils.log.warn(`${sourceIconPath} is not exsit`)\n      }\n\n    });\n  }\n}\n_.getRelativeIconPath = function(p) {\n  let fileName = path.parse(p).base;\n  return path.join('./icon', fileName)\n}\n_.getTabbarIconPaths = function(tabbar, type) {\n  let iconPaths = [];\n  let miniAppType = ['wx', 'baidu', 'qq', 'tt']\n\n  if (tabbar && miniAppType.includes(type)) {\n    (tabbar.list || []).forEach((item) => {\n      if (item.iconPath) {\n        let iconInfo = {};\n        iconInfo.originPath = item.iconPath;\n        item.iconPath = _.getRelativeIconPath(item.iconPath);\n        iconInfo.finalPath = item.iconPath;\n\n        iconPaths.push(iconInfo);\n        // 生成的app.json中的路径要适配windows\n        item.iconPath = cmlUtils.handleWinPath(item.iconPath);\n      }\n      if (item.selectedIconPath) {\n        let iconInfo = {};\n        iconInfo.originPath = item.selectedIconPath;\n        item.selectedIconPath = _.getRelativeIconPath(item.selectedIconPath);\n        iconInfo.finalPath = item.selectedIconPath;\n\n        iconPaths.push(iconInfo);\n        // 生成的app.json中的路径要适配windows\n        item.selectedIconPath = cmlUtils.handleWinPath(item.selectedIconPath);\n      }\n    })\n  }\n  if (tabbar && type === 'alipay') {\n    (tabbar.items || []).forEach((item) => {\n      if (item.icon) {\n        let iconInfo = {};\n        iconInfo.originPath = item.icon;\n        item.icon = _.getRelativeIconPath(item.icon);\n        iconInfo.finalPath = item.icon;\n\n        iconPaths.push(iconInfo);\n\n        // 生成的app.json中的路径要适配windows\n        item.icon = cmlUtils.handleWinPath(item.icon);\n      }\n      if (item.activeIcon) {\n        let iconInfo = {};\n        iconInfo.originPath = item.activeIcon;\n        item.activeIcon = _.getRelativeIconPath(item.activeIcon);\n        iconInfo.finalPath = item.activeIcon;\n\n        iconPaths.push(iconInfo);\n\n        // 生成的app.json中的路径要适配windows\n        item.activeIcon = cmlUtils.handleWinPath(item.activeIcon);\n      }\n    })\n  }\n  return iconPaths;\n}\n_.handleWorkers = function(newJsonObj, type, loaderContext) {\n  const workers = newJsonObj.workers;\n  if (workers) {\n    const destDir = path.resolve(cml.projectRoot, `dist/${type}`, workers);\n    const sourceDir = path.resolve(cml.projectRoot, 'src/', workers);\n\n    if (cmlUtils.isDir(sourceDir)) {\n      fse.copySync(sourceDir, destDir);\n      loaderContext.addContextDependency(sourceDir)\n\n    }\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-loader/src/loader.js",
    "content": "/* eslint-disable */\n\n\nconst path = require('path')\nconst hash = require('hash-sum')\nconst parse = require('./parser')\nconst createHelpers = require('./helpers')\nconst loaderUtils = require('loader-utils')\nconst normalize = require('./utils/normalize')\nconst componentNormalizerPath = normalize.lib('runtime/component-normalizer')\nconst fs = require('fs');\nconst {getVueRunTimeSnippet} = require('./cml-compile/runtime/index.js');\n\nvar compileTemplate = require('chameleon-template-parse');\nconst preParseMultiTemplate = require('chameleon-template-parse').preParseMultiTemplate;\nvar jsonHandler = require('./cml-compile/json-handle.js');\nconst { getScriptCode } = require('./interface-check/getScriptCode.js');\nconst cmlUtils = require('chameleon-tool-utils');\nconst prehandle = require('./utils/prehandle.js');\nconst loaderMethods = require('./loaderMethods');\nconst miniAppScript = require('./miniapp-script.js');\nconst loadIcon = require('./load-icon.js');\nlet jsonObject = {};\n\nmodule.exports = function (content) {\n  // 记录cml组件依赖 用于extract-css 优先级排序\n  if(!this._compiler._cmlDepsMap) {\n    this._compiler._cmlDepsMap = {};\n  }\n  const componentDeps = [];\n  this._compiler._cmlDepsMap[this.resourcePath] = componentDeps;\n  const self = this;\n  const filePath = this.resourcePath;\n  \n  const rawOptions = loaderUtils.getOptions(this);\n\n  const options = rawOptions || {};\n\n\n  let defaultCmss =  {\n    rem: true,\n    scale: 0.5,\n    remOptions: {\n      // base on 750px standard.\n      rootValue: {cpx: 75},\n      // to leave 1px alone.\n      minPixelValue: null\n    },\n    autoprefixOptions: {\n      browsers: ['> 0.1%', 'ios >= 8', 'not ie < 12']\n    }\n  }\n\n  //loader的类型  wx  web weex\n  const {cmlType, media, builtinNpmName, cmss = defaultCmss, isWrapComponent = true, subProject = []} = options;\n  let { isInjectBaseStyle = true } = options;\n  //处理拿到json对象, 使用baseStyle来配置是否注入基础样式\n  jsonObject = cmlUtils.getJsonFileContent(self.resourcePath, cmlType);\n  \n  // 处理子项目的isInjectBaseStyle\n  if (subProject.length) {\n    subProject.forEach(item => {\n      if (self.resourcePath.indexOf(item.npmName) > -1 && item.isInjectBaseStyle !== undefined) {\n        isInjectBaseStyle = item.isInjectBaseStyle;\n      }\n    })\n  }\n\n  \n  if (jsonObject && jsonObject.baseStyle !== undefined) {\n    isInjectBaseStyle = jsonObject.baseStyle;\n  }\n\n  \n  if(isInjectBaseStyle && cmlType === 'weex') {\n    content = prehandle.injectWeexBaseStyle(content, self);\n  }\n\n  if(cmlType === 'web') {\n    content = prehandle.webAddStyleScope(content, self);\n  }\n\n\n  if(builtinNpmName) {\n    cmlUtils.setBuiltinNpmName(builtinNpmName);\n  }\n\n  let output = ''\n  const isProduction = this.minimize || process.env.NODE_ENV === 'production'\n\n  const extName = path.extname(self.resourcePath);\n  const context = (\n    this.rootContext ||\n    (this.options && this.options.context) ||\n    process.cwd()\n  )\n\n  //是否是引用的原生小程序组件  wxml文件\n  const isWxmlComponent = extName === '.wxml';\n  const isAxmlComponent = extName === '.axml';\n  const isSwanComponent = extName === '.swan';\n  const isQmlComponent = extName === '.qml';\n  const isTtmlComponent = extName === '.ttml';\n  const isMiniAppRawComponent = isWxmlComponent ||  isAxmlComponent || isSwanComponent || isQmlComponent || isTtmlComponent;\n  if(!isMiniAppRawComponent) {\n    //处理script cml-type为json的内容\n    content = cmlUtils.deleteScript({content, cmlType: 'json'});\n  }\n  // 如果是web端 默认添加scoped属性\n  // 如果是weex端 默认添加全局样式\n  //判断是否是内置组件\n  const isBuildInFile = cmlUtils.isBuildIn(filePath, cmlType, context);\n  \n  const shortFilePath = path.relative(context, filePath).replace(/^(\\.\\.[\\\\\\/])+/, '')\n  var hashNum = hash(isProduction ? (shortFilePath + '\\n' + content) : shortFilePath)\n\n  const moduleId = 'data-v-' + hashNum\n\n  const needCssSourceMap = false;\n\n  //需要区分cml的类型 app componet  page 拼接不同的方法\n  var entryPath = cmlUtils.getEntryPath(self.resourcePath, context);\n  // 小程序中有文件夹有@符号无法上传  决定json js wxml文件生成路径\n  entryPath = cmlUtils.handleSpecialChar(entryPath);\n  let type = 'page';\n  if ('app/app.cml' === entryPath) {\n    entryPath = 'app.cml';\n    type = 'app';\n    self.addDependency(path.join(context, './src/router.config.json'));\n  } else {\n    if (jsonObject.component === true) {\n      type = 'component';\n    }\n  }\n\n  const parts = parse(content);\n  if(parts.styles.length >1) {\n    throw new Error(`${self.resourcePath} statement ${parts.styles.length} style tag,but only allow one`)\n  }\n  const hasScoped = parts.styles.some(({ scoped }) => scoped)\n  const templateAttrs = parts.template && parts.template.attrs && parts.template.attrs\n  const hasComment = templateAttrs && templateAttrs.comments\n  const hasFunctionalTemplate = templateAttrs && templateAttrs.functional\n\n  // 记录这个组件使用的内置组件，按需引入\n  const currentUsedBuildInTagMap = {};\n\n  const {\n    getRequire,\n    getWxmlRequest\n  } = createHelpers(\n    self,\n    options,\n    moduleId,\n    parts,\n    isProduction,\n    hasScoped,\n    hasComment,\n    hasFunctionalTemplate,\n    needCssSourceMap,\n    type\n  )\n  //小程序模板后缀Map\n  const miniappTplExt = {\n    wx: 'wxml',\n    alipay: 'axml',\n    baidu: 'swan',\n    qq: 'qml',\n    tt:'ttml'\n  }\n  //小程序模板后缀正则\n  const miniTplExtReg = /(\\.wxml|\\.axml|\\.swan|\\.qml|\\.ttml)$/;\n  const miniCmlReg = /(\\.cml|\\.wx\\.cml|\\.alipay\\.cml|\\.qq\\.cml|\\.baidu\\.cml|\\.tt\\.cml)$/;\n\n  if(isMiniAppRawComponent) {\n    miniAppRawComponentHandler.call(this);\n  } else {\n      //handler中改变output的值 最后返回output\n      switch (cmlType) {\n        case 'wx':\n        case 'qq':\n        case 'alipay':\n        case 'baidu':\n        case 'tt':\n          miniAppHandler.call(this);\n          break;\n        case 'web':\n        case 'weex':\n          webWeexHandler.call(this);\n          break;\n      }\n  }\n\n\n\n  function ASTcompileTemplate(templateContent, options = {}) {\n    let buildInComponents = {};\n    // 内置组件库中的cml文件不进行内置组件的替换\n    if(!isBuildInFile) {\n      buildInComponents = cmlUtils.getBuildinComponents(cmlType, context).compileTagMap;\n    }\n    let {source, usedBuildInTagMap = {}} = compileTemplate(templateContent, cmlType, {\n      buildInComponents,\n      cmss,\n      media,\n      ...options\n    });\n    // currentUsedBuildInTagMap 中 key为  cml-builtin-button\n    Object.keys(usedBuildInTagMap).forEach(key =>{\n      let value = usedBuildInTagMap[key];\n      currentUsedBuildInTagMap[value] = key;\n    })\n    return source;\n  }\n\n  // 引用微信小程序组件处理\n  function miniAppRawComponentHandler() {\n    if((cmlType === 'wx' && extName === '.wxml') || (cmlType === 'alipay' && extName === '.axml') || (cmlType === 'baidu' && extName === '.swan') || (cmlType === 'qq' && extName === '.qml') || (cmlType === 'tt' && extName === '.ttml')) {\n      //生成json文件\n      let jsonFile = filePath.replace(miniTplExtReg,'.json');\n      if(!cmlUtils.isFile(jsonFile)) {\n        throw new Error(`未找到${filePath}对应的json文件`)\n      }\n      self.addDependency(jsonFile);\n      self.emitFile(entryPath.replace(miniTplExtReg,'.json'), JSON.stringify(jsonObject,'',4));\n\n      //wxml不处理直接生成\n      self.emitFile(entryPath, content);\n      miniAppScript.addMiniAppScript(self,filePath,context,cmlType)\n      var styleString = getWxmlRequest('styles');\n      var scriptString = getWxmlRequest('script');\n      var entryBasePath = entryPath.replace(miniTplExtReg, '');\n      output += `var __cml__style = ${styleString};\\n`\n      output += `var __cml__script = ${scriptString};\\n\n      __CML__GLOBAL.__CMLCOMPONNETS__['${entryBasePath}'] = __cml__script;\\n`\n\n      //采用分离的方式，入口js会放到static/js下，需要再生成入口js去require该js\n      var jsFileName = entryPath.replace(miniTplExtReg, '.js');\n      emitJSFile(jsFileName)\n    }\n  }\n\n\n\n  function miniAppHandler() {\n    // 记录依赖\n    let npmComponents = cmlUtils.getTargetInsertComponents(self.resourcePath, cmlType, context) || [];\n    npmComponents.forEach(item=>{\n      componentDeps.push(item.filePath);\n    })\n    let newJsonObj = jsonHandler(self, jsonObject, cmlType, componentDeps) || {};\n    newJsonObj.usingComponents = newJsonObj.usingComponents || {};\n    let usingComponents ={} ;\n\n    //为了实现compoents is 将这个模板用到的组件传给模板编译, 但是内置组件不在其中，内置组件需要按需加载\n    Object.keys(newJsonObj.usingComponents).forEach(key=>{\n      if(!~key.indexOf('cml-buildin-')) {\n        usingComponents[key] = newJsonObj.usingComponents[key]\n      }\n    })\n\n    usingComponents = prepareParseUsingComponents(usingComponents);\n    \n    //cml 编译出wxml模板\n    if (type !== 'app') {\n      let parseTemplate = parts.template && parts.template[0];\n      let templateContent = (parseTemplate && parseTemplate.content) || '';\n      templateContent = preParseMultiTemplate(`<template>${templateContent}</template>`,cmlType,{needTranJSX:true,needDelTemplate:true});\n      let lang = (parseTemplate && parseTemplate.lang) || 'cml';\n      //content是不带template标签的内容；\n      let compileResult = ASTcompileTemplate(templateContent, {\n        lang,\n        usingComponents,\n        filePath,\n        isInjectBaseStyle\n      });\n\n      let emitPath = entryPath.replace(miniCmlReg, `.${miniappTplExt[cmlType]}`)\n      self.emitFile(emitPath, compileResult);\n    }\n\n    // 生成json文件\n    let emitJsonPath = entryPath.replace(miniCmlReg, '.json');\n\n    // 内置组件按需引用\n    newJsonObj.usingComponents = newJsonObj.usingComponents || {};\n    Object.keys(newJsonObj.usingComponents).forEach(key =>{\n      //如果是内置组件 并且没有用过则删除\n      if(~key.indexOf('cml-buildin-') && !currentUsedBuildInTagMap[key]) {\n        delete newJsonObj.usingComponents[key]\n      }\n    })\n\n    // 小程序中有文件夹有@符号无法上传\n    Object.keys(newJsonObj.usingComponents).forEach(key=>{\n      newJsonObj.usingComponents[key] = cmlUtils.handleSpecialChar(newJsonObj.usingComponents[key])\n    });\n    //处理tabbar中配置的icon路径\n    if(type == 'app'){\n      loadIcon.handleApptabbar(newJsonObj,filePath,cmlType);\n      loadIcon.handleWorkers(newJsonObj,cmlType,self);\n    }\n    let jsonResult = JSON.stringify(newJsonObj, '', 4);\n    self.emitFile(emitJsonPath, jsonResult);\n    \n    //cml\n    parts.styles.forEach(function (style, i) {\n      //微信小程序在使用组件的时候 不支持属性选择器\n      style.scoped = false;\n      // require style\n      var requireString = style.src\n        ? getRequireForImport('styles', style, style.scoped)\n        : getRequire('styles', style, i, style.scoped)\n      output += `var __cml__style${i} = ${requireString};\\n`\n    })\n\n    var script = parts.script && parts.script[0];\n    if (script) {\n      var scriptRequireString = script.src\n        ? getRequireForImport('script', script)\n        : getRequire('script', script)\n      var entryBasePath = entryPath.replace(miniCmlReg, '');\n      output += `var __cml__script = ${scriptRequireString};\\n\n      __CML__GLOBAL.__CMLCOMPONNETS__['${entryBasePath}'] = __cml__script;\\n`\n\n      //采用分离的方式，入口js会放到static/js下，需要再生成入口js去require该js\n      var jsFileName = entryPath.replace(miniCmlReg, '.js');\n      emitJSFile(jsFileName);\n    }\n  }\n\n\n  function emitJSFile(jsFileName) {\n    var relativePath;\n    if (~self.resourcePath.indexOf('node_modules')) {\n      relativePath = path.relative(self.resourcePath, path.join(context, 'node_modules'));\n    } else {\n      relativePath = path.relative(self.resourcePath, path.join(context, 'src'));\n      if (relativePath == '..' || relativePath == '.') {\n        relativePath = ''\n      } else {\n        relativePath = relativePath.slice(3);\n      }\n      //app.js需要再去除一个相对路径\n      if (jsFileName === 'app.js') {\n        relativePath = relativePath.slice(3);\n      }\n    }\n    relativePath = cmlUtils.handleWinPath(relativePath);\n    jsFileName = cmlUtils.handleWinPath(jsFileName);\n    var entryContent =\n    `var __CML__GLOBAL = require('${relativePath}/static/js/manifest.js')\\n`;\n    if(type === 'app') {\n      entryContent += \"__CML__GLOBAL.App = App;\\n\"\n    } else if(type === 'component') {\n      entryContent += \"__CML__GLOBAL.Component = Component;\\n\"\n    } else if(type === 'page') {\n      entryContent += \"__CML__GLOBAL.Page = Page;\\n\"\n    }\n    entryContent += `require('${relativePath}/static/js/common.js')\\n`;\n    entryContent += `require('${relativePath}/static/js/${jsFileName}')()\\n`;\n    \n     \n    self.emitFile(jsFileName, entryContent);\n  }\n\n\n  function webWeexHandler() {\n    //主要是对模板进行编译和script进行拼接  vue组件的注册\n    const parseTemplate = (parts.template && parts.template[0]) || {};\n    let templateContent = parseTemplate.content || '';\n    if(type !== 'app'){\n      templateContent = preParseMultiTemplate(`<template>${templateContent}</template>`,cmlType,{needTranJSX:true,needDelTemplate:true});\n    }\n    const lang = parseTemplate.lang || 'cml';\n    const parseScript = (parts.script && parts.script[0]) || {};\n    const scriptContent = parseScript.content || '';\n    let newTemplate = handleTemplate();\n    if(type === 'app') {\n      if (cmlType == 'web') {\n        newTemplate = newTemplate.replace(/<app[\\s\\S]*?\\/app>/,`<router-view class=\"app\" bubble=\"true\"></router-view> `)\n      } else {\n        newTemplate = newTemplate.replace(/<app[\\s\\S]*?\\/app>/,`<div class=\"app\" bubble=\"true\">\n        <router-view ></router-view> \n        </div>`)\n      }\n      // newTemplate = `<template><view><router-view></router-view></view></template>`\n    }\n    let newScript = handleVueScript();\n    //拼接\n\n    let newContent = content;\n    //---------template----------------script--------\n    if(parseTemplate.start < parseScript.start) {\n      newContent = content.slice(0,parseTemplate.tagStart) +\n        newTemplate +\n        content.slice(parseTemplate.tagEnd, parseScript.start) +\n        newScript +\n        content.slice(parseScript.end);\n    } else {\n      newContent = content.slice(0,parseScript.start) +\n        newScript +\n        content.slice(parseScript.end, parseTemplate.tagStart) +\n        newTemplate +\n        content.slice(parseTemplate.tagEnd);\n    }\n    output = newContent;\n\n\n    function handleTemplate() {\n      let usingComponents = jsonObject.usingComponents || {};\n      usingComponents = prepareParseUsingComponents(usingComponents);\n      \n      //有组件在weex.cml中的template写的根标签不是唯一的，进入jsx解析会报错\n      let before = '';\n      if (type === 'component' && isWrapComponent) { // 组件包裹div\n        before = '<template>\\n<view class=\"__shadow_root__\">' +\n        templateContent + '\\n' +\n        '</view></template>'\n      } else { // 其他包裹template\n        before = '<template>\\n' +\n        templateContent + '\\n' +\n        '</template>'\n      }\n      return ASTcompileTemplate(before, {\n        lang,\n        usingComponents,\n        filePath,\n        isInjectBaseStyle\n      });\n\n    }\n\n    function handleVueScript() {\n      let { defineComponets, componetsStr } = getComponents();\n      let runtimeSnippet = getVueRunTimeSnippet(cmlType, type);\n      let scriptCode = getScriptCode(self, cmlType, scriptContent, media, options.check);\n      return `\n        ${defineComponets}\n        ${scriptCode}\n        ${componetsStr}\n        ${runtimeSnippet}`\n    }\n\n  }\n\n\n  //获取import组件与components字段\n  function getComponents() {\n    // 如果是web和weex的app组件形式做特殊处理\n\n    let defineComponets = '';\n    let componetsStr = '';\n    let coms = jsonObject.usingComponents || {};\n    let customComKeys = Object.keys(coms);\n    let npmComponents = cmlUtils.getTargetInsertComponents(self.resourcePath, cmlType, context) || [];\n    // 内置组件按需加载\n    npmComponents = npmComponents.filter(item=>{\n      // 如果是内置组件 选择模板中使用了的组件\n      if(item.isBuiltin) {\n        return !!currentUsedBuildInTagMap[item.name];\n        // 如果是其他的npm库组件 选择与用户自定义名称不同的组件\n      } else if(!~customComKeys.indexOf(item.name)){\n        return true;\n      }\n    })\n    let npmComponentsKeys = npmComponents.map((item) => { return item.name });\n    let componentsKey = [];\n    componentsKey = [].concat(Object.keys(coms), npmComponentsKeys);\n    //组件名称去重\n    componentsKey = [...new Set(componentsKey)]\n\n    componetsStr = toUpperCase(`exports.default.components = { ...exports.default.components, ${componentsKey.join(',')} }`)\n\n    //node_modules 中的组件引入\n    npmComponents.forEach(item => {\n      componentDeps.push(item.filePath);\n      defineComponets += `import ${toUpperCase(item.name)} from \"${cmlUtils.handleRelativePath(self.resourcePath, item.filePath)}\" \\n`\n    })\n\n    Object.keys(coms).forEach(comKey => {\n      let comPath = coms[comKey];\n      let splitInfo = comPath.split('?');\n      comPath = splitInfo[0];\n      let dynamicCompQuery = splitInfo[1]\n      let { filePath } = cmlUtils.handleComponentUrl(context, self.resourcePath, comPath, cmlType);\n      if(filePath) {\n        componentDeps.push(filePath);\n        let dynamicCompInfo = cmlUtils.getDynamicInfo(dynamicCompQuery);\n        if(cmlType === 'web' && dynamicCompInfo && dynamicCompInfo.dynamic == 1){ //动态加载组件只在web端生效\n          let chunkName = dynamicCompInfo && dynamicCompInfo.chunkName\n          if( chunkName && typeof chunkName === 'string'){\n            //支持自定义组件定义chunkName\n            defineComponets += `const ${toUpperCase(comKey)} = () => import(/*  webpackChunkName: '${chunkName}' */ \"${cmlUtils.handleRelativePath(self.resourcePath, filePath)}\") \\n`\n          }else{\n            defineComponets += `const ${toUpperCase(comKey)} = () => import(\"${cmlUtils.handleRelativePath(self.resourcePath, filePath)}\") \\n`\n          }\n        }else{\n          defineComponets += `import ${toUpperCase(comKey)} from \"${cmlUtils.handleRelativePath(self.resourcePath, filePath)}\" \\n`\n        }\n      } else {\n        cmlUtils.log.error(`can't find component:${comPath} in ${self.resourcePath} `);\n      }\n    })\n    return {\n      defineComponets,\n      componetsStr\n    }\n\n  }\n\n  function toUpperCase(content) {\n    return content.replace(/-(\\w)/ig, function (m, s1) {\n      return s1.toUpperCase()\n    })\n  }\n  /**\n   * 给template parse 提供组件的引用信息\n   * 目前不包括内置组件\n   * 1 小程序的component is的实现  不能有内置组件  否则无法按需加载\n   * 2 判断原生组件不代理事件，\n   * \n   * @param {*} originObj key 为组件名称，value为refPath的对象\n   * @return {*} [{\n   *   tagName: 组件名称\n   *   refUrl: 引用路径\n   *   filePath: 文件实际路径\n   *   isNative： 是否引用的原生组件\n   * }]\n   */\n  function prepareParseUsingComponents(originObj) {\n    return loaderMethods.prepareParseUsingComponents({\n      loaderContext: self,\n      context,\n      originObj,\n      cmlType\n    })\n  }\n  // done\n  return output\n}\n\n\n\n"
  },
  {
    "path": "packages/chameleon-loader/src/loaderMethods.js",
    "content": "\nconst cmlUtils = require('chameleon-tool-utils');\n\nexports.prepareParseUsingComponents = function({loaderContext, context, originObj, cmlType}) {\n  return Object.keys(originObj).map(key => {\n    let value = originObj[key];\n    let {filePath, refUrl} = cmlUtils.handleComponentUrl(context, loaderContext.resourcePath, value, cmlType);\n    // 如果是node_modules中的refUrl中会变成npm，替换成/node_modules/后再查找组件 只替换node_modules 路径也会有问题\n    if (~value.indexOf('/npm') && filePath === '') {\n      value = value.replace(/(.*?)npm\\//, '/node_modules/');\n      filePath = cmlUtils.handleComponentUrl(context, loaderContext.resourcePath, value, cmlType).filePath;\n    }\n    return {\n      tagName: key,\n      refUrl,\n      filePath,\n      isNative: !filePath.endsWith('.cml')\n    }\n  })\n}\n"
  },
  {
    "path": "packages/chameleon-loader/src/miniapp-script.js",
    "content": "const _ = module.exports = {};\nconst fs = require('fs');\nconst path = require('path');\nconst babylon = require('@babel/parser');\nconst traverse = require('babel-traverse')['default'];\nconst t = require('@babel/types')\nconst cmlUtils = require('chameleon-tool-utils');\n\n/** *\n * @param:loaderContext  webpack loader的上下文\n * @param:filePath 文件的绝对路径，用来读取文件内容\n * @param:context 项目的根目录 /Users/didi/work/cml-test/miniapp-script\n * 用来得到 var entryPath = cmlUtils.getEntryPath(self.resourcePath, context);\n * self.emitFile(entryPath, content);\n * @param:type  wx alipay baidu\n*/\n_.addMiniAppScript = function(loaderContext, filePath, context, type) {\n  let miniAppPaths = _.parseMiniAppScript(filePath, type);\n  if (miniAppPaths.length) {\n    miniAppPaths.forEach((item) => {\n      // 得到需要emit出的文件相对于被处理的文件（.wxml  .wxs）的绝对路径\n      let innerFilePath = path.resolve(path.dirname(filePath), item);\n      // 得到要导出的文件相对于 output.path的相对路径\n      let entryPath = cmlUtils.getEntryPath(innerFilePath, context);\n      let fileContent = fs.readFileSync(innerFilePath, {encoding: 'utf-8'});\n      loaderContext.emitFile(entryPath, fileContent);\n      // 递归处理文件\n      _.addMiniAppScript(loaderContext, innerFilePath, context, type)\n    })\n  }\n\n}\n\n/**\n * @param:filePath 文件的路径，可能是 .wxml或者 .wxs 的内容\n * @param:type wx alipay baidu\n *\n * @return:解析 .wxml  .wxs文件之后返回的一个相对路径数组 :['../wxs/utils.wxs','../wxs/utils1.wxs']\n *\n*/\n_.parseMiniAppScript = function(filePath, type) {\n  let miniAppPaths\n  if (type === 'wx') {\n    miniAppPaths = _.parseMiniAppScriptForWx(filePath);\n  }\n  if (type === 'qq') {\n    miniAppPaths = _.parseMiniAppScriptForQq(filePath);\n  }\n  if (type === 'alipay') {\n    miniAppPaths = _.parseMiniAppScriptForAlipay(filePath);\n  }\n  if (type === 'baidu') {\n    miniAppPaths = _.parseMiniAppScriptForBaidu(filePath);\n  }\n  if (type === 'tt') {\n    miniAppPaths = _.parseMiniAppScriptForTt(filePath);\n  }\n  return miniAppPaths || [];\n\n}\n_.parseMiniAppScriptForWx = function (filePath) {\n  let source = fs.readFileSync(filePath, {encoding: 'utf-8'});\n  let extName = path.extname(filePath);\n  let scriptPaths = [];\n  if (extName === '.wxml') {\n    // <wxs src=\"../wxs/utils.wxs\" module=\"utils\" />\n    // <wxs module=\"sss\" src=\"../wxs/utils.wxs\" module=\"utils\" ></wxs>\n    let miniScriptTagReg = /<wxs[\\s\\S]*?[\\/]*>/g;\n    let srcReg = /src\\s*=\\s*(\"[^\"]*\"|'[^']*')/\n    let matches = source.match(miniScriptTagReg);\n    if (!matches) {\n      return []\n    } else if (matches && Array.isArray(matches)) {\n      matches.forEach((item) => {\n        let srcMatches = item.match(srcReg);\n        if (srcMatches && Array.isArray(srcMatches)) {\n          scriptPaths.push(srcMatches[1].slice(1, -1))\n        }\n      })\n    }\n  } else if (extName === '.wxs') {\n    let callback = function(path) {\n      let node = path.node;\n      if (t.isCallExpression(node) && node.callee.name === 'require' && node.arguments[0]) {\n        let value = node.arguments[0].value\n        if (typeof value === 'string' && value.endsWith('.wxs')) {\n          scriptPaths.push(value)\n        }\n\n      }\n    };\n    _.commonParseScript(source, callback);\n  }\n  return scriptPaths;\n}\n_.parseMiniAppScriptForQq = function (filePath) {\n  let source = fs.readFileSync(filePath, {encoding: 'utf-8'});\n  let extName = path.extname(filePath);\n  let scriptPaths = [];\n  if (extName === '.qml') {\n    // <qs src=\"../wxs/utils.wxs\" module=\"utils\" />\n    // <qs module=\"sss\" src=\"../wxs/utils.wxs\" module=\"utils\" ></wxs>\n    let miniScriptTagReg = /<qs[\\s\\S]*?[\\/]*>/g;\n    let srcReg = /src\\s*=\\s*(\"[^\"]*\"|'[^']*')/\n    let matches = source.match(miniScriptTagReg);\n    if (!matches) {\n      return []\n    } else if (matches && Array.isArray(matches)) {\n      matches.forEach((item) => {\n        let srcMatches = item.match(srcReg);\n        if (srcMatches && Array.isArray(srcMatches)) {\n          scriptPaths.push(srcMatches[1].slice(1, -1))\n        }\n      })\n    }\n  } else if (extName === '.qs') {\n    let callback = function(path) {\n      let node = path.node;\n      if (t.isCallExpression(node) && node.callee.name === 'require' && node.arguments[0]) {\n        let value = node.arguments[0].value\n        if (typeof value === 'string' && value.endsWith('.qs')) {\n          scriptPaths.push(value)\n        }\n\n      }\n    };\n    _.commonParseScript(source, callback);\n  }\n  return scriptPaths;\n}\n_.parseMiniAppScriptForAlipay = function (filePath) {\n  let source = fs.readFileSync(filePath, {encoding: 'utf-8'});\n  let extName = path.extname(filePath);\n  let scriptPaths = [];\n  if (extName === '.axml') {\n    let miniScriptTagReg = /<import-sjs[\\s\\S]*?[\\/]*>/g;\n    let srcReg = /from\\s*=\\s*(\"[^\"]*\"|'[^']*')/\n    let matches = source.match(miniScriptTagReg);\n    if (!matches) {\n      return []\n    } else if (matches && Array.isArray(matches)) {\n      matches.forEach((item) => {\n        let srcMatches = item.match(srcReg);\n        if (srcMatches && Array.isArray(srcMatches)) {\n          scriptPaths.push(srcMatches[1].slice(1, -1))\n        }\n      })\n    }\n  } else if (extName === '.sjs') {\n    let callback = function(path) {\n      let node = path.node;\n      if (t.isImportDeclaration(node)) {\n        let value = node.source && node.source.value;\n        if (typeof value === 'string' && value.endsWith('.sjs')) {\n          scriptPaths.push(value)\n        }\n\n      }\n    };\n    _.commonParseScript(source, callback);\n  }\n  return scriptPaths;\n}\n_.parseMiniAppScriptForBaidu = function (filePath) {\n  let source = fs.readFileSync(filePath, {encoding: 'utf-8'});\n  let extName = path.extname(filePath);\n  if (filePath.endsWith('.filter.js')) {\n    extName = '.filter.js';\n  }\n  let scriptPaths = [];\n  if (extName === '.swan') {\n    let miniScriptTagReg = /<filter[\\s\\S]*?[\\/]*>/g;\n    let srcReg = /from\\s*=\\s*(\"[^\"]*\"|'[^']*')/\n    let matches = source.match(miniScriptTagReg);\n    if (!matches) {\n      return []\n    } else if (matches && Array.isArray(matches)) {\n      matches.forEach((item) => {\n        let srcMatches = item.match(srcReg);\n        if (srcMatches && Array.isArray(srcMatches)) {\n          scriptPaths.push(srcMatches[1].slice(1, -1))\n        }\n      })\n    }\n  } else if (extName === '.filter.js') {\n    let callback = function(path) {\n      let node = path.node;\n      if (t.isCallExpression(node) && node.callee.name === 'require' && node.arguments[0]) {\n        let value = node.arguments[0].value\n        if (typeof value === 'string' && value.endsWith('.filter.js')) {\n          scriptPaths.push(value)\n        }\n\n      }\n    };\n    _.commonParseScript(source, callback);\n  }\n  return scriptPaths;\n}\n// 暂未找到对应文档\n_.parseMiniAppScriptForTt = function (filePath) {\n  let source = fs.readFileSync(filePath, {encoding: 'utf-8'});\n  let extName = path.extname(filePath);\n  if (filePath.endsWith('.filter.js')) {\n    extName = '.filter.js';\n  }\n  let scriptPaths = [];\n  if (extName === '.ttml') {\n    let miniScriptTagReg = /<filter[\\s\\S]*?[\\/]*>/g;\n    let srcReg = /from\\s*=\\s*(\"[^\"]*\"|'[^']*')/\n    let matches = source.match(miniScriptTagReg);\n    if (!matches) {\n      return []\n    } else if (matches && Array.isArray(matches)) {\n      matches.forEach((item) => {\n        let srcMatches = item.match(srcReg);\n        if (srcMatches && Array.isArray(srcMatches)) {\n          scriptPaths.push(srcMatches[1].slice(1, -1))\n        }\n      })\n    }\n  } else if (extName === '.filter.js') {\n    let callback = function(path) {\n      let node = path.node;\n      if (t.isCallExpression(node) && node.callee.name === 'require' && node.arguments[0]) {\n        let value = node.arguments[0].value\n        if (typeof value === 'string' && value.endsWith('.filter.js')) {\n          scriptPaths.push(value)\n        }\n\n      }\n    };\n    _.commonParseScript(source, callback);\n  }\n  return scriptPaths;\n}\n\n_.commonParseScript = function(source, callback) {\n  let ast = babylon.parse(source);\n  traverse(ast, {\n    enter(path) {\n      callback(path)\n    }\n  })\n}\n\n"
  },
  {
    "path": "packages/chameleon-loader/src/parser.js",
    "content": "const cmlUtils = require('chameleon-tool-utils');\n\nmodule.exports = (content) => {\n  let parts = cmlUtils.splitParts({content})\n  parts.styles = parts.style;\n  return parts;\n}\n\n"
  },
  {
    "path": "packages/chameleon-loader/src/runtime/check.js",
    "content": "\n/* istanbul ignore next */\nmodule.exports = function(obj, __CML_ERROR__, __enableTypes__, __INTERFAE__DEFINES__, __CML__DEFINES__) {\n const className = obj.constructor.name;\n const interfaceDefines = __INTERFAE__DEFINES__;\n const enableTypes = __enableTypes__; // ['Object','Array','Nullable']\n const types = interfaceDefines.types;\n const interfaceKey = Object.keys(interfaceDefines.interfaces)[0]; // interface Name\n const interfaceObj = interfaceDefines.interfaces[interfaceKey];\n const cmlDefines = __CML__DEFINES__;\n let isImplementInterface = false;\n // 找到class\n if (cmlDefines.classes[className]) {\n   // class 的interface数组中有interface中的定义\n   if (~cmlDefines.classes[className].indexOf(interfaceKey)) {\n     isImplementInterface = true;\n   } else {\n     console.error(`class ${className} not implements interface ${interfaceKey}`);\n   }\n }\n\n\n let props = [];\n let events = {};\n\n Object.keys(interfaceObj).forEach(key => {\n   let item = interfaceObj[key];\n   if (is(item, 'Object')) {\n     // 是事件  有output和input\n     events[key] = item;\n   } else {\n     // 是属性\n     props.push({\n       key,\n       value: item\n     })\n   }\n })\n\n // created 时做props校验  同时建立watch属性检测props类型\n // 包装this.$cmlEmit 校验自定义事件参数类型\n function isFunc(target) {\n   return target && is(target, 'Function')\n }\n\n function is(source, type) {\n   return Object.prototype.toString.call(source) === '[object ' + type + ']';\n }\n\n const getType = function (value) {\n   const type = Object.prototype.toString.call(value);\n   return type.replace(/\\[object\\s(.*)\\]/g, '$1').replace(/( |^)[a-z]/g, (L) => L.toUpperCase());\n };\n\n // beforeCreate时 vue中还获取不到mixins的this.$cmlEmit方法\n let oldCreated = obj.created || function() {};\n obj.created = function(...args) {\n   checkProps.call(this);\n   oldCreated.call(this);\n }\n\n obj.methods = obj.methods || {};\n\n obj.methods.$__checkCmlEmit__ = function(eventName, eventDetail) {\n   if (events[eventName]) {\n     let {input} = events[eventName];\n     let detailType = input[0];\n     let errList = checkType(eventDetail, detailType, []);\n     if (errList && errList.length) {\n       __CML_ERROR__(`errorinfo: event ${eventName} detail verification fails\n           ${errList.join('\\n')}\n         `)\n     }\n   } else {\n     __CML_ERROR__(`errorinfo:  event ${eventName} is not defined in interface\n           ${errList.join('\\n')}\n         `)\n   }\n }\n\n function checkProps() {\n   props.forEach(item => {\n     let errList = checkType(this[item.key], item.value, []);\n     if (errList && errList.length) {\n       __CML_ERROR__(`error: prop [${item.key}] verification fails\n         ${errList.join('\\n')}\n       `)\n     }\n\n   })\n }\n\n obj.watch = obj.watch || {};\n\n props.forEach(item => {\n   let oldWatch = obj.watch[item.key];\n   obj.watch[item.key] = function (newVal, oldVal) {\n     let errList = checkType(newVal, item.value, []);\n     if (errList && errList.length) {\n       __CML_ERROR__(`errorinfo: prop [${item.key}] verification fails\n           ${errList.join('\\n')}\n         `)\n     }\n     if (isFunc(oldWatch)) {\n       oldWatch.call(this, newVal, oldVal);\n     }\n   }\n\n })\n\n\n /**\n  * 校验类型  两个loader共用代码\n  *\n  * @param  {*}      value 实际传入的值\n  * @param  {string} type  静态分析时候得到的值得类型\n  * @param  {array[string]} errList 校验错误信息  类型\n  * @return {bool}         校验结果\n  */\n const checkType = function(value, originType, errList = []) {\n   let isNullableReg = /_cml_nullable_lmc_/g;\n   let type = originType.replace('_cml_nullable_lmc_', '');\n   (type === \"Void\") && (type = \"Undefined\")\n   let currentType = getType(value);// Undefined Null Object Array Number String  Function只可能是这几种类型；\n   // 但是对于type的值则可能是 Undefined Null Number String NullUndefinedStiring\n   // Object Array Function EventDetail(...这种自定义的复杂数据类型) 这几种；\n   // 判断nullable类型的参数\n   // 如果 currentType === type 那么就会直接返回 [];\n   let canUseNullable = enableTypes.includes(\"Nullable\");\n   let canUseObject = enableTypes.includes(\"Object\");\n   let canUseArray = enableTypes.includes(\"Array\");\n   if (currentType == 'Null') { // 如果传入的值是 null类型，那么可能的情况是该值在接口处的被定义为Null或者是 ?string 这种可选参数的形式；\n     if (type == \"Null\") {// 如果定义的参数的值就是 Null，那么校验通过\n       errList = [];\n     } else { // 实际定义的参数的值不是 Null  ?string这种形式的定义，type = new String('String') ?Callback type = new String('Callback')\n     // 那么判断是否是可选参数的情况\n       (canUseNullable && isNullableReg.test(originType)) ? errList = [] : errList.push(`定义了${type}类型的参数，传入的却是${currentType},请确认是否开启nullable配置`)\n     }\n     return errList;\n\n   }\n   if (currentType == 'Undefined') { // 如果运行时传入的真实值是undefined,那么可能改值在接口处就是被定义为 Undefined类型或者是 ?string 这种可选参数 nullable的情况；\n     if (type == \"Undefined\") {\n       errList = [];\n     } else {\n       (canUseNullable && isNullableReg.test(originType)) ? errList = [] : errList.push(`定义了${type}类型的参数，传入的却是${currentType},请确认是否开启nullable配置或者检查所传参数是否和接口定义的一致`)\n     }\n     return errList;\n   }\n   if (currentType == 'String') {\n     if (type == 'String') {\n       errList = [];\n     } else {\n       errList.push(`定义了${type}类型的参数，传入的却是${currentType},请检查所传参数是否和接口定义的一致`)\n     }\n     return errList;\n   }\n   if (currentType == 'Boolean') {\n     if (type == 'Boolean') {\n       errList = [];\n     } else {\n       errList.push(`定义了${type}类型的参数，传入的却是${currentType},请检查所传参数是否和接口定义的一致`)\n     }\n     return errList;\n   }\n   if (currentType == 'Number') {\n     if (type == 'Number') {\n       errList = [];\n     } else {\n       errList.push(`定义了${type}类型的参数，传入的却是${currentType},请检查所传参数是否和接口定义的一致`)\n     }\n     return errList;\n   }\n   if (currentType == 'Object') {\n     if (type == 'Object') {\n       (!canUseObject) ? errList.push(`不能直接定义类型${type}，需要使用符合类型定义，请确认是否开启了可以直接定义 Object 类型参数；`) : (errList = []);\n     } else if (type == 'CMLObject') {\n       errList = [];\n     } else { // 这种情况的对象就是自定义的对象；\n       if (types[type]) {\n         const keys = Object.keys(types[type]);\n         // todo 这里是同样的问题，可能多传递\n         keys.forEach(key => {\n           let subError = checkType(value[key], types[type][key], []);\n           if (subError && subError.length) {\n             errList = errList.concat(subError)\n           }\n         });\n         if (Object.keys(value).length > keys.length) {\n           errList.push(`type [${type}] 参数个数与定义不符`)\n         }\n       } else {\n         errList.push('找不到定义的type [' + type + ']!');\n       }\n     }\n     return errList;\n   }\n   if (currentType == 'Array') {\n     if (type == 'Array') {\n       (!canUseObject) ? errList.push(`不能直接定义类型${type}，需要使用符合类型定义，请确认是否开启了可以直接定义 Array 类型参数；`) : (errList = []);\n     } else {\n       if (types[type]) {\n         // 数组元素的类型\n         let itemType = types[type][0];\n         for (let i = 0; i < value.length; i++) {\n           let subError = checkType(value[i], itemType, []);\n           if (subError && subError.length) {\n             errList = errList.concat(subError)\n           }\n         }\n       } else {\n         errList.push('找不到定义的type [' + type + ']!');\n\n       }\n     }\n\n     return errList;\n   }\n   if (currentType == 'Function') {\n     if (types[type]) {\n       if (!types[type].input && !types[type].output) {\n         errList.push(`找不到${types[type]} 函数定义的输入输出`);\n       }\n     } else {\n       errList.push('找不到定义的type [' + type + ']!');\n     }\n   }\n   if (currentType == 'Promise') {\n     if (type == 'Promise') {\n       errList = [];\n     } else {\n       errList.push(`定义了${type}类型的参数，传入的却是${currentType},请检查所传参数是否和接口定义的一致`)\n     }\n     return errList;\n   }\n   if (currentType == 'Date') {\n     if (type == 'Date') {\n       errList = [];\n     } else {\n       errList.push(`定义了${type}类型的参数，传入的却是${currentType},请检查所传参数是否和接口定义的一致`)\n     }\n     return errList;\n   }\n   if (currentType == 'RegExp') {\n     if (type == 'RegExp') {\n       errList = [];\n     } else {\n       errList.push(`定义了${type}类型的参数，传入的却是${currentType},请检查所传参数是否和接口定义的一致`)\n     }\n     return errList;\n   }\n\n\n   return errList;\n }\n\n return obj;\n\n\n}"
  },
  {
    "path": "packages/chameleon-loader/src/runtime/component-normalizer.js",
    "content": "/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n  scriptExports,\n  render,\n  staticRenderFns,\n  functionalTemplate,\n  injectStyles,\n  scopeId,\n  moduleIdentifier, /* server only */\n  shadowMode /* vue-cli only */\n) {\n  scriptExports = scriptExports || {}\n\n  // ES6 modules interop\n  var type = typeof scriptExports[\"default\"]\n  if (type === 'object' || type === 'function') {\n    scriptExports = scriptExports[\"default\"]\n  }\n\n  // Vue.extend constructor export interop\n  var options = typeof scriptExports === 'function'\n    ? scriptExports.options\n    : scriptExports\n\n  // render functions\n  if (render) {\n    options.render = render\n    options.staticRenderFns = staticRenderFns\n    options._compiled = true\n  }\n\n  // functional template\n  if (functionalTemplate) {\n    options.functional = true\n  }\n\n  // scopedId\n  if (scopeId) {\n    options._scopeId = scopeId\n  }\n\n  var hook\n  if (moduleIdentifier) { // server build\n    hook = function (context) {\n      // 2.3 injection\n      context =\n        context || // cached call\n        (this.$vnode && this.$vnode.ssrContext) || // stateful\n        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n      // 2.2 with runInNewContext: true\n      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n        context = __VUE_SSR_CONTEXT__\n      }\n      // inject component styles\n      if (injectStyles) {\n        injectStyles.call(this, context)\n      }\n      // register component module identifier for async chunk inferrence\n      if (context && context._registeredComponents) {\n        context._registeredComponents.add(moduleIdentifier)\n      }\n    }\n    // used by ssr in case component is cached and beforeCreate\n    // never gets called\n    options._ssrRegister = hook\n  } else if (injectStyles) {\n    hook = shadowMode\n      ? function () {injectStyles.call(this, this.$root.$options.shadowRoot)}\n      : injectStyles\n  }\n\n  if (hook) {\n    if (options.functional) {\n      // for template-only hot-reload because in that case the render fn doesn't\n      // go through the normalizer\n      options._injectStyles = hook\n      // register for functioal component in vue file\n      var originalRender = options.render\n      options.render = function renderWithStyleInjection (h, context) {\n        hook.call(context)\n        return originalRender(h, context)\n      }\n    } else {\n      // inject component registration as beforeCreate hook\n      var existing = options.beforeCreate\n      options.beforeCreate = existing\n        ? [].concat(existing, hook)\n        : [hook]\n    }\n  }\n\n  return {\n    exports: scriptExports,\n    options: options\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-loader/src/selector.js",
    "content": "// this is a utility loader that takes a *.cml file, parses it and returns\n// the requested language block, e.g. the content inside <template>, for\n// further processing.\n\nconst path = require('path')\nconst parse = require('./parser')\nconst {getMiniAppRunTimeSnippet} = require('./cml-compile/runtime/index.js');\nconst {getScriptCode} = require('./interface-check/getScriptCode.js');\nconst cmlUtils = require('chameleon-tool-utils');\n\n// 小程序才会经过该方法\nmodule.exports = function (content) {\n\n  // 处理script cml-type为json的内容\n  content = cmlUtils.deleteScript({content, cmlType: 'json'});\n  const loaderContext = this;\n\n  const query = queryParse(this.query);\n  query.check = query.check || '{}';\n  query.check = JSON.parse(query.check);\n  const context = (this._compiler && this._compiler.context) || this.options.context || process.cwd()\n  let filename = path.basename(this.resourcePath)\n  filename = filename.substring(0, filename.lastIndexOf(path.extname(filename))) + '.vue'\n  const sourceRoot = path.dirname(path.relative(context, this.resourcePath))\n  const parts = parse(content, filename, this.sourceMap, sourceRoot)\n  let part = parts[query.type]\n  if (Array.isArray(part)) {\n    let index = query.index || 0;\n    part = part[index]\n  }\n  let output = part.content;\n  if (query.type === 'styles' && ~['page', 'component'].indexOf(query.fileType) && query.isInjectBaseStyle === 'true') {\n    let pageCssPath = path.join(cml.projectRoot, 'node_modules', `chameleon-runtime/src/platform/${query.cmlType}/style/page.css`)\n    let hasPageCss = cmlUtils.isFile(pageCssPath)\n    if (query.fileType === 'page' && hasPageCss) {\n      // output = `\n      //   @import 'chameleon-runtime/src/platform/${query.cmlType}/style/page.css';\n      //   ${output}\n      // `\n      output = `\n        ${output}\n      `\n    } else {\n      // output = `\n      //   @import 'chameleon-runtime/src/platform/${query.cmlType}/style/index.css';\n      //   ${output}\n      // `\n      output = `\n        ${output}\n      `\n    }\n\n  }\n  if (query.type == 'script') {\n    // 拼接wx所需要的运行时代码，如果在loader中拼接，拼接的代码将不会过loader了\n    let runtimeScript = getMiniAppRunTimeSnippet(query.cmlType, query.fileType);\n    output = getScriptCode(loaderContext, query.cmlType, output, query.media, query.check);\n    output = `\n      ${output}\\n\n      ${runtimeScript}\n    `\n  }\n  this.callback(null, output, part.map)\n}\n\n\nfunction queryParse(search) {\n  search = search || '';\n  let arr = search.split(/(\\?|&)/);\n  let parmsObj = {};\n  for (let i = 0; i < arr.length; i++) {\n    if (arr[i].indexOf('=') !== -1) {\n      let keyValue = arr[i].match(/([^=]*)=(.*)/);\n      parmsObj[keyValue[1]] = keyValue[2];\n    }\n  }\n  return parmsObj;\n}\n\n"
  },
  {
    "path": "packages/chameleon-loader/src/utils/normalize.js",
    "content": "const IS_TEST = !!process.env.VUE_LOADER_TEST\nconst fs = require('fs')\nconst path = require('path')\n\nexports.lib = file => path.resolve(__dirname, '../', file)\n\nexports.dep = dep => {\n  if (IS_TEST) {\n    return dep\n  } else if (\n    fs.existsSync(path.resolve(__dirname, '../../node_modules', dep))\n  ) {\n    // npm 2 or npm linked\n    return 'vue-loader/node_modules/' + dep\n  } else {\n    // npm 3\n    return dep\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-loader/src/utils/prehandle.js",
    "content": "const parse = require('../parser')\nconst cmlUtils = require('chameleon-tool-utils');\nexports.injectWeexBaseStyle = function(content, self) {\n  let globalStyleConfig = cml.config.get().globalStyleConfig;\n  let weexCssConfig = globalStyleConfig && globalStyleConfig.weexCssConfig;\n  let newcontent = content;\n  let parts = parse(content);\n  if (parts.styles && parts.styles.length > 1) {\n    throw new Error(`${self.resourcePath} statement ${parts.styles.length} style tag,but only allow one`)\n  }\n\n  if (parts.styles && parts.styles.length === 1) {\n    let contentStart = parts.styles[0].start;\n    let contentEnd = parts.styles[0].end;\n    let globalStyle = '\\n@import \\'chameleon-runtime/src/platform/weex/style/index.css\\';\\n';\n    let injectCssContent = '';\n    if (weexCssConfig && weexCssConfig.weexCssPath && cmlUtils.isFile(weexCssConfig.weexCssPath)) {\n      globalStyle = `${globalStyle} @import '${weexCssConfig.weexCssPath}';\\n`\n    }\n    if (weexCssConfig && weexCssConfig.injectCss && Array.isArray(weexCssConfig.injectCss)) {\n      let injectConfig = weexCssConfig.injectCss.find((item) => item.componentPath === self.resourcePath);\n      injectConfig && (injectCssContent = `\\n@import '${injectConfig.cssPath}';\\n`);\n    }\n    newcontent = content.slice(0, contentStart) + globalStyle + content.slice(contentStart, contentEnd) + injectCssContent + content.slice(contentEnd);\n  }\n  return newcontent;\n}\nexports.webAddStyleScope = function(content, self) {\n  let newcontent = content;\n  let parts = parse(content);\n  if (parts.styles && parts.styles.length > 1) {\n    throw new Error(`${self.resourcePath} statement ${parts.styles.length} style tag,but only allow one`)\n  }\n\n  if (parts.styles && parts.styles.length === 1) {\n    let part = parts.styles[0];\n    if (!part.scoped) {\n      let styleTag = content.slice(part.tagStart, part.start);\n      const styleReg = /\\s*<\\s*style([\\s\\S]*)/g\n      styleTag = styleTag.replace(styleReg, function(matches, $1) {\n        return `<style scoped ${$1}`\n      });\n      newcontent = content.slice(0, part.tagStart) + styleTag + content.slice(part.start);\n    }\n  }\n  return newcontent;\n}\n"
  },
  {
    "path": "packages/chameleon-loader/src/utils/try-require.js",
    "content": "/* eslint-disable */\nconst cwd = process.cwd()\nconst resolve = require('resolve')\n\n// attempts to first require a dep using projects cwd (when vue-loader is linked)\n// then try a normal require.\nmodule.exports = function tryRequire (dep) {\n  let fromCwd\n  try {\n    fromCwd = resolve.sync(dep, { basedir: cwd })\n  } catch (e) {}\n  if (fromCwd) {\n    return require(fromCwd)\n  } else {\n    try {\n      return require(dep)\n    } catch (e) {}\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-loader/test/src/cml-compile.test/runtime/all-properties.js",
    "content": "function Person(name,age){\n  //定义自身属性\n  this.name = name ;\n  this.age = age;\n}\n//定义原型属性\nPerson.prototype.jump = function(){};\nPerson.prototype.yell = function(){};\nvar person = new Person(\"JiM\",23);\n//Object.defineProperty 直接给一个对象定义一个自身属性值\n//给person对象定义一个可以枚举的属性gender\nObject.defineProperty(person,'gender',{value:'male',enumerable:true});\n//给person对象定义一个不可以枚举的属性weight \nObject.defineProperty(person,'weight',{value:'200kg',enumerable:false});\nmodule.exports.person = person;"
  },
  {
    "path": "packages/chameleon-loader/test/src/cml-compile.test/runtime/common-utils.test.js",
    "content": "// const utils = require('../../../../lib/cml-compile/runtime/common/util.js');\n// const expect = require('chai').expect;\n// const fs = require('fs');\n// const path = require('path');\n// const {person} = require('./all-properties.js');\n\n// describe('common/utils.js',function(){\n//   it('test common/utils.js',function(){\n//     console.log(Object.keys(person));\n//   })\n// })\n//运行时的无法校验；\n\n"
  },
  {
    "path": "packages/chameleon-loader/test/src/cml-compile.test/runtime/web-utils.test.js",
    "content": ""
  },
  {
    "path": "packages/chameleon-loader/test/src/cml-compile.test/runtime/weex-utils.test.js",
    "content": ""
  },
  {
    "path": "packages/chameleon-loader/test/src/cml-compile.test/runtime/wx-utils.test.js",
    "content": ""
  },
  {
    "path": "packages/chameleon-loader/test/src/load-icon.test.js",
    "content": "const loadIcon = require('../../src/load-icon.js');\nconst expect = require('chai').expect;\nconst path = require('path');\n\ndescribe('load-icon', function() {\n  it('handleApptabbar', function() {\n    let newJsonObj = {\n      \"tabBar\": {\n        \"color\": \"#7A7E83\",\n        \"selectedColor\": \"#3cc51f\",\n        \"borderStyle\": \"black\",\n        \"backgroundColor\": \"#ffffff\",\n        \"list\": [\n          {\n            \"pagePath\": \"pages/index/index\",\n            \"text\": \"组件\",\n            \"iconPath\": \"../../assets/images/chameleon.png\",\n            \"selectedIconPath\": \"../../assets/images/icon_API.png\"\n          },\n          {\n            \"pagePath\": \"pages/index/index2\",\n            \"text\": \"接口\"\n          }\n        ]\n      }\n    }\n    let filePath = path.resolve(__dirname);\n\n    let result = loadIcon.handleApptabbar(newJsonObj, filePath, 'wx');\n    expect(result).to.not.be.ok;\n  })\n  it('getRelativeIconPath', function() {\n    let result = loadIcon.getRelativeIconPath('./dir/chameleon.png');\n    expect(result).to.equal('icon/chameleon.png')\n  });\n  it('getTabbarIconPaths-baidu', function() {\n    let tabbar = {\n      \"color\": \"#7A7E83\",\n      \"selectedColor\": \"#3cc51f\",\n      \"borderStyle\": \"black\",\n      \"backgroundColor\": \"#ffffff\",\n      \"list\": [\n        {\n          \"pagePath\": \"pages/index/index\",\n          \"text\": \"组件\",\n          \"iconPath\": \"../../assets/images/chameleon.png\",\n          \"selectedIconPath\": \"../../assets/images/icon_API2.png\"\n        },\n        {\n          \"pagePath\": \"pages/index/index2\",\n          \"text\": \"接口\"\n        }\n      ]\n    }\n    let result = loadIcon.getTabbarIconPaths(tabbar, 'baidu')\n    expect(result).to.be.an('array')\n  });\n  it('getTabbarIconPaths-wx', function() {\n    let tabbar = {\n      \"color\": \"#7A7E83\",\n      \"selectedColor\": \"#3cc51f\",\n      \"borderStyle\": \"black\",\n      \"backgroundColor\": \"#ffffff\",\n      \"list\": [\n        {\n          \"pagePath\": \"pages/index/index\",\n          \"text\": \"组件\",\n          \"iconPath\": \"../../assets/images/chameleon.png\",\n          \"selectedIconPath\": \"../../assets/images/icon_API2.png\"\n        },\n        {\n          \"pagePath\": \"pages/index/index2\",\n          \"text\": \"接口\"\n        }\n      ]\n    }\n    let result = loadIcon.getTabbarIconPaths(tabbar, 'wx')\n    expect(result).to.be.an('array')\n  });\n  it('getTabbarIconPaths-baidu', function() {\n    let tabbar = {\n      \"color\": \"#7A7E83\",\n      \"selectedColor\": \"#3cc51f\",\n      \"borderStyle\": \"black\",\n      \"backgroundColor\": \"#ffffff\",\n      \"items\": [\n        {\n          \"pagePath\": \"pages/index/index\",\n          \"text\": \"组件\",\n          \"icon\": \"../../assets/images/chameleon.png\",\n          \"activeIcon\": \"../../assets/images/icon_API2.png\"\n        },\n        {\n          \"pagePath\": \"pages/index/index2\",\n          \"text\": \"接口\"\n        }\n      ]\n    }\n    let result = loadIcon.getTabbarIconPaths(tabbar, 'alipay')\n    expect(result).to.be.an('array')\n  });\n\n})\n"
  },
  {
    "path": "packages/chameleon-loader/test/src/loader.test.js",
    "content": "\n\n\n"
  },
  {
    "path": "packages/chameleon-loader/test/src/loaderMethods.test.js",
    "content": "const loaderMethods = require('../../src/loaderMethods.js');\nconst expect = require('chai').expect;\nconst path = require('path');\n\ndescribe('prepareParseUsingComponents', function() {\n  it('/npm/', function() {\n    let originObj = {\n      scroller: '/npm/cml-ui/scroller/scroller'\n    }\n    let loaderContext = {\n      resourcePath: path.join(__dirname, './project/src/pages/pagea.cml')\n    }\n\n    let context = path.join(__dirname, './project');\n    let result = loaderMethods.prepareParseUsingComponents({\n      loaderContext,\n      context,\n      originObj,\n      cmlType: 'wx'\n    });\n\n    let expectPath = path.join(__dirname, './project/node_modules/cml-ui/scroller/scroller.cml')\n    console.log(result)\n    result.forEach(item => {\n      if (item.tagName === 'scroller') {\n        expect(item.filePath).to.be.equal(expectPath);\n        expect(item.isNative).to.be.equal(false);\n      }\n    })\n  })\n\n  it('../npm/', function() {\n    let originObj = {\n      scroller: './../npm/cml-ui/scroller/scroller'\n    }\n    let loaderContext = {\n      resourcePath: path.join(__dirname, './project/src/pages/pagea.cml')\n    }\n\n    let context = path.join(__dirname, './project');\n    let result = loaderMethods.prepareParseUsingComponents({\n      loaderContext,\n      context,\n      originObj,\n      cmlType: 'wx'\n    });\n\n    let expectPath = path.join(__dirname, './project/node_modules/cml-ui/scroller/scroller.cml')\n    result.forEach(item => {\n      if (item.tagName === 'scroller') {\n        expect(item.filePath).to.be.equal(expectPath);\n        expect(item.isNative).to.be.equal(false);\n      }\n    })\n  })\n})\n\n\n"
  },
  {
    "path": "packages/chameleon-loader/test/src/parser.cml",
    "content": "<template>\n<view class=\"wrap\">\n\n</view>\n</template>\n<script>\nimport cml from 'chameleon-api'\nclass CTodoitem   {\n  props = {\n    \n  }\n  data = {\n    \n  }\n\n  computed = {\n    \n  }\n\n  watch  = {\n  }\n\n  methods = {\n    \n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.wrap {\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  height: 100px;\n  width: 600px;\n  border-bottom: 1px solid #ccc;\n}\n.checkbox-wrap {\n  display: flex;\n  flex-direction: row;\n  width: 80px;\n  height: 100px;\n  justify-content: center;\n  align-items: center;\n}\n.completed-show {\n  width: 470px;\n  font-size: 32px;\n  color: #999;\n  height: 100px;\n  line-height: 100px;\n  text-decoration: line-through;\n}\n.text-show {\n  width: 470px;\n  font-size: 32px;\n  color: #666;\n  height: 100px;\n  line-height: 100px;\n}\n.top-btn {\n  font-size: 28px;\n  width: 120px;\n  height: 100px;\n  line-height: 100px;\n  text-align: center;\n  color: #fff;\n  background: #61c7fc;\n}\n.delete-btn {\n  margin-right: 10px;\n  width: 40px;\n  height: 40px;\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: center;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  },\n  \"wx\": {\n    \"component\": true\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-loader/test/src/parser.test.js",
    "content": "const parser = require('../../src/parser.js');\nconst expect = require('chai').expect;\nconst fs = require('fs');\nconst path = require('path');\n\nlet source = fs.readFileSync(path.resolve(__dirname,'./parser.cml'),'utf-8');\ndescribe('parser.js',function(){\n  it('test parser',function(){\n    let result = parser(source);\n    expect(result.template.length).to.equal(1);\n    expect(result.script.length).to.equal(2);\n    expect(result.style.length).to.equal(1);\n  })\n})\n\n\n"
  },
  {
    "path": "packages/chameleon-loader/test/src/project/src/components/coma.cml",
    "content": ""
  },
  {
    "path": "packages/chameleon-loader/test/src/project/src/pages/pagea.cml",
    "content": ""
  },
  {
    "path": "packages/chameleon-loader/test/src/utils.test/normalize.test.js",
    "content": "const normalize = require('../../../src/utils/normalize.js');\nconst expect = require('chai').expect;\nconst fs = require('fs');\nconst path = require('path');\n\ndescribe('normalize.js',function(){\n  it('test dep function:process.env.VUE_LOADER_TEST=true',function(){\n    process.env.VUE_LOADER_TEST = true;\n    let dep = 'test-dep'\n    let result = normalize.dep(dep);\n    expect(result).to.be.equal(dep);\n  });\n  it('test dep function:process.env.VUE_LOADER_TEST=fasle',function(){\n    process.env.VUE_LOADER_TEST = false;\n    let dep = 'test-dep'\n    let result = normalize.dep(dep);\n    expect(result).to.be.equal(dep);\n  });\n})\n\n\n"
  },
  {
    "path": "packages/chameleon-loader/test/src/utils.test/prehandle.test.js",
    "content": "const prehandle = require('../../../src/utils/prehandle.js');\nconst expect = require('chai').expect;\n\nlet content1 = `\n<style>\n.name {\n\n}\n</style>\n`\n\nlet content2 = `\n<style scoped >\n.name {\n\n}\n</style>\n\n`\n\nlet self = {\n  resourcePath: 'User/yyl/1.cml'\n}\ndescribe('prehandle.js', function() {\n  it('injectWeexBaseStyle', function() {\n    let result1 = prehandle.injectWeexBaseStyle(content1, self);\n    console.log(result1)\n    expect(!!~result1.indexOf(`@import 'chameleon-runtime/src/platform/weex/style/index.css';`)).to.be.equal(true);\n  });\n\n  it('webAddStyleScope', function() {\n    let result1 = prehandle.webAddStyleScope(content1, self);\n    console.log(result1)\n    expect(!!~result1.indexOf(`scoped`)).to.be.equal(true);\n\n    let result2 = prehandle.webAddStyleScope(content2, self);\n    console.log(result2)\n    expect(result2 === content2).to.be.equal(true);\n  });\n \n})\n\n\n"
  },
  {
    "path": "packages/chameleon-loader/test/src/utils.test/try-require.test.js",
    "content": "const try_require = require('../../../src/utils/try-require.js');\nconst expect = require('chai').expect;\nconst fs = require('fs');\nconst path = require('path');\n\ndescribe('try_require.js',function(){\n  it('test try require',function(){\n    let result = !!try_require('@babel/parser');\n    expect(result).to.be.ok\n  })\n})\n\n\n"
  },
  {
    "path": "packages/chameleon-miniapp-target/.eslintrc",
    "content": "{\n    // 在配置文件里配置全局变量时，使用 globals 指出你要使用的全局变量。将变量设置为 true 将允许变量被重写，或 false 将不允许被重写\n    \"globals\": {\n        \"cml\": false\n    },\n  // 环境定义了预定义的全局变量。\n  \"env\": {\n      //环境定义了预定义的全局变量。更多在官网查看\n      \"browser\": true,\n      \"node\": true,\n      \"commonjs\": true,\n      \"amd\": true,\n      \"es6\": true,\n      \"mocha\": true\n  },\n  // JavaScript 语言选项\n  \"parserOptions\": {\n      // ECMAScript 版本\n      \"ecmaVersion\": 6,\n      \"sourceType\": \"module\", //设置为 \"script\" (默认) 或 \"module\"（如果你的代码是 ECMAScript 模块)。\n      //想使用的额外的语言特性:\n      \"ecmaFeatures\": {\n          // 允许在全局作用域下使用 return 语句\n          \"globalReturn\": true,\n          // impliedStric\n          \"impliedStrict\": true,\n          // 启用 JSX\n          \"jsx\": true,\n          \"modules\": true\n      }\n  },\n  //-----让eslint支持 JSX start\n  \"plugins\": [\n\n  ],\n  \"extends\": [\n      \"eslint:recommended\"\n  ],\n  //-----让eslint支持 JSX end\n\n\n  /**\n   * \"off\" 或 0 - 关闭规则\n   * \"warn\" 或 1 - 开启规则，使用警告级别的错误：warn (不会导致程序退出),\n   * \"error\" 或 2 - 开启规则，使用错误级别的错误：error (当被触发的时候，程序会退出)\n   */\n  \"rules\": {\n\n      ////////////////\n      // 可能的错误 //\n      ////////////////\n\n      // 禁止条件表达式中出现赋值操作符\n      \"no-cond-assign\": 2,\n      // 禁用 console\n      \"no-console\": 0,\n      // 禁止在条件中使用常量表达式\n      // if (false) {\n      // doSomethingUnfinished();\n      // } //cuowu\n      \"no-constant-condition\": 2,\n      // 禁止在正则表达式中使用控制字符 ：new RegExp(\"\\x1f\")\n      \"no-control-regex\": 2,\n      // 数组和对象键值对最后一个逗号， never参数：不能带末尾的逗号, always参数：必须带末尾的逗号，\n      // always-multiline：多行模式必须带逗号，单行模式不能带逗号\n      \"comma-dangle\": [1, \"never\"],\n      // 禁用 debugger\n      \"no-debugger\": 2,\n      // 禁止 function 定义中出现重名参数\n      \"no-dupe-args\": 2,\n      // 禁止对象字面量中出现重复的 key\n      \"no-dupe-keys\": 2,\n      // 禁止重复的 case 标签\n      \"no-duplicate-case\": 2,\n      // 禁止空语句块\n      \"no-empty\": 2,\n      // 禁止在正则表达式中使用空字符集 (/^abc[]/)\n      \"no-empty-character-class\": 2,\n      // 禁止对 catch 子句的参数重新赋值\n      \"no-ex-assign\": 2,\n      // 禁止不必要的布尔转换\n      \"no-extra-boolean-cast\": 2,\n      // 禁止不必要的括号 //(a * b) + c;//报错\n      \"no-extra-parens\": 0,\n      // 禁止不必要的分号\n      \"no-extra-semi\": 2,\n      // 禁止对 function 声明重新赋值\n      \"no-func-assign\": 2,\n      // 禁止在嵌套的块中出现 function 或 var 声明\n      \"no-inner-declarations\": [2, \"functions\"],\n      // 禁止 RegExp 构造函数中无效的正则表达式字符串\n      \"no-invalid-regexp\": 2,\n      // 禁止在字符串和注释之外不规则的空白\n      \"no-irregular-whitespace\": 2,\n      // 禁止在 in 表达式中出现否定的左操作数\n      \"no-negated-in-lhs\": 2,\n      // 禁止把全局对象 (Math 和 JSON) 作为函数调用 错误：var math = Math();\n      \"no-obj-calls\": 2,\n      // 禁止直接使用 Object.prototypes 的内置属性\n      \"no-prototype-builtins\": 0,\n      // 禁止正则表达式字面量中出现多个空格\n      \"no-regex-spaces\": 2,\n      // 禁用稀疏数组\n      \"no-sparse-arrays\": 2,\n      // 禁止出现令人困惑的多行表达式\n      \"no-unexpected-multiline\": 2,\n      // 禁止在return、throw、continue 和 break语句之后出现不可达代码\n      \"no-unreachable\": 2,\n      // 要求使用 isNaN() 检查 NaN\n      \"use-isnan\": 2,\n      // 强制使用有效的 JSDoc 注释\n      \"valid-jsdoc\": 0,\n      // 强制 typeof 表达式与有效的字符串进行比较\n      // typeof foo === \"undefimed\" 错误\n      \"valid-typeof\": 2,\n\n\n      //////////////\n      // 最佳实践 //\n      //////////////\n\n      // 定义对象的set存取器属性时，强制定义get\n      \"accessor-pairs\": 2,\n      // 强制数组方法的回调函数中有 return 语句\n      \"array-callback-return\": 0,\n      // 强制把变量的使用限制在其定义的作用域范围内\n      \"block-scoped-var\": 0,\n      // 限制圈复杂度，也就是类似if else能连续接多少个\n      \"complexity\": [2, 9],\n      // 要求 return 语句要么总是指定返回的值，要么不指定\n      \"consistent-return\": 0,\n      // 强制所有控制语句使用一致的括号风格\n      \"curly\": [2, \"all\"],\n      // switch 语句强制 default 分支，也可添加 // no default 注释取消此次警告\n      \"default-case\": 2,\n      // 强制object.key 中 . 的位置，参数:\n      // property，'.'号应与属性在同一行\n      // object, '.' 号应与对象名在同一行\n      \"dot-location\": [2, \"property\"],\n      // 强制使用.号取属性\n      // 参数： allowKeywords：true 使用保留字做属性名时，只能使用.方式取属性\n      // false 使用保留字做属性名时, 只能使用[]方式取属性 e.g [2, {\"allowKeywords\": false}]\n      // allowPattern: 当属性名匹配提供的正则表达式时，允许使用[]方式取值,否则只能用.号取值 e.g [2, {\"allowPattern\": \"^[a-z]+(_[a-z]+)+$\"}]\n      \"dot-notation\": [2, {\n          \"allowKeywords\": false\n      }],\n      // 使用 === 替代 == allow-null允许null和undefined==\n      \"eqeqeq\": [0, \"allow-null\"],\n      // 要求 for-in 循环中有一个 if 语句\n      \"guard-for-in\": 2,\n      // 禁用 alert、confirm 和 prompt\n      \"no-alert\": 0,\n      // 禁用 arguments.caller 或 arguments.callee\n      \"no-caller\": 2,\n      // 不允许在 case 子句中使用词法声明\n      \"no-case-declarations\": 2,\n      // 禁止除法操作符显式的出现在正则表达式开始的位置\n      \"no-div-regex\": 2,\n      // 禁止 if 语句中有 return 之后有 else\n      \"no-else-return\": 0,\n      // 禁止出现空函数.如果一个函数包含了一条注释，它将不会被认为有问题。\n      \"no-empty-function\": 2,\n      // 禁止使用空解构模式no-empty-pattern\n      \"no-empty-pattern\": 2,\n      // 禁止在没有类型检查操作符的情况下与 null 进行比较\n      \"no-eq-null\": 1,\n      // 禁用 eval()\n      \"no-eval\": 2,\n      // 禁止扩展原生类型\n      \"no-extend-native\": 2,\n      // 禁止不必要的 .bind() 调用\n      \"no-extra-bind\": 2,\n      // 禁用不必要的标签\n      \"no-extra-label:\": 0,\n      // 禁止 case 语句落空\n      \"no-fallthrough\": 2,\n      // 禁止数字字面量中使用前导和末尾小数点\n      \"no-floating-decimal\": 2,\n      // 禁止使用短符号进行类型转换(!!fOO)\n      \"no-implicit-coercion\": 0,\n      // 禁止在全局范围内使用 var 和命名的 function 声明\n      \"no-implicit-globals\": 1,\n      // 禁止使用类似 eval() 的方法\n      \"no-implied-eval\": 2,\n      // 禁止 this 关键字出现在类和类对象之外\n      \"no-invalid-this\": 0,\n      // 禁用 __iterator__ 属性\n      \"no-iterator\": 2,\n      // 禁用标签语句\n      \"no-labels\": 2,\n      // 禁用不必要的嵌套块\n      \"no-lone-blocks\": 2,\n      // 禁止在循环中出现 function 声明和表达式\n      \"no-loop-func\": 1,\n      // 禁用魔术数字(3.14什么的用常量代替)\n      \"no-magic-numbers\": [1, {\n          \"ignore\": [0, -1, 1]\n      }],\n      // 禁止使用多个空格\n      \"no-multi-spaces\": 2,\n      // 禁止使用多行字符串，在 JavaScript 中，可以在新行之前使用斜线创建多行字符串\n      \"no-multi-str\": 2,\n      // 禁止对原生对象赋值\n      \"no-native-reassign\": 2,\n      // 禁止在非赋值或条件语句中使用 new 操作符\n      \"no-new\": 2,\n      // 禁止对 Function 对象使用 new 操作符\n      \"no-new-func\": 0,\n      // 禁止对 String，Number 和 Boolean 使用 new 操作符\n      \"no-new-wrappers\": 2,\n      // 禁用八进制字面量\n      \"no-octal\": 2,\n      // 禁止在字符串中使用八进制转义序列\n      \"no-octal-escape\": 2,\n      // 不允许对 function 的参数进行重新赋值\n      \"no-param-reassign\": 0,\n      // 禁用 __proto__ 属性\n      \"no-proto\": 2,\n      // 禁止使用 var 多次声明同一变量\n      \"no-redeclare\": 2,\n      // 禁用指定的通过 require 加载的模块\n      \"no-return-assign\": 0,\n      // 禁止使用 javascript: url\n      \"no-script-url\": 0,\n      // 禁止自我赋值\n      \"no-self-assign\": 2,\n      // 禁止自身比较\n      \"no-self-compare\": 2,\n      // 禁用逗号操作符\n      \"no-sequences\": 2,\n      // 禁止抛出非异常字面量\n      \"no-throw-literal\": 2,\n      // 禁用一成不变的循环条件\n      \"no-unmodified-loop-condition\": 2,\n      // 禁止出现未使用过的表达式\n      \"no-unused-expressions\": 0,\n      // 禁用未使用过的标签\n      \"no-unused-labels\": 2,\n      // 禁止不必要的 .call() 和 .apply()\n      \"no-useless-call\": 2,\n      // 禁止不必要的字符串字面量或模板字面量的连接\n      \"no-useless-concat\": 0,\n      // 禁用不必要的转义字符\n      \"no-useless-escape\": 0,\n      // 禁用 void 操作符\n      \"no-void\": 0,\n      // 禁止在注释中使用特定的警告术语\n      \"no-warning-comments\": 0,\n      // 禁用 with 语句\n      \"no-with\": 2,\n      // 强制在parseInt()使用基数参数\n      \"radix\": 2,\n      // 要求所有的 var 声明出现在它们所在的作用域顶部\n      \"vars-on-top\": 0,\n      // 要求 IIFE 使用括号括起来\n      \"wrap-iife\": [2, \"any\"],\n      // 要求或禁止 “Yoda” 条件\n      \"yoda\": [2, \"never\"],\n      // 要求或禁止使用严格模式指令\n      \"strict\": 0,\n\n\n      //////////////\n      // 变量声明 //\n      //////////////\n\n      // 要求或禁止 var 声明中的初始化(初值)\n      \"init-declarations\": 0,\n      // 不允许 catch 子句的参数与外层作用域中的变量同名\n      \"no-catch-shadow\": 0,\n      // 禁止删除变量\n      \"no-delete-var\": 2,\n      // 不允许标签与变量同名\n      \"no-label-var\": 2,\n      // 禁用特定的全局变量\n      \"no-restricted-globals\": 0,\n      // 禁止 var 声明 与外层作用域的变量同名\n      \"no-shadow\": 0,\n      // 禁止覆盖受限制的标识符\n      \"no-shadow-restricted-names\": 2,\n      // 禁用未声明的变量，除非它们在 /*global */ 注释中被提到\n      \"no-undef\": 2,\n      // 禁止将变量初始化为 undefined\n      \"no-undef-init\": 2,\n      // 禁止将 undefined 作为标识符\n      \"no-undefined\": 0,\n      // 禁止出现未使用过的变量\n      \"no-unused-vars\": [2, {\n          \"vars\": \"all\",\n          \"args\": \"none\"\n      }],\n      // 不允许在变量定义之前使用它们\n      \"no-use-before-define\": 0,\n\n      //////////////////////////\n      // Node.js and CommonJS //\n      //////////////////////////\n\n      // require return statements after callbacks\n      \"callback-return\": 0,\n      // 要求 require() 出现在顶层模块作用域中\n      \"global-require\": 1,\n      // 要求回调函数中有容错处理\n      \"handle-callback-err\": [2, \"^(err|error)$\"],\n      // 禁止混合常规 var 声明和 require 调用\n      \"no-mixed-requires\": 0,\n      // 禁止调用 require 时使用 new 操作符\n      \"no-new-require\": 2,\n      // 禁止对 __dirname 和 __filename进行字符串连接\n      \"no-path-concat\": 0,\n      // 禁用 process.env\n      \"no-process-env\": 0,\n      // 禁用 process.exit()\n      \"no-process-exit\": 0,\n      // 禁用同步方法\n      \"no-sync\": 0,\n\n      //////////////\n      // 风格指南 //\n      //////////////\n\n      // 指定数组的元素之间要以空格隔开(, 后面)， never参数：[ 之前和 ] 之后不能带空格，always参数：[ 之前和 ] 之后必须带空格\n      \"array-bracket-spacing\": [2, \"never\"],\n      // 禁止或强制在单行代码块中使用空格(禁用)\n      \"block-spacing\": [1, \"never\"],\n      //强制使用一致的缩进 第二个参数为 \"tab\" 时，会使用tab，\n      // if while function 后面的{必须与if在同一行，java风格。\n      \"brace-style\": [2, \"1tbs\", {\n          \"allowSingleLine\": true\n      }],\n      // 双峰驼命名格式\n      \"camelcase\": 2,\n      // 控制逗号前后的空格\n      \"comma-spacing\": [2, {\n          \"before\": false,\n          \"after\": true\n      }],\n      // 控制逗号在行尾出现还是在行首出现 (默认行尾)\n      // http://eslint.org/docs/rules/comma-style\n      \"comma-style\": [2, \"last\"],\n      //\"SwitchCase\" (默认：0) 强制 switch 语句中的 case 子句的缩进水平\n      // 以方括号取对象属性时，[ 后面和 ] 前面是否需要空格, 可选参数 never, always\n      \"computed-property-spacing\": [2, \"never\"],\n      // 用于指统一在回调函数中指向this的变量名，箭头函数中的this已经可以指向外层调用者，应该没卵用了\n      // e.g [0,\"that\"] 指定只能 var that = this. that不能指向其他任何值，this也不能赋值给that以外的其他值\n      \"consistent-this\": [1, \"that\"],\n      // 强制使用命名的 function 表达式\n      \"func-names\": 0,\n      // 文件末尾强制换行\n      \"eol-last\": 2,\n      \"indent\": [2, 2, {\n          \"SwitchCase\": 1\n      }],\n      // 强制在对象字面量的属性中键和值之间使用一致的间距\n      \"key-spacing\": [2, {\n          \"beforeColon\": false,\n          \"afterColon\": true\n      }],\n      // 强制使用一致的换行风格\n      \"linebreak-style\": [1, \"unix\"],\n      // 要求在注释周围有空行 ( 要求在块级注释之前有一空行)\n      \"lines-around-comment\": [1, {\n          \"beforeBlockComment\": true\n      }],\n      // 强制一致地使用函数声明或函数表达式，方法定义风格，参数：\n      // declaration: 强制使用方法声明的方式，function f(){} e.g [2, \"declaration\"]\n      // expression：强制使用方法表达式的方式，var f = function() {} e.g [2, \"expression\"]\n      // allowArrowFunctions: declaration风格中允许箭头函数。 e.g [2, \"declaration\", { \"allowArrowFunctions\": true }]\n      \"func-style\": 0,\n      // 强制回调函数最大嵌套深度 5层\n      \"max-nested-callbacks\": [1, 5],\n      // 禁止使用指定的标识符\n      \"id-blacklist\": 0,\n      // 强制标识符的最新和最大长度\n      \"id-length\": 0,\n      // 要求标识符匹配一个指定的正则表达式\n      \"id-match\": 0,\n      // 强制在 JSX 属性中一致地使用双引号或单引号\n      \"jsx-quotes\": 0,\n      // 强制在关键字前后使用一致的空格 (前后腰需要)\n      \"keyword-spacing\": 2,\n      // 强制一行的最大长度\n      \"max-len\": [1, 200],\n      // 强制最大行数\n      \"max-lines\": 0,\n      // 强制 function 定义中最多允许的参数数量\n      \"max-params\": [1, 7],\n      // 强制 function 块最多允许的的语句数量\n      \"max-statements\": [1, 200],\n      // 强制每一行中所允许的最大语句数量\n      \"max-statements-per-line\": 0,\n      // 要求构造函数首字母大写 （要求调用 new 操作符时有首字母大小的函数，允许调用首字母大写的函数时没有 new 操作符。）\n      \"new-cap\": [2, {\n          \"newIsCap\": true,\n          \"capIsNew\": false\n      }],\n      // 要求调用无参构造函数时有圆括号\n      \"new-parens\": 2,\n      // 要求或禁止 var 声明语句后有一行空行\n      \"newline-after-var\": 0,\n      // 禁止使用 Array 构造函数\n      \"no-array-constructor\": 2,\n      // 禁用按位运算符\n      \"no-bitwise\": 0,\n      // 要求 return 语句之前有一空行\n      \"newline-before-return\": 0,\n      // 要求方法链中每个调用都有一个换行符\n      \"newline-per-chained-call\": 1,\n      // 禁用 continue 语句\n      \"no-continue\": 0,\n      // 禁止在代码行后使用内联注释\n      \"no-inline-comments\": 0,\n      // 禁止 if 作为唯一的语句出现在 else 语句中\n      \"no-lonely-if\": 0,\n      // 禁止混合使用不同的操作符\n      \"no-mixed-operators\": 0,\n      // 不允许空格和 tab 混合缩进\n      \"no-mixed-spaces-and-tabs\": 2,\n      // 不允许多个空行\n      \"no-multiple-empty-lines\": [2, {\n          \"max\": 2\n      }],\n      // 不允许否定的表达式\n      \"no-negated-condition\": 0,\n      // 不允许使用嵌套的三元表达式\n      \"no-nested-ternary\": 0,\n      // 禁止使用 Object 的构造函数\n      \"no-new-object\": 2,\n      // 禁止使用一元操作符 ++ 和 --\n      \"no-plusplus\": 0,\n      // 禁止使用特定的语法\n      \"no-restricted-syntax\": 0,\n      // 禁止 function 标识符和括号之间出现空格\n      \"no-spaced-func\": 2,\n      // 不允许使用三元操作符\n      \"no-ternary\": 0,\n      // 禁用行尾空格\n      \"no-trailing-spaces\": 2,\n      // 禁止标识符中有悬空下划线_bar\n      \"no-underscore-dangle\": 0,\n      // 禁止可以在有更简单的可替代的表达式时使用三元操作符\n      \"no-unneeded-ternary\": 2,\n      // 禁止属性前有空白\n      \"no-whitespace-before-property\": 0,\n      // 强制花括号内换行符的一致性\n      \"object-curly-newline\": 0,\n      // 强制在花括号中使用一致的空格\n      \"object-curly-spacing\": 0,\n      // 强制将对象的属性放在不同的行上\n      \"object-property-newline\": 0,\n      // 强制函数中的变量要么一起声明要么分开声明\n      \"one-var\": [2, {\n          \"initialized\": \"never\"\n      }],\n      // 要求或禁止在 var 声明周围换行\n      \"one-var-declaration-per-line\": 0,\n      // 要求或禁止在可能的情况下要求使用简化的赋值操作符\n      \"operator-assignment\": 0,\n      // 强制操作符使用一致的换行符\n      \"operator-linebreak\": [2, \"after\", {\n          \"overrides\": {\n              \"?\": \"before\",\n              \":\": \"before\"\n          }\n      }],\n      // 要求或禁止块内填充\n      \"padded-blocks\": 0,\n      // 要求对象字面量属性名称用引号括起来\n      \"quote-props\": 0,\n      // 强制使用一致的反勾号、双引号或单引号\n    //   \"quotes\": [2, \"single\",\"double\", \"avoid-escape\"],\n      // 要求使用 JSDoc 注释\n      \"require-jsdoc\": 0,\n      // 要求或禁止使用分号而不是 ASI（这个才是控制行尾部分号的，）\n      \"semi\": [0, \"always\"],\n      // 强制分号之前和之后使用一致的空格\n      \"semi-spacing\": 0,\n      // 要求同一个声明块中的变量按顺序排列\n      \"sort-vars\": 0,\n      // 强制在块之前使用一致的空格\n      \"space-before-blocks\": [2, \"always\"],\n      // 强制在 function的左括号之前使用一致的空格\n      \"space-before-function-paren\": [0, \"always\"],\n      // 强制在圆括号内使用一致的空格\n      \"space-in-parens\": [2, \"never\"],\n      // 要求操作符周围有空格\n      \"space-infix-ops\": 2,\n      // 强制在一元操作符前后使用一致的空格\n      \"space-unary-ops\": [2, {\n          \"words\": true,\n          \"nonwords\": false\n      }],\n      // 强制在注释中 // 或 /* 使用一致的空格\n      \"spaced-comment\": [2, \"always\", {\n          \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n      }],\n      // 要求或禁止 Unicode BOM\n      \"unicode-bom\": 0,\n      // 要求正则表达式被括号括起来\n      \"wrap-regex\": 0,\n\n      //////////////\n      // ES6.相关 //\n      //////////////\n\n      // 要求箭头函数体使用大括号\n      \"arrow-body-style\": 2,\n      // 要求箭头函数的参数使用圆括号\n      \"arrow-parens\": 0,\n      \"arrow-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 强制在子类构造函数中用super()调用父类构造函数，TypeScrip的编译器也会提示\n      \"constructor-super\": 0,\n      // 强制 generator 函数中 * 号周围使用一致的空格\n      \"generator-star-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 禁止修改类声明的变量\n      \"no-class-assign\": 2,\n      // 不允许箭头功能，在那里他们可以混淆的比较\n      \"no-confusing-arrow\": 0,\n      // 禁止修改 const 声明的变量\n      \"no-const-assign\": 2,\n      // 禁止类成员中出现重复的名称\n      \"no-dupe-class-members\": 2,\n      // 不允许复制模块的进口\n      \"no-duplicate-imports\": 0,\n      // 禁止 Symbol 的构造函数\n      \"no-new-symbol\": 2,\n      // 允许指定模块加载时的进口\n      \"no-restricted-imports\": 0,\n      // 禁止在构造函数中，在调用 super() 之前使用 this 或 super\n      \"no-this-before-super\": 2,\n      // 禁止不必要的计算性能键对象的文字\n      \"no-useless-computed-key\": 0,\n      // 要求使用 let 或 const 而不是 var\n      \"no-var\": 0,\n      // 要求或禁止对象字面量中方法和属性使用简写语法\n      \"object-shorthand\": 0,\n      // 要求使用箭头函数作为回调\n      \"prefer-arrow-callback\": 0,\n      // 要求使用 const 声明那些声明后不再被修改的变量\n      \"prefer-const\": 0,\n      // 要求在合适的地方使用 Reflect 方法\n      \"prefer-reflect\": 0,\n      // 要求使用扩展运算符而非 .apply()\n      \"prefer-spread\": 0,\n      // 要求使用模板字面量而非字符串连接\n      \"prefer-template\": 0,\n      // Suggest using the rest parameters instead of arguments\n      \"prefer-rest-params\": 0,\n      // 要求generator 函数内有 yield\n      \"require-yield\": 0,\n      // enforce spacing between rest and spread operators and their expressions\n      \"rest-spread-spacing\": 0,\n      // 强制模块内的 import 排序\n      \"sort-imports\": 0,\n      // 要求或禁止模板字符串中的嵌入表达式周围空格的使用\n      \"template-curly-spacing\": 1,\n      // 强制在 yield* 表达式中 * 周围使用空格\n      \"yield-star-spacing\": 2\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-miniapp-target/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\ndist\n\n# ///////////////////////////\n\n"
  },
  {
    "path": "packages/chameleon-miniapp-target/.npmignore",
    "content": ".scripts/\ntest/\ngulpfile.js"
  },
  {
    "path": "packages/chameleon-miniapp-target/gulpfile.js",
    "content": "const gulp = require('gulp');\nconst uglify = require('gulp-uglify-es').default;\n\ngulp.task('build', function () {\n  gulp.src('src/**/**.js')\n    .pipe(uglify({\n      parse: {\n        bare_returns: true,\n\n      },\n      mangle: {\n        toplevel: true\n      },\n      compress: {\n        drop_console: true,\n        drop_debugger: true\n      }\n    }))\n    .pipe(gulp.dest('dist/'));\n});"
  },
  {
    "path": "packages/chameleon-miniapp-target/package.json",
    "content": "{\n  \"name\": \"chameleon-miniapp-target\",\n  \"version\": \"1.0.8\",\n  \"description\": \"chameleon 小程序webpack的target\",\n  \"main\": \"src/index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\"\"\n  },\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"devDependencies\": {\n    \"gulp\": \"^3.9.1\",\n    \"gulp-uglify-es\": \"^1.0.4\",\n    \"webpack\": \"^3.12.0\"\n  },\n  \"dependencies\": {\n    \"chameleon-tool-utils\": \"1.0.8\"\n  },\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"gitHead\": \"5ddcde4330774710f7646559446e008f7785ce00\"\n}"
  },
  {
    "path": "packages/chameleon-miniapp-target/src/JsonpChunkTemplatePlugin.js",
    "content": "\n\"use strict\";\n\nconst ConcatSource = require(\"webpack-sources\").ConcatSource;\nconst cmlUtils = require('chameleon-tool-utils');\nclass JsonpChunkTemplatePlugin {\n  apply(chunkTemplate) {\n    chunkTemplate.plugin(\"render\", function(modules, chunk) {\n      const jsonpFunction = this.outputOptions.jsonpFunction;\n      const source = new ConcatSource();\n      const chunkNameLength = cmlUtils.handleWinPath(chunk.name).split('/').length;\n      // 所有chunk都在static/js下，求该chunk相对manifest.js的路径\n      const manifestPath = [\n        'manifest.js'\n      ]\n      if (chunkNameLength === 1) {\n        manifestPath.unshift('./');\n      } else {\n        let prefix = '';\n        // 如果是3  ../../\n        for (let i = 1; i < chunkNameLength; i++) {\n          prefix += '../'\n        }\n        manifestPath.unshift(prefix);\n      }\n      source.add(`var __CML__GLOBAL = require(\"${manifestPath.join('')}\");\\n`);\n      source.add(`__CML__GLOBAL.${jsonpFunction}(${JSON.stringify(chunk.ids)},`);\n      source.add(modules);\n      const entries = [chunk.entryModule].filter(Boolean).map(m => m.id);\n      if(entries.length > 0) {\n        source.add(`,${JSON.stringify(entries)}`);\n      }\n      source.add(\")\\n\");\n      if(chunk.name !== 'common'){\n        \n        source.add(`module.exports = __CML__GLOBAL.__CMLCOMPONNETS__['${chunk.name}']`)\n      }\n      return source;\n    });\n    chunkTemplate.plugin(\"hash\", function(hash) {\n      hash.update(\"JsonpChunkTemplatePlugin\");\n      hash.update(\"3\");\n      hash.update(`${this.outputOptions.jsonpFunction}`);\n      hash.update(`${this.outputOptions.library}`);\n    });\n  }\n}\nmodule.exports = JsonpChunkTemplatePlugin;"
  },
  {
    "path": "packages/chameleon-miniapp-target/src/JsonpHotUpdateChunkTemplatePlugin.js",
    "content": "\n\"use strict\";\n\nconst ConcatSource = require(\"webpack-sources\").ConcatSource;\n\nclass JsonpHotUpdateChunkTemplatePlugin {\n  apply(hotUpdateChunkTemplate) {\n    hotUpdateChunkTemplate.plugin(\"render\", function(modulesSource, modules, removedModules, hash, id) {\n      const source = new ConcatSource();\n      source.add(`${this.outputOptions.hotUpdateFunction}(${JSON.stringify(id)},`);\n      source.add(modulesSource);\n      source.add(\")\");\n      return source;\n    });\n    hotUpdateChunkTemplate.plugin(\"hash\", function(hash) {\n      hash.update(\"JsonpHotUpdateChunkTemplatePlugin\");\n      hash.update(\"3\");\n      hash.update(`${this.outputOptions.hotUpdateFunction}`);\n      hash.update(`${this.outputOptions.library}`);\n    });\n  }\n}\n\nmodule.exports = JsonpHotUpdateChunkTemplatePlugin;"
  },
  {
    "path": "packages/chameleon-miniapp-target/src/JsonpMainTemplatePlugin.js",
    "content": "\n\"use strict\";\n\nconst Template = require(\"webpack/lib/Template\");\nconst ConcatSource = require(\"webpack-sources\").ConcatSource;\n\nclass JsonpMainTemplatePlugin {\n\n  apply(mainTemplate) {\n    mainTemplate.plugin(\"local-vars\", function(source, chunk) {\n      if(chunk.chunks.length > 0) {\n        return this.asString([\n          source,\n          \"\",\n          \"// objects to store loaded and loading chunks\",\n          \"var installedChunks = {\",\n          this.indent(\n            chunk.ids.map(id => `${JSON.stringify(id)}: 0`).join(\",\\n\")\n          ),\n          \"};\"\n        ]);\n      }\n      return source;\n    });\n    mainTemplate.plugin(\"jsonp-script\", function(_, chunk, hash) {\n      const chunkFilename = this.outputOptions.chunkFilename;\n      const chunkMaps = chunk.getChunkMaps();\n      const crossOriginLoading = this.outputOptions.crossOriginLoading;\n      const chunkLoadTimeout = this.outputOptions.chunkLoadTimeout;\n      const scriptSrcPath = this.applyPluginsWaterfall(\"asset-path\", JSON.stringify(chunkFilename), {\n        hash: `\" + ${this.renderCurrentHashCode(hash)} + \"`,\n        hashWithLength: length => `\" + ${this.renderCurrentHashCode(hash, length)} + \"`,\n        chunk: {\n          id: \"\\\" + chunkId + \\\"\",\n          hash: `\" + ${JSON.stringify(chunkMaps.hash)}[chunkId] + \"`,\n          hashWithLength(length) {\n            const shortChunkHashMap = Object.create(null);\n            Object.keys(chunkMaps.hash).forEach(chunkId => {\n              if(typeof chunkMaps.hash[chunkId] === \"string\")\n                shortChunkHashMap[chunkId] = chunkMaps.hash[chunkId].substr(0, length);\n            });\n            return `\" + ${JSON.stringify(shortChunkHashMap)}[chunkId] + \"`;\n          },\n          name: `\" + (${JSON.stringify(chunkMaps.name)}[chunkId]||chunkId) + \"`\n        }\n      });\n      return this.asString([\n        \"var script = document.createElement('script');\",\n        \"script.type = 'text/javascript';\",\n        \"script.charset = 'utf-8';\",\n        \"script.async = true;\",\n        `script.timeout = ${chunkLoadTimeout};`,\n        crossOriginLoading ? `script.crossOrigin = ${JSON.stringify(crossOriginLoading)};` : \"\",\n        `if (${this.requireFn}.nc) {`,\n        this.indent(`script.setAttribute(\"nonce\", ${this.requireFn}.nc);`),\n        \"}\",\n        `script.src = ${this.requireFn}.p + ${scriptSrcPath};`,\n        `var timeout = setTimeout(onScriptComplete, ${chunkLoadTimeout});`,\n        \"script.onerror = script.onload = onScriptComplete;\",\n        \"function onScriptComplete() {\",\n        this.indent([\n          \"// avoid mem leaks in IE.\",\n          \"script.onerror = script.onload = null;\",\n          \"clearTimeout(timeout);\",\n          \"var chunk = installedChunks[chunkId];\",\n          \"if(chunk !== 0) {\",\n          this.indent([\n            \"if(chunk) {\",\n            this.indent(\"chunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));\"),\n            \"}\",\n            \"installedChunks[chunkId] = undefined;\"\n          ]),\n          \"}\"\n        ]),\n        \"};\",\n      ]);\n    });\n    mainTemplate.plugin(\"require-ensure\", function(_, chunk, hash) {\n      return this.asString([\n        \"var installedChunkData = installedChunks[chunkId];\",\n        \"if(installedChunkData === 0) {\",\n        this.indent([\n          \"return new Promise(function(resolve) { resolve(); });\"\n        ]),\n        \"}\",\n        \"\",\n        \"// a Promise means \\\"currently loading\\\".\",\n        \"if(installedChunkData) {\",\n        this.indent([\n          \"return installedChunkData[2];\"\n        ]),\n        \"}\",\n        \"\",\n        \"// setup Promise in chunk cache\",\n        \"var promise = new Promise(function(resolve, reject) {\",\n        this.indent([\n          \"installedChunkData = installedChunks[chunkId] = [resolve, reject];\"\n        ]),\n        \"});\",\n        \"installedChunkData[2] = promise;\",\n        \"\",\n        \"// start chunk loading\",\n        \"var head = document.getElementsByTagName('head')[0];\",\n        this.applyPluginsWaterfall(\"jsonp-script\", \"\", chunk, hash),\n        \"head.appendChild(script);\",\n        \"\",\n        \"return promise;\"\n      ]);\n    });\n    mainTemplate.plugin(\"require-extensions\", function(source, chunk) {\n      if(chunk.chunks.length === 0) return source;\n\n      return this.asString([\n        source,\n        \"\",\n        \"// on error function for async loading\",\n        `${this.requireFn}.oe = function(err) { console.error(err); throw err; };`\n      ]);\n    });\n    mainTemplate.plugin(\"bootstrap\", function(source, chunk, hash) {\n      if(chunk.chunks.length > 0) {\n        var jsonpFunction = this.outputOptions.jsonpFunction;\n        return this.asString([\n          source,\n          \"\",\n          \"// install a JSONP callback for chunk loading\",\n          `var parentJsonpFunction = __CML__GLOBAL[${JSON.stringify(jsonpFunction)}];`,\n          `__CML__GLOBAL[${JSON.stringify(jsonpFunction)}] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {`,\n          this.indent([\n            \"// add \\\"moreModules\\\" to the modules object,\",\n            \"// then flag all \\\"chunkIds\\\" as loaded and fire callback\",\n            \"var moduleId, chunkId, i = 0, resolves = [], result;\",\n            \"for(;i < chunkIds.length; i++) {\",\n            this.indent([\n              \"chunkId = chunkIds[i];\",\n              \"if(installedChunks[chunkId]) {\",\n              this.indent(\"resolves.push(installedChunks[chunkId][0]);\"),\n              \"}\",\n              \"installedChunks[chunkId] = 0;\"\n            ]),\n            \"}\",\n            \"for(moduleId in moreModules) {\",\n            this.indent([\n              \"if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\",\n              this.indent(this.renderAddModule(hash, chunk, \"moduleId\", \"moreModules[moduleId]\")),\n              \"}\"\n            ]),\n            \"}\",\n            \"if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\",\n            \"while(resolves.length) {\",\n            this.indent(\"resolves.shift()();\"),\n            \"}\",\n            this.entryPointInChildren(chunk) ? [\n              \"if(executeModules) {\",\n              this.indent([\n                \"for(i=0; i < executeModules.length; i++) {\",\n                this.indent(`result = ${this.requireFn}(${this.requireFn}.s = executeModules[i]);`),\n                \"}\"\n              ]),\n              \"}\",\n              \"return result;\",\n            ] : \"\"\n          ]),\n          \"};\"\n        ]);\n      }\n      return source;\n    });\n    mainTemplate.plugin(\"hot-bootstrap\", function(source, chunk, hash) {\n      const hotUpdateChunkFilename = this.outputOptions.hotUpdateChunkFilename;\n      const hotUpdateMainFilename = this.outputOptions.hotUpdateMainFilename;\n      const hotUpdateFunction = this.outputOptions.hotUpdateFunction;\n      const currentHotUpdateChunkFilename = this.applyPluginsWaterfall(\"asset-path\", JSON.stringify(hotUpdateChunkFilename), {\n        hash: `\" + ${this.renderCurrentHashCode(hash)} + \"`,\n        hashWithLength: length => `\" + ${this.renderCurrentHashCode(hash, length)} + \"`,\n        chunk: {\n          id: \"\\\" + chunkId + \\\"\"\n        }\n      });\n      const currentHotUpdateMainFilename = this.applyPluginsWaterfall(\"asset-path\", JSON.stringify(hotUpdateMainFilename), {\n        hash: `\" + ${this.renderCurrentHashCode(hash)} + \"`,\n        hashWithLength: length => `\" + ${this.renderCurrentHashCode(hash, length)} + \"`\n      });\n      const runtimeSource = Template.getFunctionContent(require(\"./JsonpMainTemplate.runtime.js\"))\n        .replace(/\\/\\/\\$semicolon/g, \";\")\n        .replace(/\\$require\\$/g, this.requireFn)\n        .replace(/\\$hotMainFilename\\$/g, currentHotUpdateMainFilename)\n        .replace(/\\$hotChunkFilename\\$/g, currentHotUpdateChunkFilename)\n        .replace(/\\$hash\\$/g, JSON.stringify(hash));\n      return `${source}\nfunction hotDisposeChunk(chunkId) {\n  delete installedChunks[chunkId];\n}\nvar parentHotUpdateCallback = global.parentHotUpdateCallback = this[${JSON.stringify(hotUpdateFunction)}];\nthis[${JSON.stringify(hotUpdateFunction)}] = ${runtimeSource}`;\n    });\n    mainTemplate.plugin(\"hash\", function(hash) {\n      hash.update(\"jsonp\");\n      hash.update(\"4\");\n      hash.update(`${this.outputOptions.filename}`);\n      hash.update(`${this.outputOptions.chunkFilename}`);\n      hash.update(`${this.outputOptions.jsonpFunction}`);\n      hash.update(`${this.outputOptions.hotUpdateFunction}`);\n    });\n\n    mainTemplate.plugin(\"render\", (beforeMainSource, chunk, hash, moduleTemplate, dependencyTemplates) => {\n      //beforeMainSource 是每部的MainTemplate render之后的代码\n      // __CMLCOMPONNETS__ 是用于存放每个组件的执行函数\n      const source = new ConcatSource();\n      source.add(`/******/ var __CML__GLOBAL = {};\\n`);\n      source.add(`/******/ __CML__GLOBAL.__CMLCOMPONNETS__ = {};\\n`);\n      source.add(beforeMainSource);\n      source.add(`\\r\\n /******/ module.exports = __CML__GLOBAL;`);\t\n\t\t\treturn source;\n\t\t});\n  }\n}\nmodule.exports = JsonpMainTemplatePlugin;"
  },
  {
    "path": "packages/chameleon-miniapp-target/src/JsonpTemplatePlugin.js",
    "content": "\n\"use strict\";\n\nconst JsonpMainTemplatePlugin = require(\"./JsonpMainTemplatePlugin\");\nconst JsonpChunkTemplatePlugin = require(\"./JsonpChunkTemplatePlugin\");\nconst JsonpHotUpdateChunkTemplatePlugin = require(\"./JsonpHotUpdateChunkTemplatePlugin\");\n\nclass JsonpTemplatePlugin {\n  apply(compiler) {\n    compiler.plugin(\"this-compilation\", (compilation) => {\n      compilation.mainTemplate.apply(new JsonpMainTemplatePlugin());\n      compilation.chunkTemplate.apply(new JsonpChunkTemplatePlugin());\n      compilation.hotUpdateChunkTemplate.apply(new JsonpHotUpdateChunkTemplatePlugin());\n    });\n  }\n}\n\nmodule.exports = JsonpTemplatePlugin;"
  },
  {
    "path": "packages/chameleon-miniapp-target/src/index.js",
    "content": "const JsonpTemplatePlugin = require(\"./JsonpTemplatePlugin\");\nconst NodeSourcePlugin = require(\"webpack/lib/node/NodeSourcePlugin\");\nconst FunctionModulePlugin = require(\"webpack/lib/FunctionModulePlugin\");\nconst LoaderTargetPlugin = require(\"webpack/lib/LoaderTargetPlugin\");\n\n\nmodule.exports = function (compiler) {\n  const { options } = compiler\n  compiler.apply(\n    new JsonpTemplatePlugin(options.output),\n    new FunctionModulePlugin(options.output),\n    new NodeSourcePlugin(options.node),\n    new LoaderTargetPlugin(options.target)\n  );\n};\n"
  },
  {
    "path": "packages/chameleon-mixins/.eslintrc",
    "content": "/* eslint-enable */\n{\n  \"globals\": {\n      \"cml\": false\n  },\n  \"env\": {\n      \"browser\": true,\n      \"node\": true,\n      \"commonjs\": true,\n      \"amd\": true,\n      \"es6\": true,\n      \"mocha\": true\n  },\n  \"parserOptions\": {\n      \"ecmaVersion\": 6,\n      \"sourceType\": \"module\", \n      \"ecmaFeatures\": {\n          \"globalReturn\": true,\n          \"impliedStrict\": true,\n          \"jsx\": true,\n          \"modules\": true\n      }\n  },\n  \"plugins\": [\n\n  ],\n  \"extends\": [\n      \"eslint:recommended\"\n  ],\n\n\n  \"rules\": {\n\n     \n      \"no-cond-assign\": 2,\n      \"no-console\": 0,\n      \n      \"no-constant-condition\": 2,\n      \"no-control-regex\": 2,\n      \"comma-dangle\": [1, \"never\"],\n      \"no-debugger\": 2,\n      \"no-dupe-args\": 2,\n      \"no-dupe-keys\": 2,\n      \"no-duplicate-case\": 2,\n      \"no-empty\": 2,\n      \"no-empty-character-class\": 2,\n      \"no-ex-assign\": 2,\n      \"no-extra-boolean-cast\": 2,\n      \"no-extra-parens\": 0,\n      \"no-extra-semi\": 2,\n      \"no-func-assign\": 2,\n      \"no-inner-declarations\": [2, \"functions\"],\n      \"no-invalid-regexp\": 2,\n      \"no-irregular-whitespace\": 2,\n      \"no-negated-in-lhs\": 2,\n      \"no-obj-calls\": 2,\n      \"no-prototype-builtins\": 0,\n      \"no-regex-spaces\": 2,\n      \"no-sparse-arrays\": 2,\n      \"no-unexpected-multiline\": 2,\n      \"no-unreachable\": 2,\n      \"use-isnan\": 2,\n      \"valid-jsdoc\": 0,\n      \"valid-typeof\": 2,\n\n\n      \"accessor-pairs\": 2,\n      \"array-callback-return\": 0,\n      \"block-scoped-var\": 0,\n      \"complexity\": [2, 30],\n      \"consistent-return\": 0,\n      \"curly\": [2, \"all\"],\n      \"default-case\": 2,\n      \"dot-location\": [2, \"property\"],\n      \"dot-notation\": [2, {\n          \"allowKeywords\": false\n      }],\n      \"eqeqeq\": [0, \"allow-null\"],\n      \"guard-for-in\": 2,\n      \"no-alert\": 0,\n      \"no-caller\": 2,\n      \"no-case-declarations\": 2,\n      \"no-div-regex\": 2,\n      \"no-else-return\": 0,\n      \"no-empty-function\": 2,\n      \"no-empty-pattern\": 2,\n      \"no-eq-null\": 1,\n      \"no-eval\": 2,\n      \"no-extend-native\": 2,\n      \"no-extra-bind\": 2,\n      \"no-extra-label:\": 0,\n      \"no-fallthrough\": 2,\n      \"no-floating-decimal\": 2,\n      \"no-implicit-coercion\": 0,\n      \"no-implicit-globals\": 1,\n      \"no-implied-eval\": 2,\n      \"no-invalid-this\": 0,\n      \"no-iterator\": 2,\n      \"no-labels\": 2,\n      \"no-lone-blocks\": 2,\n      \"no-loop-func\": 1,\n      \"no-magic-numbers\": [1, {\n          \"ignore\": [0, -1, 1]\n      }],\n      \"no-multi-spaces\": 2,\n      \"no-multi-str\": 2,\n      \"no-native-reassign\": 2,\n      \"no-new\": 2,\n      // 禁止对 Function 对象使用 new 操作符\n      \"no-new-func\": 0,\n      // 禁止对 String，Number 和 Boolean 使用 new 操作符\n      \"no-new-wrappers\": 2,\n      // 禁用八进制字面量\n      \"no-octal\": 2,\n      // 禁止在字符串中使用八进制转义序列\n      \"no-octal-escape\": 2,\n      // 不允许对 function 的参数进行重新赋值\n      \"no-param-reassign\": 0,\n      // 禁用 __proto__ 属性\n      \"no-proto\": 2,\n      // 禁止使用 var 多次声明同一变量\n      \"no-redeclare\": 2,\n      // 禁用指定的通过 require 加载的模块\n      \"no-return-assign\": 0,\n      // 禁止使用 javascript: url\n      \"no-script-url\": 0,\n      // 禁止自我赋值\n      \"no-self-assign\": 2,\n      // 禁止自身比较\n      \"no-self-compare\": 2,\n      // 禁用逗号操作符\n      \"no-sequences\": 2,\n      // 禁止抛出非异常字面量\n      \"no-throw-literal\": 2,\n      // 禁用一成不变的循环条件\n      \"no-unmodified-loop-condition\": 2,\n      // 禁止出现未使用过的表达式\n      \"no-unused-expressions\": 0,\n      // 禁用未使用过的标签\n      \"no-unused-labels\": 2,\n      // 禁止不必要的 .call() 和 .apply()\n      \"no-useless-call\": 2,\n      // 禁止不必要的字符串字面量或模板字面量的连接\n      \"no-useless-concat\": 0,\n      // 禁用不必要的转义字符\n      \"no-useless-escape\": 0,\n      // 禁用 void 操作符\n      \"no-void\": 0,\n      // 禁止在注释中使用特定的警告术语\n      \"no-warning-comments\": 0,\n      // 禁用 with 语句\n      \"no-with\": 2,\n      // 强制在parseInt()使用基数参数\n      \"radix\": 2,\n      // 要求所有的 var 声明出现在它们所在的作用域顶部\n      \"vars-on-top\": 0,\n      // 要求 IIFE 使用括号括起来\n      \"wrap-iife\": [2, \"any\"],\n      // 要求或禁止 “Yoda” 条件\n      \"yoda\": [2, \"never\"],\n      // 要求或禁止使用严格模式指令\n      \"strict\": 0,\n\n\n      //////////////\n      // 变量声明 //\n      //////////////\n\n      // 要求或禁止 var 声明中的初始化(初值)\n      \"init-declarations\": 0,\n      // 不允许 catch 子句的参数与外层作用域中的变量同名\n      \"no-catch-shadow\": 0,\n      // 禁止删除变量\n      \"no-delete-var\": 2,\n      // 不允许标签与变量同名\n      \"no-label-var\": 2,\n      // 禁用特定的全局变量\n      \"no-restricted-globals\": 0,\n      // 禁止 var 声明 与外层作用域的变量同名\n      \"no-shadow\": 0,\n      // 禁止覆盖受限制的标识符\n      \"no-shadow-restricted-names\": 2,\n      // 禁用未声明的变量，除非它们在 /*global */ 注释中被提到\n      \"no-undef\": 2,\n      // 禁止将变量初始化为 undefined\n      \"no-undef-init\": 2,\n      // 禁止将 undefined 作为标识符\n      \"no-undefined\": 0,\n      // 禁止出现未使用过的变量\n      \"no-unused-vars\": [2, {\n          \"vars\": \"all\",\n          \"args\": \"none\"\n      }],\n      // 不允许在变量定义之前使用它们\n      \"no-use-before-define\": 0,\n\n      //////////////////////////\n      // Node.js and CommonJS //\n      //////////////////////////\n\n      // require return statements after callbacks\n      \"callback-return\": 0,\n      // 要求 require() 出现在顶层模块作用域中\n      \"global-require\": 1,\n      // 要求回调函数中有容错处理\n      \"handle-callback-err\": [2, \"^(err|error)$\"],\n      // 禁止混合常规 var 声明和 require 调用\n      \"no-mixed-requires\": 0,\n      // 禁止调用 require 时使用 new 操作符\n      \"no-new-require\": 2,\n      // 禁止对 __dirname 和 __filename进行字符串连接\n      \"no-path-concat\": 0,\n      // 禁用 process.env\n      \"no-process-env\": 0,\n      // 禁用 process.exit()\n      \"no-process-exit\": 0,\n      // 禁用同步方法\n      \"no-sync\": 0,\n\n      //////////////\n      // 风格指南 //\n      //////////////\n\n      // 指定数组的元素之间要以空格隔开(, 后面)， never参数：[ 之前和 ] 之后不能带空格，always参数：[ 之前和 ] 之后必须带空格\n      \"array-bracket-spacing\": [2, \"never\"],\n      // 禁止或强制在单行代码块中使用空格(禁用)\n      \"block-spacing\": [1, \"never\"],\n      //强制使用一致的缩进 第二个参数为 \"tab\" 时，会使用tab，\n      // if while function 后面的{必须与if在同一行，java风格。\n      \"brace-style\": [2, \"1tbs\", {\n          \"allowSingleLine\": true\n      }],\n      // 双峰驼命名格式\n      \"camelcase\": 2,\n      // 控制逗号前后的空格\n      \"comma-spacing\": [2, {\n          \"before\": false,\n          \"after\": true\n      }],\n      // 控制逗号在行尾出现还是在行首出现 (默认行尾)\n      // http://eslint.org/docs/rules/comma-style\n      \"comma-style\": [2, \"last\"],\n      //\"SwitchCase\" (默认：0) 强制 switch 语句中的 case 子句的缩进水平\n      // 以方括号取对象属性时，[ 后面和 ] 前面是否需要空格, 可选参数 never, always\n      \"computed-property-spacing\": [2, \"never\"],\n      // 用于指统一在回调函数中指向this的变量名，箭头函数中的this已经可以指向外层调用者，应该没卵用了\n      // e.g [0,\"that\"] 指定只能 var that = this. that不能指向其他任何值，this也不能赋值给that以外的其他值\n      \"consistent-this\": [1, \"that\"],\n      // 强制使用命名的 function 表达式\n      \"func-names\": 0,\n      // 文件末尾强制换行\n      \"eol-last\": 2,\n      \"indent\": [2, 2, {\n          \"SwitchCase\": 1\n      }],\n      // 强制在对象字面量的属性中键和值之间使用一致的间距\n      \"key-spacing\": [2, {\n          \"beforeColon\": false,\n          \"afterColon\": true\n      }],\n      // 强制使用一致的换行风格\n      \"linebreak-style\": [1, \"unix\"],\n      // 要求在注释周围有空行 ( 要求在块级注释之前有一空行)\n      \"lines-around-comment\": [1, {\n          \"beforeBlockComment\": true\n      }],\n      // 强制一致地使用函数声明或函数表达式，方法定义风格，参数：\n      // declaration: 强制使用方法声明的方式，function f(){} e.g [2, \"declaration\"]\n      // expression：强制使用方法表达式的方式，var f = function() {} e.g [2, \"expression\"]\n      // allowArrowFunctions: declaration风格中允许箭头函数。 e.g [2, \"declaration\", { \"allowArrowFunctions\": true }]\n      \"func-style\": 0,\n      // 强制回调函数最大嵌套深度 5层\n      \"max-nested-callbacks\": [1, 5],\n      // 禁止使用指定的标识符\n      \"id-blacklist\": 0,\n      // 强制标识符的最新和最大长度\n      \"id-length\": 0,\n      // 要求标识符匹配一个指定的正则表达式\n      \"id-match\": 0,\n      // 强制在 JSX 属性中一致地使用双引号或单引号\n      \"jsx-quotes\": 0,\n      // 强制在关键字前后使用一致的空格 (前后腰需要)\n      \"keyword-spacing\": 2,\n      // 强制一行的最大长度\n      \"max-len\": [1, 200],\n      // 强制最大行数\n      \"max-lines\": 0,\n      // 强制 function 定义中最多允许的参数数量\n      \"max-params\": [1, 7],\n      // 强制 function 块最多允许的的语句数量\n      \"max-statements\": [1, 200],\n      // 强制每一行中所允许的最大语句数量\n      \"max-statements-per-line\": 0,\n      // 要求构造函数首字母大写 （要求调用 new 操作符时有首字母大小的函数，允许调用首字母大写的函数时没有 new 操作符。）\n      \"new-cap\": [2, {\n          \"newIsCap\": true,\n          \"capIsNew\": false\n      }],\n      // 要求调用无参构造函数时有圆括号\n      \"new-parens\": 2,\n      // 要求或禁止 var 声明语句后有一行空行\n      \"newline-after-var\": 0,\n      // 禁止使用 Array 构造函数\n      \"no-array-constructor\": 2,\n      // 禁用按位运算符\n      \"no-bitwise\": 0,\n      // 要求 return 语句之前有一空行\n      \"newline-before-return\": 0,\n      // 要求方法链中每个调用都有一个换行符\n      \"newline-per-chained-call\": 1,\n      // 禁用 continue 语句\n      \"no-continue\": 0,\n      // 禁止在代码行后使用内联注释\n      \"no-inline-comments\": 0,\n      // 禁止 if 作为唯一的语句出现在 else 语句中\n      \"no-lonely-if\": 0,\n      // 禁止混合使用不同的操作符\n      \"no-mixed-operators\": 0,\n      // 不允许空格和 tab 混合缩进\n      \"no-mixed-spaces-and-tabs\": 2,\n      // 不允许多个空行\n      \"no-multiple-empty-lines\": [2, {\n          \"max\": 2\n      }],\n      // 不允许否定的表达式\n      \"no-negated-condition\": 0,\n      // 不允许使用嵌套的三元表达式\n      \"no-nested-ternary\": 0,\n      // 禁止使用 Object 的构造函数\n      \"no-new-object\": 2,\n      // 禁止使用一元操作符 ++ 和 --\n      \"no-plusplus\": 0,\n      // 禁止使用特定的语法\n      \"no-restricted-syntax\": 0,\n      // 禁止 function 标识符和括号之间出现空格\n      \"no-spaced-func\": 2,\n      // 不允许使用三元操作符\n      \"no-ternary\": 0,\n      // 禁用行尾空格\n      \"no-trailing-spaces\": 2,\n      // 禁止标识符中有悬空下划线_bar\n      \"no-underscore-dangle\": 0,\n      // 禁止可以在有更简单的可替代的表达式时使用三元操作符\n      \"no-unneeded-ternary\": 2,\n      // 禁止属性前有空白\n      \"no-whitespace-before-property\": 0,\n      // 强制花括号内换行符的一致性\n      \"object-curly-newline\": 0,\n      // 强制在花括号中使用一致的空格\n      \"object-curly-spacing\": 0,\n      // 强制将对象的属性放在不同的行上\n      \"object-property-newline\": 0,\n      // 强制函数中的变量要么一起声明要么分开声明\n      \"one-var\": [2, {\n          \"initialized\": \"never\"\n      }],\n      // 要求或禁止在 var 声明周围换行\n      \"one-var-declaration-per-line\": 0,\n      // 要求或禁止在可能的情况下要求使用简化的赋值操作符\n      \"operator-assignment\": 0,\n      // 强制操作符使用一致的换行符\n      \"operator-linebreak\": [2, \"after\", {\n          \"overrides\": {\n              \"?\": \"before\",\n              \":\": \"before\"\n          }\n      }],\n      // 要求或禁止块内填充\n      \"padded-blocks\": 0,\n      // 要求对象字面量属性名称用引号括起来\n      \"quote-props\": 0,\n      // 强制使用一致的反勾号、双引号或单引号\n      // \"quotes\": [2, \"single\", \"avoid-escape\"],\n      // 要求使用 JSDoc 注释\n      \"require-jsdoc\": 0,\n      // 要求或禁止使用分号而不是 ASI（这个才是控制行尾部分号的，）\n      \"semi\": [0, \"always\"],\n      // 强制分号之前和之后使用一致的空格\n      \"semi-spacing\": 0,\n      // 要求同一个声明块中的变量按顺序排列\n      \"sort-vars\": 0,\n      // 强制在块之前使用一致的空格\n      \"space-before-blocks\": [2, \"always\"],\n      // 强制在 function的左括号之前使用一致的空格\n      \"space-before-function-paren\": [0, \"always\"],\n      // 强制在圆括号内使用一致的空格\n      \"space-in-parens\": [2, \"never\"],\n      // 要求操作符周围有空格\n      \"space-infix-ops\": 2,\n      // 强制在一元操作符前后使用一致的空格\n      \"space-unary-ops\": [2, {\n          \"words\": true,\n          \"nonwords\": false\n      }],\n      // 强制在注释中 // 或 /* 使用一致的空格\n      \"spaced-comment\": [2, \"always\", {\n          \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n      }],\n      // 要求或禁止 Unicode BOM\n      \"unicode-bom\": 0,\n      // 要求正则表达式被括号括起来\n      \"wrap-regex\": 0,\n\n      //////////////\n      // ES6.相关 //\n      //////////////\n\n      // 要求箭头函数体使用大括号\n      \"arrow-body-style\": 2,\n      // 要求箭头函数的参数使用圆括号\n      \"arrow-parens\": 0,\n      \"arrow-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 强制在子类构造函数中用super()调用父类构造函数，TypeScrip的编译器也会提示\n      \"constructor-super\": 0,\n      // 强制 generator 函数中 * 号周围使用一致的空格\n      \"generator-star-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 禁止修改类声明的变量\n      \"no-class-assign\": 2,\n      // 不允许箭头功能，在那里他们可以混淆的比较\n      \"no-confusing-arrow\": 0,\n      // 禁止修改 const 声明的变量\n      \"no-const-assign\": 2,\n      // 禁止类成员中出现重复的名称\n      \"no-dupe-class-members\": 2,\n      // 不允许复制模块的进口\n      \"no-duplicate-imports\": 0,\n      // 禁止 Symbol 的构造函数\n      \"no-new-symbol\": 2,\n      // 允许指定模块加载时的进口\n      \"no-restricted-imports\": 0,\n      // 禁止在构造函数中，在调用 super() 之前使用 this 或 super\n      \"no-this-before-super\": 2,\n      // 禁止不必要的计算性能键对象的文字\n      \"no-useless-computed-key\": 0,\n      // 要求使用 let 或 const 而不是 var\n      \"no-var\": 0,\n      // 要求或禁止对象字面量中方法和属性使用简写语法\n      \"object-shorthand\": 0,\n      // 要求使用箭头函数作为回调\n      \"prefer-arrow-callback\": 0,\n      // 要求使用 const 声明那些声明后不再被修改的变量\n      \"prefer-const\": 0,\n      // 要求在合适的地方使用 Reflect 方法\n      \"prefer-reflect\": 0,\n      // 要求使用扩展运算符而非 .apply()\n      \"prefer-spread\": 0,\n      // 要求使用模板字面量而非字符串连接\n      \"prefer-template\": 0,\n      // Suggest using the rest parameters instead of arguments\n      \"prefer-rest-params\": 0,\n      // 要求generator 函数内有 yield\n      \"require-yield\": 0,\n      // enforce spacing between rest and spread operators and their expressions\n      \"rest-spread-spacing\": 0,\n      // 强制模块内的 import 排序\n      \"sort-imports\": 0,\n      // 要求或禁止模板字符串中的嵌入表达式周围空格的使用\n      \"template-curly-spacing\": 1,\n      // 强制在 yield* 表达式中 * 周围使用空格\n      \"yield-star-spacing\": 2\n  }\n}\n/* eslint-enable */"
  },
  {
    "path": "packages/chameleon-mixins/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n.vscode\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\n# dist\ndist/\n"
  },
  {
    "path": "packages/chameleon-mixins/.npmignore",
    "content": ".scripts"
  },
  {
    "path": "packages/chameleon-mixins/alipay-mixins.js",
    "content": "const commonMixins = require('./wx-alipay-common-mixins.js');\n\nvar _ = module.exports = commonMixins.deepClone(commonMixins);\nconst utils = require('./utils.js');\ncommonMixins.merge(_.mixins.methods, {\n  [_.eventEmitName]: function(eventKey, detail) {\n    let dataset = {};\n    let propKeys = Object.keys((this.props || {}));\n    (propKeys || []).forEach((propKey) => {\n      if (propKey.indexOf('data-') === 0) {\n        let dataKey = propKey.slice(5);// 得到dataset中应该对应的key值\n        if (dataKey) {\n          dataset[dataKey] = this.props[propKey];\n\n        }\n      }\n    })\n    // let modelkey = this.props['data-modelkey'];\n    // let eventKeyProps = this.props[\"data-event\" + eventKey];\n    function titleLize (word) { // 将开头字母转化为大写\n      return word.replace(/^\\w/, function (match) {\n        return match.toUpperCase();\n      })\n    }\n    // 这里对于用户自定义事件，会将首字母大写，但是对于原生事件 touchstart 仅仅大写是不够的，还需要将 touchstart ==> TouchStart\n    eventKey = utils.handleCompEventType(eventKey);\n    let callback = this.props['on' + titleLize(eventKey)];\n    if (callback && _.isType(callback, 'Function')) {\n      callback({\n        type: eventKey,\n        detail,\n        currentTarget: {\n          dataset\n        }\n      })\n    }\n\n  }\n});\n"
  },
  {
    "path": "packages/chameleon-mixins/common.js",
    "content": "\nconst _ = module.exports = {};\nconst utils = require('./utils.js')\n_.eventProxyName = '_cmlEventProxy';\n_.modelEventProxyName = '_cmlModelEventProxy';// c-model  v-model的事件代理\n_.inlineStatementEventProxy = '_cmlInline';// 内联语句的事件代理\n_.eventEmitName = '$cmlEmit'; // 触发事件的方法\n_.styleParseName = '$cmlStyle'; // 提供各端处理style属性的方法  weex中处理成对象，wx中处理成字符串，web中不处理\n_.styleProxyName = '_cmlStyleProxy'; // 提供代理 weex和web端处理style\n_.mergeStyleName = '$cmlMergeStyle';\n_.animationProxy = '_animationCb';\n_.weexClassProxy = '_weexClassProxy';\n_.merge = function(target, fromObj) {\n  Object.keys(fromObj).forEach(key => {\n    target[key] = fromObj[key]\n  })\n}\n\n\n_.isType = function (obj, type) {\n  return Object.prototype.toString.call(obj).slice(8, -1) === type\n}\n\n\n_.mergeStyle = function (...args) {\n  // 可以接受字符串或者对象\n  function styleToObj(str) {\n    let obj = {};\n    str.split(';').filter(item => !!item.trim())\n      .forEach(item => {\n        let {key, value} = utils.getStyleKeyValue(item);\n        key = key.replace(/\\s+/, '')\n        value = value.replace(/\\s+/, '')\n        obj[key] = value\n      })\n    return obj;\n  }\n  let arr = [];\n  args.forEach(arg => {\n    if (typeof arg === 'string') {\n      arr.push(styleToObj(arg))\n    } else if (Object.prototype.toString.call(arg) === '[object Object]') {\n      arr.push(arg);\n    }\n  })\n  let resultObj = Object.assign(...arr)\n\n  let resultStr = ''\n  Object.keys(resultObj).forEach(key => {\n    resultStr += `${key}:${resultObj[key]};`\n  })\n  return resultStr;\n\n}\n_.trim = function (value) {\n  return value.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n};\n_.isReactive = function(value) {\n  let reg = /(?:^'([^']*?)'$)/;\n  return _.trim(value).match(reg);\n}\n"
  },
  {
    "path": "packages/chameleon-mixins/miniapp-utils/px2cpx.js",
    "content": "/* eslint-disable */\nconst _ = module.exports = {};\nconst platform = process.env.platform;\nlet viewportWidth ;\n_.px2cpx = function(px) {\n  function getViewportSize() {\n    if (platform === 'wx') {\n      const { windowWidth } = wx.getSystemInfoSync();\n      return windowWidth;\n    }\n    if (platform === 'baidu') {\n      const { windowWidth } = swan.getSystemInfoSync();\n      return windowWidth;\n    }\n    if (platform === 'alipay') {\n      const { windowWidth } = my.getSystemInfoSync();\n      return windowWidth;\n    }\n    if (platform === 'qq') {\n      const { windowWidth } = qq.getSystemInfoSync();\n      return windowWidth;\n    }\n    if (platform === 'tt') {\n      const { windowWidth } = tt.getSystemInfoSync();\n      return windowWidth;\n    }\n  }\n\n  viewportWidth = viewportWidth || getViewportSize();\n  const cpx = +(750 / viewportWidth * px).toFixed(3);\n  return cpx;\n}\n"
  },
  {
    "path": "packages/chameleon-mixins/package.json",
    "content": "{\n  \"name\": \"chameleon-mixins\",\n  \"version\": \"1.0.8\",\n  \"description\": \"chameleon-mixins\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"mocha --recursive --reporter spec\",\n    \"eslint:fix\": \"eslint web-mixins.js weex-mixins.js wx-mixins.js common.js --fix\",\n    \"eslint\": \"eslint web-mixins.js weex-mixins.js wx-mixins.js common.js \"\n  },\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"devDependencies\": {\n    \"chai\": \"^4.2.0\",\n    \"chameleon-css-loader\": \"1.0.8\",\n    \"coveralls\": \"^2.11.9\",\n    \"eslint\": \"^5.9.0\",\n    \"gulp\": \"^3.9.1\",\n    \"gulp-uglify-es\": \"^1.0.4\",\n    \"istanbul\": \"^0.4.5\",\n    \"mocha\": \"^5.2.0\"\n  },\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"gitHead\": \"5ddcde4330774710f7646559446e008f7785ce00\"\n}"
  },
  {
    "path": "packages/chameleon-mixins/test/common.test.js",
    "content": "const common = require('../common.js');\nconst {expect} = require('chai');\n\n\ndescribe('common.js', function() {\n  it('test merge source to target', function() {\n    let target = {name: 'jim', age: 12};\n    let source = {name: 'jhon', address: 'China'};\n    let result = common.merge(target, source);\n    expect(target).to.be.deep.equal({ name: 'jhon', age: 12, address: 'China' })\n  });\n  it('test isType function', function() {\n    let str = 'this is string';\n    let bool = true;\n    let obj = {};\n    let arr = [];\n    let date = new Date();\n    let promise = new Promise(() => {});\n    let reg = /this is reg/g;\n    let fun = () => {};\n    expect(common.isType(str, 'String')).to.be.ok;\n    expect(common.isType(bool, 'Boolean')).to.be.ok;\n    expect(common.isType(obj, 'Object')).to.be.ok;\n    expect(common.isType(arr, 'Array')).to.be.ok;\n    expect(common.isType(date, 'Date')).to.be.ok;\n    expect(common.isType(promise, 'Promise')).to.be.ok;\n    expect(common.isType(reg, 'RegExp')).to.be.ok;\n    expect(common.isType(fun, 'Function')).to.be.ok;\n    expect(common.isType(str, 'String')).to.be.ok;\n  });\n  it('test mergeStyle function', function() {\n    let cssString = 'background-color:red; width:100px; ';\n    let cssObj1 = {height: '200px;', 'font-size': '30px'};\n    let cssObj2 = {color: 'red'};\n    let mergeResult = common.mergeStyle(cssString, cssObj1, cssObj2);\n    expect(mergeResult).to.be.equal(`background-color:red;width:100px;height:200px;;font-size:30px;color:red;`);\n  });\n  it('judge if the arguments is reactive', function() {\n    expect(common.isReactive(`'index'`)).to.be.an('array')\n  });\n  it('test trim function', function() {\n    expect(common.trim('  name   ')).to.be.equal('name');\n  })\n\n})\n"
  },
  {
    "path": "packages/chameleon-mixins/test/utils.test.js",
    "content": "const utils = require('../utils.js');\nconst {expect} = require('chai');\n\ndescribe('utils.js', function() {\n  it('test getStyleKeyValue', function() {\n    let source = `background-url:(http:www.didi.chameleon.png)`\n    let result = utils.getStyleKeyValue(source);\n    expect(result).to.include.keys('key');\n    expect(result).to.include.keys('value');\n  });\n  it('test handleEventType', function() {\n    expect(utils.handleEventType('touchStart')).to.equal('touchstart')\n    expect(utils.handleEventType('touchMove')).to.equal('touchmove')\n    expect(utils.handleEventType('touchEnd')).to.equal('touchend')\n    expect(utils.handleEventType('tap')).to.equal('tap')\n  });\n  it('test handleCompEventType', function() {\n    expect(utils.handleCompEventType('touchstart')).to.equal('touchStart')\n    expect(utils.handleCompEventType('touchmove')).to.equal('touchMove')\n    expect(utils.handleCompEventType('touchend')).to.equal('touchEnd')\n    expect(utils.handleCompEventType('tap')).to.equal('tap')\n  });\n})\n"
  },
  {
    "path": "packages/chameleon-mixins/test/web-mixins.test.js",
    "content": "const mixins = require('../web-mixins.js').mixins.methods;\nconst {expect} = require('chai');\nlet eventEmittter = require('events')\nlet e = {\n  type: 'touchstart',\n  target: {\n\n  },\n  stopPropagation: function() {},\n  timeStamp: 3795662,\n\n  currentTarget: {\n    dataset: {\n      eventtouchstart: ['handleTouchStart', '$event', 1]\n    }\n  },\n  touches: [{\n    identifier: 'identifier',\n    pageX: 'pageX',\n    pageY: 'pageY',\n    screenX: 'screenX',\n    screenY: 'screenY'\n  }],\n  changedTouches: [{\n    identifier: 'identifier',\n    pageX: 'pageX',\n    pageY: 'pageY',\n    screenX: 'screenX',\n    screenY: 'screenY'\n  }]\n}\n\ndescribe('web-mixins.js', function() {\n  it('test _cmlInline', function() {\n    global.Event = eventEmittter\n    let thisArg = {\n      handleTouchStart: function() {\n\n      }\n    }\n    expect(mixins._cmlInline.call(thisArg, 'handleTouchStart', true, e)).to.be.not.ok\n  });\n  it('test _cmlModelEventProxy', function() {\n    let thisArg = {\n      key: 'modelKey'\n    }\n    global.window = {innerWidth: 750, innerHeight: 1260 } // px2cpx用到了window.innerWidth\n    expect(mixins._cmlModelEventProxy.call(thisArg, e, 'key')).to.be.not.ok\n  });\n  it('test _cmlEventProxy', function() {\n    let thisArg = {\n      handleTouchStart: function() {\n\n      }\n    }\n    expect(mixins._cmlEventProxy.call(thisArg, e, 'handleTouchStart', true)).to.be.not.ok\n  });\n  it('test $cmlEmit', function() {\n    let thisArg = {\n      $emit: function() {\n\n      },\n      $__checkCmlEmit__: function() {\n\n      }\n    }\n    expect(mixins.$cmlEmit.call(thisArg, 'handleTouchStart', {detail: 'detail'})).to.be.not.ok\n  });\n  it('test styleProxyName function:aimed to transform cssStyle object to cssStyle string', function() {\n    expect(mixins.$cmlStyle('width:100px;')).to.be.equal('width:100px;')\n    expect(mixins.$cmlStyle({width: '100px'})).to.be.equal('width:100px;')\n  });\n  it('test $cmlMergeStyle function', function() {\n    let cssString = 'background-color:red; width:100px; ';\n    let cssObj1 = {height: '200px;', 'font-size': '30px'};\n    let cssObj2 = {color: 'red'};\n    let mergeResult = mixins.$cmlMergeStyle(cssString, cssObj1, cssObj2);\n    expect(mergeResult).to.be.equal(`background-color:red;width:100px;height:200px;;font-size:30px;color:red;`);\n  });\n\n})\n"
  },
  {
    "path": "packages/chameleon-mixins/test/weex-mixins.test.js",
    "content": "const mixins = require('../weex-mixins.js').mixins.methods;\nconst {expect} = require('chai');\n\ndescribe('weex-mixins.js', function() {\n  it('test _cmlInline', function() {\n    let e = {\n      type: 'touchstart',\n      target: {\n\n      },\n      stopPropagation: function() {},\n      timestamp: 3795662,\n\n      currentTarget: {\n        dataset: {\n          eventtouchstart: ['handleTouchStart', '$event', 1]\n        }\n      },\n      touches: [{\n        identifier: 'identifier',\n        pageX: 'pageX',\n        pageY: 'pageY',\n        screenX: 'screenX',\n        screenY: 'screenY'\n      }],\n      changedTouches: [{\n        identifier: 'identifier',\n        pageX: 'pageX',\n        pageY: 'pageY',\n        screenX: 'screenX',\n        screenY: 'screenY'\n      }]\n    }\n    let thisArg = {\n      handleTouchStart: function() {\n\n      }\n    }\n    expect(mixins._cmlInline.call(thisArg, 'handleTouchStart', true, 1, e)).to.be.not.ok\n  });\n  it('test _cmlModelEventProxy', function() {\n    let e = {\n      type: 'touchstart',\n      target: {\n\n      },\n      stopPropagation: function() {},\n      timestamp: 3795662,\n\n      currentTarget: {\n        dataset: {\n          eventtouchstart: ['handleTouchStart', '$event', 1]\n        }\n      }\n    }\n    let thisArg = {\n      key: 'modelKey'\n    }\n    expect(mixins._cmlModelEventProxy.call(thisArg, e, 'key')).to.be.not.ok\n  });\n  it('test _cmlEventProxy', function() {\n    let e = {\n      type: 'touchstart',\n      target: {\n\n      },\n      stopPropagation: function() {},\n      timestamp: 3795662,\n\n      currentTarget: {\n        dataset: {\n          eventtouchstart: ['handleTouchStart', '$event', 1]\n        }\n      }\n    }\n    let thisArg = {\n      handleTouchStart: function() {\n\n      }\n    }\n    expect(mixins._cmlEventProxy.call(thisArg, e, 'handleTouchStart', true)).to.be.not.ok\n  });\n  it('test $cmlEmit', function() {\n    let thisArg = {\n      $emit: function() {\n\n      },\n      $__checkCmlEmit__: function() {\n\n      }\n    }\n    expect(mixins.$cmlEmit.call(thisArg, 'handleTouchStart', {detail: 'detail'})).to.be.not.ok\n  });\n\n  it('test styleProxyName function:aimed to transform cssStyle string to cssStyle Object', function() {\n    expect(mixins._cmlStyleProxy('width:75px; ;height:50px; ')).to.be.deep.equal({ width: '75px', height: '50px' });\n    expect(mixins._cmlStyleProxy({ width: '75px', height: '50px' })).to.be.deep.equal({ width: '75px', height: '50px' });\n  });\n  it('test $cmlMergeStyle function', function() {\n    let cssString = 'background-color:red; width:100px; ';\n    let cssObj1 = {height: '200px;', 'font-size': '30px'};\n    let cssObj2 = {color: 'red'};\n    let mergeResult = mixins.$cmlMergeStyle(cssString, cssObj1, cssObj2);\n    expect(mergeResult).to.be.equal(`background-color:red;width:100px;height:200px;;font-size:30px;color:red;`);\n  });\n  it('test weexClassProxy array function', function() {\n    let result = mixins._weexClassProxy(['str1', 'str2']);\n    expect(result).to.include('str1')\n    expect(result).to.include('str2')\n  });\n  it('test weexClassProxy array function', function() {\n    let result = mixins._weexClassProxy({str1: 'str1', str2: 'str2'});\n    expect(result).to.include('str1')\n    expect(result).to.include('str2')\n  });\n\n})\n"
  },
  {
    "path": "packages/chameleon-mixins/test/wx-mixins.test.js",
    "content": "const mixins = require('../wx-mixins.js').mixins.methods;\nconst {expect} = require('chai');\n\ndescribe('wx-mixins.js', function() {\n  it('test $cmlEmit', function() {\n    let thisArg = {\n      triggerEvent: function() {\n\n      },\n      $__checkCmlEmit__: function() {\n\n      }\n    }\n    expect(mixins.$cmlEmit.call(thisArg, 'handleTouchStart', {detail: 'detail'})).to.be.not.ok\n  });\n  it('test _cmlInline', function() {\n    let e = {\n      type: 'touchstart',\n      currentTarget: {\n        dataset: {\n          eventtouchstart: ['handleTouchStart', '$event', 1]\n        }\n      }\n    }\n    let thisArg = {\n      handleTouchStart: function() {\n\n      }\n    }\n    expect(mixins._cmlInline.call(thisArg, e)).to.be.not.ok\n  });\n  it('test _cmlModelEventProxy', function() {\n    let e = {\n      type: 'touchstart',\n      currentTarget: {\n        dataset: {\n          modelkey: 'key'\n        }\n      },\n      detail: {\n        value: \"detailValue\"\n      }\n    }\n    let thisArg = {\n      key: 'modelKey'\n    }\n    expect(mixins._cmlModelEventProxy.call(thisArg, e)).to.be.not.ok\n  });\n  it('test _cmlEventProxy', function() {\n    let e = {\n      type: 'touchstart',\n      currentTarget: {\n        dataset: {\n          eventtouchstart: ['handleTouchStart']\n        }\n      }\n    }\n    let thisArg = {\n      handleTouchStart: function() {\n\n      }\n    }\n    expect(mixins._cmlEventProxy.call(thisArg, e)).to.be.not.ok\n  });\n  it('test styleProxyName function:aimed to transfrom px to rpx', function() {\n    expect(mixins.$cmlStyle('width:75cpx;height:50cpx;')).to.be.equal(`width:75rpx;height:50rpx`);\n    expect(mixins.$cmlStyle({ width: '75cpx', height: '50cpx' })).to.be.equal(`width:75rpx;height:50rpx`);\n  });\n  it('test $cmlMergeStyle function', function() {\n    let cssString = 'background-color:red; width:100px; ';\n    let cssObj1 = {height: '200px;', 'font-size': '30px'};\n    let cssObj2 = {color: 'red'};\n    let mergeResult = mixins.$cmlMergeStyle(cssString, cssObj1, cssObj2);\n    expect(mergeResult).to.be.equal(`background-color:red;width:100px;height:200px;;font-size:30px;color:red;`);\n  });\n  // _animationCb\n  it('test _animationCb', function() {\n    let e = {\n      animationValue: 'animationValue'\n    }\n    let thisArg = {\n      animationValue: {\n        cbs: [function() {}],\n        index: 0\n      }\n    }\n    expect(mixins._animationCb.call(thisArg, e)).to.be.not.ok\n  });\n  it('test _animationCb', function() {\n    let e = {\n      animationValue: 'animationValue'\n    }\n    let thisArg = {\n      animationValue: {\n        index: 1\n      }\n    }\n    expect(mixins._animationCb.call(thisArg, e)).to.be.not.ok\n  });\n  it('test _animationCb', function() {\n    let e = {\n      animationValue: 'animationValue'\n    }\n    let thisArg = {\n      animationValue: {\n        cbs: [function() {}]\n      }\n    }\n    expect(mixins._animationCb.call(thisArg, e)).to.be.not.ok\n  });\n})\n"
  },
  {
    "path": "packages/chameleon-mixins/utils.js",
    "content": "const _ = module.exports = {};\n\n_.getStyleKeyValue = function(declaration) {\n  let colonIndex = declaration.indexOf(':');\n  let key = declaration.slice(0, colonIndex);\n  let value = declaration.slice(colonIndex + 1);\n  return {\n    key, value\n  }\n}\n// 支付宝中的e.type=\"touchStart\"\n_.handleEventType = function(eventType) {\n  let aliEventMap = {\n    touchStart: \"touchstart\",\n    touchEnd: \"touchend\",\n    touchMove: \"touchmove\"\n  }\n  if (Object.keys(aliEventMap).includes(eventType)) {\n    return aliEventMap[eventType]\n  } else {\n    return eventType\n  }\n}\n// 对于组件上绑定的touchstart事件，在编译之后会处理成 onTouchStart=\"handleStart\",所以需要改为对应的大写\n_.handleCompEventType = function(eventType) {\n  let aliEventMap = {\n    touchstart: 'touchStart',\n    touchend: 'touchEnd',\n    touchmove: 'touchMove'\n  }\n  if (Object.keys(aliEventMap).includes(eventType)) {\n    return aliEventMap[eventType]\n  } else {\n    return eventType\n  }\n}\n\n"
  },
  {
    "path": "packages/chameleon-mixins/web-mixins.js",
    "content": "\nconst common = require('./common.js');\nconst webStyleHandle = require('chameleon-css-loader/proxy/proxyWeb.js');\nconst {px2cpx} = require('./web-utils/px2cpx.js');\nconst _ =  module.exports  = {};\ncommon.merge(_, common);\n\n\n_.mixins = {\n  methods: {\n    //支持事件传参\n    [_.inlineStatementEventProxy](...args){\n      let _cml_event_lmc; // ...args 的参数是用户传入的，可能为任意值，防止冲突；(a,'item',e);\n      args = args.reduce((result,arg) => {\n        if(arg instanceof Event){\n          _cml_event_lmc = arg;\n          result.push(getNewEvent(arg))\n        }else{\n          result.push(arg)\n        }\n        return result;\n      },[]);\n      let originFuncName = args[0];\n      let isStopBubble = args[1];\n      if(isStopBubble && _cml_event_lmc && typeof _cml_event_lmc.stopPropagation === 'function'){\n        _cml_event_lmc.stopPropagation();\n      }\n      if(this[originFuncName] && _.isType(this[originFuncName], 'Function')){\n        this[originFuncName](...args.slice(2))\n      }else{\n        console.log(`can not find function ${originFuncName}`)\n      }\n    },\n    //代理 事件，可以使用v-model\n    [_.modelEventProxyName](e,modelKey){\n      let newEvent = getNewEvent(e);\n      this[modelKey] = newEvent.detail.value;\n\n    },\n    [_.eventProxyName](e, originFuncName,isStopBubble) {\n      //调用原始事件\n      if(isStopBubble && typeof e.stopPropagation === 'function'){\n        e.stopPropagation();\n      }\n      if(this[originFuncName] && _.isType(this[originFuncName], 'Function')) {\n        //获取新的事件对象\n        let newEvent = getNewEvent(e);\n        this[originFuncName](newEvent)\n      } else {\n        console.log(`can not find function  ${originFuncName}`)\n      }\n\n    },\n    [_.eventEmitName](eventKey, detail){\n      //传递的参数内容包装成detail参数\n      this.$emit(eventKey, {\n        type: eventKey,\n        detail,\n        stopPropagation:function(){}\n      })\n      if(this['$__checkCmlEmit__']) {\n        this['$__checkCmlEmit__'](eventKey, detail);\n      }\n    },\n    [_.styleParseName](content) {\n      //web端不需要处理直接返回\n      let res = '';\n      if(_.isType(content, 'String')) {\n        res = content\n\n      } else if(_.isType(content, 'Object')) {\n        Object.keys(content).forEach(key=>{\n          res +=`${key}:${content[key]};`\n        })\n      }\n      return res;\n    },\n    [_.styleProxyName](content,options) {\n      return webStyleHandle(content,options);\n    },\n    [_.mergeStyleName](...args) {\n      return _.mergeStyle(...args);\n    }\n  }\n}\n\nfunction getNewEvent(e) {\n  let newEvent = {}\n  let {type, timeStamp, target, currentTarget, touches, changedTouches, detail = {} } = e;\n\n  newEvent._originEvent = e;\n\n  if(type) {\n    type = type.replace(/^weex\\$/, '');\n    type = type === 'click' ? 'tap' : type;\n    newEvent.type = type;\n  }\n\n  if(timeStamp) {\n    newEvent.timeStamp = parseInt(timeStamp);\n  }\n\n  if(target) {\n    newEvent.target = {\n      id: target.id,\n      // offsetLeft: target.offsetLeft,\n      // offsetTop: target.offsetTop,\n      dataset: target.dataset\n    }\n  }\n\n  if(currentTarget) {\n    newEvent.currentTarget = {\n      id: currentTarget.id,\n      // offsetLeft: currentTarget.offsetLeft,\n      // offsetTop: currentTarget.offsetTop,\n      dataset: currentTarget.dataset\n    }\n  }\n\n  if(touches) {\n    newEvent.touches = [];\n    for(let i=0;i<touches.length;i++) {\n      let touch = touches[i];\n      let ret = {}\n      ret.identifier = touch.identifier;\n      ret.pageX = px2cpx(parseInt(touch.pageX,10));\n      ret.pageY = px2cpx(parseInt(touch.pageY,10));\n      ret.clientX = px2cpx(parseInt(touch.clientX,10));\n      ret.clientY = px2cpx(parseInt(touch.clientY,10));\n      newEvent.touches.push(ret);\n    }\n  }\n\n  if(changedTouches) {\n    newEvent.changedTouches = [];\n    for(let i=0;i<changedTouches.length;i++) {\n      let touch = changedTouches[i];\n      let ret = {}\n      ret.identifier = touch.identifier;\n      ret.pageX = px2cpx(parseInt(touch.pageX,10));\n      ret.pageY = px2cpx(parseInt(touch.pageY,10));\n      ret.clientX = px2cpx(parseInt(touch.clientX,10));\n      ret.clientY = px2cpx(parseInt(touch.clientY,10));\n      newEvent.changedTouches.push(ret);\n    }\n  }\n\n  if(_.isType(detail, 'Object')) {\n    newEvent.detail = detail\n  } else {\n    newEvent.detail = {}\n  }\n\n  if(target) {\n    newEvent.detail.value = target.value;\n  }\n\n  //特殊事件处理\n  if(type === 'loadmore') {\n    newEvent.detail.direction = 'bottom';\n  }\n\n  if(type === 'scroll') {\n    newEvent.detail = {\n      ...newEvent.detail,\n      scrollHeight: e.contentSize ? e.contentSize.height : 0,\n      scrollWidth: e.contentSize ? e.contentSize.width : 0,\n      scrollLeft: e.contentOffset ? Math.abs(e.contentOffset.x) : 0,\n      scrollTop: e.contentOffset ? Math.abs(e.contentOffset.y) : 0, // 坐标轴变换\n      deltaX: 0,\n      deltaY: 0\n    }\n  }\n\n  return newEvent;\n}\n"
  },
  {
    "path": "packages/chameleon-mixins/web-utils/px2cpx.js",
    "content": "const _ = module.exports = {};\n\n_.px2cpx = function(px) {\n  function getViewportSize() {\n    let viewportWidth;\n    let viewportHeight;\n    if (window.innerWidth) {\n      viewportWidth = window.innerWidth;\n      viewportHeight = window.innerHeight;\n    } else if (document.documentElement && document.documentElement.clientWidth || document.body && document.body.clientWidth) {\n      viewportWidth = document.documentElement && document.documentElement.clientWidth || document.body && document.body.clientWidth;\n      viewportHeight = document.documentElement && document.documentElement.clientHeight || document.body && document.body.clientHeight;\n    }\n    return {\n      viewportWidth: viewportWidth,\n      viewportHeight: viewportHeight\n    };\n  }\n  const {viewportWidth} = getViewportSize();\n  const cpx = +(750 / viewportWidth * px).toFixed(3);\n  return cpx;\n}\n"
  },
  {
    "path": "packages/chameleon-mixins/weex-mixins.js",
    "content": "\nconst common = require('./common.js');\nconst weexStyleHandle = require('chameleon-css-loader/transform/weex.js')\nconst utils = require('./utils.js');\n\nconst _ = module.exports = {};\ncommon.merge(_, common);\n\n\n_.mixins = {\n  methods: {\n    //支持事件传参\n    [_.inlineStatementEventProxy](...args) {\n      function _is__WEEX__EVENT(weexEvent) {\n        let weexEventKeys = Object.keys(weexEvent);\n        let weexEventFlagKeys = ['type', 'target', 'timestamp'];\n        return weexEventFlagKeys.every((flagKey) => {\n          return weexEventKeys.includes(flagKey);\n        })\n      }\n      let _cml_event_lmc; // ...args 的参数是用户传入的，可能为任意值，防止冲突；(a,'item',e);\n      args = args.reduce((result, arg) => {\n        if (_is__WEEX__EVENT(arg)) {\n          _cml_event_lmc = arg;\n          result.push(getNewEvent(arg))\n        } else {\n          result.push(arg)\n        }\n        return result;\n      }, []);\n      let originFuncName = args[0];\n      let isStopBubble = args[1];\n      if(isStopBubble && _cml_event_lmc && typeof _cml_event_lmc.stopPropagation === 'function'){\n        _cml_event_lmc.stopPropagation();\n      }\n      if (this[originFuncName] && _.isType(this[originFuncName], 'Function')) {\n        this[originFuncName](...args.slice(2))\n      } else {\n        console.log(`can not find function ${originFuncName}`)\n      }\n    },\n    [_.modelEventProxyName](e, modelKey) {\n      let newEvent = getNewEvent(e);\n      this[modelKey] = newEvent.detail.value;\n    },\n    [_.eventProxyName](e, originFuncName,isStopBubble) {\n      if(isStopBubble && typeof e.stopPropagation === 'function'){\n        e.stopPropagation();\n      }\n      //调用原始事件\n      if (this[originFuncName] && _.isType(this[originFuncName], 'Function')) {\n        //获取新的事件对象\n        let newEvent = getNewEvent(e);\n        this[originFuncName](newEvent)\n      } else {\n        console.log(`can not find function  ${originFuncName}`)\n      }\n\n    },\n    [_.eventEmitName](eventKey, detail) {\n      //传递的参数内容包装成detail参数\n      this.$emit(eventKey, {\n        type: eventKey,\n        detail\n      })\n      if (this['$__checkCmlEmit__']) {\n        this['$__checkCmlEmit__'](eventKey, detail);\n      }\n    },\n    //weex端的处理放到自动包装的代理函数中\n    [_.styleParseName](content) {\n      return content;\n    },\n    //动态的style ，编译时会自动包装的代理函数\n    [_.styleProxyName](content) {\n      let res = '';\n      if (_.isType(content, 'String')) {\n        res = content\n\n      } else if (_.isType(content, 'Object')) {\n        Object.keys(content).forEach(key => {\n          res += `${key}:${content[key]};`\n        })\n      }\n      //先统一转成字符串，处理后再转成对象\n      res = weexStyleHandle.parse(res)\n      var obj = {};\n      res.split(';').filter(styleitem => {\n        return !!styleitem.trim();\n      }).forEach(item => {\n        let { key, value } = utils.getStyleKeyValue(item);\n        key = key.replace(/\\s/g, '')\n        value = value.replace(/\\s/g, '')\n        obj[key] = value;\n      })\n      return obj;\n    },\n    [_.mergeStyleName](...args) {\n      return _.mergeStyle(...args);\n    },\n    // 只提供weex端动态class的代理\n    [_.weexClassProxy](value) {\n      if ((typeof value === 'string')) {\n        return value.split(' ').filter((item) => !!item.trim());\n      } else if (Object.prototype.toString.call(value) === '[object Array]') {\n        return value\n      } else if (Object.prototype.toString.call(value) === '[object Object]') {\n        return Object.keys(value).filter((key) => value[key])\n      } else {\n        throw new Error(`please check if the value of class is right at ${JSON.stringify(value)}`)\n      }\n    }\n\n  }\n}\n\n\n\nfunction getNewEvent(e) {\n  let newEvent = {}\n  let { type, timestamp, target, currentTarget, touches, changedTouches, value, detail = {} } = e;\n\n  newEvent._originEvent = e;\n\n  if (type) {\n    type = type.replace(/^weex\\$/, '');\n    type = type === 'click' ? 'tap' : type;\n    newEvent.type = type;\n  }\n\n  if (timestamp) {\n    newEvent.timeStamp = parseInt(e.timestamp);\n  }\n\n  if (target) {\n    newEvent.target = getTarget(target)\n  }\n\n  if (currentTarget) {\n    newEvent.currentTarget = getTarget(currentTarget)\n  }\n\n  function getTarget(originTarget) {\n    let { attr } = originTarget;\n    let id;\n    let dataset = {};\n    if (attr) {\n      Object.keys(attr).forEach(key => {\n        let originKey = key;\n        if (key === 'id') {\n          id = attr[key]\n        } else {\n          if (key.indexOf('data') === 0) {\n            key = key.slice(4);\n            //weex中会把data-name=\"yyl\"  变成 dataName:yyl  data后的第一个字母大写\n            key = key[0].toLowerCase() + key.slice(1);\n            dataset[key] = attr[originKey]\n          }\n        }\n      })\n    }\n    return {\n      id,\n      dataset\n    }\n  }\n\n  if (touches) {\n    newEvent.touches = [];\n    for (let i = 0; i < touches.length; i++) {\n      let touch = touches[i];\n      let ret = {}\n      ret.identifier = touch.identifier;\n      ret.pageX = parseInt(touch.pageX);\n      ret.pageY = parseInt(touch.pageY);\n      ret.clientX = parseInt(touch.screenX);\n      ret.clientY = parseInt(touch.screenY);\n      newEvent.touches.push(ret);\n    }\n  }\n\n  if (changedTouches) {\n    newEvent.changedTouches = [];\n    for (let i = 0; i < changedTouches.length; i++) {\n      let touch = changedTouches[i];\n      let ret = {}\n      ret.identifier = touch.identifier;\n      ret.pageX = parseInt(touch.pageX);\n      ret.pageY = parseInt(touch.pageY);\n      ret.clientX = parseInt(touch.screenX);\n      ret.clientY = parseInt(touch.screenY);\n      newEvent.changedTouches.push(ret);\n    }\n  }\n\n  if (_.isType(detail, 'Object')) {\n    newEvent.detail = detail\n  } else {\n    newEvent.detail = {}\n  }\n\n\n  if (value) {\n    newEvent.detail.value = value;\n  }\n\n  //特殊事件处理\n  if (type === 'loadmore') {\n    newEvent.detail.direction = 'bottom';\n  }\n\n  if (type === 'scroll') {\n    newEvent.detail = {\n      ...newEvent.detail,\n      scrollHeight: e.contentSize ? e.contentSize.height : 0,\n      scrollWidth: e.contentSize ? e.contentSize.width : 0,\n      scrollLeft: e.contentOffset ? Math.abs(e.contentOffset.x) : 0,\n      scrollTop: e.contentOffset ? Math.abs(e.contentOffset.y) : 0, // 坐标轴变换\n      deltaX: 0,\n      deltaY: 0\n    }\n  }\n\n  return newEvent;\n}\n"
  },
  {
    "path": "packages/chameleon-mixins/wx-alipay-common-mixins.js",
    "content": "\n\nconst common = require('./common.js');\nconst wxStyleHandle = require('chameleon-css-loader/proxy/proxyMiniapp.js')\nconst utils = require('./utils.js');\nconst {px2cpx} = require('./miniapp-utils/px2cpx.js');\nconst deepClone = function(obj) {\n  if (obj.toString().slice(8, -1) !== \"Object\") {\n    return obj;\n  }\n  let res = {};\n  Object.keys(obj).forEach(key => {\n    res[key] = deepClone(obj[key]);\n  })\n  return res;\n}\n\nvar _ = module.exports = { deepClone };\n\ncommon.merge(_, common);\n\n_.mixins = {\n  methods: {\n    // 支持事件传参\n    [_.inlineStatementEventProxy](e) {\n      let { dataset } = e.currentTarget;\n      // 支付宝的e.type = 'touchStart',需要改为小写，否则找不到函数\n      e.type = utils.handleEventType(e.type);\n      let eventKey = e.type.toLowerCase();\n      let originFuncName = dataset && dataset[`event${eventKey}`] && dataset[`event${eventKey}`][0];\n      let inlineArgs = dataset && dataset[`event${eventKey}`] && dataset[`event${eventKey}`].slice(1);\n      let argsArr = [];\n      // 由于百度对于 data-arg=\"\" 在dataset.arg = true 值和微信端不一样所以需要重新处理下这部分逻辑\n      if (inlineArgs) {\n        argsArr = inlineArgs.reduce((result, arg, index) => {\n          if (arg === \"$event\") {\n            let newEvent = getNewEvent(e);\n            result.push(newEvent);\n          } else {\n            result.push(arg)\n          }\n          return result;\n        }, []);\n      }\n      if (originFuncName && this[originFuncName] && _.isType(this[originFuncName], 'Function')) {\n        this[originFuncName](...argsArr)\n      } else {\n        console.log(`can not find method ${originFuncName}`)\n      }\n    },\n    [_.modelEventProxyName](e) {\n      let dataset = e.currentTarget && e.currentTarget.dataset\n      let modelKey = dataset && dataset.modelkey\n      if (modelKey) {\n        this[modelKey] = e.detail.value;\n      }\n\n    },\n    [_.eventProxyName](e) {\n      let { dataset } = e.currentTarget;\n      // 支付宝的e.type = 'touchStart',需要改为小写，否则找不到函数\n      e.type = utils.handleEventType(e.type);\n      let eventKey = e.type.toLowerCase();\n      let originFuncName = dataset && dataset[`event${eventKey}`] && dataset[`event${eventKey}`][0];\n      if (originFuncName && this[originFuncName] && _.isType(this[originFuncName], 'Function')) {\n        let newEvent = getNewEvent(e);\n        this[originFuncName](newEvent)\n\n      } else {\n        console.log(`can not find method ${originFuncName}`)\n      }\n    },\n    [_.styleParseName](content) {\n      let res = ''\n      if (_.isType(content, 'Object')) {\n        Object.keys(content).forEach(key => {\n          res += `${key}:${content[key]};`\n        })\n      } else if (_.isType(content, 'String')) {\n        res = content;\n      }\n      return wxStyleHandle(res);\n    },\n    [_.mergeStyleName](...args) {\n      return _.mergeStyle(...args);\n    },\n    [_.animationProxy](...args) {\n      let animationValue = args[0];\n      // animationValue:{cbs:{0:cb0,1:cb1,length:2},index}\n      let animation = this[animationValue];// 引用值\n      if (!animation) {\n        return ;\n      }\n      const { cbs, index } = animation;\n      // 配合 解决百度端动画bug\n      if (cbs === undefined || index === undefined) {return ;}\n      let cb = cbs[index];\n      if (cb && typeof cb === 'function') {\n        cb();\n      }\n      delete animation.index;\n      animation.index = index + 1;\n    }\n  }\n\n}\n\nfunction getNewEvent(e) {\n  let newEvent = {};\n  ['type', 'timeStamp', 'target', 'currentTarget', 'detail', 'touches', 'changedTouches'].forEach((key) => {\n    if (e[key]) {\n      if (~['target', 'currentTarget'].indexOf(key)) {\n        let newTarget = {}\n        newTarget = {\n          id: e[key].id,\n          dataset: e[key].dataset\n        }\n        newEvent[key] = newTarget\n      } else if (~['touches', 'changedTouches'].indexOf(key)) {\n        if (key == 'touches') {\n          let touches = e[key];\n          newEvent.touches = [];\n          for (let i = 0;i < touches.length;i++) {\n            let touch = touches[i];\n            let ret = {}\n            ret.identifier = touch.identifier;\n            ret.pageX = px2cpx(parseInt(touch.pageX, 10));\n            ret.pageY = px2cpx(parseInt(touch.pageY, 10));\n            ret.clientX = px2cpx(parseInt(touch.clientX, 10));\n            ret.clientY = px2cpx(parseInt(touch.clientY, 10));\n            newEvent.touches.push(ret);\n          }\n        }\n\n        if (key == 'changedTouches') {\n          let changedTouches = e[key]\n          newEvent.changedTouches = [];\n          for (let i = 0;i < changedTouches.length;i++) {\n            let touch = changedTouches[i];\n            let ret = {}\n            ret.identifier = touch.identifier;\n            ret.pageX = px2cpx(parseInt(touch.pageX, 10));\n            ret.pageY = px2cpx(parseInt(touch.pageY, 10));\n            ret.clientX = px2cpx(parseInt(touch.clientX, 10));\n            ret.clientY = px2cpx(parseInt(touch.clientY, 10));\n            newEvent.changedTouches.push(ret);\n          }\n        }\n      } else {\n        newEvent[key] = e[key]\n      }\n    }\n  })\n\n  newEvent._originEvent = e;\n  return newEvent;\n}\n\n"
  },
  {
    "path": "packages/chameleon-mixins/wx-mixins.js",
    "content": "const commonMixins = require('./wx-alipay-common-mixins.js');\n\nvar _ = module.exports = commonMixins.deepClone(commonMixins);\ncommonMixins.merge(_.mixins.methods, {\n  [_.eventEmitName]: function(eventKey, detail) {\n    this.triggerEvent(eventKey, detail);\n    if (this.$__checkCmlEmit__) {\n      this.$__checkCmlEmit__(eventKey, detail);\n    }\n  }\n});\n"
  },
  {
    "path": "packages/chameleon-template-parse/.eslintrc",
    "content": "/* eslint-enable */\n{\n  \"globals\": {\n      \"cml\": false\n  },\n  \"env\": {\n      \"browser\": true,\n      \"node\": true,\n      \"commonjs\": true,\n      \"amd\": true,\n      \"es6\": true,\n      \"mocha\": true\n  },\n  \"parserOptions\": {\n      \"ecmaVersion\": 6,\n      \"sourceType\": \"module\", \n      \"ecmaFeatures\": {\n          \"globalReturn\": true,\n          \"impliedStrict\": true,\n          \"jsx\": true,\n          \"modules\": true\n      }\n  },\n  \"plugins\": [\n\n  ],\n  \"extends\": [\n      \"eslint:recommended\"\n  ],\n\n\n  \"rules\": {\n\n     \n      \"no-cond-assign\": 2,\n      \"no-console\": 0,\n      \n      \"no-constant-condition\": 2,\n      \"no-control-regex\": 2,\n      \"comma-dangle\": [1, \"never\"],\n      \"no-debugger\": 2,\n      \"no-dupe-args\": 2,\n      \"no-dupe-keys\": 2,\n      \"no-duplicate-case\": 2,\n      \"no-empty\": 2,\n      \"no-empty-character-class\": 2,\n      \"no-ex-assign\": 2,\n      \"no-extra-boolean-cast\": 2,\n      \"no-extra-parens\": 0,\n      \"no-extra-semi\": 2,\n      \"no-func-assign\": 2,\n      \"no-inner-declarations\": [2, \"functions\"],\n      \"no-invalid-regexp\": 2,\n      \"no-irregular-whitespace\": 2,\n      \"no-negated-in-lhs\": 2,\n      \"no-obj-calls\": 2,\n      \"no-prototype-builtins\": 0,\n      \"no-regex-spaces\": 2,\n      \"no-sparse-arrays\": 2,\n      \"no-unexpected-multiline\": 2,\n      \"no-unreachable\": 2,\n      \"use-isnan\": 2,\n      \"valid-jsdoc\": 0,\n      \"valid-typeof\": 2,\n\n\n      \"accessor-pairs\": 2,\n      \"array-callback-return\": 0,\n      \"block-scoped-var\": 0,\n      \"complexity\": [2, 30],\n      \"consistent-return\": 0,\n      \"curly\": [2, \"all\"],\n      \"default-case\": 2,\n      \"dot-location\": [2, \"property\"],\n      \"dot-notation\": [2, {\n          \"allowKeywords\": false\n      }],\n      \"eqeqeq\": [0, \"allow-null\"],\n      \"guard-for-in\": 2,\n      \"no-alert\": 0,\n      \"no-caller\": 2,\n      \"no-case-declarations\": 2,\n      \"no-div-regex\": 2,\n      \"no-else-return\": 0,\n      \"no-empty-function\": 2,\n      \"no-empty-pattern\": 2,\n      \"no-eq-null\": 1,\n      \"no-eval\": 2,\n      \"no-extend-native\": 2,\n      \"no-extra-bind\": 2,\n      \"no-extra-label:\": 0,\n      \"no-fallthrough\": 2,\n      \"no-floating-decimal\": 2,\n      \"no-implicit-coercion\": 0,\n      \"no-implicit-globals\": 1,\n      \"no-implied-eval\": 2,\n      \"no-invalid-this\": 0,\n      \"no-iterator\": 2,\n      \"no-labels\": 2,\n      \"no-lone-blocks\": 2,\n      \"no-loop-func\": 1,\n      \"no-magic-numbers\": [1, {\n          \"ignore\": [0, -1, 1]\n      }],\n      \"no-multi-spaces\": 2,\n      \"no-multi-str\": 2,\n      \"no-native-reassign\": 2,\n      \"no-new\": 2,\n      // 禁止对 Function 对象使用 new 操作符\n      \"no-new-func\": 0,\n      // 禁止对 String，Number 和 Boolean 使用 new 操作符\n      \"no-new-wrappers\": 2,\n      // 禁用八进制字面量\n      \"no-octal\": 2,\n      // 禁止在字符串中使用八进制转义序列\n      \"no-octal-escape\": 2,\n      // 不允许对 function 的参数进行重新赋值\n      \"no-param-reassign\": 0,\n      // 禁用 __proto__ 属性\n      \"no-proto\": 2,\n      // 禁止使用 var 多次声明同一变量\n      \"no-redeclare\": 2,\n      // 禁用指定的通过 require 加载的模块\n      \"no-return-assign\": 0,\n      // 禁止使用 javascript: url\n      \"no-script-url\": 0,\n      // 禁止自我赋值\n      \"no-self-assign\": 2,\n      // 禁止自身比较\n      \"no-self-compare\": 2,\n      // 禁用逗号操作符\n      \"no-sequences\": 2,\n      // 禁止抛出非异常字面量\n      \"no-throw-literal\": 2,\n      // 禁用一成不变的循环条件\n      \"no-unmodified-loop-condition\": 2,\n      // 禁止出现未使用过的表达式\n      \"no-unused-expressions\": 0,\n      // 禁用未使用过的标签\n      \"no-unused-labels\": 2,\n      // 禁止不必要的 .call() 和 .apply()\n      \"no-useless-call\": 2,\n      // 禁止不必要的字符串字面量或模板字面量的连接\n      \"no-useless-concat\": 0,\n      // 禁用不必要的转义字符\n      \"no-useless-escape\": 0,\n      // 禁用 void 操作符\n      \"no-void\": 0,\n      // 禁止在注释中使用特定的警告术语\n      \"no-warning-comments\": 0,\n      // 禁用 with 语句\n      \"no-with\": 2,\n      // 强制在parseInt()使用基数参数\n      \"radix\": 2,\n      // 要求所有的 var 声明出现在它们所在的作用域顶部\n      \"vars-on-top\": 0,\n      // 要求 IIFE 使用括号括起来\n      \"wrap-iife\": [2, \"any\"],\n      // 要求或禁止 “Yoda” 条件\n      \"yoda\": [2, \"never\"],\n      // 要求或禁止使用严格模式指令\n      \"strict\": 0,\n\n\n      //////////////\n      // 变量声明 //\n      //////////////\n\n      // 要求或禁止 var 声明中的初始化(初值)\n      \"init-declarations\": 0,\n      // 不允许 catch 子句的参数与外层作用域中的变量同名\n      \"no-catch-shadow\": 0,\n      // 禁止删除变量\n      \"no-delete-var\": 2,\n      // 不允许标签与变量同名\n      \"no-label-var\": 2,\n      // 禁用特定的全局变量\n      \"no-restricted-globals\": 0,\n      // 禁止 var 声明 与外层作用域的变量同名\n      \"no-shadow\": 0,\n      // 禁止覆盖受限制的标识符\n      \"no-shadow-restricted-names\": 2,\n      // 禁用未声明的变量，除非它们在 /*global */ 注释中被提到\n      \"no-undef\": 2,\n      // 禁止将变量初始化为 undefined\n      \"no-undef-init\": 2,\n      // 禁止将 undefined 作为标识符\n      \"no-undefined\": 0,\n      // 禁止出现未使用过的变量\n      \"no-unused-vars\": [2, {\n          \"vars\": \"all\",\n          \"args\": \"none\"\n      }],\n      // 不允许在变量定义之前使用它们\n      \"no-use-before-define\": 0,\n\n      //////////////////////////\n      // Node.js and CommonJS //\n      //////////////////////////\n\n      // require return statements after callbacks\n      \"callback-return\": 0,\n      // 要求 require() 出现在顶层模块作用域中\n      \"global-require\": 1,\n      // 要求回调函数中有容错处理\n      \"handle-callback-err\": [2, \"^(err|error)$\"],\n      // 禁止混合常规 var 声明和 require 调用\n      \"no-mixed-requires\": 0,\n      // 禁止调用 require 时使用 new 操作符\n      \"no-new-require\": 2,\n      // 禁止对 __dirname 和 __filename进行字符串连接\n      \"no-path-concat\": 0,\n      // 禁用 process.env\n      \"no-process-env\": 0,\n      // 禁用 process.exit()\n      \"no-process-exit\": 0,\n      // 禁用同步方法\n      \"no-sync\": 0,\n\n      //////////////\n      // 风格指南 //\n      //////////////\n\n      // 指定数组的元素之间要以空格隔开(, 后面)， never参数：[ 之前和 ] 之后不能带空格，always参数：[ 之前和 ] 之后必须带空格\n      \"array-bracket-spacing\": [2, \"never\"],\n      // 禁止或强制在单行代码块中使用空格(禁用)\n      \"block-spacing\": [1, \"never\"],\n      //强制使用一致的缩进 第二个参数为 \"tab\" 时，会使用tab，\n      // if while function 后面的{必须与if在同一行，java风格。\n      \"brace-style\": [2, \"1tbs\", {\n          \"allowSingleLine\": true\n      }],\n      // 双峰驼命名格式\n      \"camelcase\": 2,\n      // 控制逗号前后的空格\n      \"comma-spacing\": [2, {\n          \"before\": false,\n          \"after\": true\n      }],\n      // 控制逗号在行尾出现还是在行首出现 (默认行尾)\n      // http://eslint.org/docs/rules/comma-style\n      \"comma-style\": [2, \"last\"],\n      //\"SwitchCase\" (默认：0) 强制 switch 语句中的 case 子句的缩进水平\n      // 以方括号取对象属性时，[ 后面和 ] 前面是否需要空格, 可选参数 never, always\n      \"computed-property-spacing\": [2, \"never\"],\n      // 用于指统一在回调函数中指向this的变量名，箭头函数中的this已经可以指向外层调用者，应该没卵用了\n      // e.g [0,\"that\"] 指定只能 var that = this. that不能指向其他任何值，this也不能赋值给that以外的其他值\n      \"consistent-this\": [1, \"that\"],\n      // 强制使用命名的 function 表达式\n      \"func-names\": 0,\n      // 文件末尾强制换行\n      \"eol-last\": 2,\n      \"indent\": [2, 2, {\n          \"SwitchCase\": 1\n      }],\n      // 强制在对象字面量的属性中键和值之间使用一致的间距\n      \"key-spacing\": [2, {\n          \"beforeColon\": false,\n          \"afterColon\": true\n      }],\n      // 强制使用一致的换行风格\n      \"linebreak-style\": [1, \"unix\"],\n      // 要求在注释周围有空行 ( 要求在块级注释之前有一空行)\n      \"lines-around-comment\": [1, {\n          \"beforeBlockComment\": true\n      }],\n      // 强制一致地使用函数声明或函数表达式，方法定义风格，参数：\n      // declaration: 强制使用方法声明的方式，function f(){} e.g [2, \"declaration\"]\n      // expression：强制使用方法表达式的方式，var f = function() {} e.g [2, \"expression\"]\n      // allowArrowFunctions: declaration风格中允许箭头函数。 e.g [2, \"declaration\", { \"allowArrowFunctions\": true }]\n      \"func-style\": 0,\n      // 强制回调函数最大嵌套深度 5层\n      \"max-nested-callbacks\": [1, 5],\n      // 禁止使用指定的标识符\n      \"id-blacklist\": 0,\n      // 强制标识符的最新和最大长度\n      \"id-length\": 0,\n      // 要求标识符匹配一个指定的正则表达式\n      \"id-match\": 0,\n      // 强制在 JSX 属性中一致地使用双引号或单引号\n      \"jsx-quotes\": 0,\n      // 强制在关键字前后使用一致的空格 (前后腰需要)\n      \"keyword-spacing\": 2,\n      // 强制一行的最大长度\n      \"max-len\": [1, 200],\n      // 强制最大行数\n      \"max-lines\": 0,\n      // 强制 function 定义中最多允许的参数数量\n      \"max-params\": [1, 7],\n      // 强制 function 块最多允许的的语句数量\n      \"max-statements\": [1, 200],\n      // 强制每一行中所允许的最大语句数量\n      \"max-statements-per-line\": 0,\n      // 要求构造函数首字母大写 （要求调用 new 操作符时有首字母大小的函数，允许调用首字母大写的函数时没有 new 操作符。）\n      \"new-cap\": [2, {\n          \"newIsCap\": true,\n          \"capIsNew\": false\n      }],\n      // 要求调用无参构造函数时有圆括号\n      \"new-parens\": 2,\n      // 要求或禁止 var 声明语句后有一行空行\n      \"newline-after-var\": 0,\n      // 禁止使用 Array 构造函数\n      \"no-array-constructor\": 2,\n      // 禁用按位运算符\n      \"no-bitwise\": 0,\n      // 要求 return 语句之前有一空行\n      \"newline-before-return\": 0,\n      // 要求方法链中每个调用都有一个换行符\n      \"newline-per-chained-call\": 1,\n      // 禁用 continue 语句\n      \"no-continue\": 0,\n      // 禁止在代码行后使用内联注释\n      \"no-inline-comments\": 0,\n      // 禁止 if 作为唯一的语句出现在 else 语句中\n      \"no-lonely-if\": 0,\n      // 禁止混合使用不同的操作符\n      \"no-mixed-operators\": 0,\n      // 不允许空格和 tab 混合缩进\n      \"no-mixed-spaces-and-tabs\": 2,\n      // 不允许多个空行\n      \"no-multiple-empty-lines\": [2, {\n          \"max\": 2\n      }],\n      // 不允许否定的表达式\n      \"no-negated-condition\": 0,\n      // 不允许使用嵌套的三元表达式\n      \"no-nested-ternary\": 0,\n      // 禁止使用 Object 的构造函数\n      \"no-new-object\": 2,\n      // 禁止使用一元操作符 ++ 和 --\n      \"no-plusplus\": 0,\n      // 禁止使用特定的语法\n      \"no-restricted-syntax\": 0,\n      // 禁止 function 标识符和括号之间出现空格\n      \"no-spaced-func\": 2,\n      // 不允许使用三元操作符\n      \"no-ternary\": 0,\n      // 禁用行尾空格\n      \"no-trailing-spaces\": 2,\n      // 禁止标识符中有悬空下划线_bar\n      \"no-underscore-dangle\": 0,\n      // 禁止可以在有更简单的可替代的表达式时使用三元操作符\n      \"no-unneeded-ternary\": 2,\n      // 禁止属性前有空白\n      \"no-whitespace-before-property\": 0,\n      // 强制花括号内换行符的一致性\n      \"object-curly-newline\": 0,\n      // 强制在花括号中使用一致的空格\n      \"object-curly-spacing\": 0,\n      // 强制将对象的属性放在不同的行上\n      \"object-property-newline\": 0,\n      // 强制函数中的变量要么一起声明要么分开声明\n      \"one-var\": [2, {\n          \"initialized\": \"never\"\n      }],\n      // 要求或禁止在 var 声明周围换行\n      \"one-var-declaration-per-line\": 0,\n      // 要求或禁止在可能的情况下要求使用简化的赋值操作符\n      \"operator-assignment\": 0,\n      // 强制操作符使用一致的换行符\n      \"operator-linebreak\": [2, \"after\", {\n          \"overrides\": {\n              \"?\": \"before\",\n              \":\": \"before\"\n          }\n      }],\n      // 要求或禁止块内填充\n      \"padded-blocks\": 0,\n      // 要求对象字面量属性名称用引号括起来\n      \"quote-props\": 0,\n      // 强制使用一致的反勾号、双引号或单引号\n      // \"quotes\": [2, \"single\", \"avoid-escape\"],\n      // 要求使用 JSDoc 注释\n      \"require-jsdoc\": 0,\n      // 要求或禁止使用分号而不是 ASI（这个才是控制行尾部分号的，）\n      \"semi\": [0, \"always\"],\n      // 强制分号之前和之后使用一致的空格\n      \"semi-spacing\": 0,\n      // 要求同一个声明块中的变量按顺序排列\n      \"sort-vars\": 0,\n      // 强制在块之前使用一致的空格\n      \"space-before-blocks\": [2, \"always\"],\n      // 强制在 function的左括号之前使用一致的空格\n      \"space-before-function-paren\": [0, \"always\"],\n      // 强制在圆括号内使用一致的空格\n      \"space-in-parens\": [2, \"never\"],\n      // 要求操作符周围有空格\n      \"space-infix-ops\": 2,\n      // 强制在一元操作符前后使用一致的空格\n      \"space-unary-ops\": [2, {\n          \"words\": true,\n          \"nonwords\": false\n      }],\n      // 强制在注释中 // 或 /* 使用一致的空格\n      \"spaced-comment\": [2, \"always\", {\n          \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n      }],\n      // 要求或禁止 Unicode BOM\n      \"unicode-bom\": 0,\n      // 要求正则表达式被括号括起来\n      \"wrap-regex\": 0,\n\n      //////////////\n      // ES6.相关 //\n      //////////////\n\n      // 要求箭头函数体使用大括号\n      \"arrow-body-style\": 2,\n      // 要求箭头函数的参数使用圆括号\n      \"arrow-parens\": 0,\n      \"arrow-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 强制在子类构造函数中用super()调用父类构造函数，TypeScrip的编译器也会提示\n      \"constructor-super\": 0,\n      // 强制 generator 函数中 * 号周围使用一致的空格\n      \"generator-star-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 禁止修改类声明的变量\n      \"no-class-assign\": 2,\n      // 不允许箭头功能，在那里他们可以混淆的比较\n      \"no-confusing-arrow\": 0,\n      // 禁止修改 const 声明的变量\n      \"no-const-assign\": 2,\n      // 禁止类成员中出现重复的名称\n      \"no-dupe-class-members\": 2,\n      // 不允许复制模块的进口\n      \"no-duplicate-imports\": 0,\n      // 禁止 Symbol 的构造函数\n      \"no-new-symbol\": 2,\n      // 允许指定模块加载时的进口\n      \"no-restricted-imports\": 0,\n      // 禁止在构造函数中，在调用 super() 之前使用 this 或 super\n      \"no-this-before-super\": 2,\n      // 禁止不必要的计算性能键对象的文字\n      \"no-useless-computed-key\": 0,\n      // 要求使用 let 或 const 而不是 var\n      \"no-var\": 0,\n      // 要求或禁止对象字面量中方法和属性使用简写语法\n      \"object-shorthand\": 0,\n      // 要求使用箭头函数作为回调\n      \"prefer-arrow-callback\": 0,\n      // 要求使用 const 声明那些声明后不再被修改的变量\n      \"prefer-const\": 0,\n      // 要求在合适的地方使用 Reflect 方法\n      \"prefer-reflect\": 0,\n      // 要求使用扩展运算符而非 .apply()\n      \"prefer-spread\": 0,\n      // 要求使用模板字面量而非字符串连接\n      \"prefer-template\": 0,\n      // Suggest using the rest parameters instead of arguments\n      \"prefer-rest-params\": 0,\n      // 要求generator 函数内有 yield\n      \"require-yield\": 0,\n      // enforce spacing between rest and spread operators and their expressions\n      \"rest-spread-spacing\": 0,\n      // 强制模块内的 import 排序\n      \"sort-imports\": 0,\n      // 要求或禁止模板字符串中的嵌入表达式周围空格的使用\n      \"template-curly-spacing\": 1,\n      // 强制在 yield* 表达式中 * 周围使用空格\n      \"yield-star-spacing\": 2\n  }\n}\n/* eslint-enable */"
  },
  {
    "path": "packages/chameleon-template-parse/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n.vscode\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\n#dist\ndist/\n# \nold-test/\n"
  },
  {
    "path": "packages/chameleon-template-parse/.npmignore",
    "content": "# Editor directories and files\n.git\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n.vscode\n.script\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\n\n# odl-test\nold-test/"
  },
  {
    "path": "packages/chameleon-template-parse/LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2015-present Yuxi (Evan) You\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "packages/chameleon-template-parse/gulpfile.js",
    "content": "const gulp = require('gulp');\nconst uglify = require('gulp-uglify-es')[\"default\"];\n\ngulp.task('build', function () {\n  gulp.src('src/**/**.js')\n    .pipe(uglify({\n      parse: {\n        bare_returns: true\n\n      },\n      mangle: {\n        toplevel: true\n      },\n      compress: {\n        drop_console: true,\n        drop_debugger: true\n      }\n    }))\n    .pipe(gulp.dest('dist/'));\n});\n"
  },
  {
    "path": "packages/chameleon-template-parse/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n  <title>Document</title>\n</head>\n<body>\n  <div id=\"app\">\n  </div>\n</html>"
  },
  {
    "path": "packages/chameleon-template-parse/index.js",
    "content": "let compileTemplate = require('./src/index.js')\n\nmodule.exports = compileTemplate;\n\n"
  },
  {
    "path": "packages/chameleon-template-parse/package.json",
    "content": "{\n  \"name\": \"chameleon-template-parse\",\n  \"version\": \"1.0.8\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"eslint\": \"eslint ./src\",\n    \"lint\": \"eslint --ext .js  src --fix\",\n    \"dev\": \"webpack-dev-server\",\n    \"test\": \"mocha --recursive --reporter spec\",\n    \"cover\": \"istanbul cover --report lcov node_modules/mocha/bin/_mocha -- -R spec --recursive\"\n  },\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"dependencies\": {\n    \"@babel/generator\": \"^7.1.2\",\n    \"@babel/parser\": \"^7.3.4\",\n    \"@babel/plugin-syntax-jsx\": \"^7.0.0\",\n    \"@babel/traverse\": \"^7.1.0\",\n    \"@babel/types\": \"^7.1.2\",\n    \"babylon\": \"^6.18.0\",\n    \"hash-sum\": \"^1.0.2\",\n    \"tapable\": \"^1.1.0\"\n  },\n  \"devDependencies\": {\n    \"chai\": \"^4.2.0\",\n    \"chameleon-css-loader\": \"1.0.8\",\n    \"chameleon-mixins\": \"1.0.8\",\n    \"chameleon-tool-utils\": \"1.0.8\",\n    \"clean-webpack-plugin\": \"^0.1.19\",\n    \"coveralls\": \"^2.11.9\",\n    \"eslint\": \"^5.9.0\",\n    \"gulp\": \"^3.9.1\",\n    \"gulp-uglify-es\": \"^1.0.4\",\n    \"html-webpack-plugin\": \"^3.2.0\",\n    \"istanbul\": \"^0.4.5\",\n    \"mocha\": \"^5.2.0\",\n    \"uglifyjs-webpack-plugin\": \"^2.0.1\",\n    \"webpack\": \"^4.20.2\",\n    \"webpack-cli\": \"^3.1.1\",\n    \"webpack-dev-server\": \"^3.1.9\"\n  },\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"gitHead\": \"5ddcde4330774710f7646559446e008f7785ce00\"\n}"
  },
  {
    "path": "packages/chameleon-template-parse/src/common/cml-map.js",
    "content": "\nexports.tagMap = {\n  targetTagMap: {\n    'cover-view': {\n      wx: 'cover-view',\n      web: 'div',\n      weex: 'div',\n      alipay: 'cover-view',\n      baidu: 'cover-view',\n      qq: 'cover-view',\n      tt: 'cover-view'\n    },\n    'view': {\n      wx: 'view',\n      web: 'div',\n      weex: 'div',\n      alipay: 'view',\n      baidu: 'view',\n      qq: 'view',\n      tt: 'view'\n    },\n    'text': {\n      wx: 'text',\n      web: 'span',\n      weex: 'text',\n      alipay: 'text',\n      baidu: 'text',\n      qq: 'text',\n      tt: 'text'\n    },\n    'image': {\n      wx: 'image',\n      web: 'img',\n      weex: 'image',\n      alipay: 'image',\n      baidu: 'image',\n      qq: 'image',\n      tt: 'image'\n    },\n    'input': {\n      wx: 'input',\n      web: 'input',\n      weex: 'input',\n      alipay: 'input',\n      baidu: 'input',\n      qq: 'input',\n      tt: 'input'\n\n    },\n    'button': {\n      wx: 'button',\n      web: 'div',\n      weex: 'div',\n      alipay: 'button',\n      baidu: 'button',\n      qq: 'button',\n      tt: 'button'\n    },\n    'cell': {\n      wx: 'view',\n      web: 'cell',\n      weex: 'cell',\n      alipay: 'view',\n      baidu: 'view',\n      qq: 'view',\n      tt: 'view'\n    },\n    'slider-item': {\n      wx: 'swiper-item',\n      web: 'div',\n      weex: 'div',\n      alipay: 'swiper-item',\n      baidu: 'swiper-item',\n      qq: 'swiper-item',\n      tt: 'swiper-item'\n\n    }\n  },\n  afterTagMap: {\n    // 在最后处理的标签，因为template标签在jsdom中不识别\n    'block': {\n      wx: 'block',\n      web: 'template',\n      weex: 'template',\n      alipay: 'block',\n      baidu: 'block',\n      qq: 'block',\n      tt: 'block'\n    }\n  },\n  diffTagMap: {\n    wx: ['cml-wx'],\n    web: ['cml-web', 'cml-web-weex'],\n    weex: ['cml-weex', 'cml-web-weex'],\n    alipay: ['cml-ali'],\n    baidu: ['cml-baidu'],\n    qq: ['cml-qq'],\n    tt: ['cml-tt']\n  },\n  wxTagMap: {\n    'carousel': 'swiper',\n    'carousel-item': 'swiper-item'\n  }\n}\nexports.conditionMap = {\n  'c-if': {\n    web: 'v-if',\n    weex: 'v-if',\n    wx: 'wx:if',\n    alipay: 'a:if',\n    baidu: 's-if',\n    qq: 'qq:if',\n    tt: 'tt:if'\n  },\n  'c-else-if': {\n    web: 'v-else-if',\n    weex: 'v-else-if',\n    wx: 'wx:elif',\n    alipay: 'a:elif',\n    baidu: 's-elif',\n    qq: 'qq:elif',\n    tt: 'tt:elif'\n  },\n  'c-else': {\n    web: 'v-else',\n    weex: 'v-else',\n    wx: 'wx:else',\n    alipay: 'a:else',\n    baidu: 's-else',\n    qq: 'qq:else',\n    tt: 'tt:else'\n\n  }\n}\nexports.interationMap = {\n  'c-for': {\n    wx: 'wx:for',\n    alipay: 'a:for',\n    baidu: 's-for',\n    qq: 'qq:for',\n    tt: 'tt:for'\n  },\n  'c-key': {\n    wx: 'wx:key',\n    alipay: 'a:key',\n    baidu: 's-key', // 百度文档没有提到这个，黑人问号脸\n    qq: 'qq:key',\n    tt: 'tt:key'\n  },\n  'c-for-item': {\n    wx: 'wx:for-item',\n    alipay: 'a:for-item',\n    baidu: 's-for-item',\n    qq: 'qq:for-item',\n    tt: 'tt:for-item'\n  },\n  'c-for-index': {\n    wx: 'wx:for-index',\n    alipay: 'a:for-index',\n    baidu: 's-for-index',\n    qq: 'qq:for-index',\n    tt: 'tt:for-index'\n  }\n}\nexports.eventMap = {\n  'touchstart': 'touchStart',\n  'touchmove': 'touchMove',\n  'touchend': 'touchEnd',\n  'touchcancel': 'touchCancel',\n  'longtap': 'longTap'\n}\nexports.conditionMapVue2Wx = {\n  'v-if': {\n    wx: 'wx:if',\n    alipay: 'a:if',\n    baidu: 's-if',\n    qq: 'qq:if',\n    tt: 'tt:if'\n  },\n  'v-else-if': {\n    wx: 'wx:elif',\n    alipay: 'a:elif',\n    baidu: 's-elif',\n    qq: 'qq:elif',\n    tt: 'tt:elif'\n  },\n  'v-else': {\n    wx: 'wx:else',\n    alipay: 'a:else',\n    baidu: 's-else',\n    qq: 'qq:else',\n    tt: 'tt:else'\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-template-parse/src/common/process-template.js",
    "content": "\nconst babylon = require('babylon');\nconst t = require('@babel/types');\nconst traverse = require('@babel/traverse')['default'];\nconst generate = require('@babel/generator')['default'];\nconst {\n  tagMap\n} = require('../common/cml-map.js')\nconst utils = require('./utils');\n\nexports.startCallback = function(matchStart, type, options) {\n  let usingComponents = options.usingComponents || [];\n  let buildInComponents = options.buildInComponents || {};\n  if (type === 'alipay') {\n    let isComponent = usingComponents.find((comp) => comp.tagName === matchStart.tagName) || Object.keys(buildInComponents).includes(matchStart.tagName);\n    let leftAttrsOnComponent = matchStart.attrs;// 遗留在组件上的属性,默认值是所有属性，如果是组件，那么还需要过滤\n    if (isComponent) { // 如果是组件，那么需要将组件的c-if c-else去掉\n      let filtersAttrs = ['c-if', 'c-else', 'c-else-if', 'v-if', 'v-else', 'v-else-if']\n      leftAttrsOnComponent = matchStart.attrs.filter((attr) => !filtersAttrs.includes(attr[1]))\n    }\n\n    let attrString = (leftAttrsOnComponent || []).reduce((result, item) => result = result + (item[0] || ''), '')\n    return attrString;\n  }\n}\n\n/*\n@description:因为阿里的组件上的样式会被直接忽略掉，所以编译层要做一层标签的包裹处理；\n注意只处理alipay端的组件，其他的不作处理\n*/\nexports.preParseAliComponent = function(source, type, options) {\n  if (type === 'alipay') {\n    let usingComponents = options.usingComponents || [];\n    let buildInComponents = options.buildInComponents || {};\n    let exceptTags = ['carousel-item', 'c-tab-item', 'checkbox', 'radio'];// 用于包括哪些组件标签不用被view标签包裹\n    let callbacks = {startCallback: exports.startCallback};\n    let htmlArr = exports.preParseHTMLtoArray(source, type, options, callbacks);\n    let newHtmlArr = [];\n    htmlArr.forEach((item) => {\n      let isExpectTags = exceptTags.includes(item.tagName)\n      if (item.type === 'tagContent') { // 标签内置直接push内容\n        newHtmlArr.push(item.content);\n      }\n      if (item.type === 'tagEnd') { // 结束标签的话，先将该标签的内容push,然后判断是否是组件\n        newHtmlArr.push(item.content);\n        let isComponent = usingComponents.find((comp) => comp.tagName === item.tagName) || Object.keys(buildInComponents).includes(item.tagName);\n        if (isComponent && !isExpectTags) {\n          newHtmlArr.push('</view>');\n        }\n      }\n      if (item.type === 'tagStart') {\n        // 先 push view标签，然后再push组件标签\n        let isComponent = usingComponents.find((comp) => comp.tagName === item.tagName) || Object.keys(buildInComponents).includes(item.tagName);\n        let inheritNodes = (item.attrs || []).filter((attr) => {\n          let inheritAttrsFromComp = ['c-if', 'c-else', 'c-else-if', 'v-if', 'v-else', 'v-else-if', 'class', 'style', 'v-bind:style', 'v-bind:class', ':style', ':class', 'c-show', 'v-show', 'id'];\n          // eslint-disable-next-line\n          let inheritEvent = ['c-bind:click', 'c-bind:tap', 'c-bind:touchstart', 'c-bind:touchmove', 'c-bind:touchend', 'c-bind:touchcancel', 'c-catch:click', 'c-catch:tap', 'c-catch:touchstart', 'c-catch:touchmove', 'c-catch:touchend', 'c-catch:touchcancel'];\n          let isInherit = inheritAttrsFromComp.includes(attr[1]) || inheritEvent.includes(attr[1]) || /^data-/.test(attr[1])\n          return isInherit;\n        });\n        let inheritString = inheritNodes.reduce((result, styleClassNode) => result = result + (styleClassNode[0] || ''), '');\n        if (isComponent && !isExpectTags) { // 如果是组件需要从组件继承一些属性过来\n          if (!item.isunary) { // 如果不是一元标签，那么只在该标签前面push一个view\n            newHtmlArr.push(`<view ${inheritString} >`);\n            newHtmlArr.push(item.content);\n          }\n          if (item.isunary) { // 如果是一元标签，那么在该标签前后都要push view\n            newHtmlArr.push(`<view ${inheritString} >`);\n            newHtmlArr.push(item.content);\n            newHtmlArr.push('</view>')\n          }\n        } else { // 不是内置组件直接push\n          newHtmlArr.push(item.content)\n        }\n      }\n    });\n    return newHtmlArr.join('')\n\n  }\n  return source;\n}\n\n/* @description:提供一个将模板转化为数组的方法，以后各个端如果对模板的处理在jsx中做不了的话，可以通过处理这个数组进行解决\n 解析的数组元素分为三种类型 tagStart  tagEnd  和 tagContent,其中tagStart有可能是自闭标签\n @params:html模板\n @return:html模板对应的字符串\n */\nexports.preParseHTMLtoArray = function(html, type, options, callbacks) {\n  let {startCallback} = callbacks;\n  // 需要考虑问题 单标签和双标签\n  let stack = [];\n  // id=\"value\" id='value'  class=red    disabled\n  const attribute = /^\\s*([^\\s\"'<>\\/=]+)(?:\\s*(=)\\s*(?:\"([^\"]*)\"+|'([^']*)'+|([^\\s\"'=<>`]+)))?/\n  const ncname = '[a-zA-Z_][\\\\w\\\\-\\\\.]*'\n  const qnameCapture = `((?:${ncname}\\\\:)?${ncname})`\n  // 标签的匹配，这些正则都不是g这种全局匹配，所以仅仅会匹配第一个遇到的标签；\n  // const startTag = new RegExp(`^<${qnameCapture}([\\\\s\\\\S])*(\\\\/?)>`);\n  // const startTag = /^<([a-zA-Z-:.]*)[^>]*?>/;\n  const startTagOpen = new RegExp(`^<${qnameCapture}`) // 匹配开始open\n  const startTagClose = /^\\s*(\\/?)>/ // 匹配开始关闭；单标签的关闭有两种情况，第一就是 > 第二个就是 />,可以通过捕获分组 / 来判断是单闭合标签还是双开标签的开始标签的闭合\n  const endTag = new RegExp(`^<\\\\/${qnameCapture}[^>]*>`);\n  // eslint-disable-next-line\n  let index = 0;\n  while (html) {\n    let textEnd = html.indexOf('<')\n    // 解析标签内容，包括开始标签以及结束标签\n    if (textEnd === 0) { // 以 < 开头的html\n      const startTagMatch = parseStartTag();\n      if (startTagMatch) {\n        stack.push(startTagMatch);\n        continue;\n      }\n      const endTagMatch = parseEndTag();\n      if (endTagMatch) {\n        stack.push(endTagMatch);\n        continue;\n      }\n    }\n    // 解析标签中间的内容\n    let text, rest, next\n    if (textEnd >= 0) {\n      rest = html.slice(textEnd)\n      while (\n        !endTag.test(rest) &&\n          !startTagOpen.test(rest)\n      ) {\n        // < in plain text, be forgiving and treat it as text\n        next = rest.indexOf('<', 1)\n        if (next < 0) {break}\n        textEnd += next\n        rest = html.slice(textEnd)\n      }\n      let matchText = {\n        type: 'tagContent'\n      };\n      text = html.substring(0, textEnd)\n      matchText.content = text;\n      matchText.isText = true;\n      stack.push(matchText);\n      advance(textEnd);\n      continue;\n    }\n    if (textEnd < 0) {\n      text = html;\n      html = '';\n      const matchText2 = {\n        type: 'tagContent',\n        content: text\n      }\n      stack.push(matchText2)\n      continue;\n\n    }\n  }\n  return stack;\n  function advance (n) {\n    index += n\n    html = html.substring(n)\n  }\n  function parseStartTag () {\n    // 开始标签也可能是一元标签 通过isunary字段进行区分\n    const start = html.match(startTagOpen)\n    if (start) {\n      const matchStart = {\n        type: 'tagStart',\n        tagName: start[1],\n        attrs: []\n      }\n      advance(start[0].length);\n\n      let end, attr\n      // 这里处理标签的属性值；\n      while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) {\n        advance(attr[0].length)\n        matchStart.attrs.push(attr)\n      }\n      if (end) {\n        matchStart.isunary = !!utils.trim(end[1] || '');// 标记是否是一元标签\n        advance(end[0].length)\n        let attrString = startCallback(matchStart, type, options) || '';\n        let content ;\n        if (matchStart.isunary) {\n          content = `<${matchStart.tagName} ${attrString} />`\n        } else {\n          content = `<${matchStart.tagName} ${attrString} >`\n        }\n        matchStart.content = content;// 每个数组中这个值用于拼接；\n        return matchStart\n      }\n    }\n  }\n  function parseEndTag() {\n    const end = html.match(endTag);\n    if (end) {\n      const matchEnd = {\n        type: 'tagEnd',\n        tagName: end[1],\n        content: end[0]\n      }\n      advance(end[0].length)\n      return matchEnd;\n    }\n  }\n\n}\n// 注意，所有要再次使用babylon解析html模板的，必须再次将模板转化为符合jsx语法\nexports.preParseDiffPlatformTag = function(htmlContent, type) {\n  let activeTags = tagMap.diffTagMap[type] || [];\n  let deadTags = []\n  Object.keys(tagMap.diffTagMap).forEach(key => {\n    if (key !== type) {\n      deadTags = deadTags.concat(tagMap.diffTagMap[key])\n    }\n  })\n\n  activeTags.forEach(tag => {\n    htmlContent = exports.activeTagHandler(tag, htmlContent);\n  })\n  deadTags.forEach(tag => {\n    htmlContent = exports.deadTagHandler(tag, htmlContent);\n  })\n  return htmlContent\n}\nexports.deadTagHandler = function(tag, content) {\n  var contentReg = new RegExp(`<\\\\s*${tag}[\\\\s\\\\S]*?>[\\\\s\\\\S]*?<\\\\s*\\\\/\\\\s*${tag}[\\\\s\\\\S]*?>`, 'ig')\n  content = content.replace(contentReg, '')\n  return content\n}\nexports.activeTagHandler = function (tag, content) {\n  let startreg = new RegExp(`<\\\\s*${tag}[\\\\s\\\\S]*?>`, 'ig')\n  let endreg = new RegExp(`<\\\\s*\\\\/\\\\s*${tag}[\\\\s\\\\S]*?>`, 'ig')\n\n  content = content.replace(startreg, '')\n  content = content.replace(endreg, '')\n\n  return content;\n}\n\n// 模板前置处理器\n// 预处理:属性  :name=\"sth\" ==> v-bind:name=\"sth\",因为jsx识别不了 :name=\"sth\"\nexports.preParseBindAttr = function (content) {\n  content = content.replace(/(\\s+):([a-zA-Z_\\-0-9]+?\\s*=\\s*[\"'][^\"']*?[\"'])/ig, (m, $1, $2) => `${$1}v-bind:${$2}`);\n  return content;\n}\n\n/**\n * 处理vue的事件\n * <a v-on:click=\"doSomething\"> ... </a>\n * <a @click=\"doSomething\"> ... </a>\n *\n * <a bindclick=\"doSomething\"> ... </a>\n * @param {*} content\n */\n\nexports.preParseVueEvent = function (content) {\n  //         v-on | @--> <--  属性名  --><--=-->\n  let reg = /(?:v\\-on:|@)([^\\s\"'<>\\/=]+?)\\s*=\\s*/g\n  content = content.replace(reg, (m, $1) => {\n    if (typeof $1 === 'string' && $1.endsWith('.stop')) {\n      $1 = $1.replace('.stop', '');\n      return `c-catch:${$1}=`;\n    } else {\n      return `c-bind:${$1}=`\n    }\n  });\n  return content;\n}\n// 处理 {{}} 里面的 >  < ==>\nexports.preParseGtLt = function(content) {\n  let reg = /{{([\\s\\S]*?)}}/g;\n  return content.replace(reg, function(match) {\n    return exports._operationGtLt(match);\n  })\n}\n// 预处理 标签内的 {{item.id}} 这种语法jsx无法识别，转化为 _cml{item.id}lmc_\nexports.preParseMustache = function (content) {\n  let reg = />([\\s\\S]*?)<[a-zA-Z\\/\\-_]+?/g;\n  return content.replace(reg, function (match, key) {\n    return exports._operationMustache(match);\n  })\n}\nexports.preDisappearAnnotation = function (content) {\n  let annotionReg = /<!--[\\s\\S]*?-->/g;\n  return content.replace(annotionReg, function (match) {\n    return '';\n  })\n}\n// 将模板预处理符合jsx解析规则，比如 : {{}} 等\nexports.preParseTemplateToSatisfactoryJSX = function(source, callbacks) {\n  // 预处理html模板中的注释，jsx不支持，这个需要优先处理，防止解析 < > 的时候出现问题；\n  callbacks.forEach((callback) => {\n    source = exports[callback](source);\n  })\n  return source;\n}\nexports.preParseAnimation = function(source, type) {\n  // 这个只在小程序端增加callback;\n  // if (type === 'wx' || type === 'alipay' || type === 'baidu' || type === 'qq') {\n  let miniAppType = ['wx', 'alipay', 'baidu', 'qq', 'tt'];\n  if (miniAppType.includes(type)) {\n    let callbacks = ['preDisappearAnnotation', 'preParseGtLt', 'preParseBindAttr', 'preParseVueEvent', 'preParseMustache', 'postParseLtGt']\n    source = exports.preParseTemplateToSatisfactoryJSX(source, callbacks);\n    const ast = babylon.parse(source, {\n      plugins: ['jsx']\n    })\n    traverse(ast, {\n      enter(path) {\n        let node = path.node;\n        if (t.isJSXAttribute(node) && (node.name.name === 'c-animation' || node.name.name === 'v-animation')) {\n          let value = utils.trimCurly(node.value.value).trim();\n          path.insertAfter(t.jsxAttribute(t.jsxIdentifier('c-bind:transitionend'), t.stringLiteral(`_animationCb('${value}',$event)`)))\n        }\n      }\n    });\n    // 这里注意，每次经过babel之后，中文都需要转义过来；\n    return exports.postParseUnicode(generate(ast).code);\n  }\n  return source;\n\n}\n// 语法检查：这个不参与真正的模板编译；\n// vue语法不能写c-bind {{}} c-show  c-if c-model c-text  c-animation c-for\n// cml语法不能写 @     :    v-show  v-if v-model v-text v-animation v-for\nexports.preParseEventSyntax = function (content) {\n  let reg = /(?:v\\-on:|@)([^\\s\"'<>\\/=]+?)\\s*=\\s*/g\n  content = content.replace(reg, (m, $1) => {\n    if (typeof $1 === 'string' && $1.endsWith('.stop')) {\n      $1 = $1.replace('.stop', '');\n      $1 = $1 === 'click' ? 'tap' : $1;\n      return `v-on:${$1}=`;\n    } else {\n      $1 = $1 === 'click' ? 'tap' : $1;\n      return `v-on:${$1}=`\n    }\n  });\n  return content;\n}\n// 仅仅对跨端组件进行语法校验：不能是 .web.cml   .weex.cml   .alipay.cml  .wx.cml  .baidu.cml结尾的\nexports.preCheckTemplateSyntax = function(source, type, options) {\n  let {lang, filePath} = options;\n  // 多态组件不进行语法校验\n  let polymorphicCompSuffix = `.${type}.cml`;\n  let crossPlatformSuffix = '.cml';\n  let ispolymorphicComp = filePath.endsWith(polymorphicCompSuffix);\n  // 跨端组件肯定不能是 .web.cml   .weex.cml   .alipay.cml  .wx.cml  .baidu.cml结尾的\n  let iscrossPlatform = !ispolymorphicComp && filePath.endsWith(crossPlatformSuffix);\n\n  let errorInfo\n  if (lang === 'vue' && iscrossPlatform) {\n    try {\n      errorInfo = exports.preCheckTemplateSyntaxForVue(source, type, options)\n\n    } catch (e) {\n      errorInfo = 'vue syntax error '\n    }\n  }\n  if (lang === 'cml' && iscrossPlatform) {\n    try {\n      errorInfo = exports.preCheckTemplateSyntaxForCml(source, type, options)\n\n    } catch (e) {\n      errorInfo = 'cml syntax error '\n    }\n  }\n  return errorInfo\n}\nexports.preCheckTemplateSyntaxForVue = function(source, type, options) {\n  let {lang} = options;\n  if (lang === 'vue') {\n    let callbacks = ['preDisappearAnnotation', 'preParseEventSyntax', 'preParseGtLt', 'preParseBindAttr', 'preParseMustache', 'postParseLtGt']\n    source = exports.preParseTemplateToSatisfactoryJSX(source, callbacks);\n    let errorInfo = '';\n    let directiveError = []; let twoWayBindError; let eventBindingError;\n    let disabledDirective = ['c-if', 'c-else-if', 'c-else', 'c-show', 'c-text', 'c-model', 'c-animation', 'c-for']\n    const ast = babylon.parse(source, {\n      plugins: ['jsx']\n    })\n    traverse(ast, {\n      enter(path) {\n        let node = path.node;\n        if (directiveError.length <= disabledDirective.length && t.isJSXAttribute(node) && disabledDirective.includes(node.name.name)) {\n          errorInfo += `${node.name.name} can't be used with vue syntax ;`\n          !directiveError.includes(node.name.name) && directiveError.push(directiveError)\n        }\n        if (!twoWayBindError && t.isJSXAttribute(node) && node.value && utils.isMustacheReactive(node.value.value)) {\n          errorInfo += '<div id={{value}}></div> can not be used with vue syntax,please use <div v-bind:id=\"value\"></div> 或者 <div :id=\"value\"></div> '\n          twoWayBindError = true;\n        }\n        if (!eventBindingError && t.isJSXNamespacedName(node.name) && node.name.namespace.name === 'c-bind') {\n          errorInfo += \"with vue syntax you can not use 'c-bind' to get event binded , please use  @ or v-on;\"\n          eventBindingError = true\n        }\n      }\n    });\n    return errorInfo\n  }\n\n}\nexports.preCheckTemplateSyntaxForCml = function(source, type, options) {\n  let {lang} = options;\n  if (lang === 'cml') {\n    let callbacks = ['preDisappearAnnotation', 'preParseEventSyntax', 'preParseGtLt', 'preParseBindAttr', 'preParseMustache', 'postParseLtGt']\n    source = exports.preParseTemplateToSatisfactoryJSX(source, callbacks);\n    let errorInfo = '';\n    let directiveError = []; let twoWayBindError; let eventBindingError;\n    let disabledDirective = ['v-if', 'v-else-if', 'v-else', 'v-show', 'v-text', 'v-model', 'v-animation', 'v-for']\n    const ast = babylon.parse(source, {\n      plugins: ['jsx']\n    })\n    traverse(ast, {\n      enter(path) {\n        let node = path.node;\n        if (directiveError.length <= disabledDirective.length && t.isJSXAttribute(node) && disabledDirective.includes(node.name.name)) {\n          errorInfo += `${node.name.name} can't be used with cml syntax ;`\n          !directiveError.includes(node.name.name) && directiveError.push(directiveError)\n        }\n        if (!twoWayBindError && t.isJSXNamespacedName(node.name) && node.name.namespace.name === 'v-bind') {\n          errorInfo += '<div v-bind:id=\"value\"></div> 或者 <div :id=\"value\"></div> can not be used with cml syntax,please use  <div id={{value}}></div> '\n          twoWayBindError = true;\n        }\n        if (!eventBindingError && t.isJSXNamespacedName(node.name) && node.name.namespace.name === 'v-on') {\n          errorInfo += \"with cml syntax you can not use @ or v-on  to get event binded , please use  'c-bind';\"\n          eventBindingError = true;\n        }\n      }\n    });\n    return errorInfo\n  }\n\n}\n// 模板后置处理器\nexports.postParseMustache = function (content) {\n  let reg = />([\\s\\S]*?)<[a-zA-Z\\/\\-_]+?/g;\n  return content.replace(reg, function (match, key) {\n    return exports._deOperationMustache(match);\n  })\n}\nexports.postParseLtGt = function(content) {\n  let reg = /{{([\\s\\S]*?)}}/g;\n  return content.replace(reg, function(match) {\n    return exports._deOperationGtLt(match);\n  })\n}\nexports.postParseUnicode = function(content) {\n  let reg = /\\\\u/g;\n  return unescape(content.replace(reg, '%u'));\n}\n\n/**\n * 校验 template 模板下如果有 cml 标签，则必须是第一层,且在第一层不能有其他标签；\n */\nexports.checkTemplateChildren = function(path) {\n  let node = path.node;\n  let children = node.children || [];\n  let jsxElements = children.filter((child) => t.isJSXElement(child));\n  let hasCMLTag = jsxElements.some((ele) => ele.openingElement.name.name === 'cml');\n  let hasOtherTag = jsxElements.some((ele) => ele.openingElement.name.name !== 'cml');\n  return {hasCMLTag, hasOtherTag, jsxElements};\n}\n\n/*\n校验 cml 标签的父元素必须是 template;\n\n*/\nexports.checkCMLParent = function(path) {\n  let node = path.node;\n  if (node.openingElement.name.name === 'cml') {\n    let parentNode = path.parentPath && path.parentPath.node;\n    if (parentNode && parentNode.openingElement && parentNode.openingElement.name.name !== 'template') {\n      throw new Error('模板多态标签 cml 只允许在 template 标签的第一层');\n    }\n  }\n}\n\n/**\n * 获取 符合多态模板结构的 template 标签下对应平台的cml标签里的内容；\n * @params:jsxElements  template 节点下所有的 元素节点标签\n * @params:type  当前平台对应的 type，wx baidu alipay 等\n */\nexports.getCurrentPlatformCML = function(jsxElements, type) {\n  let currentCML = jsxElements.find((ele) => {\n    let typeAttr = ele.openingElement.attributes.find((attr) => attr.name.name = 'type');\n    if (!typeAttr) {\n      throw new Error('cml 标签必须有 type 属性，标识用于哪端的代码')\n    }\n    let typeValue = typeAttr && typeAttr.value && typeAttr.value.value;\n    return typeValue.includes(type)\n  });\n  // 有对应平台的 type 找到之后直接return 这个节点\n  if (currentCML) {\n    return currentCML;\n  }\n  let baseCML = jsxElements.find((ele) => {\n    let typeAttr = ele.openingElement.attributes.find((attr) => attr.name.name = 'type');\n    if (!typeAttr) {\n      throw new Error('cml 标签必须有 type 属性，标识用于哪端的代码')\n    }\n    let typeValue = typeAttr && typeAttr.value && typeAttr.value.value;\n    return typeValue.includes('base')\n  });\n\n  if (!currentCML && baseCML) {\n    return baseCML;\n  }\n\n}\n\n/*\n@source: 源 template 文件\n@type:要编译的平台\n*/\nexports.postParseOriginTag = function(source, type) {\n  let callbacks = ['preDisappearAnnotation', 'preParseGtLt', 'preParseBindAttr', 'preParseMustache', 'postParseLtGt'];\n  source = exports.postParseUnicode(source);\n  source = exports.preParseTemplateToSatisfactoryJSX(source, callbacks);\n  const ast = babylon.parse(source, {\n    plugins: ['jsx']\n  })\n  traverse(ast, {\n    enter(path) {\n      let node = path.node;\n      if (t.isJSXElement(node) && (node.openingElement.name && typeof node.openingElement.name.name === 'string')) {\n        if (node.openingElement.name.name.indexOf('origin-') === 0) {\n          let currentTag = node.openingElement.name.name;\n          let targetTag = currentTag.replace('origin-', '')\n          node.openingElement.name.name = targetTag;\n          node.closingElement && (node.closingElement.name.name = targetTag);\n        }\n      }\n    }\n  });\n  // 这里注意，每次经过babel之后，中文都需要转义过来；\n  return exports.postParseUnicode(generate(ast).code);\n}\n\n/* 提供给 chameleon-loader 用于删除多态模板多其他端的不用的代码\n@params:source 模板内容\n@params:type 当前要编译的平台，用于截取多态模板\n@params:options needTranJSX 需要转化为jsx可以解析的模板；needDelTemplate 需要删除template节点\n*/\nexports.preParseMultiTemplate = function(source, type, options = {}) {\n  try {\n    if (options.needTranJSX) { // 当调用这个方法之前没有事先转义jsx,那么就需要转义一下\n      let callbacks = ['preDisappearAnnotation', 'preParseGtLt', 'preParseBindAttr', 'preParseVueEvent', 'preParseMustache', 'postParseLtGt'];\n      source = exports.preParseTemplateToSatisfactoryJSX(source, callbacks);\n    }\n    let isEmptyTemplate = false;\n    const ast = babylon.parse(source, {\n      plugins: ['jsx']\n    })\n    traverse(ast, {\n      enter(path) {\n        let node = path.node;\n        if (t.isJSXElement(node) && (node.openingElement.name && typeof node.openingElement.name.name === 'string' && node.openingElement.name.name === 'template')) {\n          path.stop();// 不要在进行子节点的遍历,因为这个只需要处理template\n          let {hasCMLTag, hasOtherTag, jsxElements} = exports.checkTemplateChildren(path);\n          if (hasCMLTag && hasOtherTag) {\n            throw new Error('多态模板里只允许在template标签下的一级标签是cml');\n          }\n          if (hasCMLTag && !hasOtherTag) {// 符合多态模板的结构格式\n            let currentPlatformCML = exports.getCurrentPlatformCML(jsxElements, type);\n            if (currentPlatformCML) {\n              currentPlatformCML.openingElement.name.name = 'view';\n              // 这里要处理自闭和标签，没有closingElement，所以做个判断；\n              currentPlatformCML.closingElement && (currentPlatformCML.closingElement.name.name = 'view');\n              node.children = [currentPlatformCML];\n              if (options.needDelTemplate) { // 将template节点替换成找到的cml type 节点；\n                path.replaceWith(currentPlatformCML)\n              }\n            } else {\n              // 如果没有写对应平台的 cml type='xxx' 或者 cml type='base',那么报错\n              throw new Error('没有对应平台的模板或者基础模板')\n            }\n          } else { // 不是多态模板\n            // 注意要考虑空模板的情况\n            if (options.needDelTemplate && jsxElements.length === 1) { // 将template节点替换成找到的cml type 节点；\n              path.replaceWith((jsxElements[0]));\n            } else {\n              isEmptyTemplate = true;\n            }\n          }\n        }\n      }\n    });\n    // 这里注意，每次经过babel之后，中文都需要转义过来；\n    if (isEmptyTemplate) {\n      return '';\n    }\n    source = exports.postParseUnicode(generate(ast).code);\n    if (/;$/.test(source)) { // 这里有个坑，jsx解析语法的时候，默认解析的是js语法，所以会在最后多了一个 ; 字符串；但是在 html中 ; 是无法解析的；\n      source = source.slice(0, -1);\n    }\n    return source;\n  } catch (e) {\n    console.log('preParseMultiTemplate', e)\n  }\n}\n// cli仓库使用\nexports.analyzeTemplate = function(source, options) {\n  try {\n    let callbacks = ['preDisappearAnnotation', 'preParseGtLt', 'preParseBindAttr', 'preParseVueEvent', 'preParseMustache', 'postParseLtGt'];// //这些预处理是为了让jsx可以处理\n    if (!source) {\n      return options;\n    }\n    source = exports.preParseTemplateToSatisfactoryJSX(source, callbacks);\n    source = exports.preParseMultiTemplate(source, options.cmlType, {needDelTemplate: true})\n    const ast = babylon.parse(source, {\n      plugins: ['jsx']\n    })\n    traverse(ast, {\n      enter(path) {\n        let node = path.node;\n        let buildInTagMap = options && options.buildInComponents;// {button:\"cml-buildin-button\"}\n        if (t.isJSXElement(node) && buildInTagMap) {\n          let currentTag = node.openingElement.name.name;\n          let targetTag = buildInTagMap[currentTag];\n          // 收集用了哪些内置组件 usedBuildInTagMap:{button:'cml-buildin-button',radio:'cml-buildin-radio'}\n          if (targetTag) {\n            (!options.usedBuildInTagMap) && (options.usedBuildInTagMap = {});\n            options.usedBuildInTagMap[currentTag] = targetTag;\n          }\n        }\n      }\n    });\n    return options;\n  } catch (e) {\n    console.log('analyzeTemplate', e)\n  }\n}\n// 模块内置方法\n// 这里主要处理1  >{{}}< 双花括号之间的 ==> _cml{}lmc_ ,因为jsx无法识别 {{}}\n// 2 同时将 {{}}内的 _cml_gt_lmc_  _cml_lt_lmc_ 复原  < >\nexports._operationMustache = function (content) {\n  let mustacheReg = /{{([\\s\\S]*?)}}/g\n  return content.replace(mustacheReg, function (match, key) {\n    key = exports._deOperationGtLt(key);\n    return `_cml{${key}}lmc_`\n  })\n}\nexports._deOperationMustache = function (content) {\n  let deMustacheReg = /_cml{([\\s\\S]*?)}lmc_/g;\n  return content.replace(deMustacheReg, function (match, key) {\n    return `{{${key}}}`\n  })\n}\nexports._operationGtLt = function(content) {\n  let gtltReg = />|</g;\n  return content.replace(gtltReg, function(match) {\n    if (match === '>') {\n      return '_cml_gt_lmc_'\n    }\n    if (match === '<') {\n      return '_cml_lt_lmc_'\n    }\n    return match;\n  })\n}\nexports._deOperationGtLt = function(content) {\n  let deGtLtReg = /_cml_gt_lmc_|_cml_lt_lmc_/g;\n  return content.replace(deGtLtReg, function(match) {\n    if (match === '_cml_gt_lmc_') {\n      return '>';\n    }\n    if (match === '_cml_lt_lmc_') {\n      return '<';\n    }\n    return match;\n  })\n}\nexports.transformNativeEvent = function(source) {\n  let reg = /__CML_NATIVE_EVENTS__/g;\n  return source.replace(reg, '.native');\n}\n"
  },
  {
    "path": "packages/chameleon-template-parse/src/common/utils.js",
    "content": "// --inspect-brk\nconst t = require('@babel/types');\nconst _ = module.exports = {};\nconst utils = _;\nconst babylon = require('babylon');\nconst traverse = require('@babel/traverse')[\"default\"];\nconst generate = require('@babel/generator')[\"default\"];\nconst weexMixins = require('chameleon-mixins/weex-mixins.js');\n_.trimCurly = (str) => str.replace(/(?:{{)|(?:}})/ig, '');\n\n_.getModelKey = function(modelKey) {\n  modelKey = _.trimCurly(modelKey);\n  modelKey = modelKey.trim();\n  return modelKey;\n}\n// 驼峰化单词\n_.camelize = function(str) {\n  return str.replace(/[-_\\s]+(.)/g, function(match, key) {\n    return key ? key.toUpperCase() : '';\n  })\n}\n// 中划线化单词\n_.dasherise = function(str) {\n  return str.replace(/([A-Z])/g, '-$1').replace(/[-_\\s]+/g, '-')\n    .toLowerCase();\n}\n_.analysisFor = function (nodeValue) {\n  // v-for=\"item in items\"\n  let reg1 = /\\s*(.+?)\\s+(?:in|of)\\s+(.+)\\s*/;\n\n  // v-for=\"(item, index) in items\"\n  let reg2 = /\\s*\\(\\s*([^\\,\\s]+?)\\s*\\,\\s*([^\\,\\s]+?)\\s*\\)\\s*(?:in|of)\\s+(.+)\\s*/\n  let item, index, list;\n  let matches1 = nodeValue.match(reg1);\n  let matches2 = nodeValue.match(reg2);\n  if (matches2) {\n    item = matches2[1];\n    index = matches2[2];\n    list = matches2[3];\n\n  } else if (matches1) {\n    item = matches1[1];\n    index = 'index';\n    list = matches1[2];\n  }\n  return {\n    item,\n    index,\n    list\n  }\n}\n_.titleLize = function (word) {\n  return word.replace(/^\\w/, function (match) {\n    return match.toUpperCase();\n  })\n}\n// ast遍历相关\n_.getSiblingPaths = function (path) {\n  let container = path.container;\n  let siblingPaths = [];\n  for (let i = 0; i < container.length; i++) {\n    siblingPaths.push(path.getSibling(i));\n  }\n  return siblingPaths;\n}\n\n/* 获取某个jsxElement 上的某个具体属性的值*\n@params:\npath:代表JSXElement的path值\nreturn\n该JSXElement上所有的属性集合\n*/\n_.getJSXElementAttrKeyValue = function (path) {\n  let attributes = path.node.openingElement.attributes || [];\n  return attributes.reduce((attrMap, attr) => {\n    let key = attr.name.name;\n    let value = attr.value.value;\n    if (typeof key === 'string') {\n      attrMap[key] = value\n    }\n    return attrMap;\n  }, {});\n}\n_.trim = function (value) {\n  return value.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n};\n_.isInlineStatementFn = function (statament) {\n  let reg = /\\(([\\s\\S]*?)\\)/;\n  return statament.match(reg);\n}\n// 判断函数参数值在微信中是否是响应式的属性，'index' 代表字符串 'index'+1 代表表达式；\n_.isReactive = function (value) {\n  let reg = /(?:^'([^']*?)'$)/;\n  return _.trim(value).match(reg);\n}\n_.doublequot2singlequot = function (value) {\n  return value.replace(/[\"]/g, \"'\");\n}\n_.isMustacheReactive = function (value) {\n  let reg = /(?=.*[{]{2})(?=.*[}]{2})/;\n  return reg.test(value);\n}\n_.isOnlySpaceContent = function(value) {\n  let reg = /[^\\s]+/;\n  return !reg.test(value);\n}\n_.getReactiveValue = function(nodeValue) {\n  let vLength = nodeValue && nodeValue.length;\n  const newValue = [];\n  if (nodeValue && _.isMustacheReactive(nodeValue)) {\n    for (let idx = 0; idx < vLength; idx++) {\n      if (nodeValue[idx] === '{' && idx < vLength - 1 && nodeValue[idx + 1] === '{') {\n        newValue.push(\"'+(\");\n        idx++;\n      } else if (nodeValue[idx] === '}' && idx < vLength - 1 && nodeValue[idx + 1] === '}') {\n        newValue.push(\")+'\");\n        idx++;\n      } else {\n        newValue.push(nodeValue[idx]);\n      }\n    }\n\n    if (newValue.length != 0) {\n      newValue.push(\"'\");\n      newValue.unshift(\"'\");\n      const nl = newValue.length;\n      if (nl > 2 && newValue[nl - 1] === \"'\" && newValue[nl - 2] === \")+'\") {\n        newValue.splice(-2, 2);\n        newValue.push(')');\n      }\n      if (newValue.length > 2 && newValue[0] === \"'\" && newValue[1] === \"'+(\") {\n        newValue.splice(0, 2);\n        newValue.unshift('(');\n      }\n      nodeValue = newValue.join('');\n    }\n  }\n  return nodeValue;\n};\n// 从 let value = `a b {{true ? 'cls1':'cls2'}} c d {{true ? 'cls1':'cls2'}} `;获取 `a b  c d`\n_.getStaticValueFromMixinValue = function(value) {\n  let reg = /[{]{2}[^{}]*?[}]{2}/g;\n  return value.replace(reg, ' ');\n}\n\n\n/**\n * @params:\n * <view><text style=\"width:{{cpx}}cpx;background-color:red;\">{{'width{'}}</text></view>\n    <view><text style=\"{{'width:'+cpx+'cpx;'+'height:'+cpx2+'cpx;background-color:red'}}\">{{'width+++'}}</text></view>\n    cpx：300\n    cpx:'300cpx'\n  @returnvalue: 将非变量cpx单位转化为rpx;\n  转化策略：\n  1 首先将非 {{}} 内的cpx全部转化为rpx,因为非{{}}内的肯定都是cpx这个单位；\n  2 转化 {{}} 内的cpx 单位，而不能转化变量cpx,\n\n*/\n_.transformWxDynamicStyleCpxToRpx = function(value) {\n  let reg = /[{]{2}([^{}]*?)[}]{2}/g;\n  value = _.transformNotInMustacheCpxToRpx(value);\n  value = value.replace(reg, (match, statement) => `{{${_.transformMustacheCpxToRpx(statement)}}}`);\n  value = _.doublequot2singlequot(value)\n  return value;\n}\n_.transformNotInMustacheCpxToRpx = function(value) {\n  let isNotMustacheCpxToRpxReg = /([^{}]+)?(\\{\\{[^{}]+\\}\\})?/g;\n  let temp = '';\n  value.replace(isNotMustacheCpxToRpxReg, (match, $1, $2, $3) => {\n    if ($1) {\n      temp += $1.replace(/cpx/g, 'rpx');\n    }\n    if ($2) {\n      temp += $2;\n    }\n  });\n  return temp\n}\n_.transformMustacheCpxToRpx = function(source) {\n  const ast = babylon.parse(source, {\n    plugins: ['jsx']\n  })\n  traverse(ast, {\n    enter(path) {\n      let node = path.node;\n      if (t.isStringLiteral(node)) {\n        if (node.value.includes('cpx')) {\n          node.value = node.value.replace(/cpx/g, `rpx`);\n        }\n      }\n    }\n  })\n  let result = generate(ast).code;\n  if (/;$/.test(result)) { // 这里有个坑，jsx解析语法的时候，默认解析的是js语法，所以会在最后多了一个 ; 字符串；但是在 html中 ; 是无法解析的；\n    result = result.slice(0, -1);\n  }\n  return result\n}\n_.handleVUEClassNodes = function (options) {\n  let { type } = options;\n  _[`${type}VUEClassNodes`](options);\n}\n_.webVUEClassNodes = function (options) {\n  let { classNodes, attributes, extraClass } = options;\n  if (classNodes.length === 0) {\n    extraClass && attributes.push(t.jsxAttribute(t.jsxIdentifier('class'), t.stringLiteral(extraClass)))\n  } else if (classNodes.length === 1) { // 可能是动态class或者静态class\n    classNodes.forEach((itemNode) => {\n      if (t.isJSXNamespacedName(itemNode.name)) { // 动态的\n        extraClass && attributes.push(t.jsxAttribute(t.jsxIdentifier('class'), t.stringLiteral(extraClass)))\n      } else {// 静态的\n        itemNode.value.value = `${itemNode.value.value}  ${extraClass}`\n      }\n    })\n  } else if (classNodes.length === 2) {\n    classNodes.forEach((itemNode) => {\n      if (t.isJSXNamespacedName(itemNode.name)) { // 动态的\n\n      } else { // 静态的\n        itemNode.value.value = `${itemNode.value.value}  ${extraClass}`\n      }\n    })\n  }\n}\n_.weexVUEClassNodes = function (options) {\n  let { classNodes, attributes, extraClass } = options;\n  if (classNodes.length === 0) {\n    extraClass && attributes.push(t.jsxAttribute(t.jsxIdentifier('class'), t.stringLiteral(extraClass)))\n  } else if (classNodes.length === 1) { // 可能是动态class或者静态class\n    classNodes.forEach((itemNode) => {\n      if (t.isJSXNamespacedName(itemNode.name)) { // 动态的\n        extraClass && attributes.push(t.jsxAttribute(t.jsxIdentifier('class'), t.stringLiteral(extraClass)));\n        let newClassNodeValue = utils.trimCurly(itemNode.value.value);\n        itemNode.value.value = `${weexMixins.weexClassProxy}((${newClassNodeValue}))`\n      } else {// 静态的\n        itemNode.value.value = ` ${extraClass} ${itemNode.value.value}`\n      }\n    })\n  } else if (classNodes.length === 2) {\n    classNodes.forEach((itemNode) => {\n      if (t.isJSXNamespacedName(itemNode.name)) { // 动态的\n        // itemNode.value.value = `[(${itemNode.value.value})]`;\n\n        let newClassNodeValue = utils.trimCurly(itemNode.value.value);\n        itemNode.value.value = `${weexMixins.weexClassProxy}((${newClassNodeValue}))`\n      } else { // 静态的\n        itemNode.value.value = ` ${extraClass} ${itemNode.value.value}`\n      }\n    })\n  }\n}\n_.miniappVUEClassNodes = function (options) {\n  let { classNodes, attributes, extraClass } = options;\n  if (classNodes.length === 0) {\n    extraClass && attributes.push(t.jsxAttribute(t.jsxIdentifier('class'), t.stringLiteral(extraClass)))\n  } else if (classNodes.length === 1) { // 可能是动态class或者静态class\n    classNodes.forEach((itemNode) => {\n      // itemNode.value.value = `${itemNode.value.value} ${extraClass}`\n      if (t.isJSXNamespacedName(itemNode.name)) {\n        let newValue = `{{${itemNode.value.value}}} ${extraClass}`;\n        let classNodeIndex = attributes.indexOf(itemNode)\n        if (classNodeIndex !== -1) {\n          attributes.splice(classNodeIndex, 1)\n        }\n        attributes.push(t.jsxAttribute(t.jsxIdentifier('class'), t.stringLiteral(newValue)));\n      } else {\n        itemNode.value.value = `${itemNode.value.value} ${extraClass}`\n      }\n    })\n  } else if (classNodes.length === 2) {\n    let reactiveClassNode = classNodes.find((item) => t.isJSXNamespacedName(item.name));\n    let staticClassNode = classNodes.find((item) => t.isJSXIdentifier(item.name));\n    let reactiveClassNodeValue = reactiveClassNode && reactiveClassNode.value.value;\n    let staticClassNodeValue = staticClassNode && staticClassNode.value.value;\n\n    let newValue = `{{${reactiveClassNodeValue}}} ${staticClassNodeValue} ${extraClass}`\n\n    attributes.push(t.jsxAttribute(t.jsxIdentifier('class'), t.stringLiteral(newValue)))\n    classNodes.forEach((classNode) => {\n      let classNodeIndex = attributes.indexOf(classNode);\n      if (classNodeIndex !== -1) {\n        attributes.splice(classNodeIndex, 1)\n      }\n    })\n\n  }\n}\n// 转换 $event参数\n_.getInlineStatementArgs = function(argsStr) {\n  // argsStr:\"1,'index'+1,$event,'item',index+1,item\"\n  const result = argsStr.split(',').reduce((result, current, index) => {\n    // if (current === '$event') {\n    if (/\\s*?\\$event\\s*?/.test(current)) {\n      result.push(\"'$event'\");\n    } else {\n      result.push(current)\n    }\n    return result\n  }, []);\n  return result.join();// \"1,'index'+1,'$event','item',index+1,item\"\n\n}\n_.isOriginTagOrNativeComp = function(tagName, options) {\n  let usedComponentInfo = (options.usingComponents || []).find((item) => item.tagName === tagName)\n  let isNative = usedComponentInfo && usedComponentInfo.isNative;\n  let isOrigin = (tagName && typeof tagName === 'string' && tagName.indexOf('origin-') === 0);\n  if (isOrigin || isNative) {\n    return true\n  }\n  return false;\n}\n// 判断是否是原生组件\n_.isNativeComp = function(tagName, options) {\n  let usedComponentInfo = (options.usingComponents || []).find((item) => item.tagName === tagName)\n  let isNative = usedComponentInfo && usedComponentInfo.isNative;\n  return isNative\n}\n// 判断是否是组件，不包括第三方原生组件\n// {button: \"cml-buildin-button\"},\n_.isNotNativeComponent = function(tagName, options) {\n  let usingComponents = options.usingComponents || [];\n  let buildInComponents = options.buildInComponents || {};\n  let isComponent = usingComponents.find((comp) =>\n    ((comp.tagName === tagName) && !comp.isNative)\n  ) || Object.values(buildInComponents).includes(tagName);\n  return isComponent\n}\n\n"
  },
  {
    "path": "packages/chameleon-template-parse/src/compile-template-cml.js",
    "content": "\nconst babylon = require('babylon');\nconst traverse = require('@babel/traverse')['default'];\nconst generate = require('@babel/generator')['default'];\n// traverse path的时候解析path\nconst parseTemplate = require('./parser/index.js');\n// 对于模板的预处理 - 后置处理 - 等正则的一些替换；\nconst processTemplate = require('./common/process-template.js')\n// 目前事件的处理有两处：第一，c-bind,第二c-model,两者互相不影响；借鉴于此，需要新增处理事件支持传参的形式，而此时就需要处理c-bind;\nexports.compileTemplateForCml = function (source, type, options) {\n\n  // source\n  // 预处理html模板中的注释，jsx不支持，这个需要优先处理，防止解析 < > 的时候出现问题；\n  source = processTemplate.preDisappearAnnotation(source);\n  // 预处理：<   >  ==>  _cml_lt_lmc_  _cml_gt_lmc_,这么做的目的为了防止 preParseMustache 解析 > < 中间的内容报错，所以需要将 > < 先转化 gt lt的形式，等 preParseMustache 解析完毕之后即可将其转化回来；\n  source = processTemplate.preParseGtLt(source);\n  source = processTemplate.preParseDiffPlatformTag(source, type);\n  // 预处理:属性 jsx不支持 :name=\"sth\" ==> v-bind:name=\"sth\"\n  source = processTemplate.preParseBindAttr(source);\n  // 预处理vue事件 @click=\"handleClick\" ==> c-bind:click=\"handleClick\"\n  source = processTemplate.preParseVueEvent(source);\n  // 预处理 标签内的 {{item.id}} 这种语法jsx无法识别，转化为 _cml{item.id}lmc_\n  source = processTemplate.preParseMustache(source);\n  // 预处理：解析_cml_lt_lmc_ ==> <; _cml_gt_lmc_ ==> >\n  source = processTemplate.postParseLtGt(source);\n  // 预处理c-animation 标签，给这个标签增加一个 c-bind:transitionend = \"_animationCb(value,$event)\",注意这个必须在所有预处理的最后，因为前面的预处理兼容了jsx的语法；\n  source = processTemplate.preParseAnimation(source, type);\n  source = processTemplate.preParseAliComponent(source, type, options);\n  if (type === 'web') {\n    source = compileWebTemplate(source, type, options).code;\n  }\n  if (type === 'weex') {\n    source = compileWeexTemplate(source, type, options).code;\n  }\n  if (type === 'wx') {\n    source = compileWxTemplate(source, type, options).code;\n  }\n  if (type === 'qq') {\n    source = compileQqTemplate(source, type, options).code;\n  }\n  if (type === 'alipay') {\n    source = compileAliPayTemplate(source, type, options).code;\n  }\n  if (type === 'baidu') {\n    source = compileBaiduTemplate(source, type, options).code;\n  }\n  if (type === 'tt') {\n    source = compileTtTemplate(source, type, options).code;\n  }\n  // 后置处理，解析origin-tag ==> tag\n  source = processTemplate.postParseOriginTag(source, type)\n  // 后置处理：解析_cml{str}lmc_ ==> {{str}}\n  source = processTemplate.postParseMustache(source)\n  // 后置处理：用于处理 \\u ，便于解析unicode 中文\n  source = processTemplate.postParseUnicode(source);\n  // 后置处理，所有的 __CML_NATIVE_EVENTS__ ==> .native\n  source = processTemplate.transformNativeEvent(source)\n  return {\n    source,\n    usedBuildInTagMap: options.usedBuildInTagMap\n  }\n}\nfunction compileWebTemplate(source, type, options) {\n\n  const ast = babylon.parse(source, {\n    plugins: ['jsx']\n  })\n  traverse(ast, {\n    enter(path) {\n      parseTemplate.parseClassStatement(path, type, options);\n      parseTemplate.parseTagForSlider(path, type, options);\n\n      parseTemplate.parseBuildTag(path, type, options) // 解析内置标签；\n\n      parseTemplate.parseTag(path, type, options);// 替换标签；\n\n      parseTemplate.parseAnimationStatement(path, type, options);\n      parseTemplate.parseConditionalStatement(path, type, options);// 替换c-if c-else\n      parseTemplate.parseEventListener(path, type, options) // 处理 c-bind c-catch\n      parseTemplate.parseIterationStatement(path, type, options);// 处理 c-for\n\n      // 解析c-model ==> v-bind:value=\"modelValue\" v-on:input=\"_cmlModelEventProxy($event,modelKey)\"\n      parseTemplate.parseDirectiveStatement(path, type, options);\n\n      parseTemplate.parseStyleStatement(path, type, options);\n      // wx alipay 的 {{}}语法中转换成vue属性表达式 所有的响应式属性的处理成vue识别的；  propname=\"a{{b}}\"  -> :propname = \"'a'+(b)\"\n      parseTemplate.parseAttributeStatement(path, type, options);\n      // 最后处理模板中的标签  block-->template\n      parseTemplate.afterParseTag(path, type, options);\n    }\n  })\n  return generate(ast);\n}\nfunction compileWeexTemplate(source, type, options) {\n\n  const ast = babylon.parse(source, {\n    plugins: ['jsx']\n  })\n  traverse(ast, {\n    enter(path) {\n      parseTemplate.parseClassStatement(path, type, options);\n\n      // 这个最优先；\n      parseTemplate.parseBuildTag(path, type, options) // 解析内置标签；\n      parseTemplate.parseTag(path, type, options);// 替换标签；\n\n      parseTemplate.parseAnimationStatement(path, type, options);\n      parseTemplate.parseConditionalStatement(path, type, options);// 替换c-if c-else\n      parseTemplate.parseEventListener(path, type, options)\n      parseTemplate.parseIterationStatement(path, type, options);\n      // 解析c-model ==> v-bind:value=\"modelValue\" v-on:input=\"_cmlModelEventProxy($event,modelKey)\"\n      parseTemplate.parseDirectiveStatement(path, type, options);\n      // style的处理判断是否是动态和静态的依赖{{}} 需要在parseAttributeStatement之前执行，parseAttributeStatement会处理掉{{}}\n      parseTemplate.parseStyleStatement(path, type, options)\n      // {{}}中转换成vue属性表达式    class=\"a{{b}}\"  -> :class = \"'a'+(b)\"\n      parseTemplate.parseAttributeStatement(path, type, options);\n      parseTemplate.afterParseTag(path, type, options);\n    }\n  })\n  return generate(ast);\n}\nfunction compileWxTemplate(source, type, options) {\n\n  const ast = babylon.parse(source, {\n    plugins: ['jsx']\n  })\n  traverse(ast, {\n    enter(path) {\n      parseTemplate.parseClassStatement(path, type, options);\n\n      // 微信端支持安震 slider\n      parseTemplate.parseTagForSlider(path, type, options);\n      // 微信端支持ref\n      parseTemplate.parseRefStatement(path, type, options)\n\n      parseTemplate.parseBuildTag(path, type, options) // 解析内置标签；\n      // 微信端需要特殊处理支持 component\n\n      parseTemplate.parseTag(path, type, options);// 替换标签；\n\n      parseTemplate.parseAnimationStatement(path, type, options);\n\n      parseTemplate.afterParseTag(path, type, options);\n      parseTemplate.parseConditionalStatement(path, type, options);// 替换c-if c-else\n      parseTemplate.parseEventListener(path, type, options);\n\n      // 解析c-model ==> value=\"{{modelValue}}\" bindinput=\"_cmlModelEventProxy($event) data-modelkey=\"modelKey\"\n      parseTemplate.parseDirectiveStatement(path, type, options);\n\n      parseTemplate.parseIterationStatement(path, type, options);\n      //\n      parseTemplate.parseStyleStatement(path, type, options);\n      // <component is=\"{{currentComp}}\"></component>\n      parseTemplate.parseVue2WxStatement(path, type, options);\n    }\n  })\n  return generate(ast);\n}\nfunction compileQqTemplate(source, type, options) {\n\n  const ast = babylon.parse(source, {\n    plugins: ['jsx']\n  })\n  traverse(ast, {\n    enter(path) {\n      parseTemplate.parseClassStatement(path, type, options);\n\n      // 微信端支持安震 slider\n      parseTemplate.parseTagForSlider(path, type, options);\n      // 微信端支持ref\n      parseTemplate.parseRefStatement(path, type, options)\n\n      parseTemplate.parseBuildTag(path, type, options) // 解析内置标签；\n      // 微信端需要特殊处理支持 component\n\n      parseTemplate.parseTag(path, type, options);// 替换标签；\n\n      parseTemplate.parseAnimationStatement(path, type, options);\n\n      parseTemplate.afterParseTag(path, type, options);\n      parseTemplate.parseConditionalStatement(path, type, options);// 替换c-if c-else\n      parseTemplate.parseEventListener(path, type, options);\n\n      // 解析c-model ==> value=\"{{modelValue}}\" bindinput=\"_cmlModelEventProxy($event) data-modelkey=\"modelKey\"\n      parseTemplate.parseDirectiveStatement(path, type, options);\n\n      parseTemplate.parseIterationStatement(path, type, options);\n      //\n      parseTemplate.parseStyleStatement(path, type, options);\n      // <component is=\"{{currentComp}}\"></component>\n      parseTemplate.parseVue2WxStatement(path, type, options);\n    }\n  })\n  return generate(ast);\n}\nfunction compileAliPayTemplate(source, type, options) {\n  const ast = babylon.parse(source, {\n    plugins: ['jsx']\n  })\n  traverse(ast, {\n    enter(path) {\n      parseTemplate.parseClassStatement(path, type, options);\n\n      // 微信端支持安震 slider\n      parseTemplate.parseTagForSlider(path, type, options);\n      // 微信端支持ref\n      parseTemplate.parseRefStatement(path, type, options)\n\n      parseTemplate.parseBuildTag(path, type, options) // 解析内置标签；\n      // 微信端需要特殊处理支持 component\n\n      parseTemplate.parseTag(path, type, options);// 替换标签；\n\n      parseTemplate.parseAnimationStatement(path, type, options);\n\n      parseTemplate.afterParseTag(path, type, options);\n      parseTemplate.parseConditionalStatement(path, type, options);// 替换c-if c-else\n      parseTemplate.parseEventListener(path, type, options);\n\n      // 解析c-model ==> value=\"{{modelValue}}\" bindinput=\"_cmlModelEventProxy($event) data-modelkey=\"modelKey\"\n      parseTemplate.parseDirectiveStatement(path, type, options);\n\n      parseTemplate.parseIterationStatement(path, type, options);\n      //\n      parseTemplate.parseStyleStatement(path, type, options);\n      // 用于支持 <component is=\"{{currentComp}}\"></component>\n      parseTemplate.parseVue2WxStatement(path, type, options);\n    }\n  })\n  return generate(ast);\n}\nfunction compileBaiduTemplate(source, type, options) {\n  const ast = babylon.parse(source, {\n    plugins: ['jsx']\n  })\n  traverse(ast, {\n    enter(path) {\n      parseTemplate.parseClassStatement(path, type, options);\n\n      // 微信端支持安震 slider\n      parseTemplate.parseTagForSlider(path, type, options);\n      // 微信端支持ref\n      parseTemplate.parseRefStatement(path, type, options)\n\n      parseTemplate.parseBuildTag(path, type, options) // 解析内置标签；\n      // 微信端需要特殊处理支持 component\n\n      parseTemplate.parseTag(path, type, options);// 替换标签；\n\n      parseTemplate.parseAnimationStatement(path, type, options);\n\n      parseTemplate.afterParseTag(path, type, options);\n      parseTemplate.parseConditionalStatement(path, type, options);// 替换c-if c-else\n      parseTemplate.parseEventListener(path, type, options);\n\n      // 解析c-model ==> value=\"{{modelValue}}\" bindinput=\"_cmlModelEventProxy($event) data-modelkey=\"modelKey\"\n      parseTemplate.parseDirectiveStatement(path, type, options);\n\n      parseTemplate.parseIterationStatement(path, type, options);\n      //\n      parseTemplate.parseStyleStatement(path, type, options);\n      // <component is=\"{{currentComp}}\"></component>\n      parseTemplate.parseVue2WxStatement(path, type, options);\n    }\n  })\n  return generate(ast);\n}\nfunction compileTtTemplate(source, type, options) {\n  const ast = babylon.parse(source, {\n    plugins: ['jsx']\n  })\n  traverse(ast, {\n    enter(path) {\n      parseTemplate.parseClassStatement(path, type, options);\n\n      // 微信端支持安震 slider\n      parseTemplate.parseTagForSlider(path, type, options);\n      // 微信端支持ref\n      parseTemplate.parseRefStatement(path, type, options)\n\n      parseTemplate.parseBuildTag(path, type, options) // 解析内置标签；\n      // 微信端需要特殊处理支持 component\n\n      parseTemplate.parseTag(path, type, options);// 替换标签；\n\n      parseTemplate.parseAnimationStatement(path, type, options);\n\n      parseTemplate.afterParseTag(path, type, options);\n      parseTemplate.parseConditionalStatement(path, type, options);// 替换c-if c-else\n      parseTemplate.parseEventListener(path, type, options);\n\n      // 解析c-model ==> value=\"{{modelValue}}\" bindinput=\"_cmlModelEventProxy($event) data-modelkey=\"modelKey\"\n      parseTemplate.parseDirectiveStatement(path, type, options);\n\n      parseTemplate.parseIterationStatement(path, type, options);\n      //\n      parseTemplate.parseStyleStatement(path, type, options);\n      // <component is=\"{{currentComp}}\"></component>\n      parseTemplate.parseVue2WxStatement(path, type, options);\n    }\n  })\n  return generate(ast);\n}\n"
  },
  {
    "path": "packages/chameleon-template-parse/src/compile-template-vue.js",
    "content": "\nconst babylon = require('babylon');\nconst traverse = require('@babel/traverse')['default'];\nconst generate = require('@babel/generator')['default'];\n// traverse path的时候解析path\nconst parseTemplate = require('./parser/index.js');\n// 对于模板的预处理 - 后置处理 - 等正则的一些替换；\nconst processTemplate = require('./common/process-template.js')\n\n// 目前事件的处理有两处：第一，c-bind,第二c-model,两者互相不影响；借鉴于此，需要新增处理事件支持传参的形式，而此时就需要处理c-bind;\nexports.compileTemplateForVue = function (source, type, options) {\n\n  // source\n  // 预处理html模板中的注释，将其删除；这个需要优先处理，防止解析 < > 的时候出现问题；\n  source = processTemplate.preDisappearAnnotation(source);\n  // 预处理：<   >  ==>  _cml&lt&lmc_  _cml&gt&lmc_,这么做的目的为了防止 preParseMustache 解析 > < 中间的内容报错，所以需要将 > < 先转化 gt lt的形式，等 preParseMustache 解析完毕之后即可将其转化回来；\n  source = processTemplate.preParseGtLt(source);\n  source = processTemplate.preParseDiffPlatformTag(source, type);\n  // 预处理:属性  :name=\"sth\" ==> v-bind:name=\"sth\" jsx无法解析 :name=\"sth\"\n  source = processTemplate.preParseBindAttr(source);\n  // 预处理vue事件 @click=\"handleClick\" ==> c-bind:click=\"handleClick\"\n  source = processTemplate.preParseVueEvent(source);\n  // 预处理 标签内的 {{item.id}} 这种语法jsx无法识别，转化为 _cml{item.id}lmc_\n  source = processTemplate.preParseMustache(source);\n  // 后置处理：解析_cml_lt_lmc_ ==> < _cml_gt_lmc_ ==> >\n  source = processTemplate.postParseLtGt(source);\n  // 预处理c-animation 标签，给这个标签增加一个 c-bind:transitionend = \"_animationCb(value,$event)\"，注意这个必须在所有预处理的最后，因为前面的预处理兼容了jsx的语法；\n  source = processTemplate.preParseAnimation(source, type);\n  source = processTemplate.preParseAliComponent(source, type, options);\n\n  if (type === 'web') {\n    source = compileWebTemplate(source, type, options).code;\n  }\n  if (type === 'weex') {\n    source = compileWeexTemplate(source, type, options).code;\n  }\n  if (type === 'wx') {\n    source = compileWxTemplate(source, type, options).code;\n  }\n  if (type === 'qq') {\n    source = compileQqTemplate(source, type, options).code;\n  }\n  if (type === 'alipay') {\n    source = compileAliPayTemplate(source, type, options).code;\n  }\n  if (type === 'baidu') {\n    source = compileBaiduTemplate(source, type, options).code;\n  }\n  if (type === 'tt') {\n    source = compileTtTemplate(source, type, options).code;\n  }\n  // 后置处理，解析origin-tag ==> tag\n  source = processTemplate.postParseOriginTag(source, type)\n  // 后置处理：解析_cml{str}lmc_ ==> {{str}}\n  source = processTemplate.postParseMustache(source)\n  // 后置处理：用于处理 \\u ，便于解析unicode 中文\n  source = processTemplate.postParseUnicode(source);\n  // 后置处理，所有的 __CML_NATIVE_EVENTS__ ==> .native\n  source = processTemplate.transformNativeEvent(source)\n  return {\n    source,\n    usedBuildInTagMap: options.usedBuildInTagMap\n  }\n}\nfunction compileWebTemplate(source, type, options) {\n\n  const ast = babylon.parse(source, {\n    plugins: ['jsx']\n  })\n  traverse(ast, {\n    enter(path) {\n      parseTemplate.parseClassStatement(path, type, options);\n      // 微信端支持安震 slider\n      parseTemplate.parseTagForSlider(path, type, options);\n      parseTemplate.parseBuildTag(path, type, options) // 解析内置标签；\n\n      parseTemplate.parseTag(path, type, options);// 替换标签；\n\n      parseTemplate.parseAnimationStatement(path, type, options);\n\n      parseTemplate.parseEventListener(path, type, options)\n\n      // 解析c-model ==> v-bind:value=\"modelValue\" v-on:input=\"_cmlModelEventProxy($event,modelKey)\"\n      parseTemplate.parseDirectiveStatement(path, type, options);\n      parseTemplate.parseStyleStatement(path, type, options)\n      // wx alipay 的 {{}}语法中转换成vue属性表达式    class=\"a{{b}}\"  -> :class = \"'a'+(b)\"\n      parseTemplate.parseAttributeStatement(path, type, options);\n      // 最后处理模板中的标签  block-->template\n      parseTemplate.afterParseTag(path, type, options);\n    }\n  })\n  return generate(ast);\n}\nfunction compileWeexTemplate(source, type, options) {\n\n  const ast = babylon.parse(source, {\n    plugins: ['jsx']\n  })\n  traverse(ast, {\n    enter(path) {\n      parseTemplate.parseClassStatement(path, type, options);\n\n      // 这个最优先；\n      parseTemplate.parseBuildTag(path, type, options) // 解析内置标签；\n      parseTemplate.parseTag(path, type, options);// 替换标签；\n\n      parseTemplate.parseAnimationStatement(path, type, options);\n\n      parseTemplate.parseEventListener(path, type, options)\n      // 解析v-model ==> v-bind:value=\"modelValue\" v-on:input=\"_cmlModelEventProxy($event,modelKey)\"\n      parseTemplate.parseDirectiveStatement(path, type, options);\n      // style的处理判断是否是动态和静态的依赖{{}} 需要在parseAttributeStatement之前执行，parseAttributeStatement会处理掉{{}}\n      parseTemplate.parseStyleStatement(path, type, options)\n      // {{}}中转换成vue属性表达式    class=\"a{{b}}\"  -> :class = \"'a'+(b)\"\n      parseTemplate.parseAttributeStatement(path, type, options);\n      parseTemplate.afterParseTag(path, type, options);\n    }\n  })\n  return generate(ast);\n}\nfunction compileWxTemplate(source, type, options) {\n\n  const ast = babylon.parse(source, {\n    plugins: ['jsx']\n  })\n  traverse(ast, {\n    enter(path) {\n      parseTemplate.parseClassStatement(path, type, options);\n      // 微信端支持安震 slider\n      parseTemplate.parseTagForSlider(path, type, options);\n      // 微信端支持 ref；\n      parseTemplate.parseRefStatement(path, type, options)\n      parseTemplate.parseBuildTag(path, type, options) // 解析内置标签；\n      parseTemplate.parseTag(path, type, options);// 替换标签；\n\n      parseTemplate.parseAnimationStatement(path, type, options);\n      parseTemplate.afterParseTag(path, type, options);\n      parseTemplate.parseEventListener(path, type, options);\n      // 解析v-model ==> value=\"{{modelValue}}\" bindinput=\"_cmlModelEventProxy($event) data-modelkey=\"modelKey\"\n      parseTemplate.parseDirectiveStatement(path, type, options);\n      // parseTemplate.parseIterationStatement(path,type,options);\n      parseTemplate.parseStyleStatement(path, type, options);\n      // 用于支持 v-bind:name=\"sth\" ==> name=\"{{sth}}\"  v-for  v-if\n      parseTemplate.parseVue2WxStatement(path, type, options);\n    }\n  })\n  return generate(ast);\n}\nfunction compileQqTemplate(source, type, options) {\n\n  const ast = babylon.parse(source, {\n    plugins: ['jsx']\n  })\n  traverse(ast, {\n    enter(path) {\n      parseTemplate.parseClassStatement(path, type, options);\n      // 微信端支持安震 slider\n      parseTemplate.parseTagForSlider(path, type, options);\n      // 微信端支持 ref；\n      parseTemplate.parseRefStatement(path, type, options)\n      parseTemplate.parseBuildTag(path, type, options) // 解析内置标签；\n      parseTemplate.parseTag(path, type, options);// 替换标签；\n\n      parseTemplate.parseAnimationStatement(path, type, options);\n      parseTemplate.afterParseTag(path, type, options);\n      parseTemplate.parseEventListener(path, type, options);\n      // 解析v-model ==> value=\"{{modelValue}}\" bindinput=\"_cmlModelEventProxy($event) data-modelkey=\"modelKey\"\n      parseTemplate.parseDirectiveStatement(path, type, options);\n      // parseTemplate.parseIterationStatement(path,type,options);\n      parseTemplate.parseStyleStatement(path, type, options);\n      // 用于支持 v-bind:name=\"sth\" ==> name=\"{{sth}}\"  v-for  v-if\n      parseTemplate.parseVue2WxStatement(path, type, options);\n    }\n  })\n  return generate(ast);\n}\nfunction compileAliPayTemplate(source, type, options) {\n  const ast = babylon.parse(source, {\n    plugins: ['jsx']\n  })\n  traverse(ast, {\n    enter(path) {\n      parseTemplate.parseClassStatement(path, type, options);\n      // 微信端支持安震 slider\n      parseTemplate.parseTagForSlider(path, type, options);\n      // 微信端支持 ref；\n      parseTemplate.parseRefStatement(path, type, options)\n      parseTemplate.parseBuildTag(path, type, options) // 解析内置标签；\n      parseTemplate.parseTag(path, type, options);// 替换标签；\n\n      parseTemplate.parseAnimationStatement(path, type, options);\n      parseTemplate.afterParseTag(path, type, options);\n      parseTemplate.parseEventListener(path, type, options);\n      // 解析v-model ==> value=\"{{modelValue}}\" bindinput=\"_cmlModelEventProxy($event) data-modelkey=\"modelKey\"\n      parseTemplate.parseDirectiveStatement(path, type, options);\n      parseTemplate.parseStyleStatement(path, type, options);\n      // 用于支持 v-bind:name=\"sth\" ==> name=\"{{sth}}\"  v-for  v-if\n      parseTemplate.parseVue2WxStatement(path, type, options);\n    }\n  })\n  return generate(ast);\n}\nfunction compileBaiduTemplate(source, type, options) {\n  const ast = babylon.parse(source, {\n    plugins: ['jsx']\n  })\n  traverse(ast, {\n    enter(path) {\n      parseTemplate.parseClassStatement(path, type, options);\n      // 微信端支持安震 slider\n      parseTemplate.parseTagForSlider(path, type, options);\n      // 微信端支持 ref；\n      parseTemplate.parseRefStatement(path, type, options)\n      parseTemplate.parseBuildTag(path, type, options) // 解析内置标签；\n      parseTemplate.parseTag(path, type, options);// 替换标签；\n\n      parseTemplate.parseAnimationStatement(path, type, options);\n      parseTemplate.afterParseTag(path, type, options);\n      parseTemplate.parseEventListener(path, type, options);\n      // 解析v-model ==> value=\"{{modelValue}}\" bindinput=\"_cmlModelEventProxy($event) data-modelkey=\"modelKey\"\n      parseTemplate.parseDirectiveStatement(path, type, options);\n      parseTemplate.parseStyleStatement(path, type, options);\n      // 用于支持 v-bind:name=\"sth\" ==> name=\"{{sth}}\"  v-for  v-if\n      parseTemplate.parseVue2WxStatement(path, type, options);\n    }\n  })\n  return generate(ast);\n}\nfunction compileTtTemplate(source, type, options) {\n  const ast = babylon.parse(source, {\n    plugins: ['jsx']\n  })\n  traverse(ast, {\n    enter(path) {\n      parseTemplate.parseClassStatement(path, type, options);\n      // 微信端支持安震 slider\n      parseTemplate.parseTagForSlider(path, type, options);\n      // 微信端支持 ref；\n      parseTemplate.parseRefStatement(path, type, options)\n      parseTemplate.parseBuildTag(path, type, options) // 解析内置标签；\n      parseTemplate.parseTag(path, type, options);// 替换标签；\n\n      parseTemplate.parseAnimationStatement(path, type, options);\n      parseTemplate.afterParseTag(path, type, options);\n      parseTemplate.parseEventListener(path, type, options);\n      // 解析v-model ==> value=\"{{modelValue}}\" bindinput=\"_cmlModelEventProxy($event) data-modelkey=\"modelKey\"\n      parseTemplate.parseDirectiveStatement(path, type, options);\n      parseTemplate.parseStyleStatement(path, type, options);\n      // 用于支持 v-bind:name=\"sth\" ==> name=\"{{sth}}\"  v-for  v-if\n      parseTemplate.parseVue2WxStatement(path, type, options);\n    }\n  })\n  return generate(ast);\n}\n"
  },
  {
    "path": "packages/chameleon-template-parse/src/index.js",
    "content": "\nconst { compileTemplateForCml } = require('./compile-template-cml');\nconst { compileTemplateForVue } = require('./compile-template-vue');\nconst {analyzeTemplate, preParseMultiTemplate} = require('./common/process-template.js');\n\n\nmodule.exports = function(source, type, options = {lang: 'cml'}) {\n  if (!source) {\n    return {source, usedBuildInTagMap: {}};\n  }\n  let compileTemplateMap = {\n    'cml': compileTemplateForCml,\n    'vue': compileTemplateForVue\n  };\n  let result = compileTemplateMap[options.lang](source, type, options);\n  if (/;$/.test(result.source)) { // 这里有个坑，jsx解析语法的时候，默认解析的是js语法，所以会在最后多了一个 ; 字符串；但是在 html中 ; 是无法解析的；\n    result.source = result.source.slice(0, -1);\n  }\n  return result;\n}\nmodule.exports.analyzeTemplate = analyzeTemplate;\nmodule.exports.preParseMultiTemplate = preParseMultiTemplate;\n"
  },
  {
    "path": "packages/chameleon-template-parse/src/parser/index.js",
    "content": "\nconst t = require('@babel/types');\nconst {parseCondition} = require('./parse-condition.js');\nconst {parseEvent} = require('./parse-event.js');\nconst {parseInteration} = require('./parse-interation.js');\nconst {parseAttribute} = require('./parse-attribute.js');\nconst {parseStyle} = require('./parse-style.js');\nconst {parseVue2Wx} = require('./parse-vue2wx.js');\nconst {parseAnimationTag} = require('./parse-animation-tag.js');\nconst {parseDirective} = require('./parse-directive.js');\nconst {parseClass} = require('./parse-class.js');\nconst {parseRef} = require('./parse-ref.js');\n\nconst {\n  tagMap\n} = require('../common/cml-map.js')\n\n\n/**\n * 解析原则:\n * 1 只处理需要处理的，不需要处理的，不满足条件则不做任何操作；\n * 2 为了保证解析过程的正确性，即只处理需要处理的节点，按照 节点类型 --> 平台类型 --> 这样的流程进行判断；\n *\n *\n*/\n// web wx weex\nexports.parseTag = function (path, type) {\n  let node = path.node;\n  if (t.isJSXElement(node)) {\n    let currentTag = node.openingElement.name.name;\n    let targetTag = tagMap.targetTagMap[currentTag] && tagMap.targetTagMap[currentTag][type];\n\n    if (targetTag && currentTag !== targetTag) {\n      node.openingElement.name.name = targetTag;\n      // 这里要处理自闭和标签，没有closingElement，所以做个判断；\n      node.closingElement && (node.closingElement.name.name = targetTag);\n\n    }\n  }\n}\nexports.afterParseTag = function (path, type) {\n  let node = path.node;\n  if (t.isJSXElement(node)) {\n    let currentTag = node.openingElement.name.name;\n    let targetTag = tagMap.afterTagMap[currentTag] && tagMap.afterTagMap[currentTag][type];\n\n    if (targetTag && currentTag !== targetTag) {\n      node.openingElement.name.name = targetTag;\n      node.closingElement && (node.closingElement.name.name = targetTag);\n    }\n  }\n}\nexports.parseBuildTag = function (path, type, options) {\n  let node = path.node;\n  let buildInTagMap = options && options.buildInComponents;// {button:\"cml-buildin-button\"}\n  if (t.isJSXElement(node) && buildInTagMap) {\n    let currentTag = node.openingElement.name.name;\n    let targetTag = buildInTagMap[currentTag];\n    // 收集用了哪些内置组件 usedBuildInTagMap:{button:'cml-buildin-button',radio:'cml-buildin-radio'}\n    let usingComponents = (options.usingComponents || []).map(item => item.tagName)\n    // 兼容用户自己写了组件和内置组件重名\n    let isUserComponent = usingComponents.includes(currentTag);\n    if (isUserComponent) { // 如果是用户的内置组件，这里不做任何处理，直接返回\n\n    } else {\n      if (targetTag && currentTag !== targetTag) {\n        node.openingElement.name.name = targetTag;\n        node.closingElement && (node.closingElement.name.name = targetTag);\n        (!options.usedBuildInTagMap) && (options.usedBuildInTagMap = {});\n        options.usedBuildInTagMap[currentTag] = targetTag;\n      }\n    }\n  }\n}\n// 配合安震，解析c-slider;\nexports.parseTagForSlider = function(path, type, options) {\n  let node = path.node;\n  if ((['wx', 'qq', 'baidu', 'alipay', 'tt'].includes(type)) && t.isJSXElement(node)) {\n    let currentTag = node.openingElement.name.name;\n    let targetTag = tagMap.wxTagMap[currentTag];\n    if (targetTag && currentTag !== targetTag) {\n      node.openingElement.name.name = targetTag;\n      node.closingElement && (node.closingElement.name.name = targetTag);\n    }\n  }\n}\nexports.parseRefStatement = function parseRefStatement(path, type, options) {\n  let node = path.node;\n  let lang = options.lang;\n  // cml语法下只解析 ref节点，不解析 :ref节点\n  if (lang === 'cml' && t.isJSXAttribute(node) && node.name.name === 'ref') {\n    parseRef.call({path, type, node, options});\n  } else if (lang === 'vue' && t.isJSXAttribute(node) && (node.name.name === 'ref' || node.name.name.name === 'ref')) {\n    parseRef.call({path, type, node, options});\n  }\n}\n// web weex wx ...只处理cml语法  c-if c-else-if c-else\nexports.parseConditionalStatement = function parseConditionalStatement(path, type, options) {\n  let node = path.node;\n  if (t.isJSXAttribute(node) && (node.name.name === 'c-if' ||\n  node.name.name === 'c-else-if' ||\n  node.name.name === 'c-else'\n  )) {\n    parseCondition.call({path, type, node, options})\n  }\n}\n// web weex wx  只处理cml语法 c-bind c-catch\nexports.parseEventListener = function parseEventListener(path, type, options) {\n  let node = path.node;\n  // 对于 JSXNamespaceName节点，仅仅需要处理 c-catch c-bind的情况，其他的不要进行处理\n  if (t.isJSXNamespacedName(node) && (node.namespace.name === 'c-catch' || node.namespace.name === 'c-bind')) {\n    parseEvent.call({path, type, node, options})\n  }\n}\n\n// 只支持数组，小程序不支持对象的for循环；\n// web weex wx   只处理cml语法   c-for\nexports.parseIterationStatement = function parseIterationStatement(path, type, options) {\n  let node = path.node;\n  if (t.isJSXAttribute(node) && node.name.name === 'c-for') {\n    parseInteration.call({path, node, type, options});\n  }\n}\n// 处理所有的属性，将其转化为计算属性 {{}}中转换成vue属性表达式    class=\"a+{{b}}\"  -> :class = \"'a'+(b)\"\n// web weex wx\nexports.parseAttributeStatement = function parseAttributeStatement(path, type) {\n  let node = path.node;\n  // 将 {{}}语法转化为动态值得时候，不处理class和style，这个方法是将wx中的props={{}}的语法转化为 v-bind:props=\"sth\"的形式；\n  if (t.isJSXAttribute(node) && node.name.name !== 'class' && node.name.name !== 'style' &&\n  node.name.name.name !== 'class' && node.name.name.name !== 'style'\n  ) {\n    parseAttribute.call({path, node, type});\n  }\n};\nexports.parseStyleStatement = function parseStyleStatement(path, type, options) {\n  let node = path.node;\n  let lang = options.lang;\n  // node.name.name === 'style' (代表静态style) == node.name.name.name === 'style' (代表动态style)\n  // cml语法下，不要解析 :style ，因为有可能是原生组件或者原生标签\n  if (lang === 'cml' && t.isJSXAttribute(node) && node.name.name === 'style') {\n    parseStyle.call({path, node, type, options});\n  } else if (lang === 'vue' && t.isJSXAttribute(node) && (node.name.name === 'style' || node.name.name.name === 'style')) {\n    parseStyle.call({path, node, type, options});\n  }\n}\nexports.parseClassStatement = function parseClassStatement(path, type, options) {\n  let node = path.node;\n  if (t.isJSXElement(node)) {\n    parseClass.call({path, node, type, options});\n  }\n}\nexports.parseAnimationStatement = function parseAnimationStatement(path, type) {\n  let node = path.node;\n  // 由于微信端组件的名的标签会被渲染为一个单独的标签，所以需要这个hack;\n  if (t.isJSXAttribute(node) && node.name.name === 'c-animation') {\n    parseAnimationTag.call({path, node, type});\n  }\n\n}\n\nexports.parseVue2WxStatement = function parseVue2WxStatement(path, type, options) {\n  let node = path.node;\n  node && parseVue2Wx.call({path, node, type, options});\n}\nexports.parseDirectiveStatement = function parseDirectiveStatement(path, type, options) {\n  let node = path.node;\n\n  node && parseDirective.call({path, node, type, options})\n}\n\n"
  },
  {
    "path": "packages/chameleon-template-parse/src/parser/parse-animation-tag.js",
    "content": "// import * as t from \"@babel/types\";\nconst { SyncHook } = require('tapable');\nconst utils = require('../common/utils');\n\n\nlet parseAnimationTag = new SyncHook(['args'])\n\nparseAnimationTag.tap('wx', (args) => {\n  let { node, type } = args;\n  if (type === 'web' || type === 'weex') {\n    node.name.name = 'v-animation';\n    node.value && (node.value.value = utils.trimCurly(node.value.value));\n  }\n  let miniAppType = ['wx', 'baidu', 'alipay', 'qq', 'tt']\n  if (miniAppType.includes(type)) {\n    node.name.name = 'animation';\n    if (type === 'alipay') {\n      node.value && (node.value.value = `{{(${utils.trimCurly(node.value.value)}).actions}}`)\n    }\n  }\n\n})\n\n\nmodule.exports.parseAnimationTag = parseAnimationTag;\n"
  },
  {
    "path": "packages/chameleon-template-parse/src/parser/parse-attribute.js",
    "content": "const { SyncHook } = require(\"tapable\");\nconst utils = require('../common/utils');\n\nlet parseAttribute = new SyncHook(['args'])\n\nparseAttribute.tap('web-weex', (args) => {\n  let { node, type } = args;\n  if (type === 'web' || type === 'weex') {\n    let nodeName = node.name && node.name.name;\n    let nodeValue = node.value && node.value.value;\n    let vLength = nodeValue && nodeValue.length;\n    const newValue = [];\n    if (nodeValue && utils.isMustacheReactive(nodeValue)) {\n      for (let idx = 0; idx < vLength; idx++) {\n        if (nodeValue[idx] === '{' && idx < vLength - 1 && nodeValue[idx + 1] === '{') {\n          newValue.push(\"'+(\");\n          idx++;\n        } else if (nodeValue[idx] === '}' && idx < vLength - 1 && nodeValue[idx + 1] === '}') {\n          newValue.push(\")+'\");\n          idx++;\n        } else {\n          newValue.push(nodeValue[idx]);\n        }\n      }\n\n      if (newValue.length != 0) {\n        newValue.push(\"'\");\n        newValue.unshift(\"'\");\n        const nl = newValue.length;\n        if (nl > 2 && newValue[nl - 1] === \"'\" && newValue[nl - 2] === \")+'\") {\n          newValue.splice(-2, 2);\n          newValue.push(')');\n        }\n        if (newValue.length > 2 && newValue[0] === \"'\" && newValue[1] === \"'+(\") {\n          newValue.splice(0, 2);\n          newValue.unshift('(');\n        }\n        nodeValue = newValue.join('');\n      }\n      if (nodeName[0] === ':') {\n        node.value.value = nodeValue;\n      } else {\n        node.name.name = `:${nodeName}`;\n        node.value.value = nodeValue;\n      }\n\n    }\n  }\n});\n\nexports.parseAttribute = parseAttribute;\n"
  },
  {
    "path": "packages/chameleon-template-parse/src/parser/parse-class.js",
    "content": "const { SyncHook } = require('tapable');\nconst utils = require('../common/utils');\nconst t = require('@babel/types');\nconst weexMixins = require('chameleon-mixins/weex-mixins.js')\n// weex: 不支持<view><text class=\"{{true? 'bg-green font':''}}\" >fafafa</text></view>。也就注定不能这么写多个class ,但是可以 class=\"cls1 cls2 cls3\"\nlet parseClass = new SyncHook(['args']);\nconst hash = require('hash-sum');\n// weex对于动态样式的处理  简直 amazing\n// cml语法：支持的写法如下：class=\"cls1 cls2\"  class=\"{{true ? 'cls1 cls2':'cls3 cls4'}}\"\n/**\n *<view><text class=\"cls1 cls2 {{index}}\">test class1</text></view>\n  <view><text class=\"cls1 cls2 cls-{{index}}\">test class1</text></view>\n  <view><text class=\"cls1 cls2 {{true ? 'cls1':'cls2'}}\">test class1</text></view>\n*/\nparseClass.tap('web-cml', (args) => {\n  let { node, type, options: {lang, isInjectBaseStyle} } = args;\n  if (lang === 'cml' && type === 'web') {\n    let tagName = node.openingElement.name.name;\n    let attributes = node.openingElement.attributes;\n    let classNodes = attributes.filter((attr) => // 如果没有符合条件的classNodes则返回一个空数组\n      attr.name.name === 'class'\n    );\n    let extraClass = '';\n    if (isInjectBaseStyle) {\n      extraClass = ` cml-base cml-${tagName}`;\n    }\n    if (classNodes.length === 0) {\n      extraClass && attributes.push(t.jsxAttribute(t.jsxIdentifier('class'), t.stringLiteral(extraClass)))\n    } else if (classNodes.length === 1) {\n      classNodes.forEach((itemNode) => {\n        const dealedClassNodeValue = `${itemNode.value.value} ${extraClass}`;\n        if (utils.isMustacheReactive(itemNode.value.value)) { // 包括动态class\n          const newClassNodeValue = utils.getReactiveValue(dealedClassNodeValue);\n          itemNode.name.name = `v-bind:${itemNode.name.name}`\n          itemNode.value.value = `(${newClassNodeValue})`\n        } else { // 静态class\n          itemNode.value.value = dealedClassNodeValue\n        }\n      })\n    } else {\n      throw new Error('Only allow one class node in element\\'s attribute with cml syntax');\n    }\n  }\n\n})\nparseClass.tap('weex-cml', (args) => {\n  let { node, type, options: {lang, isInjectBaseStyle} } = args;\n  if (lang === 'cml' && type === 'weex') {\n    let tagName = node.openingElement.name.name;\n    let attributes = node.openingElement.attributes;\n    let classNodes = attributes.filter((attr) => // 如果没有符合条件的classNodes则返回一个空数组\n      attr.name.name === 'class'\n    );\n    let extraClass = '';\n    if (isInjectBaseStyle) {\n      extraClass = ` cml-base cml-${tagName}`;\n    }\n    if (classNodes.length === 0) {\n      extraClass && attributes.push(t.jsxAttribute(t.jsxIdentifier('class'), t.stringLiteral(extraClass)))\n    } else if (classNodes.length === 1) {\n      classNodes.forEach((itemNode) => {\n        if (utils.isMustacheReactive(itemNode.value.value)) { // 动态的\n          const dealedClassNodeValue = `${extraClass} ${itemNode.value.value}` ;\n          itemNode.name.name = `:${itemNode.name.name}`\n          const newDynamicClassNodeValue = utils.getReactiveValue(dealedClassNodeValue);\n          itemNode.value.value = `${weexMixins.weexClassProxy}(${newDynamicClassNodeValue})`\n        } else {\n          itemNode.name.name = `:${itemNode.name.name}`\n          const newStaticClassNodeValue = `${extraClass} ${itemNode.value.value}`\n          itemNode.value.value = `${weexMixins.weexClassProxy}('${newStaticClassNodeValue}')`\n        }\n\n      })\n    } else {\n      throw new Error('Only allow one class node in element\\'s attribute with cml syntax');\n    }\n\n  }\n\n})\nparseClass.tap('wx-alipay-baidu-cml', (args) => {\n  let { node, type, options: { media, lang, filePath, usingComponents, isInjectBaseStyle } } = args;\n  // type === 'wx' || type === 'alipay' || type === 'baidu'\n  if (lang === 'cml' && (['wx', 'qq', 'baidu', 'alipay', 'tt'].includes(type))) {\n    let tagName = node.openingElement.name.name;\n    let attributes = node.openingElement.attributes;\n    let classNodes = attributes.filter((attr) => // 如果没有符合条件的classNodes则返回一个空数组\n      attr.name.name === 'class'\n    );\n    let isUsingComponents = (usingComponents || []).find((comp) => comp.tagName === tagName);\n    let extraClass = '';\n    if (['wx', 'qq', 'baidu', 'tt'].includes(type)) {\n      if (isInjectBaseStyle) {\n        extraClass = ` cml-base cml-${tagName}`;\n        if (isUsingComponents) {\n          extraClass = ` cml-view cml-${tagName}`;\n        }\n      }\n    }\n    if (type === 'alipay') {\n      let randomClassName = hash(filePath);\n      if (isInjectBaseStyle) {\n        extraClass = ` cml-base cml-${tagName}`;\n        extraClass = `${extraClass} cml-${randomClassName}`\n      } else {\n        extraClass = `${extraClass} cml-${randomClassName}` // 不插入全局样式的时候也要插入样式隔离\n      }\n    }\n    let chameleonConfig = cml.config.get()[type][media];\n    const hasMiniAppCustomDataClass = chameleonConfig.hasMiniAppCustomDataClass;\n\n    if (classNodes.length === 0) {\n      extraClass && attributes.push(t.jsxAttribute(t.jsxIdentifier('class'), t.stringLiteral(extraClass)))\n      // 添加 data-class 方便在小程序中的时间回调 event 中拿到class值\n      hasMiniAppCustomDataClass && extraClass && attributes.push(t.jsxAttribute(t.jsxIdentifier('data-class'), t.stringLiteral(extraClass.trim())))\n    } else if (classNodes.length === 1) {\n      const classNode = classNodes[0];\n      const dealedClassNodeValue = `${classNode.value.value} ${extraClass}`\n\n      classNode.value.value = dealedClassNodeValue;\n      // 添加 data-class 方便在小程序中的时间回调 event 中拿到class值\n      hasMiniAppCustomDataClass && attributes.push(t.jsxAttribute(t.jsxIdentifier('data-class'), t.stringLiteral(dealedClassNodeValue)))\n    } else {\n      throw new Error('Only allow one class node in element\\'s attribute with cml syntax');\n    }\n  }\n\n})\n// vue语法：class='cls1 cls2' :class=\"true ? 'cls1 cls2 cls3' : 'cls4 cls5 cls6'\"\nparseClass.tap('web-vue', (args) => {\n  let { node, type, options: {lang, isInjectBaseStyle} } = args;\n  if (lang === 'vue' && type === 'web') {\n    let tagName = node.openingElement.name.name;\n    let attributes = node.openingElement.attributes;\n    let classNodes = attributes.filter((attr) => // 如果没有符合条件的classNodes则返回一个空数组\n      attr.name.name === 'class' || attr.name.name.name === 'class'\n    );\n    let extraClass = '';\n    if (isInjectBaseStyle) {\n      extraClass = ` cml-base cml-${tagName}`;\n    }\n    utils.handleVUEClassNodes({classNodes, attributes, extraClass, lang, type})\n  }\n\n})\nparseClass.tap('weex-vue', (args) => {\n  let { node, type, options: {lang, isInjectBaseStyle} } = args;\n  if (lang === 'vue' && type === 'weex') {\n    let tagName = node.openingElement.name.name;\n    let attributes = node.openingElement.attributes;\n    let classNodes = attributes.filter((attr) => // 如果没有符合条件的classNodes则返回一个空数组\n      attr.name.name === 'class' || attr.name.name.name === 'class'\n    );\n    let extraClass = '';\n    if (isInjectBaseStyle) {\n      extraClass = ` cml-base cml-${tagName}`;\n    }\n    utils.handleVUEClassNodes({classNodes, attributes, extraClass, lang, type})\n  }\n\n})\nparseClass.tap('wx-alipay-baidu-vue', (args) => {\n  let { node, type, options: {lang, filePath, usingComponents, isInjectBaseStyle} } = args;\n  // (type === 'wx' || type === 'alipay' || type === 'baidu')\n  if (lang === 'vue' && (['wx', 'qq', 'baidu', 'alipay', 'tt'].includes(type))) {\n    let tagName = node.openingElement.name.name;\n    let attributes = node.openingElement.attributes;\n    let classNodes = attributes.filter((attr) => // 如果没有符合条件的classNodes则返回一个空数组\n      attr.name.name === 'class' || attr.name.name.name === 'class'\n    );\n    let isUsingComponents = (usingComponents || []).find((comp) => comp.tagName === tagName);\n    let extraClass = '';\n    if (['wx', 'qq', 'baidu', 'tt'].includes(type)) {\n      if (isInjectBaseStyle) {\n        extraClass = ` cml-base cml-${tagName}`;\n        if (isUsingComponents) {\n          extraClass = ` cml-view cml-${tagName}`;\n        }\n      }\n    }\n    if (type === 'alipay') {\n      let randomClassName = hash(filePath);\n      if (isInjectBaseStyle) {\n        extraClass = ` cml-base cml-${tagName}`;\n        extraClass = `${extraClass} cml-${randomClassName}`\n      } else {\n        extraClass = `${extraClass} cml-${randomClassName}` // 不插入全局样式的时候也要插入样式隔离\n      }\n    }\n    utils.handleVUEClassNodes({classNodes, attributes, extraClass, lang, type: 'miniapp'})\n  }\n\n})\n\n\nmodule.exports.parseClass = parseClass;\n"
  },
  {
    "path": "packages/chameleon-template-parse/src/parser/parse-condition.js",
    "content": "// import * as t from \"@babel/types\";\nconst t = require('@babel/types');\nconst { SyncHook } = require('tapable');\nconst {\n  conditionMap\n} = require('../common/cml-map.js');\nconst utils = require('../common/utils');\n\n\nlet parseCondition = new SyncHook(['args'])\n\nparseCondition.tap('web-weex', (args) => {\n  let { node, type, options: {lang}} = args;\n  if (lang === 'cml' && (type === 'web' || type === 'weex')) {\n    let currentCondition = node.name.name;\n    let targetCondition = conditionMap[currentCondition] && conditionMap[currentCondition][type];\n    if (targetCondition && currentCondition !== targetCondition) {\n      node.name.name = targetCondition;\n      node.value && t.isStringLiteral(node.value) && (node.value.value = utils.trimCurly(node.value.value));\n    }\n  }\n})\nparseCondition.tap('wx-alipay-qq-tt', (args) => {\n  let { node, type, options: {lang}} = args;\n  let miniAppType = ['wx', 'alipay', 'qq', 'tt'];\n  if (lang === 'cml' && miniAppType.includes(type)) {\n    let currentCondition = node.name.name;\n    let targetCondition = conditionMap[currentCondition] && conditionMap[currentCondition][type];\n    if (targetCondition && currentCondition !== targetCondition) {\n      node.name.name = targetCondition;\n    }\n  }\n});\nparseCondition.tap('baidu', (args) => {\n  let { node, type, options: {lang}} = args;\n  if (lang === 'cml' && type === 'baidu') {\n    let currentCondition = node.name.name;\n    let targetCondition = conditionMap[currentCondition] && conditionMap[currentCondition][type];\n    if (targetCondition && currentCondition !== targetCondition) {\n      node.name.name = targetCondition;\n      // 百度端比较特殊是 s-if=\"xxx\"\n      node.value && t.isStringLiteral(node.value) && (node.value.value = utils.trimCurly(node.value.value));\n    }\n  }\n})\n\n\nmodule.exports.parseCondition = parseCondition;\n"
  },
  {
    "path": "packages/chameleon-template-parse/src/parser/parse-directive.js",
    "content": "const t = require('@babel/types')\nconst weexMixins = require('chameleon-mixins/weex-mixins.js')\nconst { SyncHook } = require('tapable');\nconst utils = require('../common/utils');\nconst eventProxy = require('chameleon-mixins/web-mixins.js');\nconst wxEventProxy = require('chameleon-mixins/wx-mixins.js');\nlet parseDirective = new SyncHook(['args'])\n// cml语法\nparseDirective.tap('web-weex-cml', (args) => {\n  let { path, node, type, options: {lang}} = args;\n  if (lang === 'cml' && (type === 'web' || type === 'weex')) {\n    // 以下开始处理指令；\n    // v-model c-model\n    // web端因为是自定义组件触发的 input事件的参数不对，所以不能直接用vue的v-model\n    if (t.isJSXAttribute(node) && node.name.name === 'c-model') {\n      let modelKey = utils.getModelKey(node.value.value);\n      path.insertAfter(t.jsxAttribute(t.jsxIdentifier('v-bind:value'), t.stringLiteral(modelKey)))\n      path.insertAfter(t.jsxAttribute(t.jsxIdentifier('v-on:input'), t.stringLiteral(`${eventProxy.modelEventProxyName}($event,'${modelKey}')`)));\n\n      path.remove();// 删除c-model属性节点；\n    }\n    // v-text c-text\n    if (t.isJSXAttribute(node) && node.name.name === 'c-text') {\n      let textValue = node.value.value;\n      let JSXElemenetPath = path.find((pth) => pth.isJSXElement());\n      JSXElemenetPath && (JSXElemenetPath.node.children = [t.jsxText(textValue)]);\n\n      path.remove();// 删除c-text;\n    }\n    // c-show\n    if (t.isJSXElement(node)) {\n      let attributes = node.openingElement.attributes;\n      let showDirectiveNode = attributes.find((attr, i) => {\n        if (attr.name.name === 'c-show') {\n          attributes.splice(i, 1);\n        }\n        return attr.name.name === 'c-show';\n      });\n      let styleNode = attributes.find((attr) => attr.name.name === 'style' || attr.name.name.name === 'style')\n      if (!showDirectiveNode) {\n        return ;\n      }\n      if (styleNode) {\n        throw new Error('The style attribute can\\'t be used in the element that has  attributes with c-show ');\n      }\n      let elementShow = utils.trimCurly(showDirectiveNode.value.value);\n\n      let styleNodeValue = `display:{{${elementShow}?'':'none'}};{{${elementShow}?'':'height:0px;width:0px;overflow:hidden'}}`\n      if (type === 'weex') {\n        attributes.push(t.jsxAttribute(t.jsxIdentifier('style'), t.stringLiteral(styleNodeValue)))\n      } else if (type === 'web') {\n        attributes.push(t.jsxAttribute(t.jsxIdentifier('v-show'), t.stringLiteral(elementShow)))\n      }\n\n    }\n  }\n});\nparseDirective.tap('wx-baidu-qq-cml', (args) => {\n  let { path, node, type, options: {lang} } = args;\n  // type === 'wx' || type === 'baidu' || type === 'alipay'\n  if (lang === 'cml' && (['wx', 'baidu', 'alipay', 'qq', 'tt'].includes(type))) {\n    // c-model\n    if (t.isJSXAttribute(node) && node.name.name === 'c-model') {\n      let modelKey = utils.getModelKey(node.value.value);\n      path.insertAfter(t.jsxAttribute(t.jsxIdentifier('value'), t.stringLiteral(node.value.value)))\n      if (type === 'alipay') {\n        path.insertAfter(t.jsxAttribute(t.jsxIdentifier('onInput'), t.stringLiteral(`${wxEventProxy.modelEventProxyName}`)));\n        path.insertAfter(t.jsxAttribute(t.jsxIdentifier('data-eventinput'), t.stringLiteral(`${wxEventProxy.modelEventProxyName}`)));\n      } else {\n        path.insertAfter(t.jsxAttribute(t.jsxIdentifier('bindinput'), t.stringLiteral(`${wxEventProxy.modelEventProxyName}`)));\n      }\n      path.replaceWith(t.jsxAttribute(t.jsxIdentifier('data-modelkey'), t.stringLiteral(`${modelKey}`)))\n    }\n    // c-text\n    if (t.isJSXAttribute(node) && node.name.name === 'c-text') {\n      let textValue = node.value.value;\n      let JSXElemenetPath = path.find((pth) => pth.isJSXElement());\n      JSXElemenetPath && (JSXElemenetPath.node.children = [t.jsxText(textValue)]);\n\n      path.remove();// 删除c-text;\n    }\n    // c-show\n    if (t.isJSXElement(node)) {\n      let attributes = node.openingElement.attributes;\n      let showDirectiveNode = attributes.find((attr, i) => {\n        if (attr.name.name === 'c-show') {\n          attributes.splice(i, 1);\n        }\n        return attr.name.name === 'c-show';\n      });\n      let styleNode = attributes.find((attr) => attr.name.name === 'style' || attr.name.name.name === 'style')\n      if (!showDirectiveNode) {\n        return ;\n      }\n      if (styleNode) {\n        throw new Error('The style attribute can\\'t be used in the element that has  attributes with c-show ');\n      }\n      let elementShow = utils.trimCurly(showDirectiveNode.value.value);\n\n      let styleNodeValue = `display:{{${elementShow}?'':'none'}};{{${elementShow}?'':'height:0px;width:0px;overflow:hidden'}}`\n      attributes.push(t.jsxAttribute(t.jsxIdentifier('style'), t.stringLiteral(styleNodeValue)))\n    }\n  }\n})\n\n// vue语法\nparseDirective.tap('web-weex-vue', (args) => {\n  let { path, node, type, options: {lang}} = args;\n  if (lang === 'vue' && (type === 'web' || type === 'weex')) {\n    // 以下开始处理指令；\n    // v-model\n    if (t.isJSXAttribute(node) && node.name.name === 'v-model') {\n      let modelKey = utils.getModelKey(node.value.value);\n      path.insertAfter(t.jsxAttribute(t.jsxIdentifier('v-bind:value'), t.stringLiteral(modelKey)))\n      path.insertAfter(t.jsxAttribute(t.jsxIdentifier('v-on:input'), t.stringLiteral(`${eventProxy.modelEventProxyName}($event,'${modelKey}')`)));\n\n      path.remove();// 删除c-model属性节点；\n    }\n    // v-text\n    if (t.isJSXAttribute(node) && node.name.name === 'v-text') {\n      let textValue = node.value.value;\n      let JSXElemenetPath = path.find((pth) => pth.isJSXElement());\n      JSXElemenetPath && (JSXElemenetPath.node.children = [t.jsxText(`{{${textValue}}}`)]);\n\n      path.remove();// 删除c-text;\n    }\n    // v-show\n    if (t.isJSXElement(node)) {\n      let attributes = node.openingElement.attributes;\n      let showDirectiveNode = attributes.find((attr, i) => {\n        if (attr.name.name === 'v-show') {\n          attributes.splice(i, 1);\n        }\n        return attr.name.name === 'v-show';\n      });\n      let styleNode = attributes.find((attr) => attr.name.name === 'style' || attr.name.name.name === 'style')\n      if (!showDirectiveNode) {\n        return ;\n      }\n      if (styleNode) {\n        throw new Error('The style attribute can\\'t be used in the element that has  attributes with v-show ');\n      }\n      let elementShow = utils.trimCurly(showDirectiveNode.value.value);\n\n      let styleNodeValue = `display:{{${elementShow}?'':'none'}};{{${elementShow}?'':'height:0px;width:0px;overflow:hidden'}}`;\n      if (type === 'weex' && styleNodeValue.indexOf('_cmlStyleProxy') === -1) {\n        styleNodeValue = `${weexMixins.styleProxyName}(${utils.getReactiveValue(styleNodeValue)})`\n      }\n      if (type === 'weex') {\n        attributes.push(t.jsxAttribute(t.jsxIdentifier(':style'), t.stringLiteral(styleNodeValue)))\n      } else if (type === 'web') {\n        attributes.push(t.jsxAttribute(t.jsxIdentifier('v-show'), t.stringLiteral(elementShow)))\n      }\n\n    }\n  }\n})\n\nparseDirective.tap('wx-vue', (args) => {\n  let { path, node, type, options: {lang} } = args;\n  if (lang === 'vue' && (['wx', 'baidu', 'alipay', 'qq', 'tt'].includes(type))) {\n    if (t.isJSXAttribute(node) && node.name.name === 'v-model') {\n      let modelKey = utils.getModelKey(node.value.value);\n      path.insertAfter(t.jsxAttribute(t.jsxIdentifier('value'), t.stringLiteral(`{{${node.value.value}}}`)))\n      if (type === 'alipay') {\n        path.insertAfter(t.jsxAttribute(t.jsxIdentifier('onInput'), t.stringLiteral(`${wxEventProxy.modelEventProxyName}`)));\n        path.insertAfter(t.jsxAttribute(t.jsxIdentifier('data-eventinput'), t.stringLiteral(`${wxEventProxy.modelEventProxyName}`)));\n      } else {\n        path.insertAfter(t.jsxAttribute(t.jsxIdentifier('bindinput'), t.stringLiteral(`${wxEventProxy.modelEventProxyName}`)))\n      }\n      path.replaceWith(t.jsxAttribute(t.jsxIdentifier('data-modelkey'), t.stringLiteral(`${modelKey}`)))\n    }\n    // v-text c-text\n    if (t.isJSXAttribute(node) && node.name.name === 'v-text') {\n      let textValue = node.value.value;\n      let JSXElemenetPath = path.find((pth) => pth.isJSXElement());\n      JSXElemenetPath && (JSXElemenetPath.node.children = [t.jsxText(`{{${textValue}}}`)]);\n\n      path.remove();// 删除v-text;\n    }\n    if (t.isJSXElement(node)) {\n      let attributes = node.openingElement.attributes;\n      let showDirectiveNode = attributes.find((attr, i) => {\n        if (attr.name.name === 'v-show') {\n          attributes.splice(i, 1);\n        }\n        return attr.name.name === 'v-show';\n      });\n      let styleNode = attributes.find((attr) => attr.name.name === 'style' || attr.name.name.name === 'style')\n      if (!showDirectiveNode) {\n        return ;\n      }\n      if (styleNode) {\n        throw new Error('The style attribute can\\'t be used in the element that has  attributes with v-show ');\n      }\n      let elementShow = utils.trimCurly(showDirectiveNode.value.value);\n\n      let styleNodeValue = `display:{{${elementShow}?'':'none'}};{{${elementShow}?'':'height:0px;width:0px;overflow:hidden'}}`;\n\n      attributes.push(t.jsxAttribute(t.jsxIdentifier('style'), t.stringLiteral(styleNodeValue)))\n    }\n  }\n})\n\n\nmodule.exports.parseDirective = parseDirective;\n"
  },
  {
    "path": "packages/chameleon-template-parse/src/parser/parse-event.js",
    "content": "const t = require('@babel/types')\n\nconst { SyncHook } = require('tapable');\nconst {\n  eventMap\n} = require('../common/cml-map.js');\nconst utils = require('../common/utils');\nconst eventProxy = require('chameleon-mixins/web-mixins.js');\nconst wxEventProxy = require('chameleon-mixins/wx-mixins.js');\nlet parseEvent = new SyncHook(['args'])\n\nparseEvent.tap('web-weex', (args) => {\n  let { path, node, type, options} = args;\n  if (type === 'web' || type === 'weex') {\n    let container = path.container;\n    let value = container.value;\n    let isStopBubble = false;// 默认都是冒泡\n    if (node.namespace.name === 'c-catch') {\n      isStopBubble = true;\n    } else {\n      isStopBubble = false;\n    }\n    node.namespace.name = 'v-on';\n    // ====这里作用是阻止对 origin-tag标签的事件进行代理\n    let jsxElementNodePath = path.findParent((path) => t.isJSXElement(path.node));\n    let jsxElementNode = jsxElementNodePath.node;\n    let tagName = jsxElementNode.openingElement.name.name;\n    let isOriginOrNative = utils.isOriginTagOrNativeComp(tagName, options);\n    let isNotNativeComp = utils.isNotNativeComponent(tagName, options);\n    let originEvents = ['tap', 'click', 'touchstart', 'touchmove', 'touchend', 'touchcancel'];\n    if (type === 'web') {\n      if (isNotNativeComp || tagName === 'component') { // cml组件上的tap和click都处理成tap.native  click.native;这是为了和小程序端保持一致;对于第三方组件或者标签上的click或者tap则不再处理；\n        originEvents.includes(node.name.name) && (node.name.name = `${node.name.name}__CML_NATIVE_EVENTS__`);\n      }\n      // if (isNotNativeComp || tagName === 'component') { // cml组件上的tap和click都处理成tap.native  click.native;这是为了和小程序端保持一致;\n      //   // node.name.name === 'tap' && (node.name.name = 'click');\n      //   originEvents.includes(node.name.name) && (node.name.name = `${node.name.name}__CML_NATIVE_EVENTS__`);\n      // } else if (isNativeComp) { // 对于引用的第三方组件则不处理\n      //   // native组件不处理名字\n      // } else { // 普通标签都处理成tap\n      //   let isOriginTag = tagName.indexOf('origin-') === 0;\n      //   if (!isOriginTag) { // 如果是原生 origin- 开头的标签，那么click不要处理成tap\n      //     // node.name.name === 'click' && (node.name.name = 'tap');\n      //   }\n      // }\n    }\n    if (type === 'weex') { // weex端 还是原来的逻辑\n      node.name.name === 'tap' && (node.name.name = 'click');\n      if (isNotNativeComp || tagName === 'component') {\n        originEvents.includes(node.name.name) && (node.name.name = `${node.name.name}__CML_NATIVE_EVENTS__`);\n      }\n    }\n    if (isOriginOrNative) {\n      return // 原生标签和原生组件直接不解析\n    }\n    // ====这里作用是阻止对 origin-tag标签的事件进行代理\n\n    // 这里代理事件的时候，需要区分是内联事件还是单纯的事件名，c-bind:click=\"makeCountUp()\" c-bind:click=\"handleClick(item,1,'1',  'index')\";和单纯的事件名 c-bind:click=\"makeCountUp\"\n    let handler = value.value && utils.trim(value.value);\n\n    let match = utils.isInlineStatementFn(handler);\n    if (!match) {\n      // 不是内联函数执行语句 handler => \"handleClick\"\n      value.value = `${eventProxy.eventProxyName}($event,'${handler}',${isStopBubble})`;\n    } else {\n      // handler ==> handleClick() handleClick(item,1,2) ..\n      // 如果是 handleClick()  handleClick(item,name,1,2,\"item\",\"1\",'2',true,\"true\")两种情况\n      let index = handler.indexOf('(');\n      index > 0 && (handler = utils.trim(handler.slice(0, index)));\n      if (!utils.trim(match[1])) { // 对应handleClick(   ) 中的括号中的值；\n        value.value = `${eventProxy.inlineStatementEventProxy}('${handler}',${isStopBubble})`\n      } else { // handleClick(item,name,1,2,\"item\",\"1\",'2',true,\"true\")\n        let args = match && utils.doublequot2singlequot(match[1]);\n        value.value = `${eventProxy.inlineStatementEventProxy}('${handler}',${isStopBubble},${args})`\n      }\n\n    }\n\n  }\n})\nparseEvent.tap('wx-baidu-qq-tt', (args) => {\n  let { path, node, type, options} = args;\n  let miniAppType = ['wx', 'baidu', 'qq', 'tt'];\n  if (miniAppType.includes(type)) {\n    let container = path.container;\n    let value = container.value;\n    let parentPath = path.parentPath;\n    let name = node.name.name === 'click' ? 'tap' : node.name.name;\n    let eventKey = name.toLowerCase();\n    let wxName = node.name.name === 'click' ? 'tap' : node.name.name;\n    let handler = value.value && utils.trim(value.value);\n    let match = utils.isInlineStatementFn(handler);\n    if (node.namespace.name === 'c-bind') {\n      wxName = `bind${wxName}`\n    } else if (node.namespace.name === 'c-catch') {\n      wxName = `catch${wxName}`\n    }\n    path.replaceWith(t.jsxIdentifier(wxName));\n    // ====这里作用是阻止对 origin-tag标签的事件进行代理\n    let jsxElementNodePath = path.findParent((path) => t.isJSXElement(path.node));\n    let jsxElementNode = jsxElementNodePath.node;\n    let tagName = jsxElementNode.openingElement.name.name\n    if (utils.isOriginTagOrNativeComp(tagName, options)) {\n      return // 原生标签和原生组件直接不解析\n    }\n    // ====这里作用是阻止对 origin-tag标签的事件进行代理\n    if (!match) {\n      parentPath.insertAfter(t.jsxAttribute(t.jsxIdentifier(`data-event${eventKey}`), t.stringLiteral(`{{['${handler}']}}`)))\n      value.value = `${wxEventProxy.eventProxyName}`;\n    } else {\n      let index = handler.indexOf('(');\n      index > 0 && (handler = utils.trim(handler.slice(0, index)));\n      value.value = `${eventProxy.inlineStatementEventProxy}`;\n      let args = match && utils.doublequot2singlequot(match[1]).trim();\n      if (args) { // 内联函数传参\n        let inlineArgs = utils.getInlineStatementArgs(args);\n        parentPath.insertAfter(t.jsxAttribute(t.jsxIdentifier(`data-event${eventKey}`), t.stringLiteral(`{{['${handler}',${inlineArgs}]}}`)))\n      } else { // 内联函数不传参\n        parentPath.insertAfter(t.jsxAttribute(t.jsxIdentifier(`data-event${eventKey}`), t.stringLiteral(`{{['${handler}']}}`)))\n      }\n    }\n  }\n})\nparseEvent.tap('alipay', (args) => {\n  // 这里注意和wx的不同，wx  bindtap=\"tapName\"  alipay  onTap=\"tapName\" on后面必须是大写字母；\n  let { path, node, type, options} = args;\n  if (type === 'alipay') {\n    let container = path.container;\n    let value = container.value;\n    let parentPath = path.parentPath;\n    let name = node.name && (node.name.name === 'click' ? 'tap' : node.name.name);\n    let eventKey = name.toLowerCase();\n    // alipay需要将事件名称转化成大写；\n    let aliName = utils.titleLize(eventMap[name] || name);\n    let handler = value.value && utils.trim(value.value);\n    let match = utils.isInlineStatementFn(handler);\n    if (node.namespace.name === 'c-bind') {\n      aliName = `on${aliName}`\n    } else if (node.namespace.name === 'c-catch') {\n      aliName = `catch${aliName}`\n    }\n    path.replaceWith(t.jsxIdentifier(aliName));\n    // ====这里作用是阻止对 origin-tag标签的事件进行代理\n    let jsxElementNodePath = path.findParent((path) => t.isJSXElement(path.node));\n    let jsxElementNode = jsxElementNodePath.node;\n    let tagName = jsxElementNode.openingElement.name.name\n    if (utils.isOriginTagOrNativeComp(tagName, options)) {\n      return // 原生标签和原生组件直接不解析\n    }\n    // ====这里作用是阻止对 origin-tag标签的事件进行代理\n    if (!match) {\n      parentPath.insertAfter(t.jsxAttribute(t.jsxIdentifier(`data-event${eventKey}`), t.stringLiteral(`{{['${handler}']}}`)))\n      value.value = `${wxEventProxy.eventProxyName}`;\n    } else {\n      let index = handler.indexOf('(');\n      index > 0 && (handler = utils.trim(handler.slice(0, index)));\n      value.value = `${eventProxy.inlineStatementEventProxy}`;\n      let args = match && utils.doublequot2singlequot(match[1]).trim();\n      if (args) { // 内联函数传参\n        let inlineArgs = utils.getInlineStatementArgs(args);\n        parentPath.insertAfter(t.jsxAttribute(t.jsxIdentifier(`data-event${eventKey}`), t.stringLiteral(`{{['${handler}',${inlineArgs}]}}`)))\n      } else { // 内联函数不传参\n        parentPath.insertAfter(t.jsxAttribute(t.jsxIdentifier(`data-event${eventKey}`), t.stringLiteral(`{{['${handler}']}}`)))\n      }\n    }\n  }\n});\nmodule.exports.parseEvent = parseEvent;\n"
  },
  {
    "path": "packages/chameleon-template-parse/src/parser/parse-interation.js",
    "content": "const t = require('@babel/types')\n\nconst { SyncHook } = require('tapable');\nconst {\n  interationMap\n} = require('../common/cml-map.js');\nconst utils = require('../common/utils');\n\nlet parseInteration = new SyncHook(['args'])\n\nparseInteration.tap('web-weex', (args) => {\n  let { path, node, type, options: {lang} } = args;\n\n  if (lang === 'cml' && (type === 'web' || type === 'weex')) {\n    let container = path.container;\n    let forBody = utils.trimCurly(node.value.value);\n    let forIdx = 'index';\n    let forItem = 'item';\n    let forKey = '';\n    let siblingPaths = utils.getSiblingPaths(path);\n    for (let item of container) {\n      if (item.name.name === 'c-for-index') {\n        forIdx = (item.value && item.value.value) || 'index';\n      }\n      if (item.name.name === 'c-for-item') {\n        forItem = (item.value && item.value.value) || 'item';\n      }\n      if (item.name.name === 'c-key') {\n        // 这个 for-key的限制是来自于微信端；\n        forKey = item.value && item.value.value;\n        if (forKey && forKey === '*this') {\n          forKey = forIdx;\n        } else {\n          forKey = forItem + '.' + forKey;\n        }\n      }\n    }\n    node.name.name = 'v-for';\n    node.value.value = `(${forItem}, ${forIdx}) in ${forBody}`;\n    // 移除 c-for-index c-for-item c-key这些jsxAttribute\n    siblingPaths.forEach((siblingPath) => {\n      if (siblingPath.node.name.name === 'c-for-index' ||\n        siblingPath.node.name.name === 'c-for-item' ||\n        siblingPath.node.name.name === 'c-key'\n      ) {\n        // 如果相邻元素有c-key才会插入一个 :key的JSXAttributer;\n        if (siblingPath.node.name.name === 'c-key') {\n          path.insertAfter(t.jsxAttribute(t.jsxIdentifier(':key'), t.stringLiteral(forKey)));\n        }\n        siblingPath.remove();\n      }\n    })\n  }\n})\nparseInteration.tap('wx-alipay-qq-tt', (args) => {\n  let { path, node, type, options: {lang} } = args;\n  let miniAppType = ['wx', 'alipay', 'qq', 'tt'];\n  if (lang === 'cml' && miniAppType.includes(type)) {\n    let name = node.name.name;\n    node.name.name = interationMap[name][type];\n    let siblingPaths = utils.getSiblingPaths(path);\n    siblingPaths.forEach((siblingPath) => {\n      let siblingPathName = siblingPath.node.name.name;\n      if (siblingPathName === 'c-for-index') {\n        siblingPath.node.name.name = interationMap[siblingPathName][type];\n      }\n      if (siblingPathName === 'c-for-item') {\n        siblingPath.node.name.name = interationMap[siblingPathName][type];\n      }\n      if (siblingPathName === 'c-key') {\n        siblingPath.node.name.name = interationMap[siblingPathName][type];\n      }\n    })\n  }\n});\nparseInteration.tap('baidu', (args) => {\n  let { path, node, type, options: {lang} } = args;\n  if (lang === 'cml' && type === 'baidu') {\n    let name = node.name.name;\n    node.name.name = interationMap[name][type];\n    node.value.value = utils.trimCurly(node.value.value);\n    let siblingPaths = utils.getSiblingPaths(path);\n    siblingPaths.forEach((siblingPath) => {\n      let siblingPathName = siblingPath.node.name.name;\n      if (siblingPathName === 'c-for-index') {\n        siblingPath.node.name.name = interationMap[siblingPathName][type];\n        siblingPath.node.value.value = utils.trimCurly(siblingPath.node.value.value)\n      }\n      if (siblingPathName === 'c-for-item') {\n        siblingPath.node.name.name = interationMap[siblingPathName][type];\n        siblingPath.node.value.value = utils.trimCurly(siblingPath.node.value.value)\n      }\n      if (siblingPathName === 'c-key') {\n        siblingPath.node.name.name = interationMap[siblingPathName][type];\n        siblingPath.node.value.value = utils.trimCurly(siblingPath.node.value.value)\n      }\n    })\n  }\n})\nmodule.exports.parseInteration = parseInteration;\n"
  },
  {
    "path": "packages/chameleon-template-parse/src/parser/parse-ref.js",
    "content": "// import * as t from \"@babel/types\";\nconst t = require('@babel/types');\nconst { SyncHook } = require('tapable');\n\nlet parseRef = new SyncHook(['args'])\nparseRef.tap('wx-cml', (args) => {\n  let { path, type, options: { lang } } = args;\n  if (lang === 'cml' && (['wx', 'qq', 'baidu', 'alipay', 'tt'].includes(type))) {\n    let parentPath = path.parentPath;\n    let attributes = parentPath.node.attributes;\n    let idNode = attributes.find((attr) => attr.name.name === 'id');\n    let refNode = attributes.find((attr) => attr.name.name === 'ref');\n    let classNode = attributes.find((attr) => attr.name.name === 'class');\n    if (idNode) {\n      idNode.value.value = refNode.value.value;\n    } else {\n      attributes.push(t.jsxAttribute(t.jsxIdentifier('id'), t.stringLiteral(refNode.value.value)))\n    }\n    if (!classNode) { // 不存在class节点\n      attributes.push(t.jsxAttribute(t.jsxIdentifier('class'), t.stringLiteral('_cml_ref_lmc_')))\n    } else {\n      classNode.value.value = `${classNode.value.value}  _cml_ref_lmc_`\n    }\n\n\n    path.remove();\n  }\n\n});\nparseRef.tap('wx-vue', (args) => {\n  let { path, type, options: { lang } } = args;\n  if (lang === 'vue' && (['wx', 'qq', 'baidu', 'alipay', 'tt'].includes(type))) {\n    let parentPath = path.parentPath;\n    let attributes = parentPath.node.attributes;\n    let idNode = attributes.find((attr) => attr.name.name === 'id');\n    let refNode = attributes.find((attr) => (attr.name.name === 'ref' || attr.name.name.name === 'ref'));\n    let isDynamicRef = t.isJSXNamespacedName(refNode.name);\n    let refNodeValue = isDynamicRef ? `{{${refNode.value.value}}}` : refNode.value.value\n    let classNode = attributes.find((attr) => attr.name.name === 'class');\n    if (idNode) {\n\n      idNode.value.value = refNodeValue;\n    } else {\n      attributes.push(t.jsxAttribute(t.jsxIdentifier('id'), t.stringLiteral(refNodeValue)))\n    }\n    if (!classNode) { // 不存在class节点\n      attributes.push(t.jsxAttribute(t.jsxIdentifier('class'), t.stringLiteral('_cml_ref_lmc_')))\n    } else {\n      classNode.value.value = `${classNode.value.value}  _cml_ref_lmc_`\n    }\n\n\n    path.remove();\n  }\n\n})\n\n\nmodule.exports.parseRef = parseRef;\n"
  },
  {
    "path": "packages/chameleon-template-parse/src/parser/parse-style.js",
    "content": "// --inspect-brk\nconst t = require('@babel/types')\n\nconst { SyncHook } = require('tapable');\nconst utils = require('../common/utils');\n\nconst weexMixins = require('chameleon-mixins/weex-mixins.js')\nconst webMixins = require('chameleon-mixins/web-mixins.js')\nconst webStaticStyleHandle = require('chameleon-css-loader/proxy/proxyWeb.js');\nconst wxStaticStyleHandle = require('chameleon-css-loader/proxy/proxyMiniapp.js');\nconst weexStaticStyleHandle = require('chameleon-css-loader/transform/weex.js')\n\nlet parseStyle = new SyncHook(['args'])\n// cml语法下只能一个style属性\nparseStyle.tap('web-cml', (args) => {\n  let { node, type, options: { lang, cmss } } = args;\n  if (!cmss) {\n    throw new Error('please ensure that if you configed the cmss in chameleon.config.js');\n  }\n  if (lang === 'cml' && type === 'web') {\n    let styleNode = node;\n    let cmssString = utils.doublequot2singlequot(JSON.stringify(cmss));\n    // 动态的style,包装成代理函数；\n    if (styleNode && styleNode.value && utils.isMustacheReactive(styleNode.value.value)) {\n      styleNode.value.value = utils.getReactiveValue(styleNode.value.value);\n\n      styleNode.value.value = `${webMixins.styleProxyName}((${styleNode.value.value}),${cmssString})`\n      styleNode.name.name = `:${styleNode.name.name}`;\n    } else { // 静态的\n      styleNode.value.value = webStaticStyleHandle(styleNode.value.value, cmssString);\n    }\n\n  }\n});\nparseStyle.tap('weex-cml', (args) => {\n  let { node, type, options: { lang } } = args;\n  if (lang === 'cml' && type === 'weex') {\n    let styleNode = node\n    if (styleNode && styleNode.value && utils.isMustacheReactive(styleNode.value.value)) {\n      // weex动态style\n      styleNode.value.value = utils.getReactiveValue(styleNode.value.value);\n      styleNode.value.value = `${weexMixins.styleProxyName}((${styleNode.value.value}))`\n      styleNode.name.name = `:${styleNode.name.name}`;\n    } else { // weex静态style\n\n      styleNode.value && (styleNode.value.value = weexStaticStyleHandle.parse(styleNode.value.value));\n    }\n  }\n});\nparseStyle.tap('wx-alipay-baidu-cml', (args) => {\n  let { node, type, options: { lang } } = args;\n  if (lang === 'cml' && (['wx', 'baidu', 'alipay', 'qq', 'tt'].includes(type))) {\n    let styleNode = node\n    if (styleNode && styleNode.value && utils.isMustacheReactive(styleNode.value.value)) {// 动态的style  cpx转化成rpx\n      styleNode.value && (styleNode.value.value = utils.transformWxDynamicStyleCpxToRpx(styleNode.value.value));\n    } else { // 静态的style\n      styleNode.value && (styleNode.value.value = wxStaticStyleHandle(styleNode.value.value));\n    }\n  }\n})\nparseStyle.tap('web-vue', (args) => {\n  let { node, type, options: { lang, cmss } } = args;\n  if (!cmss) {\n    throw new Error('please ensure that if you configed the cmss in chameleon.config.js');\n  }\n  if (lang === 'vue' && type === 'web') {\n    // web端处理动态style；\n    let styleNode = node;\n    let cmssString = utils.doublequot2singlequot(JSON.stringify(cmss));\n    if (t.isJSXNamespacedName(node.name)) {\n      styleNode.value.value = `${webMixins.styleProxyName}((${styleNode.value.value}),${cmssString})`\n    } else { // 静态\n      styleNode.value.value = webStaticStyleHandle(styleNode.value.value, cmssString);\n    }\n  }\n});\nparseStyle.tap('weex-vue', (args) => {\n  let { node, type, options: { lang } } = args;\n  if (lang === 'vue' && type === 'weex') {\n    let styleNode = node;\n    if (styleNode) {\n      if (t.isJSXNamespacedName(styleNode.name)) {\n        styleNode.value.value = `${weexMixins.styleProxyName}((${styleNode.value.value}))`\n      } else { // 静态的\n        // styleNode.value && (styleNode.value.value = styleHandle(styleNode.value.value));\n        styleNode.value && (styleNode.value.value = weexStaticStyleHandle.parse(styleNode.value.value));\n      }\n    }\n  }\n});\nparseStyle.tap('miniapp-vue', (args) => {\n  let { path, node, type, options: { lang } } = args;\n  if (lang === 'vue' && (['wx', 'baidu', 'alipay', 'qq', 'tt'].includes(type))) {\n    let styleNode = node;\n    if (styleNode) {\n      let newStyleNodeValue;\n      if (t.isJSXNamespacedName(styleNode.name)) {\n        try {\n          newStyleNodeValue = utils.transformWxDynamicStyleCpxToRpx(`{{${styleNode.value.value}}}`);\n          path.replaceWith(t.jsxAttribute(t.jsxIdentifier('style'), t.stringLiteral(newStyleNodeValue)));\n        } catch (err) {\n          throw new Error(`${type} platform with ${lang} syntax，the attributes style is not correct`);\n        }\n      } else if (styleNode.value && !utils.isMustacheReactive(styleNode.value.value)) { // 静态的\n        styleNode.value && (styleNode.value.value = wxStaticStyleHandle(styleNode.value.value));\n      }\n    }\n  }\n})\n\n\nmodule.exports.parseStyle = parseStyle;\n"
  },
  {
    "path": "packages/chameleon-template-parse/src/parser/parse-vue2wx.js",
    "content": "const t = require('@babel/types')\n\nconst { SyncHook } = require('tapable');\nconst {\n  interationMap, conditionMapVue2Wx\n} = require('../common/cml-map.js');\nconst utils = require('../common/utils');\n\nlet parseVue2Wx = new SyncHook(['args'])\n// 注意点，如果 parseVue2Wx 前面处理某个path将其path.remove()删除了，那么这个path走到了这里就会报错\n\nparseVue2Wx.tap('vue2wx-condition,vue2alipay-condition', (args) => {\n  let { node, type, options: {lang}} = args;\n  if (lang === 'vue' && (['wx', 'baidu', 'alipay', 'qq', 'tt'].includes(type))) {\n    if (t.isJSXAttribute(node) && (node.name.name === 'v-if' ||\n    node.name.name === 'v-else-if' ||\n    node.name.name === 'v-else'\n    )) {\n      let currentCondition = node.name.name;\n      let targetCondition = conditionMapVue2Wx[currentCondition][type];\n      if (targetCondition && currentCondition !== targetCondition) {\n        node.name.name = targetCondition;\n        if (type === 'baidu') {\n          // 不做处理\n        } else {\n          node.value && t.isStringLiteral(node.value) && (node.value.value = `{{${node.value.value}}}`);\n        }\n\n      }\n    }\n  }\n})\nparseVue2Wx.tap('vue2wx-v-bind,vue2alipay-v-bind', (args) => {\n  let { node, type, options: {lang}} = args;\n  if (lang === 'vue' && (['wx', 'baidu', 'alipay', 'qq', 'tt'].includes(type))) {\n    // 注意这个node节点仍然是 JSXAttribute节点；\n    let bindAttrName = node.name;\n    if (t.isJSXNamespacedName(bindAttrName) && bindAttrName.namespace.name === 'v-bind' && bindAttrName.name.name !== 'key' && bindAttrName.name.name !== 'class') {\n      // key属性不要处理；class属性不要处理；\n      let finalBindAttrName = bindAttrName.name && bindAttrName.name.name;\n      if (finalBindAttrName) {\n        node.name = t.jsxIdentifier(finalBindAttrName);\n        node.value.value = `{{${node.value.value}}}`\n      }\n    }\n  }\n});\nparseVue2Wx.tap('vue2wx-v-for', (args) => {\n  let { path, node, type, options: {lang}} = args;\n  if (lang === 'vue' && (['wx', 'baidu', 'alipay', 'qq', 'tt'].includes(type))) {\n    if (t.isJSXAttribute(node) && node.name.name === 'v-for') {\n      let siblingPaths = utils.getSiblingPaths(path);\n      let value = node.value && node.value.value;\n      let {item, list, index} = utils.analysisFor(value);\n      siblingPaths.forEach((siblingPath) => {\n        let siblingPathNode = siblingPath.node;\n        let keyAttrName = siblingPathNode.name;\n        let keyValue = siblingPathNode.value && siblingPathNode.value.value;\n        if (t.isJSXNamespacedName(keyAttrName) && keyAttrName.name.name === 'key') {\n          if (keyValue === item) {\n            keyValue = '*this'\n          } else {\n            let reg = new RegExp(`${item}\\\\.`, 'g');\n            keyValue = keyValue.replace(reg, '');\n          }\n          if (keyValue) {\n            // siblingPathNode.name = t.jsxIdentifier('wx:key');\n            siblingPathNode.name = t.jsxIdentifier(interationMap['c-key'][type]);\n            siblingPathNode.value.value = `${keyValue}`\n          }\n        }\n      })\n      if (type === 'baidu') {\n        path.insertAfter(t.jsxAttribute(t.jsxIdentifier(interationMap['c-for'][type]), t.stringLiteral(`${list}`)));\n      } else {\n        path.insertAfter(t.jsxAttribute(t.jsxIdentifier(interationMap['c-for'][type]), t.stringLiteral(`{{${list}}}`)));\n      }\n      path.insertAfter(t.jsxAttribute(t.jsxIdentifier(interationMap['c-for-index'][type]), t.stringLiteral(`${index}`)));\n      path.insertAfter(t.jsxAttribute(t.jsxIdentifier(interationMap['c-for-item'][type]), t.stringLiteral(`${item}`)));\n      path.remove();\n    }\n  }\n});\nparseVue2Wx.tap('component-is', (args) => {\n  let {path, node, type, options} = args;\n  let lang = options.lang;\n  let conditionMap = {\n    wx: 'wx:if',\n    alipay: 'a:if',\n    baidu: 's-if',\n    qq: 'qq:if',\n    tt: 'tt:if'\n  }\n  let usingComponents = (options.usingComponents || []).map(item => item.tagName)\n  if ((['wx', 'baidu', 'alipay', 'qq', 'tt'].includes(type)) && t.isJSXElement(node)) {\n    let currentTag = node.openingElement.name.name;\n    let jsxElementChildren = node.children || [];\n    if (currentTag === 'component') {\n      let attributes = utils.getJSXElementAttrKeyValue(path);\n      let shrinkcomponents = attributes.shrinkcomponents;\n      if (shrinkcomponents) {\n        usingComponents = shrinkcomponents.split(',').reduce((result, comp) => {\n          comp = utils.trim(comp);\n          if (comp) {\n            result.push(comp);\n          }\n          return result;\n        }, [])\n      }\n      let currentComp;\n      (path.node.openingElement.attributes || []).forEach((attr) => {\n        let attrName = attr.name\n        if (lang === 'vue' && t.isJSXNamespacedName(attrName) && attrName.name.name === 'is') {\n          currentComp = attr.value.value;\n        }\n        if (lang === 'cml' && t.isJSXIdentifier(attrName) && attrName.name === 'is') {\n          currentComp = utils.trimCurly(attr.value.value);\n        }\n\n      })\n      if (currentComp && usingComponents) {\n        let elementAttributes = path.node.openingElement.attributes || [];\n        usingComponents.forEach((comp) => {\n          elementAttributes = JSON.parse(JSON.stringify(elementAttributes));\n          // eslint-disable-next-line\n          let openTag = t.jsxOpeningElement(t.jsxIdentifier(comp), [t.jsxAttribute(t.jsxIdentifier(`${conditionMap[type]}`), t.stringLiteral(`{{${currentComp} === '${comp}'}}`))].concat(elementAttributes));\n          let closeTag = t.jsxClosingElement(t.jsxIdentifier(comp))\n          let insertNode = t.jsxElement(openTag, closeTag, jsxElementChildren, false);\n\n          path.insertAfter(insertNode);\n        })\n      }\n      path.remove();// 无论如何都要移除 component这个元素；\n    }\n  }\n})\n\nmodule.exports.parseVue2Wx = parseVue2Wx;\n"
  },
  {
    "path": "packages/chameleon-template-parse/test/common/process-template.test.js",
    "content": "const processTemplate = require('../../src/common/process-template');\nconst expect = require('chai').expect;\nlet options = {lang: 'cml',\n  buildInComponents: {button: \"cml-buildin-button\", 'c-tab-item': 'cml-buildin-tab'},\n  filePath: '/User/Jim-W/didi/component/button.cml',\n  cmss: {\n    rem: true,\n    scale: 0.5,\n    remOptions: {\n    // base on 750px standard.\n      rootValue: 75,\n      // to leave 1px alone.\n      minPixelValue: 1.01\n    },\n    autoprefixOptions: {\n      browsers: ['> 0.1%', 'ios >= 8', 'not ie < 12']\n    }\n  },\n  usingComponents: [{\n    tagName: 'thirdComp1',\n    refUrl: '/path/to/ref1',\n    filePath: 'path/to/real1',\n    isNative: true\n  }, {\n    tagName: 'thirdComp2',\n    refUrl: '/path/to/ref2',\n    filePath: 'path/to/real2',\n    isNative: false\n  }]\n};\ndescribe('process-template', function() {\n  describe('preParseAliComponent', function() {\n    // 组件需要进行一层包裹， 有些特定的组件不要被包裹 c-tab-item\n    it('test alipay component wraped', function() {\n      let source = `<view><c-tab-item></c-tab-item><thirdComp2></thirdComp2><button></button><text></text></view>`\n      expect(processTemplate.preParseAliComponent(source, 'alipay', options)).to.equal(`<view  ><c-tab-item  ></c-tab-item><view  ><thirdComp2  ></thirdComp2></view><view  ><button  ></button></view><text  ></text></view>`)\n    })\n    // 组件上的 c-if c-else v-if   class style需要外移到包裹层\n    it('test alipay component wraped', function() {\n      let source = `<view><c-tab-item></c-tab-item><thirdComp2 v-if=\"true\"></thirdComp2><button class=\"cls1\" :class=\"cls2\" style=\"width:100cpx\"></button><text></text></view>`\n      expect(processTemplate.preParseAliComponent(source, 'alipay', options)).to.equal(`<view  ><c-tab-item  ></c-tab-item><view  v-if=\"true\" ><thirdComp2  ></thirdComp2></view><view  class=\"cls1\" :class=\"cls2\" style=\"width:100cpx\" ><button  class=\"cls1\" :class=\"cls2\" style=\"width:100cpx\" ></button></view><text  ></text></view>`)\n    });\n    // 一元标签的处理,组件一元标签也是需要被包裹，非组件一元标签则不会,组件在options中有声明\n    it('test alipay component wraped', function() {\n      let source = `<view><input class=\"cls1\" style=\"width:100cpx\" /><button class='btn' />你好</view>`\n      expect(processTemplate.preParseAliComponent(source, 'alipay', options)).to.equal(`<view  ><input  class=\"cls1\" style=\"width:100cpx\" /><view  class=\\'btn\\' ><button  class=\\'btn\\' /></view>你好</view>`)\n    })\n  });\n  describe('preParseBindAttr', function() {\n    it('support :sth=\"name\"', function() {\n      expect(processTemplate.preParseBindAttr(`<view :name=\"sth\" v-on:click=\"handleClick\"></view>`)).to.equal(`<view v-bind:name=\"sth\" v-on:click=\"handleClick\"></view>`)\n    })\n  });\n  describe('preParseVueEvent', function() {\n    it('support @ v-on', function() {\n      expect(processTemplate.preParseVueEvent(`<view v-on:touch=\"handle1\" @tap=\"handle2\"></view>`)).to.equal(`<view c-bind:touch=\"handle1\" c-bind:tap=\"handle2\"></view>`)\n    })\n  });\n  describe('preParseGtLt', function() {\n    it('transform < > in {{}} to _cml_lt_lmc_  _cml_gt_lmc_', function() {\n      expect(processTemplate.preParseGtLt(`{{< >}}`)).to.equal(`{{_cml_lt_lmc_ _cml_gt_lmc_}}`)\n    })\n  });\n  describe('preParseMustache', function() {\n    it('transform <view>{{}}</view> to <view>_cml{}lmc_</view>', function() {\n      expect(processTemplate.preParseMustache(`<view>{{}}</view>`)).to.equal(`<view>_cml{}lmc_</view>`)\n    })\n  });\n  describe('preDisappearAnnotation', function() {\n    it(`disappear annotation like <!--something--> become ''`, function() {\n      expect(processTemplate.preDisappearAnnotation(`<!--something-->`)).to.equal('')\n    })\n  });\n  // preParseAnimation 只处理wx  alipay  baidu\n  describe('preParseAnimation', function() {\n    it(`preParse Animation add c-bind:transitionend=\"_animationCb(...)\"`, function() {\n      expect(processTemplate.preParseAnimation(`<view><text c-animation=\"{{ sss }}\">click</text></view>`, 'wx')).to.equal(`<view><text c-animation=\"{{ sss }}\" c-bind:transitionend=\"_animationCb('sss',$event)\">click</text></view>;`);\n    })\n  });\n  describe('preParseEventSyntax', function() {\n    it('support @ v-on', function() {\n      expect(processTemplate.preParseEventSyntax(`<view v-on:touch=\"handle1\" @click=\"handle2\"></view>`)).to.equal(`<view v-on:touch=\"handle1\" v-on:tap=\"handle2\"></view>`)\n    })\n  });\n  describe('preCheckTemplateSyntax', function() {\n    it('preCheckTemplateSyntax for cml', function() {\n      let checkOptions = {lang: 'cml', filePath: '/users/components/button.cml'}\n      expect(processTemplate.preCheckTemplateSyntax(`<view @click=\"handleClick \" v-if=\"true\" :id=\"value\"></view>`, 'web', checkOptions)).to.equal(`with cml syntax you can not use @ or v-on  to get event binded , please use  \\'c-bind\\';v-if can\\'t be used with cml syntax ;<div v-bind:id=\"value\"></div> 或者 <div :id=\"value\"></div> can not be used with cml syntax,please use  <div id={{value}}></div> `)\n    })\n  });\n  describe('preCheckTemplateSyntax', function() {\n    it('preCheckTemplateSyntax for vue', function() {\n      let checkOptions = {lang: 'vue', filePath: '/users/components/button.cml'}\n      expect(processTemplate.preCheckTemplateSyntax(`<view c-bind:click=\"handleClick \" c-if=\"true\" id=\"{{value}}\"></view>`, 'web', checkOptions)).to.equal(`with vue syntax you can not use \\'c-bind\\' to get event binded , please use  @ or v-on;c-if can\\'t be used with vue syntax ;<div id={{value}}></div> can not be used with vue syntax,please use <div v-bind:id=\"value\"></div> 或者 <div :id=\"value\"></div> `)\n    })\n  });\n  describe('postParseMustache', function() {\n    it('transform <view>_cml{}lmc_</view> to <view>{{}}</view> ', function() {\n      expect(processTemplate.postParseMustache(`<view>_cml{}lmc_</view>`)).to.equal(`<view>{{}}</view>`)\n    })\n  });\n  describe('postParseLtGt', function() {\n    it('transform _cml_lt_lmc_  _cml_gt_lmc_ to < > in {{}} ', function() {\n      expect(processTemplate.postParseLtGt(`{{_cml_lt_lmc_ _cml_gt_lmc_}}`)).to.equal(`{{< >}}`)\n    })\n  });\n  describe('postParseUnicode', function() {\n    it('transform \\\\u to %u', function() {\n      expect(processTemplate.postParseUnicode(`\\\\u`)).to.equal(`%u`)\n    })\n  });\n  describe('postParseOriginTag', function() {\n    it('transform <origin-tag></origin-tag> to <tag></tag>', function() {\n      expect(processTemplate.postParseOriginTag(`<view><origin-input></origin-input></view>`)).to.equal(`<view><input></input></view>;`)\n    })\n  });\n  describe('postParseOriginTag', function() {\n    it('transform <origin-tag></origin-tag> to <tag></tag>', function() {\n      try{\n        processTemplate.postParseOriginTag(`<template>\n        <cml type='alipay'>\n          alipay\n          <cml></cml>\n          </cml>\n        <cml type='base'></cml>\n        <cml ></cml>\n          \n          </template>`,'alipay')\n        }catch(e){\n          \n        }\n    })\n  });\n  describe('preParseMultiTemplate', function() {\n    it('test multi template:web', function() {\n      let result = processTemplate.preParseMultiTemplate(`<template class=\"demo-com\" >\n        <cml type='weex'>\n          <view @click=\"handleClick\">weex</view>\n          <demo-com title=\"我是标题1\"></demo-com>\n          <view>{{5 > 2 ? 5 : 2}}</view>\n        </cml>\n        <cml type=\"alipay,baidu\">\n          <view @click=\"handleClick\">alipay baidu</view>\n          <demo-com title=\"我是标题2\"></demo-com>\n          <view>{{5 > 2 ? 5 : 2}}</view>\n        </cml>\n        <cml type=\"wx\">\n          <view @click=\"handleClick\">wx</view>\n          <demo-com title=\"我是标题2\"></demo-com>\n          <view>{{5 > 2 ? 5 : 2}}</view>\n        </cml>\n        <cml type=\"base\">\n          <view @click=\"handleClick\">base</view>\n          <demo-com title=\"我是标题2\"></demo-com>\n          <view>{{5 > 2 ? 5 : 2}}</view>\n        </cml>\n\n        </template>`,'web',{needTranJSX:true});\n      expect(result).to.equal(`<template class=\"demo-com\"><view type=\"base\">\\n          <view c-bind:click=\"handleClick\">base</view>\\n          <demo-com title=\"我是标题2\"></demo-com>\\n          <view>_cml{5 > 2 ? 5 : 2}lmc_</view>\\n        </view></template>`)\n        \n    })\n  });\n  describe('preParseMultiTemplate', function() {\n    it('test multi template:wx', function() {\n      let result = processTemplate.preParseMultiTemplate(`<template class=\"demo-com\" >\n        <cml type='weex'>\n          <view @click=\"handleClick\">weex</view>\n          <demo-com title=\"我是标题1\"></demo-com>\n          <view>{{5 > 2 ? 5 : 2}}</view>\n        </cml>\n        <cml type=\"alipay,baidu\">\n          <view @click=\"handleClick\">alipay baidu</view>\n          <demo-com title=\"我是标题2\"></demo-com>\n          <view>{{5 > 2 ? 5 : 2}}</view>\n        </cml>\n        <cml type=\"wx\">\n          <view @click=\"handleClick\">wx</view>\n          <demo-com title=\"我是标题2\"></demo-com>\n          <view>{{5 > 2 ? 5 : 2}}</view>\n        </cml>\n        <cml type=\"base\">\n          <view @click=\"handleClick\">base</view>\n          <demo-com title=\"我是标题2\"></demo-com>\n          <view>{{5 > 2 ? 5 : 2}}</view>\n        </cml>\n\n        </template>`,'wx',{needTranJSX:true});\n      expect(result).to.equal(`<template class=\"demo-com\"><view type=\"wx\">\\n          <view c-bind:click=\"handleClick\">wx</view>\\n          <demo-com title=\"我是标题2\"></demo-com>\\n          <view>_cml{5 > 2 ? 5 : 2}lmc_</view>\\n        </view></template>`)\n        \n    })\n  });\n  describe('preParseMultiTemplate', function() {\n    it('test multi template:alipay', function() {\n      let result = processTemplate.preParseMultiTemplate(`<template class=\"demo-com\" >\n        <cml type='weex'>\n          <view @click=\"handleClick\">weex</view>\n          <demo-com title=\"我是标题1\"></demo-com>\n          <view>{{5 > 2 ? 5 : 2}}</view>\n        </cml>\n        <cml type=\"alipay,baidu\">\n          <view @click=\"handleClick\">alipay baidu</view>\n          <demo-com title=\"我是标题2\"></demo-com>\n          <view>{{5 > 2 ? 5 : 2}}</view>\n        </cml>\n        <cml type=\"wx\">\n          <view @click=\"handleClick\">wx</view>\n          <demo-com title=\"我是标题2\"></demo-com>\n          <view>{{5 > 2 ? 5 : 2}}</view>\n        </cml>\n        <cml type=\"base\">\n          <view @click=\"handleClick\">base</view>\n          <demo-com title=\"我是标题2\"></demo-com>\n          <view>{{5 > 2 ? 5 : 2}}</view>\n        </cml>\n\n        </template>`,'alipay',{needTranJSX:true});\n      expect(result).to.equal(`<template class=\"demo-com\"><view type=\"alipay,baidu\">\\n          <view c-bind:click=\"handleClick\">alipay baidu</view>\\n          <demo-com title=\"我是标题2\"></demo-com>\\n          <view>_cml{5 > 2 ? 5 : 2}lmc_</view>\\n        </view></template>`)\n        \n    })\n  });\n  describe('preParseMultiTemplate', function() {\n    it('test multi template delete template', function() {\n      let result = processTemplate.preParseMultiTemplate(`<template class=\"demo-com\" >\n        <cml type='weex'>\n          <view @click=\"handleClick\">weex</view>\n          <demo-com title=\"我是标题1\"></demo-com>\n          <view>{{5 > 2 ? 5 : 2}}</view>\n        </cml>\n        <cml type=\"alipay,baidu\">\n          <view @click=\"handleClick\">alipay baidu</view>\n          <demo-com title=\"我是标题2\"></demo-com>\n          <view>{{5 > 2 ? 5 : 2}}</view>\n        </cml>\n        <cml type=\"wx\">\n          <view @click=\"handleClick\">wx</view>\n          <demo-com title=\"我是标题2\"></demo-com>\n          <view>{{5 > 2 ? 5 : 2}}</view>\n        </cml>\n        <cml type=\"base\">\n          <view @click=\"handleClick\">base</view>\n          <demo-com title=\"我是标题2\"></demo-com>\n          <view>{{5 > 2 ? 5 : 2}}</view>\n        </cml>\n\n        </template>`,'web',{needTranJSX:true,needDelTemplate:true});\n      expect(result).to.equal(`<view type=\"base\">\\n          <view c-bind:click=\"handleClick\">base</view>\\n          <demo-com title=\"我是标题2\"></demo-com>\\n          <view>_cml{5 > 2 ? 5 : 2}lmc_</view>\\n        </view>`)\n        \n    })\n  });\n  describe('preParseMultiTemplate', function() {\n    it('test multi template delete template with blank template', function() {\n      let result = processTemplate.preParseMultiTemplate(`<template class=\"demo-com\" >\n        \n        </template>`,'web',{needTranJSX:true,needDelTemplate:true});\n      expect(result).to.equal(``)\n        \n    })\n  });\n  describe('analyzeTemplate', function() {\n    it('collect which build-in-tag is used in template', function() {\n      let options = {buildInComponents: {button: \"cml-buildin-button\"}};\n      expect(processTemplate.analyzeTemplate(`<view><button></button></view>`, options)).to.include.keys('usedBuildInTagMap');\n      expect(processTemplate.analyzeTemplate(``, options)).to.include.keys('buildInComponents')\n    })\n  });\n  describe('analyzeTemplate', function() {\n    it('collect which build-in-tag is used in template', function() {\n      let options = {buildInComponents: {button: \"cml-buildin-button\"}};\n      expect(processTemplate.analyzeTemplate(`<template><view><button></button></view></template>`, options)).to.include.keys('usedBuildInTagMap');\n      expect(processTemplate.analyzeTemplate(``, options)).to.include.keys('buildInComponents')\n    })\n  });\n  describe('analyzeTemplate', function() {\n    it('collect which build-in-tag is used in template', function() {\n      let options = {buildInComponents: {button: \"cml-buildin-button\"}};\n      expect(processTemplate.analyzeTemplate(`<template></template>`, options)).to.include.keys('buildInComponents');\n    })\n  });\n  describe('_operationGtLt', function() {\n    it('transform _operationGtLt', function() {\n      expect(processTemplate._operationGtLt(`{{value}}`)).to.equal(`{{value}}`)\n    })\n  });\n  describe('_deOperationGtLt', function() {\n    it('transform _deOperationGtLt', function() {\n      expect(processTemplate._operationGtLt(`{{value}}`)).to.equal(`{{value}}`)\n    })\n  });\n  describe('transformNativeEvent', function() {\n    it('transform transformNativeEvent', function() {\n      expect(processTemplate.transformNativeEvent(`<view v-on:click__CML_NATIVE_EVENTS__=\"handleClick\"=></view>`)).to.equal(`<view v-on:click.native=\"handleClick\"=></view>`)\n    })\n  });\n})\n"
  },
  {
    "path": "packages/chameleon-template-parse/test/common/utils.test.js",
    "content": "const utils = require('../../src/common/utils');\nvar expect = require('chai').expect;\nlet options = {lang: 'cml',\n  buildInComponents: {button: \"cml-buildin-button\", 'c-tab-item': 'cml-buildin-tab'},\n  filePath: '/User/Jim-W/didi/component/button.cml',\n  cmss: {\n    rem: true,\n    scale: 0.5,\n    remOptions: {\n    // base on 750px standard.\n      rootValue: 75,\n      // to leave 1px alone.\n      minPixelValue: 1.01\n    },\n    autoprefixOptions: {\n      browsers: ['> 0.1%', 'ios >= 8', 'not ie < 12']\n    }\n  },\n  usingComponents: [{\n    tagName: 'thirdComp1',\n    refUrl: '/path/to/ref1',\n    filePath: 'path/to/real1',\n    isNative: true\n  }, {\n    tagName: 'thirdComp2',\n    refUrl: '/path/to/ref2',\n    filePath: 'path/to/real2',\n    isNative: false\n  }]\n};\ndescribe('utils', function() {\n  describe('trimCurly', function() {\n    it('trim {{variable}} to variable', function() {\n      expect(utils.trimCurly(`{{name}}`)).to.equal(`name`)\n    })\n  });\n  // 驼峰化\n  describe('camelize', function() {\n    it('transform ab-c to abC', function() {\n      expect(utils.camelize(`abc-de-f`)).to.equal(`abcDeF`)\n    })\n  });\n  // 中划线化\n  describe('dasherise', function() {\n    it('transform  abcDeF to abc-de-f', function() {\n      expect(utils.dasherise(`abcDeF`)).to.equal(`abc-de-f`)\n    })\n  });\n  describe('analysisFor', function() {\n    it('transform  analysisFor ', function() {\n      expect(utils.analysisFor(`(item,index) in items`)).to.includes.keys(`item`)\n      expect(utils.analysisFor(`(item,index) in items`)).to.includes.keys(`index`)\n      expect(utils.analysisFor(`(item,index) in items`)).to.includes.keys(`list`)\n    })\n  });\n  describe('analysisFor', function() {\n    it('transform  analysisFor ', function() {\n      expect(utils.analysisFor(`item in items`)).to.includes.keys(`item`)\n      expect(utils.analysisFor(`item in items`)).to.includes.keys(`index`)\n      expect(utils.analysisFor(`item in items`)).to.includes.keys(`list`)\n    })\n  });\n  describe('getModelKey', function() {\n    it('trim {{ variable }} to variable', function() {\n      expect(utils.getModelKey(`{{ name }}`)).to.equal(`name`)\n    })\n  });\n  describe('titleLize', function() {\n    it(`titleLize a word asked for that the word cant't start with space character`, function() {\n      expect(utils.titleLize('name')).to.equal(`Name`)\n    })\n  });\n  describe('trim', function() {\n    it(`trim the word`, function() {\n      expect(utils.trim(' beTrimed ')).to.equal('beTrimed');\n    })\n  });\n  describe('isInlineStatementFn', function() {\n    it(`judge if the expression is inlineStatement`, function() {\n      expect(utils.isInlineStatementFn(`c-bind:click=\"handleClick(item,1,'1',  'index')\"`)).to.be.an('array');\n    })\n  });\n  describe('isInlineStatementFn', function() {\n    it(`judge if the expression is inlineStatement`, function() {\n      expect(utils.isInlineStatementFn(`c-bind:click=\"handleClick\"`)).to.not.be.ok;\n    })\n  })\n  describe('isReactive', function() {\n    it('judge if the arguments is reactive', function() {\n      expect(utils.isReactive(`'index'`)).to.be.an('array')\n    })\n  });\n  describe('isReactive', function() {\n    it('judge if the arguments is not reactive', function() {\n      expect(utils.isReactive(`'index'+1`)).to.not.be.ok;\n    })\n  });\n  describe('doublequot2singlequot', function() {\n    it('transform doublequot to singlequot', function() {\n      expect(utils.doublequot2singlequot(`\"name\"`)).to.equal(`'name'`)\n    })\n  });\n  describe('isMustacheReactive', function() {\n    it('judge if the value is Reactive', function() {\n      expect(utils.isMustacheReactive(`{{value}}`)).to.equal(true)\n    })\n  });\n  describe('isOnlySpaceContent', function() {\n    it('judge if the value is only space key', function() {\n      expect(utils.isOnlySpaceContent('   ')).to.be.ok;\n    })\n  });\n  describe('getReactiveValue', function() {\n    it('getReactiveValue for vue:such as {{value}} to (value)', function() {\n      expect(utils.getReactiveValue(`{{value1+value2}}`)).to.equal(`(value1+value2)`);\n    })\n  });\n  describe('getReactiveValue', function() {\n    it(`getReactiveValue for vue:such as main-{{index}} to 'main-'+(value)`, function() {\n      expect(utils.getReactiveValue(`main-{{value1+value2}}`)).to.equal(`'main-'+(value1+value2)`);\n    })\n  });\n  describe('getStaticValueFromMixinValue', function() {\n    it('getStaticValueFromMixinValue for cml', function() {\n      let result = utils.getStaticValueFromMixinValue(`a b{{true? 'cls1':'cls2'}} {{variable}}b c `);\n      expect(result).to.equal(`a b   b c `);\n    })\n  });\n  describe('transformWxDynamicStyleCpxToRpx', function() {\n    it('cml-syanx:transformWxDynamicStyleCpxToRpx for wx dynamic style', function() {\n      let result = utils.transformWxDynamicStyleCpxToRpx(`height:100cpx;{{'width:'+cpx+'cpx;'+'height:'+cpx2+'cpx;background-color:red;'}}height:200cpx;width:100cpx;`);\n      expect(result).to.equal(`height:100rpx;{{'width:' + cpx + 'rpx;' + 'height:' + cpx2 + 'rpx;background-color:red;'}}height:200rpx;width:100rpx;`);\n    })\n  });\n  describe('transformWxDynamicStyleCpxToRpx', function() {\n    it('vue-syanx:ransformWxDynamicStyleCpxToRpx for wx dynamic style', function() {\n      let result = utils.transformWxDynamicStyleCpxToRpx(`{{'width:'+cpx+'cpx;'+'height:'+cpx2+'cpx;background-color:red'}}`);\n      expect(result).to.equal(`{{'width:' + cpx + 'rpx;' + 'height:' + cpx2 + 'rpx;background-color:red'}}`);\n    })\n  });\n  // getInlineStatementArgs\n  describe('getInlineStatementArgs', function() {\n    it('getInlineStatementArgs', function() {\n      let result = utils.getInlineStatementArgs(\"1,'index'+1,$event,'item',index+1,item\");\n      expect(result).to.equal(`1,'index'+1,'$event','item',index+1,item`);\n    })\n  });\n  describe('isOriginTagOrNativeComp', function() {\n    it('isOriginTagOrNativeComp-nativecomp', function() {\n      let result = utils.isOriginTagOrNativeComp('thirdComp1', options);\n      expect(result).to.be.ok;\n    });\n    it('isOriginTagOrNativeComp-origin-tag', function() {\n      let result = utils.isOriginTagOrNativeComp('origin-tag', options);\n      expect(result).to.be.ok;\n    });\n    it('isOriginTagOrNativeComp-not-nativecomp', function() {\n      let result = utils.isOriginTagOrNativeComp('thirdComp2', options);\n      expect(result).to.be.not.ok;\n    });\n    it('isusualComp', function() {\n      let result = utils.isOriginTagOrNativeComp('view', options);\n      expect(result).to.be.not.ok;\n    });\n  });\n  describe('isNativeComp', function() {\n    it('isOriginTagOrNativeComp-nativecomp', function() {\n      let result = utils.isOriginTagOrNativeComp('thirdComp1', options);\n      expect(result).to.be.ok;\n    });\n    it('isOriginTagOrNativeComp-origin-tag', function() {\n      let result = utils.isNativeComp('origin-tag', options);\n      expect(result).to.be.not.ok;\n    });\n    it('isOriginTagOrNativeComp-not-nativecomp', function() {\n      let result = utils.isNativeComp('thirdComp2', options);\n      expect(result).to.be.not.not.ok;\n    });\n    it('isusualComp', function() {\n      let result = utils.isNativeComp('view', options);\n      expect(result).to.be.not.ok;\n    });\n  });\n  // 不是对应端的原生组件\n  describe('isNotNativeComponent', function() {\n    it('isNotNativeComponent-nativecomp', function() {\n      let result = utils.isNotNativeComponent('cml-buildin-button', options);\n      expect(result).to.be.ok;\n    });\n    it('isNotNativeComponent-not-nativecomp', function() {\n      let result = utils.isNotNativeComponent('thirdComp1', options);\n      expect(result).to.be.not.ok;\n    });\n    it('isNotNativeComponent', function() {\n      let result = utils.isNotNativeComponent('thirdComp2', options);\n      expect(result).to.be.ok;\n    });\n    it('isNotNativeComponent', function() {\n      let result = utils.isNotNativeComponent('view', options);\n      console.log('result-isNotNativeComponent', result)\n      expect(result).to.be.not.ok;\n    });\n  });\n})\n"
  },
  {
    "path": "packages/chameleon-template-parse/test/index.js",
    "content": "const compileTemplate = require('../src/index.js');\nconst source = `<template>\n<page title=\"Chameleon\">\n    <view class=\"page-home\">\n      <scroller height=\"{{-1}}\">\n        <view class=\"logo-row\">\n          <image class=\"logo-icon\" src=\"{{homeLogo}}\"></image>\n          <text class=\"logo-desc\">Chameleon</text>\n        </view>\n        <view class=\"list\">\n          <view class=\"list-cell\" c-for=\"{{pageList}}\" c-for-item=\"pageInfo\" c-bind:tap=\"onItemSelected(pageInfo.url)\">\n            <view class=\"content-item row\">\n              <image class=\"content-item-left-icon\" src=\"{{pageInfo.icon}}\"></image>\n              <view class=\"text-group\">\n                <text class=\"text-title\">{{pageInfo.title}}</text>\n                <text class=\"text-desc\">{{pageInfo.desc}}</text>\n              </view>         \n              <image class=\"content-item-right-icon\" src=\"{{arrowRight}}\"></image>\n            </view>\n          </view>    \n        </view>\n      </scroller>\n    </view>\n</page>\n</template>`\n// <view><text :class=\"{{true? 'bg-green':''}}\" >fafafa</text></view>\n// <view><text :class=\"true? 'bg-green':''\" >fafafa</text></view>\n//\n// let result = compileTemplate(source,'web');\nlet options = {lang: 'cml',\n  filePath: '/Users/didi/components.cml',\n  buildInComponents: {button: \"cml-buildin-button\"},\n  isInjectBaseStyle: false,\n  cmss: {\n    rem: true,\n    scale: 0.5,\n    remOptions: {\n    // base on 750px standard.\n      rootValue: 75,\n      // to leave 1px alone.\n      minPixelValue: 1.01\n    },\n    autoprefixOptions: {\n      browsers: ['> 0.1%', 'ios >= 8', 'not ie < 12']\n    }\n  },\n  usingComponents: [{\n    tagName: 'cube-button',\n    refUrl: '/path/to/ref1',\n    filePath: 'path/to/real1',\n    isNative: true\n  }, {\n    tagName: 'thirdComp2',\n    refUrl: '/path/to/ref2',\n    filePath: 'path/to/real2',\n    isNative: false\n  }]\n};\nlet analyzeOptions = { \n  buildInComponents:\n  { audio: 'cml-buildin-audio',\n    button: 'cml-buildin-button',\n    'carousel-item': 'cml-buildin-carousel-item',\n    carousel: 'cml-buildin-carousel',\n    checkbox: 'cml-buildin-checkbox',\n    input: 'cml-buildin-input',\n    aside: 'cml-buildin-aside',\n    col: 'cml-buildin-col',\n    container: 'cml-buildin-container',\n    foot: 'cml-buildin-foot',\n    head: 'cml-buildin-head',\n    main: 'cml-buildin-main',\n    row: 'cml-buildin-row',\n    list: 'cml-buildin-list',\n    'native-scroller': 'cml-buildin-native-scroller',\n    page: 'cml-buildin-page',\n    radio: 'cml-buildin-radio',\n    'refresh-loadding': 'cml-buildin-refresh-loadding',\n    'refresh-view': 'cml-buildin-refresh-view',\n    richtext: 'cml-buildin-richtext',\n    scroller: 'cml-buildin-scroller',\n    switch: 'cml-buildin-switch',\n    textarea: 'cml-buildin-textarea',\n    video: 'cml-buildin-video' },\n usedBuildInTagMap: {},\n cmlType: 'wx' }\n// console.log('before-compile', source);\n// let result_web = compileTemplate(source, 'web', options);\n// let result_weex = compileTemplate(source, 'weex', options);\n// let result_wx = compileTemplate(source, 'wx', options);\n// let result_baidu = compileTemplate(source, 'baidu', options);\n// // let result_alipay = compileTemplate(source, 'alipay', options);\n// console.log('result_web', result_web)\n// console.log('result_weex', result_weex)\n// console.log('result_wx', result_wx)\n// console.log('result_baidu', result_baidu)\n// console.log('result_alipay', result_alipay)\nconst {preParseMultiTemplate ,analyzeTemplate}= compileTemplate;\n// const result = preParseMultiTemplate(source,'web',{needTranJSX:true,needDelTemplate:true})\n// console.log('result',result)\nconst result2 = analyzeTemplate(source,analyzeOptions)\nconsole.log('result',result2)"
  },
  {
    "path": "packages/chameleon-template-parse/test/parser/cml.test.js",
    "content": "// cml 或者vue语法整体单元测试\nconst compileTemplate = require('../../src/index.js');\nconst expect = require('chai').expect;\n\nlet options = {lang: 'cml',\n  buildInComponents: {button: \"cml-buildin-button\"},\n  filePath: '/User/Jim-W/didi/component/button.cml',\n  isInjectBaseStyle: true,\n  cmss: {\n    rem: true,\n    scale: 0.5,\n    remOptions: {\n    // base on 750px standard.\n      rootValue: 75,\n      // to leave 1px alone.\n      minPixelValue: 1.01\n    },\n    autoprefixOptions: {\n      browsers: ['> 0.1%', 'ios >= 8', 'not ie < 12']\n    }\n  },\n  usingComponents: [{\n    tagName: 'thirdComp1',\n    refUrl: '/path/to/ref1',\n    filePath: 'path/to/real1',\n    isNative: true\n  }, {\n    tagName: 'thirdComp2',\n    refUrl: '/path/to/ref2',\n    filePath: 'path/to/real2',\n    isNative: false\n  }]\n};\ndescribe('parse-template-cml-all', function() {\n  // parse-no-source\n  describe('parse-no-source', function() {\n    let source = ``;\n    it('parse-no-source', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(source);\n    });\n  });\n  // parseTag\n  describe('parse-tag-transform', function() {\n    let source = `<view><button></button><thirdComp1></thirdComp1><thirdComp2></thirdComp2></view>`;\n    it('test-tag-transform', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\"></cml-buildin-button><thirdComp1 class=\" cml-base cml-thirdComp1\"></thirdComp1><thirdComp2 class=\" cml-base cml-thirdComp2\"></thirdComp2></div>`);\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\"></cml-buildin-button><thirdComp1 class=\" cml-view cml-thirdComp1\"></thirdComp1><thirdComp2 class=\" cml-view cml-thirdComp2\"></thirdComp2></view>`)\n    });\n  });\n  // directive c-model\n  describe('parse-directive-transform', function() {\n    let source = `<view><button c-model=\"{{  value1}}\"></button></view>`;\n    it('test-directive-comodel-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button v-on:input=\"_cmlModelEventProxy($event,\\'value1\\')\" v-bind:value=\"value1\" class=\" cml-base cml-button\"></cml-buildin-button></div>`);\n    });\n    it('test-directive-comodel-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button v-on:input=\"_cmlModelEventProxy($event,\\'value1\\')\" v-bind:value=\"value1\" class=\" cml-base cml-button\"></cml-buildin-button></div>`)\n    });\n    it('test-directive-comodel-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button data-modelkey=\"value1\" bindinput=\"_cmlModelEventProxy\" value=\"{{  value1}}\" class=\" cml-base cml-button\"></cml-buildin-button></view>`)\n    });\n    it('test-directive-comodel-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button data-modelkey=\"value1\" bindinput=\"_cmlModelEventProxy\" value=\"{{  value1}}\" class=\" cml-base cml-button\"></cml-buildin-button></view>`)\n    });\n    it('test-directive-comodel-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view class=\" cml-base cml-view cml-5766bf8a\"><view class=\" cml-base cml-view cml-5766bf8a\"><cml-buildin-button data-modelkey=\"value1\" data-eventinput=\"_cmlModelEventProxy\" onInput=\"_cmlModelEventProxy\" value=\"{{  value1}}\" class=\" cml-base cml-button cml-5766bf8a\"></cml-buildin-button></view></view>`)\n    });\n    it('test-directive-comodel-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button data-modelkey=\"value1\" bindinput=\"_cmlModelEventProxy\" value=\"{{  value1}}\" class=\" cml-base cml-button\"></cml-buildin-button></view>`)\n    });\n  });\n  // directive c-show\n  describe('parse-directive-transform', function() {\n    let source = `<view><button c-show=\"{{  value1}}\"></button></view>`;\n    it('test-directive-c-show-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\" v-show=\"  value1\"></cml-buildin-button></div>`);\n    });\n    it('test-directive-c-show-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\" v-bind:style=\"_cmlStyleProxy((\\'display:\\'+(  value1?\\'\\':\\'none\\')+\\';\\'+(  value1?\\'\\':\\'height:0px;width:0px;overflow:hidden\\')))\"></cml-buildin-button></div>`)\n    });\n    it('test-directive-c-show-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\" style=\"display:{{value1 ? \\'\\' : \\'none\\'}};{{value1 ? \\'\\' : \\'height:0px;width:0px;overflow:hidden\\'}}\"></cml-buildin-button></view>`)\n    });\n    it('test-directive-c-show-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\" style=\"display:{{value1 ? \\'\\' : \\'none\\'}};{{value1 ? \\'\\' : \\'height:0px;width:0px;overflow:hidden\\'}}\"></cml-buildin-button></view>`)\n    });\n    it('test-directive-c-show-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view class=\" cml-base cml-view cml-5766bf8a\"><view class=\" cml-base cml-view cml-5766bf8a\" style=\"display:{{value1 ? \\'\\' : \\'none\\'}};{{value1 ? \\'\\' : \\'height:0px;width:0px;overflow:hidden\\'}}\"><cml-buildin-button class=\" cml-base cml-button cml-5766bf8a\" style=\"display:{{value1 ? \\'\\' : \\'none\\'}};{{value1 ? \\'\\' : \\'height:0px;width:0px;overflow:hidden\\'}}\"></cml-buildin-button></view></view>`)\n    });\n    it('test-directive-c-show-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\" style=\"display:{{value1 ? \\'\\' : \\'none\\'}};{{value1 ? \\'\\' : \\'height:0px;width:0px;overflow:hidden\\'}}\"></cml-buildin-button></view>`)\n    });\n  });\n  // directive c-text\n  describe('parse-directive-transform', function() {\n    let source = `<view><button c-text=\"{{  value1}}\"></button></view>`;\n    it('test-directive-c-text-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\">{{value1}}</cml-buildin-button></div>`);\n    });\n    it('test-directive-c-text-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\">{{value1}}</cml-buildin-button></div>`)\n    });\n    it('test-directive-c-text-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\">{{value1}}</cml-buildin-button></view>`)\n    });\n    it('test-directive-c-text-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\">{{value1}}</cml-buildin-button></view>`)\n    });\n    it('test-directive-c-text-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view class=\" cml-base cml-view cml-5766bf8a\"><view class=\" cml-base cml-view cml-5766bf8a\"><cml-buildin-button class=\" cml-base cml-button cml-5766bf8a\">{{value1}}</cml-buildin-button></view></view>`)\n    });\n    it('test-directive-c-text-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\">{{value1}}</cml-buildin-button></view>`)\n    });\n  });\n  // directive c-if  c-else-if  c-else\n  describe('parse-directive-transform', function() {\n    let source = `<view><button c-if=\"{{  value1}}\"></button>\n    <view c-else-if=\"{{  value1}}\"></view>\n    <view c-else=\"{{  value1}}\"></view></view>`;\n    it('test-directive-c-condition-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button v-if=\"  value1\" class=\" cml-base cml-button\"></cml-buildin-button>\\n    <div v-else-if=\"  value1\" class=\" cml-base cml-view\"></div>\\n    <div v-else=\"  value1\" class=\" cml-base cml-view\"></div></div>`);\n    });\n    it('test-directive-c-condition-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button v-if=\"  value1\" class=\" cml-base cml-button\"></cml-buildin-button>\\n    <div v-else-if=\"  value1\" class=\" cml-base cml-view\"></div>\\n    <div v-else=\"  value1\" class=\" cml-base cml-view\"></div></div>`)\n    });\n    it('test-directive-c-condition-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button wx:if=\"{{  value1}}\" class=\" cml-base cml-button\"></cml-buildin-button>\\n    <view wx:elif=\"{{  value1}}\" class=\" cml-base cml-view\"></view>\\n    <view wx:else=\"{{  value1}}\" class=\" cml-base cml-view\"></view></view>`)\n    });\n    it('test-directive-c-condition-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button qq:if=\"{{  value1}}\" class=\" cml-base cml-button\"></cml-buildin-button>\\n    <view qq:elif=\"{{  value1}}\" class=\" cml-base cml-view\"></view>\\n    <view qq:else=\"{{  value1}}\" class=\" cml-base cml-view\"></view></view>`)\n    });\n    it('test-directive-c-condition-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view class=\" cml-base cml-view cml-5766bf8a\"><view a:if=\"{{  value1}}\" class=\" cml-base cml-view cml-5766bf8a\"><cml-buildin-button class=\" cml-base cml-button cml-5766bf8a\"></cml-buildin-button></view>\\n    <view a:elif=\"{{  value1}}\" class=\" cml-base cml-view cml-5766bf8a\"></view>\\n    <view a:else=\"{{  value1}}\" class=\" cml-base cml-view cml-5766bf8a\"></view></view>`)\n    });\n    it('test-directive-c-condition-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button s-if=\"  value1\" class=\" cml-base cml-button\"></cml-buildin-button>\\n    <view s-elif=\"  value1\" class=\" cml-base cml-view\"></view>\\n    <view s-else=\"  value1\" class=\" cml-base cml-view\"></view></view>`)\n    });\n  });\n  // directive c-for  c-for-index  c-for-item c-key\n  describe('parse-c-interation-transform', function() {\n    let source = `<view><view c-for=\"{{array}}\">{{item.id}}  </view></view>`;\n    it('test-directive-c-interator-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><div v-for=\"(item, index) in array\" class=\" cml-base cml-view\">{{item.id}}  </div></div>`);\n    });\n    it('test-directive-c-interator-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><div v-for=\"(item, index) in array\" class=\" cml-base cml-view\">{{item.id}}  </div></div>`)\n    });\n    it('test-directive-c-interator-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><view wx:for=\"{{array}}\" class=\" cml-base cml-view\">{{item.id}}  </view></view>`)\n    });\n    it('test-directive-c-interator-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view class=\" cml-base cml-view\"><view qq:for=\"{{array}}\" class=\" cml-base cml-view\">{{item.id}}  </view></view>`)\n    });\n    it('test-directive-c-interator-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view class=\" cml-base cml-view cml-5766bf8a\"><view a:for=\"{{array}}\" class=\" cml-base cml-view cml-5766bf8a\">{{item.id}}  </view></view>`)\n    });\n    it('test-directive-c-interator-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view class=\" cml-base cml-view\"><view s-for=\"array\" class=\" cml-base cml-view\">{{item.id}}  </view></view>`)\n    });\n  });\n  // directive c-for  c-for-index  c-for-item c-key\n  describe('parse-directive-transform', function() {\n    let source = `<view><view c-for=\"{{array}}\" c-key=\"id\">{{item.id}}  </view></view>`;\n    it('test-directive-c-interator-key-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><div v-for=\"(item, index) in array\" v-bind:key=\"item.id\" class=\" cml-base cml-view\">{{item.id}}  </div></div>`);\n    });\n    it('test-directive-c-interator-key-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><div v-for=\"(item, index) in array\" v-bind:key=\"item.id\" class=\" cml-base cml-view\">{{item.id}}  </div></div>`)\n    });\n    it('test-directive-c-interator-key-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><view wx:for=\"{{array}}\" wx:key=\"id\" class=\" cml-base cml-view\">{{item.id}}  </view></view>`)\n    });\n    it('test-directive-c-interator-key-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view class=\" cml-base cml-view\"><view qq:for=\"{{array}}\" qq:key=\"id\" class=\" cml-base cml-view\">{{item.id}}  </view></view>`)\n    });\n    it('test-directive-c-interator-key-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view class=\" cml-base cml-view cml-5766bf8a\"><view a:for=\"{{array}}\" a:key=\"id\" class=\" cml-base cml-view cml-5766bf8a\">{{item.id}}  </view></view>`)\n    });\n    it('test-directive-c-interator-key-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view class=\" cml-base cml-view\"><view s-for=\"array\" s-key=\"id\" class=\" cml-base cml-view\">{{item.id}}  </view></view>`)\n    });\n  });\n  // directive c-for  c-for-index  c-for-item c-key:*this\n  describe('parse-directive-transform', function() {\n    let source = `<view><view c-for=\"{{array}}\" c-key=\"*this\">{{item.id}}  </view></view>`;\n    it('test-directive-c-interator-*this-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><div v-for=\"(item, index) in array\" v-bind:key=\"index\" class=\" cml-base cml-view\">{{item.id}}  </div></div>`);\n    });\n    it('test-directive-c-interator-*this-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><div v-for=\"(item, index) in array\" v-bind:key=\"index\" class=\" cml-base cml-view\">{{item.id}}  </div></div>`)\n    });\n    it('test-directive-c-interator-*this-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><view wx:for=\"{{array}}\" wx:key=\"*this\" class=\" cml-base cml-view\">{{item.id}}  </view></view>`)\n    });\n    it('test-directive-c-interator-*this-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view class=\" cml-base cml-view\"><view qq:for=\"{{array}}\" qq:key=\"*this\" class=\" cml-base cml-view\">{{item.id}}  </view></view>`)\n    });\n    it('test-directive-c-interator-*this-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view class=\" cml-base cml-view cml-5766bf8a\"><view a:for=\"{{array}}\" a:key=\"*this\" class=\" cml-base cml-view cml-5766bf8a\">{{item.id}}  </view></view>`)\n    });\n    it('test-directive-c-interator-*this-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view class=\" cml-base cml-view\"><view s-for=\"array\" s-key=\"*this\" class=\" cml-base cml-view\">{{item.id}}  </view></view>`)\n    });\n  });\n  // parseEvent\n  describe('parse-event-transform', function() {\n    let source = `<view><origin-tag c-bind:tap=\"handleClick\"></origin-tag><thirdComp1 c-bind:tap=\"handleClick(1,item,'str')\"></thirdComp1><thirdComp2 c-bind:touchstart=\"handleClick(1,item,'str',$event)\"></thirdComp2><view c-bind:touchend=\"handleClick()\" c-bind:touchmove=\"handleClick\"></view></view>`;\n    it('test-event-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><tag v-on:tap=\"handleClick\" class=\" cml-base cml-origin-tag\"></tag><thirdComp1 v-on:tap=\"handleClick(1,item,'str')\" class=\" cml-base cml-thirdComp1\"></thirdComp1><thirdComp2 v-on:touchstart.native=\"_cmlInline('handleClick',false,1,item,'str',$event)\" class=\" cml-base cml-thirdComp2\"></thirdComp2><div v-on:touchend=\"_cmlInline('handleClick',false)\" v-on:touchmove=\"_cmlEventProxy($event,'handleClick',false)\" class=\" cml-base cml-view\"></div></div>`);\n    });\n    it('test-event-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><tag v-on:click=\"handleClick\" class=\" cml-base cml-origin-tag\"></tag><thirdComp1 v-on:click=\"handleClick(1,item,'str')\" class=\" cml-base cml-thirdComp1\"></thirdComp1><thirdComp2 v-on:touchstart.native=\"_cmlInline('handleClick',false,1,item,'str',$event)\" class=\" cml-base cml-thirdComp2\"></thirdComp2><div v-on:touchend=\"_cmlInline('handleClick',false)\" v-on:touchmove=\"_cmlEventProxy($event,'handleClick',false)\" class=\" cml-base cml-view\"></div></div>`);\n    });\n    it('test-event-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><tag bindtap=\"handleClick\" class=\" cml-base cml-origin-tag\"></tag><thirdComp1 bindtap=\"handleClick(1,item,'str')\" class=\" cml-view cml-thirdComp1\"></thirdComp1><thirdComp2 bindtouchstart=\"_cmlInline\" data-eventtouchstart=\"{{['handleClick',1,item,'str','$event']}}\" class=\" cml-view cml-thirdComp2\"></thirdComp2><view bindtouchend=\"_cmlInline\" data-eventtouchend=\"{{['handleClick']}}\" bindtouchmove=\"_cmlEventProxy\" data-eventtouchmove=\"{{['handleClick']}}\" class=\" cml-base cml-view\"></view></view>`);\n    });\n    it('test-event-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view class=\" cml-base cml-view\"><tag bindtap=\"handleClick\" class=\" cml-base cml-origin-tag\"></tag><thirdComp1 bindtap=\"handleClick(1,item,'str')\" class=\" cml-view cml-thirdComp1\"></thirdComp1><thirdComp2 bindtouchstart=\"_cmlInline\" data-eventtouchstart=\"{{['handleClick',1,item,'str','$event']}}\" class=\" cml-view cml-thirdComp2\"></thirdComp2><view bindtouchend=\"_cmlInline\" data-eventtouchend=\"{{['handleClick']}}\" bindtouchmove=\"_cmlEventProxy\" data-eventtouchmove=\"{{['handleClick']}}\" class=\" cml-base cml-view\"></view></view>`);\n    });\n    it('test-event-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view class=\" cml-base cml-view cml-5766bf8a\"><tag onTap=\"handleClick\" class=\" cml-base cml-origin-tag cml-5766bf8a\"></tag><view onTap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" class=\" cml-base cml-view cml-5766bf8a\"><thirdComp1 onTap=\"handleClick(1,item,'str')\" class=\" cml-base cml-thirdComp1 cml-5766bf8a\"></thirdComp1></view><view onTouchStart=\"_cmlInline\" data-eventtouchstart=\"{{['handleClick',1,item,'str','$event']}}\" class=\" cml-base cml-view cml-5766bf8a\"><thirdComp2 onTouchStart=\"_cmlInline\" data-eventtouchstart=\"{{['handleClick',1,item,'str','$event']}}\" class=\" cml-base cml-thirdComp2 cml-5766bf8a\"></thirdComp2></view><view onTouchEnd=\"_cmlInline\" data-eventtouchend=\"{{['handleClick']}}\" onTouchMove=\"_cmlEventProxy\" data-eventtouchmove=\"{{['handleClick']}}\" class=\" cml-base cml-view cml-5766bf8a\"></view></view>`);\n    });\n    it('test-event-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view class=\" cml-base cml-view\"><tag bindtap=\"handleClick\" class=\" cml-base cml-origin-tag\"></tag><thirdComp1 bindtap=\"handleClick(1,item,'str')\" class=\" cml-view cml-thirdComp1\"></thirdComp1><thirdComp2 bindtouchstart=\"_cmlInline\" data-eventtouchstart=\"{{['handleClick',1,item,'str','$event']}}\" class=\" cml-view cml-thirdComp2\"></thirdComp2><view bindtouchend=\"_cmlInline\" data-eventtouchend=\"{{['handleClick']}}\" bindtouchmove=\"_cmlEventProxy\" data-eventtouchmove=\"{{['handleClick']}}\" class=\" cml-base cml-view\"></view></view>`);\n    });\n  });\n  // parseEvent-stop\n  describe('parse-event-transform-stop', function() {\n    let source = `<view><origin-tag c-catch:tap=\"handleClick\"></origin-tag><thirdComp1 c-catch:tap=\"handleClick(1,item,'str')\"></thirdComp1><thirdComp2 c-catch:tap=\"handleClick(1,item,'str')\"></thirdComp2></view>`;\n    it('test-event-transform-web-stop', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><tag v-on:tap=\"handleClick\" class=\" cml-base cml-origin-tag\"></tag><thirdComp1 v-on:tap=\"handleClick(1,item,'str')\" class=\" cml-base cml-thirdComp1\"></thirdComp1><thirdComp2 v-on:tap.native=\"_cmlInline('handleClick',true,1,item,'str')\" class=\" cml-base cml-thirdComp2\"></thirdComp2></div>`);\n    });\n    it('test-event-transform-weex-stop', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><tag v-on:click=\"handleClick\" class=\" cml-base cml-origin-tag\"></tag><thirdComp1 v-on:click=\"handleClick(1,item,'str')\" class=\" cml-base cml-thirdComp1\"></thirdComp1><thirdComp2 v-on:click.native=\"_cmlInline('handleClick',true,1,item,'str')\" class=\" cml-base cml-thirdComp2\"></thirdComp2></div>`);\n    });\n    it('test-event-transform-wx-stop', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><tag catchtap=\"handleClick\" class=\" cml-base cml-origin-tag\"></tag><thirdComp1 catchtap=\"handleClick(1,item,'str')\" class=\" cml-view cml-thirdComp1\"></thirdComp1><thirdComp2 catchtap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" class=\" cml-view cml-thirdComp2\"></thirdComp2></view>`);\n    });\n    it('test-event-transform-qq-stop', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view class=\" cml-base cml-view\"><tag catchtap=\"handleClick\" class=\" cml-base cml-origin-tag\"></tag><thirdComp1 catchtap=\"handleClick(1,item,'str')\" class=\" cml-view cml-thirdComp1\"></thirdComp1><thirdComp2 catchtap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" class=\" cml-view cml-thirdComp2\"></thirdComp2></view>`);\n    });\n    it('test-event-transform-baidu-stop', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view class=\" cml-base cml-view\"><tag catchtap=\"handleClick\" class=\" cml-base cml-origin-tag\"></tag><thirdComp1 catchtap=\"handleClick(1,item,'str')\" class=\" cml-view cml-thirdComp1\"></thirdComp1><thirdComp2 catchtap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" class=\" cml-view cml-thirdComp2\"></thirdComp2></view>`);\n    });\n    it('test-event-transform-alipay-stop', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view class=\" cml-base cml-view cml-5766bf8a\"><tag catchTap=\"handleClick\" class=\" cml-base cml-origin-tag cml-5766bf8a\"></tag><view catchTap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" class=\" cml-base cml-view cml-5766bf8a\"><thirdComp1 catchTap=\"handleClick(1,item,'str')\" class=\" cml-base cml-thirdComp1 cml-5766bf8a\"></thirdComp1></view><view catchTap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" class=\" cml-base cml-view cml-5766bf8a\"><thirdComp2 catchTap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" class=\" cml-base cml-thirdComp2 cml-5766bf8a\"></thirdComp2></view></view>`);\n    });\n\n  });\n  // 非原生组件外面包的view要添加原生事件\n  describe('parse-event-transform-alicomponent', function() {\n    let source = `<view><thirdComp2 c-catch:tap=\"handleClick(1,item,'str')\" data-args=\"1\" c-bind:touchstart=\"handleClick(1,item,'str')\"></thirdComp2></view>`;\n    it('test-event-transform-alipay-alicomponent', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view class=\" cml-base cml-view cml-5766bf8a\"><view catchTap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" data-args=\"1\" onTouchStart=\"_cmlInline\" data-eventtouchstart=\"{{['handleClick',1,item,'str']}}\" class=\" cml-base cml-view cml-5766bf8a\"><thirdComp2 catchTap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" data-args=\"1\" onTouchStart=\"_cmlInline\" data-eventtouchstart=\"{{['handleClick',1,item,'str']}}\" class=\" cml-base cml-thirdComp2 cml-5766bf8a\"></thirdComp2></view></view>`);\n    });\n\n  });\n  // class\n  describe('parse-class-transform', function() {\n    let source = `<view><button class=\"cls1 {{true ? 'cls2':'cls3'}}\"></button><thirdComp1 class=\"cls4\"></thirdComp1></view>`;\n    it('parse-class-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button v-bind:class=\"(\\'cls1 \\'+(true ? \\'cls2\\':\\'cls3\\')+\\'  cml-base cml-button\\')\"></cml-buildin-button><thirdComp1 class=\"cls4  cml-base cml-thirdComp1\"></thirdComp1></div>`);\n    });\n    it('parse-class-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button v-bind:class=\"_weexClassProxy(' cml-base cml-button cls1 '+(true ? 'cls2':'cls3'))\"></cml-buildin-button><thirdComp1 v-bind:class=\"_weexClassProxy(' cml-base cml-thirdComp1 cls4')\"></thirdComp1></div>`);\n    });\n    // wx baidu alipay\n    it('parse-class-miniapp', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button class=\"cls1 {{true ? \\'cls2\\':\\'cls3\\'}}  cml-base cml-button\"></cml-buildin-button><thirdComp1 class=\"cls4  cml-view cml-thirdComp1\"></thirdComp1></view>`);\n    });\n  });\n  // style 以及 miniappp端cpx动态测试\n  describe('parse-style-transform', function() {\n    let source = `<view><button style=\"width:{{cpx}}cpx;height:100cpx;border-width:200cpx;{{'width:'+cpx+'cpx'}}\"></button><thirdComp1 style=\"{{'width:'+cpx+'cpx;'+'height:'+cpx2+'cpx;background-color:red'}}\"></thirdComp1></view>`;\n    it('parse-style-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button v-bind:style=\"_cmlStyleProxy((\\'width:\\'+(cpx)+\\'cpx;height:100cpx;border-width:200cpx;\\'+(\\'width:\\'+cpx+\\'cpx\\')),{\\'rem\\':true,\\'scale\\':0.5,\\'remOptions\\':{\\'rootValue\\':75,\\'minPixelValue\\':1.01},\\'autoprefixOptions\\':{\\'browsers\\':[\\'> 0.1%\\',\\'ios >= 8\\',\\'not ie < 12\\']}})\" class=\" cml-base cml-button\"></cml-buildin-button><thirdComp1 v-bind:style=\"_cmlStyleProxy(((\\'width:\\'+cpx+\\'cpx;\\'+\\'height:\\'+cpx2+\\'cpx;background-color:red\\')),{\\'rem\\':true,\\'scale\\':0.5,\\'remOptions\\':{\\'rootValue\\':75,\\'minPixelValue\\':1.01},\\'autoprefixOptions\\':{\\'browsers\\':[\\'> 0.1%\\',\\'ios >= 8\\',\\'not ie < 12\\']}})\" class=\" cml-base cml-thirdComp1\"></thirdComp1></div>`);\n    });\n    it('parse-style-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button v-bind:style=\"_cmlStyleProxy((\\'width:\\'+(cpx)+\\'cpx;height:100cpx;border-width:200cpx;\\'+(\\'width:\\'+cpx+\\'cpx\\')))\" class=\" cml-base cml-button\"></cml-buildin-button><thirdComp1 v-bind:style=\"_cmlStyleProxy(((\\'width:\\'+cpx+\\'cpx;\\'+\\'height:\\'+cpx2+\\'cpx;background-color:red\\')))\" class=\" cml-base cml-thirdComp1\"></thirdComp1></div>`);\n    });\n    // wx baidu alipay\n    it('parse-style-miniapp', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button style=\"width:{{cpx}}rpx;height:100rpx;border-width:200rpx;{{\\'width:\\' + cpx + \\'rpx\\'}}\" class=\" cml-base cml-button\"></cml-buildin-button><thirdComp1 style=\"{{\\'width:\\' + cpx + \\'rpx;\\' + \\'height:\\' + cpx2 + \\'rpx;background-color:red\\'}}\" class=\" cml-view cml-thirdComp1\"></thirdComp1></view>`);\n    });\n  });\n  // ref  动态\n  describe('parse-ref-transform-dynamic', function() {\n    let source = `<view id=\"value\" ref='{{ refVlaue }}'></view>`;\n    it('test-ref-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div id=\"value\" v-bind:ref=\"( refVlaue )\" class=\" cml-base cml-view\"></div>`);\n    });\n    it('test-ref-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div id=\"value\" v-bind:ref=\"( refVlaue )\" class=\" cml-base cml-view\"></div>`);\n    });\n    it('test-ref-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view id=\"{{ refVlaue }}\" class=\" cml-base cml-view  _cml_ref_lmc_\"></view>`);\n    });\n    it('test-ref-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view id=\"{{ refVlaue }}\" class=\" cml-base cml-view  _cml_ref_lmc_\"></view>`);\n    });\n    it('test-ref-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view id=\"{{ refVlaue }}\" class=\" cml-base cml-view  _cml_ref_lmc_\"></view>`);\n    });\n    it('test-ref-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view id=\"{{ refVlaue }}\" class=\" cml-base cml-view cml-5766bf8a  _cml_ref_lmc_\"></view>`);\n    });\n  });\n  // ref  静态\n  describe('parse-ref-transform-static', function() {\n    let source = `<view id=\"value\" ref=' refVlaue '></view>`;\n    it('test-ref-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div id=\"value\" ref=\" refVlaue \" class=\" cml-base cml-view\"></div>`);\n    });\n    it('test-ref-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div id=\"value\" ref=\" refVlaue \" class=\" cml-base cml-view\"></div>`);\n    });\n    it('test-ref-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view id=\" refVlaue \" class=\" cml-base cml-view  _cml_ref_lmc_\"></view>`);\n    });\n    it('test-ref-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view id=\" refVlaue \" class=\" cml-base cml-view  _cml_ref_lmc_\"></view>`);\n    });\n    it('test-ref-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view id=\" refVlaue \" class=\" cml-base cml-view  _cml_ref_lmc_\"></view>`);\n    });\n    it('test-ref-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view id=\" refVlaue \" class=\" cml-base cml-view cml-5766bf8a  _cml_ref_lmc_\"></view>`);\n    });\n  });\n  // component is\n  describe('parse-component-is-transform', function() {\n    let source = `<component is=\"{{currentComp}}\" shrinkcomponents=\"comp1,comp2\" image-src=\"{{chameleonSrc}}\" title=\"this is title\" c-bind:click=\"handleClick()\" c-bind:userEvent=\"handleUserEvent\" c-bind:lowerevent=\"handleLowerEvent(1,$event)\"></component>`;\n    it('test-component-is-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<component v-bind:is=\"(currentComp)\" shrinkcomponents=\"comp1,comp2\" v-bind:image-src=\"(chameleonSrc)\" title=\"this is title\" v-on:click.native=\"_cmlInline('handleClick',false)\" v-on:userEvent=\"_cmlEventProxy($event,'handleUserEvent',false)\" v-on:lowerevent=\"_cmlInline('handleLowerEvent',false,1,$event)\" class=\" cml-base cml-component\"></component>`);\n    });\n    it('test-component-is-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<component v-bind:is=\"(currentComp)\" shrinkcomponents=\"comp1,comp2\" v-bind:image-src=\"(chameleonSrc)\" title=\"this is title\" v-on:click.native=\"_cmlInline('handleClick',false)\" v-on:userEvent=\"_cmlEventProxy($event,'handleUserEvent',false)\" v-on:lowerevent=\"_cmlInline('handleLowerEvent',false,1,$event)\" class=\" cml-base cml-component\"></component>`);\n    });\n    it('test-component-is-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<comp2 wx:if=\"{{currentComp === \\'comp2\\'}}\" is=\"{{currentComp}}\" shrinkcomponents=\"comp1,comp2\" image-src=\"{{chameleonSrc}}\" title=\"this is title\" bindtap=\"_cmlInline\" data-eventtap=\"{{[\\'handleClick\\']}}\" binduserEvent=\"_cmlEventProxy\" data-eventuserevent=\"{{[\\'handleUserEvent\\']}}\" bindlowerevent=\"_cmlInline\" data-eventlowerevent=\"{{[\\'handleLowerEvent\\',1,\\'$event\\']}}\" class=\" cml-base cml-component  cml-base cml-comp2\"></comp2>;\\n<comp1 wx:if=\"{{currentComp === \\'comp1\\'}}\" is=\"{{currentComp}}\" shrinkcomponents=\"comp1,comp2\" image-src=\"{{chameleonSrc}}\" title=\"this is title\" bindtap=\"_cmlInline\" data-eventtap=\"{{[\\'handleClick\\']}}\" binduserEvent=\"_cmlEventProxy\" data-eventuserevent=\"{{[\\'handleUserEvent\\']}}\" bindlowerevent=\"_cmlInline\" data-eventlowerevent=\"{{[\\'handleLowerEvent\\',1,\\'$event\\']}}\" class=\" cml-base cml-component  cml-base cml-comp1\"></comp1>`);\n    });\n    it('test-component-is-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<comp2 qq:if=\"{{currentComp === \\'comp2\\'}}\" is=\"{{currentComp}}\" shrinkcomponents=\"comp1,comp2\" image-src=\"{{chameleonSrc}}\" title=\"this is title\" bindtap=\"_cmlInline\" data-eventtap=\"{{[\\'handleClick\\']}}\" binduserEvent=\"_cmlEventProxy\" data-eventuserevent=\"{{[\\'handleUserEvent\\']}}\" bindlowerevent=\"_cmlInline\" data-eventlowerevent=\"{{[\\'handleLowerEvent\\',1,\\'$event\\']}}\" class=\" cml-base cml-component  cml-base cml-comp2\"></comp2>;\\n<comp1 qq:if=\"{{currentComp === \\'comp1\\'}}\" is=\"{{currentComp}}\" shrinkcomponents=\"comp1,comp2\" image-src=\"{{chameleonSrc}}\" title=\"this is title\" bindtap=\"_cmlInline\" data-eventtap=\"{{[\\'handleClick\\']}}\" binduserEvent=\"_cmlEventProxy\" data-eventuserevent=\"{{[\\'handleUserEvent\\']}}\" bindlowerevent=\"_cmlInline\" data-eventlowerevent=\"{{[\\'handleLowerEvent\\',1,\\'$event\\']}}\" class=\" cml-base cml-component  cml-base cml-comp1\"></comp1>`);\n    });\n    it('test-component-is-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<comp2 s-if=\"{{currentComp === \\'comp2\\'}}\" is=\"{{currentComp}}\" shrinkcomponents=\"comp1,comp2\" image-src=\"{{chameleonSrc}}\" title=\"this is title\" bindtap=\"_cmlInline\" data-eventtap=\"{{[\\'handleClick\\']}}\" binduserEvent=\"_cmlEventProxy\" data-eventuserevent=\"{{[\\'handleUserEvent\\']}}\" bindlowerevent=\"_cmlInline\" data-eventlowerevent=\"{{[\\'handleLowerEvent\\',1,\\'$event\\']}}\" class=\" cml-base cml-component  cml-base cml-comp2\"></comp2>;\\n<comp1 s-if=\"{{currentComp === \\'comp1\\'}}\" is=\"{{currentComp}}\" shrinkcomponents=\"comp1,comp2\" image-src=\"{{chameleonSrc}}\" title=\"this is title\" bindtap=\"_cmlInline\" data-eventtap=\"{{[\\'handleClick\\']}}\" binduserEvent=\"_cmlEventProxy\" data-eventuserevent=\"{{[\\'handleUserEvent\\']}}\" bindlowerevent=\"_cmlInline\" data-eventlowerevent=\"{{[\\'handleLowerEvent\\',1,\\'$event\\']}}\" class=\" cml-base cml-component  cml-base cml-comp1\"></comp1>`);\n    });\n    it('test-component-is-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<comp2 a:if=\"{{currentComp === \\'comp2\\'}}\" is=\"{{currentComp}}\" shrinkcomponents=\"comp1,comp2\" image-src=\"{{chameleonSrc}}\" title=\"this is title\" onTap=\"_cmlInline\" data-eventtap=\"{{[\\'handleClick\\']}}\" onUserEvent=\"_cmlEventProxy\" data-eventuserevent=\"{{[\\'handleUserEvent\\']}}\" onLowerevent=\"_cmlInline\" data-eventlowerevent=\"{{[\\'handleLowerEvent\\',1,\\'$event\\']}}\" class=\" cml-base cml-component cml-5766bf8a  cml-base cml-comp2 cml-5766bf8a\"></comp2>;\\n<comp1 a:if=\"{{currentComp === \\'comp1\\'}}\" is=\"{{currentComp}}\" shrinkcomponents=\"comp1,comp2\" image-src=\"{{chameleonSrc}}\" title=\"this is title\" onTap=\"_cmlInline\" data-eventtap=\"{{[\\'handleClick\\']}}\" onUserEvent=\"_cmlEventProxy\" data-eventuserevent=\"{{[\\'handleUserEvent\\']}}\" onLowerevent=\"_cmlInline\" data-eventlowerevent=\"{{[\\'handleLowerEvent\\',1,\\'$event\\']}}\" class=\" cml-base cml-component cml-5766bf8a  cml-base cml-comp1 cml-5766bf8a\"></comp1>`);\n    });\n  });\n\n  // animation\n  describe('parse-c-animation-transform', function() {\n    let source = `<view c-animation='{{ animationData }}'></view>`;\n    it('test-c-animation-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div v-animation=\" animationData \" class=\" cml-base cml-view\"></div>`);\n    });\n    it('test-c-animation-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div v-animation=\" animationData \" class=\" cml-base cml-view\"></div>`);\n    });\n    it('test-c-animation-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view animation=\"{{ animationData }}\" bindtransitionend=\"_cmlInline\" data-eventtransitionend=\"{{['_animationCb','animationData','$event']}}\" class=\" cml-base cml-view\"></view>`);\n    });\n    it('test-c-animation-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view animation=\"{{ animationData }}\" bindtransitionend=\"_cmlInline\" data-eventtransitionend=\"{{['_animationCb','animationData','$event']}}\" class=\" cml-base cml-view\"></view>`);\n    });\n    it('test-c-animation-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view animation=\"{{ animationData }}\" bindtransitionend=\"_cmlInline\" data-eventtransitionend=\"{{['_animationCb','animationData','$event']}}\" class=\" cml-base cml-view\"></view>`);\n    });\n    it('test-c-animation-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view animation=\"{{( animationData ).actions}}\" onTransitionend=\"_cmlInline\" data-eventtransitionend=\"{{['_animationCb','animationData','$event']}}\" class=\" cml-base cml-view cml-5766bf8a\"></view>`);\n    });\n  });\n  // attribute\n  describe('parse-attribute-transform', function() {\n    let source = `<view prop1=\"static\" prop2=\"{{dynamic}}\"></view>`;\n    it('test-attribute-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div prop1=\"static\" v-bind:prop2=\"(dynamic)\" class=\" cml-base cml-view\"></div>`);\n    });\n    it('test-attribute-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div prop1=\"static\" v-bind:prop2=\"(dynamic)\" class=\" cml-base cml-view\"></div>`);\n    });\n    it('test-attribute-transform-miniapp', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view prop1=\"static\" prop2=\"{{dynamic}}\" class=\" cml-base cml-view\"></view>`);\n    });\n  })\n  // 各种 <  > 的转化\n  describe('parse-gtlt-transform', function() {\n    let source = `<view><view prop=\"{{dynamic}}\" id=\"{{5 < 6 ? '5':'6'}}\">{{ 5 > 6 ? 'this is 5':'this is 6'}}</view><view name=\"{{5 < 6?'7':'8'}}\"></view></view>`;\n    it('test-gtlt-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><div v-bind:prop=\"(dynamic)\" v-bind:id=\"(5 < 6 ? \\'5\\':\\'6\\')\" class=\" cml-base cml-view\">{{5 > 6 ? \\'this is 5\\' : \\'this is 6\\'}}</div><div v-bind:name=\"(5 < 6?\\'7\\':\\'8\\')\" class=\" cml-base cml-view\"></div></div>`);\n    });\n    it('test-gtlt-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><div v-bind:prop=\"(dynamic)\" v-bind:id=\"(5 < 6 ? \\'5\\':\\'6\\')\" class=\" cml-base cml-view\">{{5 > 6 ? \\'this is 5\\' : \\'this is 6\\'}}</div><div v-bind:name=\"(5 < 6?\\'7\\':\\'8\\')\" class=\" cml-base cml-view\"></div></div>`);\n    });\n    it('test-gtlt-transform-miniapp', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><view prop=\"{{dynamic}}\" id=\"{{5 < 6 ? \\'5\\':\\'6\\'}}\" class=\" cml-base cml-view\">{{5 > 6 ? \\'this is 5\\' : \\'this is 6\\'}}</view><view name=\"{{5 < 6?\\'7\\':\\'8\\'}}\" class=\" cml-base cml-view\"></view></view>`);\n    });\n  });\n  describe('test-alipaycomponent-wraped-cml', function() {\n    let source = `<view><thirdComp2 c-bind:click=\"handleClick\" data-a=\"a\" c-catch:touchstart=\"handleStart\" ></thirdComp2></view>`;\n    it('test-alipaycomponent-wraped', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view class=\" cml-base cml-view cml-5766bf8a\"><view onTap=\"_cmlEventProxy\" data-eventtap=\"{{['handleClick']}}\" data-a=\"a\" catchTouchStart=\"_cmlEventProxy\" data-eventtouchstart=\"{{['handleStart']}}\" class=\" cml-base cml-view cml-5766bf8a\"><thirdComp2 onTap=\"_cmlEventProxy\" data-eventtap=\"{{['handleClick']}}\" data-a=\"a\" catchTouchStart=\"_cmlEventProxy\" data-eventtouchstart=\"{{['handleStart']}}\" class=\" cml-base cml-thirdComp2 cml-5766bf8a\"></thirdComp2></view></view>`);\n    });\n  });\n  describe('test-class-noinjected', function() {\n    let source = `<view ><view class=\"cls1\"><thirdComp2 class=\"cls2\"></thirdComp2></view></view>`;\n    let cpOptions = JSON.parse(JSON.stringify(options));\n    cpOptions.isInjectBaseStyle = false;\n    it('test-class-noinjected-web', function() {\n      expect(compileTemplate(source, 'web', cpOptions).source).to.equal(`<div><div class=\"cls1 \"><thirdComp2 class=\"cls2 \"></thirdComp2></div></div>`);\n    });\n    it('test-class-noinjected-weex', function() {\n      expect(compileTemplate(source, 'weex', cpOptions).source).to.equal(`<div><div v-bind:class=\"_weexClassProxy(' cls1')\"><thirdComp2 v-bind:class=\"_weexClassProxy(' cls2')\"></thirdComp2></div></div>`);\n    });\n    it('test-class-noinjected-alipay', function() {\n      expect(compileTemplate(source, 'alipay', cpOptions).source).to.equal(`<view class=\" cml-5766bf8a\"><view class=\"cls1  cml-5766bf8a\"><view class=\"cls2  cml-5766bf8a\"><thirdComp2 class=\"cls2  cml-5766bf8a\"></thirdComp2></view></view></view>`);\n    });\n    it('test-class-noinjected-baidu', function() {\n      expect(compileTemplate(source, 'baidu', cpOptions).source).to.equal(`<view><view class=\"cls1 \"><thirdComp2 class=\"cls2 \"></thirdComp2></view></view>`);\n    });\n    it('test-class-noinjected-wx', function() {\n      expect(compileTemplate(source, 'wx', cpOptions).source).to.equal(`<view><view class=\"cls1 \"><thirdComp2 class=\"cls2 \"></thirdComp2></view></view>`);\n    });\n    it('test-class-noinjected-qq', function() {\n      expect(compileTemplate(source, 'qq', cpOptions).source).to.equal(`<view><view class=\"cls1 \"><thirdComp2 class=\"cls2 \"></thirdComp2></view></view>`);\n    });\n  });\n\n\n})\n"
  },
  {
    "path": "packages/chameleon-template-parse/test/parser/index.cml.test.js",
    "content": "\n// cml单个语法的单元测试\n\n\nconst babylon = require('babylon');\nconst traverse = require('@babel/traverse')[\"default\"];\nconst generate = require('@babel/generator')[\"default\"];\nconst parseTemplate = require('../../src/parser/index.js');\nconst expect = require('chai').expect;\nlet options = {lang: 'cml',\n  buildInComponents: {button: \"cml-buildin-button\"},\n  filePath: '/User/Jim-W/didi/component/button.cml',\n  isInjectBaseStyle: true,\n  cmss: {\n    rem: true,\n    scale: 0.5,\n    remOptions: {\n    // base on 750px standard.\n      rootValue: 75,\n      // to leave 1px alone.\n      minPixelValue: 1.01\n    },\n    autoprefixOptions: {\n      browsers: ['> 0.1%', 'ios >= 8', 'not ie < 12']\n    }\n  },\n  usingComponents: [{\n    tagName: 'thirdComp1',\n    refUrl: '/path/to/ref1',\n    filePath: 'path/to/real1',\n    isNative: true\n  }, {\n    tagName: 'thirdComp2',\n    refUrl: '/path/to/ref2',\n    filePath: 'path/to/real2',\n    isNative: false\n  }]\n};\nfunction compileTemplate(source, type, options, callback) {\n\n  const ast = babylon.parse(source, {\n    plugins: ['jsx']\n  })\n  traverse(ast, {\n    enter(path) {\n      callback(path, type, options);\n    }\n  });\n  let result = generate(ast).code;\n  if (/;$/.test(result)) { // 这里有个坑，jsx解析语法的时候，默认解析的是js语法，所以会在最后多了一个 ; 字符串；但是在 html中 ; 是无法解析的；\n    result = result.slice(0, -1);\n  }\n\n  return result;\n}\n// cml语法的单元测试\ndescribe('parse-template-cml', function() {\n  // parseTag\n  describe('parseTag', function() { // 各个端的标签转化单元测试不做全覆盖，逻辑相对简单\n    let source = `<view></view>`;\n\n    let callback = parseTemplate.parseTag;\n    let result = compileTemplate(source, 'web', options, callback);\n    it('test-tag-transform', function() {\n      expect(result).to.equal(`<div></div>`)\n    });\n  });\n  describe('afterParseTag', function() { // 各个端的标签转化单元测试不做全覆盖，逻辑相对简单\n    let source = `<block></block>`;\n\n    let callback = parseTemplate.afterParseTag;\n    it('test-after-tag-transform-web-weex', function() {\n      expect(compileTemplate(source, 'web', options, callback)).to.equal(`<template></template>`)\n    });\n    it('test-after-tag-transform-miniapp', function() {\n      expect(compileTemplate(source, 'wx', options, callback)).to.equal(`<block></block>`)\n    });\n  });\n  describe('parseBuildTag', function() { // 各个端的标签转化单元测试不做全覆盖，逻辑相对简单\n    let source = `<button></button>`;\n\n    let callback = parseTemplate.parseBuildTag;\n    let result = compileTemplate(source, 'web', options, callback);\n    it('test-build-tag-transform', function() {\n      expect(result).to.equal(`<cml-buildin-button></cml-buildin-button>`)\n    });\n  });\n  // wx baidu alipay一样\n  describe('parseTagForSlider', function() {\n    let source = `<carousel><carousel-item></carousel-item></carousel>`;\n\n    let callback = parseTemplate.parseTagForSlider;\n    let result = compileTemplate(source, 'wx', options, callback);\n    it('parseTagForSlider for wx', function() {\n      expect(result).to.equal(`<swiper><swiper-item></swiper-item></swiper>`)\n    });\n  });\n  // parseRefStatement:仅在所有的小程序端进行处理\n  describe('parseRefStatement-wx-alipay-baidu', function() {\n    let source = `<view ref=\"flag\"></view>`;\n\n    let callback = parseTemplate.parseRefStatement;\n    let result = compileTemplate(source, 'wx', options, callback);\n    it('test-ref-transform', function() {\n      expect(result).to.equal(`<view id=\"flag\" class=\"_cml_ref_lmc_\"></view>`)\n    });\n  });\n  // parseConditionalStatement\n  describe('parseConditionalStatement-web-weex', function() {\n    let source = `<view><view c-if=\"{{value1}}\"></view><view c-else-if=\"{{value2}}\"></view><view c-else></view></view>`;\n\n    let callback = parseTemplate.parseConditionalStatement;\n    let result = compileTemplate(source, 'web', options, callback);\n    it('test-condition-web-transform', function() {\n      expect(result).to.equal(`<view><view v-if=\"value1\"></view><view v-else-if=\"value2\"></view><view v-else></view></view>`)\n    });\n  });\n  describe('parseConditionalStatement-wx', function() {\n    let source = `<view><view c-if=\"{{value1}}\"></view><view c-else-if=\"{{value2}}\"></view><view c-else></view></view>`;\n\n    let callback = parseTemplate.parseConditionalStatement;\n    let result = compileTemplate(source, 'wx', options, callback);\n    it('test-condition-wx-transform', function() {\n      expect(result).to.equal(`<view><view wx:if=\"{{value1}}\"></view><view wx:elif=\"{{value2}}\"></view><view wx:else></view></view>`)\n    });\n  });\n  describe('parseConditionalStatement-alipay', function() {\n    let source = `<view><view c-if=\"{{value1}}\"></view><view c-else-if=\"{{value2}}\"></view><view c-else></view></view>`;\n\n    let callback = parseTemplate.parseConditionalStatement;\n    let result = compileTemplate(source, 'alipay', options, callback);\n    it('test-condition-alipay-transform', function() {\n      expect(result).to.equal(`<view><view a:if=\"{{value1}}\"></view><view a:elif=\"{{value2}}\"></view><view a:else></view></view>`)\n    });\n  });\n  describe('parseConditionalStatement-baidu', function() {\n    let source = `<view><view c-if=\"{{value1}}\"></view><view c-else-if=\"{{value2}}\"></view><view c-else></view></view>`;\n\n    let callback = parseTemplate.parseConditionalStatement;\n    let result = compileTemplate(source, 'baidu', options, callback);\n    console.log('condition-baidu', result)\n    it('test-condition-baidu-transform', function() {\n      expect(result).to.equal(`<view><view s-if=\"value1\"></view><view s-elif=\"value2\"></view><view s-else></view></view>`)\n    });\n  });\n  // parseEventListener\n  describe('parseEventListener-web-weex', function() {\n    let source = `<view><view c-bind:tap=\"tapHandle\"></view></view>`;\n    let originSource = `<view><origin-tag c-bind:click=\"handleClick\"></origin-tag><thirdComp1 c-bind:click=\"handleClick\"></thirdComp1><thirdComp2 c-bind:click=\"handleClick\"></thirdComp2></view>  `\n\n    let callback = parseTemplate.parseEventListener;\n    let result = compileTemplate(source, 'web', options, callback);\n    it('test-event-transform', function() {\n      expect(result).to.equal(`<view><view v-on:tap=\"_cmlEventProxy($event,'tapHandle',false)\"></view></view>`)\n    });\n    // 原生组件事件不进行代理\n    it('test-origin-tag-event-transform', function() {\n      expect(compileTemplate(originSource, 'web', options, callback)).to.equal(`<view><origin-tag v-on:click=\"handleClick\"></origin-tag><thirdComp1 v-on:click=\"handleClick\"></thirdComp1><thirdComp2 v-on:click__CML_NATIVE_EVENTS__=\"_cmlEventProxy($event,'handleClick',false)\"></thirdComp2></view>`)\n    });\n  });\n  describe('parseEventListener-wx-baidu', function() {\n    let source = `<view><view c-bind:tap=\"tapHandle\"></view></view>`;\n    let originSource = `<view><origin-tag c-bind:click=\"handleClick\"></origin-tag><thirdComp1 c-bind:click=\"handleClick\"></thirdComp1><thirdComp2 c-bind:click=\"handleClick\"></thirdComp2></view>  `\n\n    let callback = parseTemplate.parseEventListener;\n    let result = compileTemplate(source, 'wx', options, callback);\n    it('test-event-transform', function() {\n      expect(result).to.equal(`<view><view bindtap=\"_cmlEventProxy\" data-eventtap=\"{{['tapHandle']}}\"></view></view>`)\n    });\n    it('test-origin-tag-event-transform', function() {\n      expect(compileTemplate(originSource, 'wx', options, callback)).to.equal(`<view><origin-tag bindtap=\"handleClick\"></origin-tag><thirdComp1 bindtap=\"handleClick\"></thirdComp1><thirdComp2 bindtap=\"_cmlEventProxy\" data-eventtap=\"{{['handleClick']}}\"></thirdComp2></view>`)\n    });\n  });\n  describe('parseEventListener-alipay', function() {\n    let source = `<view><view c-bind:tap=\"tapHandle\"></view></view>`;\n    let originSource = `<view><origin-tag c-bind:click=\"handleClick\"></origin-tag><thirdComp1 c-bind:click=\"handleClick\"></thirdComp1><thirdComp2 c-bind:click=\"handleClick\"></thirdComp2></view>  `\n\n    let callback = parseTemplate.parseEventListener;\n    let result = compileTemplate(source, 'alipay', options, callback);\n    it('test-event-transform', function() {\n      expect(result).to.equal(`<view><view onTap=\"_cmlEventProxy\" data-eventtap=\"{{['tapHandle']}}\"></view></view>`)\n    });\n    it('test-origin-tag-event-transform', function() {\n      expect(compileTemplate(originSource, 'alipay', options, callback)).to.equal(`<view><origin-tag onTap=\"handleClick\"></origin-tag><thirdComp1 onTap=\"handleClick\"></thirdComp1><thirdComp2 onTap=\"_cmlEventProxy\" data-eventtap=\"{{['handleClick']}}\"></thirdComp2></view>`)\n    });\n  });\n  // parseIterationStatement\n  describe('parseIterationStatement-web-weex', function() {\n    let source = `<view><view c-for=\"{{array}}\"></view></view>`;\n\n    let callback = parseTemplate.parseIterationStatement;\n    let result = compileTemplate(source, 'web', options, callback);\n    it('test-Iteration-transform', function() {\n      expect(result).to.equal(`<view><view v-for=\"(item, index) in array\"></view></view>`)\n    });\n  });\n  describe('parseIterationStatement-wx', function() {\n    let source = `<view><view c-for=\"{{array}}\"></view></view>`;\n\n    let callback = parseTemplate.parseIterationStatement;\n    let result1 = compileTemplate(source, 'wx', options, callback);\n    it('test-Iteration-transform', function() {\n      expect(result1).to.equal(`<view><view wx:for=\"{{array}}\"></view></view>`)\n    });\n  });\n  describe('parseIterationStatement-alipay', function() {\n    let source = `<view><view c-for=\"{{array}}\"></view></view>`;\n\n    let callback = parseTemplate.parseIterationStatement;\n    let result2 = compileTemplate(source, 'alipay', options, callback);\n    it('test-Iteration-transform', function() {\n      expect(result2).to.equal(`<view><view a:for=\"{{array}}\"></view></view>`)\n    });\n  });\n  describe('parseIterationStatement-baidu', function() {\n    let source = `<view><view c-for=\"{{array}}\"></view></view>`;\n\n    let callback = parseTemplate.parseIterationStatement;\n    let result = compileTemplate(source, 'baidu', options, callback);\n    it('test-Iteration-transform', function() {\n      expect(result).to.equal(`<view><view s-for=\"array\"></view></view>`)\n    });\n  });\n  // parseIterationStatement c-for-inde c-for-item c-key的测试\n  describe('parseIterationStatement-web-weex', function() {\n    let source = `<view><view c-for=\"{{array}}\" c-for-index=\"idx\" c-for-item=\"item\" c-key=\"id\"></view></view>`;\n\n    let callback = parseTemplate.parseIterationStatement;\n    let result = compileTemplate(source, 'web', options, callback);\n    it('test-Iteration-transform', function() {\n      expect(result).to.equal(`<view><view v-for=\"(item, idx) in array\" :key=\"item.id\"></view></view>`)\n    });\n  });\n  describe('parseIterationStatement-wx', function() {\n    let source = `<view><view c-for=\"{{array}}\" c-for-index=\"idx\" c-for-item=\"item\" c-key=\"id\"></view></view>`;\n\n    let callback = parseTemplate.parseIterationStatement;\n    let result1 = compileTemplate(source, 'wx', options, callback);\n    it('test-Iteration-transform', function() {\n      expect(result1).to.equal(`<view><view wx:for=\"{{array}}\" wx:for-index=\"idx\" wx:for-item=\"item\" wx:key=\"id\"></view></view>`)\n    });\n  });\n  describe('parseIterationStatement-alipay', function() {\n    let source = `<view><view c-for=\"{{array}}\" c-for-index=\"idx\" c-for-item=\"item\" c-key=\"id\"></view></view>`;\n\n    let callback = parseTemplate.parseIterationStatement;\n    let result2 = compileTemplate(source, 'alipay', options, callback);\n    it('test-Iteration-transform', function() {\n      expect(result2).to.equal(`<view><view a:for=\"{{array}}\" a:for-index=\"idx\" a:for-item=\"item\" a:key=\"id\"></view></view>`)\n    });\n  });\n  describe('parseIterationStatement-baidu', function() {\n    let source = `<view><view c-for=\"{{array}}\" c-for-index=\"idx\" c-for-item=\"item\" c-key=\"id\"></view></view>`;\n\n    let callback = parseTemplate.parseIterationStatement;\n    let result = compileTemplate(source, 'baidu', options, callback);\n    it('test-Iteration-transform', function() {\n      expect(result).to.equal(`<view><view s-for=\"array\" s-for-index=\"idx\" s-for-item=\"item\" s-key=\"id\"></view></view>`)\n    });\n  });\n  // parseAttributeStatement\n  describe('parseAttributeStatement-web-weex', function() {\n    let source = `<view><view prop1=\"static\" prop2=\"{{dynamic}}\"></view></view>`;\n\n    let callback = parseTemplate.parseAttributeStatement;\n    let result = compileTemplate(source, 'web', options, callback);\n    it('test-attribute-transform', function() {\n      expect(result).to.equal(`<view><view prop1=\"static\" :prop2=\"(dynamic)\"></view></view>`)\n    });\n  });\n  describe('parseAttributeStatement-miniapp', function() {\n    let source = `<view><view prop1=\"static\" prop2=\"{{dynamic}}\"></view></view>`;\n\n    let callback = parseTemplate.parseAttributeStatement;\n    let result = compileTemplate(source, 'wx', options, callback);\n    it('test-attribute-transform', function() {\n      expect(result).to.equal(`<view><view prop1=\"static\" prop2=\"{{dynamic}}\"></view></view>`)\n    });\n  });\n  // cml语法下style只支持一个style；parseStyleStatement\n  describe('parseStyleStatement-web', function() {\n    let source = `<view style=\"{{dynamicColor}}\"><view style=\"color:red\"></view></view>`;\n\n    let callback = parseTemplate.parseStyleStatement;\n    let result = compileTemplate(source, 'web', options, callback);\n    it('test-style-transform', function() {\n      expect(result).to.equal(`<view :style=\"_cmlStyleProxy(((dynamicColor)),{'rem':true,'scale':0.5,'remOptions':{'rootValue':75,'minPixelValue':1.01},'autoprefixOptions':{'browsers':['> 0.1%','ios >= 8','not ie < 12']}})\"><view style=\"color:red\"></view></view>`)\n    });\n  });\n  describe('parseStyleStatement-weex', function() {\n    let source = `<view style=\"{{dynamicColor}}\"><view style=\"color:red;width:20px\"></view></view>`;\n\n    let callback = parseTemplate.parseStyleStatement;\n    let result = compileTemplate(source, 'weex', options, callback);\n    it('test-style-transform', function() {\n      expect(result).to.equal(`<view :style=\"_cmlStyleProxy(((dynamicColor)))\"><view style=\"color: #ff0000;width: 20px\"></view></view>`)\n    });\n  });\n  describe('parseStyleStatement-miniapp', function() {\n    let source = `<view style=\"{{dynamicColor}};width:{{num}}cpx\"><view style=\"color:red;width:20px\"></view></view>`;\n\n    let callback = parseTemplate.parseStyleStatement;\n    let result = compileTemplate(source, 'wx', options, callback);\n    it('test-style-transform', function() {\n      expect(result).to.equal(`<view style=\"{{dynamicColor}};width:{{num}}rpx\"><view style=\"color:red;width:20px\"></view></view>`)\n    });\n  });\n  // parseClassStatement:cml语法下只能写一个class\n  describe('parseClassStatement-web', function() {\n    let source = `<view class=\"cls1 cls2\"><view class=\"{{true?'cls3':'cls4'}}\"></view></view>`;\n\n    let callback = parseTemplate.parseClassStatement;\n    let result = compileTemplate(source, 'web', options, callback);\n    it('test-class-transform', function() {\n      expect(result).to.equal(`<view class=\"cls1 cls2  cml-base cml-view\"><view v-bind:class=\"((true?'cls3':'cls4')+'  cml-base cml-view')\"></view></view>`)\n    });\n  });\n  describe('parseClassStatement-weex', function() {\n    let source = `<view class=\"cls1 cls2\"><view class=\"{{true?'cls3':'cls4'}}\"></view></view>`;\n\n    let callback = parseTemplate.parseClassStatement;\n    let result = compileTemplate(source, 'weex', options, callback);\n    it('test-class-transform', function() {\n      expect(result).to.equal(`<view :class=\"_weexClassProxy(' cml-base cml-view cls1 cls2')\"><view :class=\"_weexClassProxy(' cml-base cml-view '+(true?'cls3':'cls4'))\"></view></view>`)\n    });\n  });\n  describe('parseClassStatement-wx-alipay-baidu', function() {\n    let source = `<view class=\"cls1 cls2\"><view class=\"{{true?'cls3':'cls4'}}\"></view></view>`;\n\n    let callback = parseTemplate.parseClassStatement;\n    let result_wx = compileTemplate(source, 'wx', options, callback);\n    let result_alipay = compileTemplate(source, 'wx', options, callback);\n    let result_baidu = compileTemplate(source, 'wx', options, callback);\n    it('test-class-transform', function() {\n      expect(result_wx).to.equal(`<view class=\"cls1 cls2  cml-base cml-view\"><view class=\"{{true?'cls3':'cls4'}}  cml-base cml-view\"></view></view>`)\n      expect(result_alipay).to.equal(`<view class=\"cls1 cls2  cml-base cml-view\"><view class=\"{{true?'cls3':'cls4'}}  cml-base cml-view\"></view></view>`)\n      expect(result_baidu).to.equal(`<view class=\"cls1 cls2  cml-base cml-view\"><view class=\"{{true?'cls3':'cls4'}}  cml-base cml-view\"></view></view>`)\n    });\n  });\n  // parseAnimationStatement\n  describe('parseAnimationStatement-web-weex', function() {\n    let source = `<view><view c-animation=\"anima\"></view></view>`;\n\n    let callback = parseTemplate.parseAnimationStatement;\n    let result = compileTemplate(source, 'web', options, callback);\n    it('test-class-transform', function() {\n      expect(result).to.equal(`<view><view v-animation=\"anima\"></view></view>`)\n    });\n  });\n  describe('parseAnimationStatement-wx', function() {\n    let source = `<view><view c-animation=\"anima\"></view></view>`;\n\n    let callback = parseTemplate.parseAnimationStatement;\n    let result = compileTemplate(source, 'wx', options, callback);\n    it('test-class-transform', function() {\n      expect(result).to.equal(`<view><view animation=\"anima\"></view></view>`)\n    });\n  });\n  // parseDirectiveStatement:c-model\n  describe('parseDirectiveStatement-web-weex', function() {\n    let source = `<view><input c-model=\"{{ searchText }}\" /><custom-input c-model=\"{{ search }}\"></custom-input></view>`;\n\n    let callback = parseTemplate.parseDirectiveStatement;\n    let result = compileTemplate(source, 'web', options, callback);\n    it('test-class-transform', function() {\n      expect(result).to.equal(`<view><input v-on:input=\"_cmlModelEventProxy($event,'searchText')\" v-bind:value=\"searchText\" /><custom-input v-on:input=\"_cmlModelEventProxy($event,'search')\" v-bind:value=\"search\"></custom-input></view>`)\n    });\n  });\n  describe('parseDirectiveStatement-wx', function() {\n    let source = `<view><input c-model=\"{{searchText}}\" /><custom-input c-model=\"{{search}}\"></custom-input></view>`;\n\n    let callback = parseTemplate.parseDirectiveStatement;\n    let result = compileTemplate(source, 'wx', options, callback);\n    it('parseDirectiveStatement-c-model-wx', function() {\n      expect(result).to.equal(`<view><input data-modelkey=\"searchText\" bindinput=\"_cmlModelEventProxy\" value=\"{{searchText}}\" /><custom-input data-modelkey=\"search\" bindinput=\"_cmlModelEventProxy\" value=\"{{search}}\"></custom-input></view>`)\n    });\n  });\n  describe('parseDirectiveStatement-alipay', function() {\n    let source = `<view><input c-model=\"{{searchText}}\" /><custom-input c-model=\"{{search}}\"></custom-input></view>`;\n\n    let callback = parseTemplate.parseDirectiveStatement;\n    let result = compileTemplate(source, 'alipay', options, callback);\n    it('parseDirectiveStatement-c-model-alipay', function() {\n      expect(result).to.equal(`<view><input data-modelkey=\"searchText\" data-eventinput=\"_cmlModelEventProxy\" onInput=\"_cmlModelEventProxy\" value=\"{{searchText}}\" /><custom-input data-modelkey=\"search\" data-eventinput=\"_cmlModelEventProxy\" onInput=\"_cmlModelEventProxy\" value=\"{{search}}\"></custom-input></view>`)\n    });\n  });\n  describe('parseDirectiveStatement-baidu', function() {\n    let source = `<view><input c-model=\"{{searchText}}\" /><custom-input c-model=\"{{search}}\"></custom-input></view>`;\n\n    let callback = parseTemplate.parseDirectiveStatement;\n    let result = compileTemplate(source, 'baidu', options, callback);\n    it('parseDirectiveStatement-c-model-baidu', function() {\n      expect(result).to.equal(`<view><input data-modelkey=\"searchText\" bindinput=\"_cmlModelEventProxy\" value=\"{{searchText}}\" /><custom-input data-modelkey=\"search\" bindinput=\"_cmlModelEventProxy\" value=\"{{search}}\"></custom-input></view>`)\n    });\n  });\n  // c-show\n  describe('parseDirectiveStatement-web', function() {\n    let source = `<view c-show=\"{{true}}\"></view>`;\n\n    let callback = parseTemplate.parseDirectiveStatement;\n    let result = compileTemplate(source, 'web', options, callback);\n    it('test-c-show-transform', function() {\n      // cml语法下线解析成style后续会通过parseStyle接着进行解析；\n      expect(result).to.equal(`<view v-show=\"true\"></view>`)\n    });\n  });\n  describe('parseDirectiveStatement-weex', function() {\n    let source = `<view c-show=\"{{true}}\"></view>`;\n\n    let callback = parseTemplate.parseDirectiveStatement;\n    let result = compileTemplate(source, 'weex', options, callback);\n    it('test-c-show-transform', function() {\n      // cml语法下线解析成style后续会通过parseStyle接着进行解析；\n      expect(result).to.equal(`<view style=\"display:{{true?\\'\\':\\'none\\'}};{{true?\\'\\':\\'height:0px;width:0px;overflow:hidden\\'}}\"></view>`)\n    });\n  });\n  describe('parseDirectiveStatement-wx-alipay-baidu', function() {\n    let source = `<view c-show=\"{{true}}\"></view>`;\n\n    let callback = parseTemplate.parseDirectiveStatement;\n    let result_wx = compileTemplate(source, 'wx', options, callback);\n    let result_baidu = compileTemplate(source, 'baidu', options, callback);\n    let result_alipay = compileTemplate(source, 'alipay', options, callback);\n\n    it('test-c-show-transform', function() {\n      expect(result_wx).to.equal(`<view style=\"display:{{true?'':'none'}};{{true?'':'height:0px;width:0px;overflow:hidden'}}\"></view>`)\n      expect(result_baidu).to.equal(`<view style=\"display:{{true?'':'none'}};{{true?'':'height:0px;width:0px;overflow:hidden'}}\"></view>`)\n      expect(result_alipay).to.equal(`<view style=\"display:{{true?'':'none'}};{{true?'':'height:0px;width:0px;overflow:hidden'}}\"></view>`)\n    });\n  });\n  // c-text\n  describe('parseDirectiveStatement-web-miniapp', function() {\n    let source = `<view c-text=\"{{value1}}\">everything will be replaced</view>`;\n\n    let callback = parseTemplate.parseDirectiveStatement;\n    it('test-c-text-transform', function() {\n      expect(compileTemplate(source, 'web', options, callback)).to.equal(`<view>{{value1}}</view>`)\n    });\n    it('test-c-text-transform', function() {\n      expect(compileTemplate(source, 'wx', options, callback)).to.equal(`<view>{{value1}}</view>`)\n    });\n    it('test-c-text-transform', function() {\n      expect(compileTemplate(source, 'weex', options, callback)).to.equal(`<view>{{value1}}</view>`)\n    });\n  });\n  describe('parse-vue2wx-wx', function() {\n    let source = `<component is=\"{{comp}}\" shrinkcomponents=\"comp,comp1\"></component>`;\n\n    let callback = parseTemplate.parseVue2WxStatement;\n    let result = compileTemplate(source, 'wx', options, callback);\n    it('component is', function() {\n      // cml语法下线解析成style后续会通过parseStyle接着进行解析；\n      expect(result).to.equal(`<comp1 wx:if=\"{{comp === \\'comp1\\'}}\" is=\"{{comp}}\" shrinkcomponents=\"comp,comp1\"></comp1>;\\n<comp wx:if=\"{{comp === \\'comp\\'}}\" is=\"{{comp}}\" shrinkcomponents=\"comp,comp1\"></comp>`)\n    });\n  });\n  describe('parse-vue2wx-baidu', function() {\n    let source = `<component is=\"{{comp}}\" shrinkcomponents=\"comp,comp1\"></component>`;\n\n    let callback = parseTemplate.parseVue2WxStatement;\n    let result = compileTemplate(source, 'baidu', options, callback);\n    it('component is', function() {\n      expect(result).to.equal(`<comp1 s-if=\"{{comp === \\'comp1\\'}}\" is=\"{{comp}}\" shrinkcomponents=\"comp,comp1\"></comp1>;\\n<comp s-if=\"{{comp === \\'comp\\'}}\" is=\"{{comp}}\" shrinkcomponents=\"comp,comp1\"></comp>`)\n    });\n  });\n  describe('parse-vue2wx-alipay', function() {\n    let source = `<component is=\"{{comp}}\" shrinkcomponents=\"comp,comp1\"></component>`;\n\n    let callback = parseTemplate.parseVue2WxStatement;\n    let result = compileTemplate(source, 'alipay', options, callback);\n    it('component is', function() {\n      expect(result).to.equal(`<comp1 a:if=\"{{comp === \\'comp1\\'}}\" is=\"{{comp}}\" shrinkcomponents=\"comp,comp1\"></comp1>;\\n<comp a:if=\"{{comp === \\'comp\\'}}\" is=\"{{comp}}\" shrinkcomponents=\"comp,comp1\"></comp>`)\n    });\n  });\n\n})\n"
  },
  {
    "path": "packages/chameleon-template-parse/test/parser/index.vue.test.js",
    "content": "\n// vue单个语法的单元测试\nconst babylon = require('babylon');\nconst t = require('@babel/types');\nconst traverse = require('@babel/traverse')[\"default\"];\nconst generate = require('@babel/generator')[\"default\"];\nconst parseTemplate = require('../../src/parser/index.js');\nconst expect = require('chai').expect;\nlet options = {lang: 'vue',\n  buildInComponents: {button: \"cml-buildin-button\"},\n  filePath: '/User/Jim-W/didi/component/button.cml',\n  isInjectBaseStyle: true,\n  cmss: {\n    rem: true,\n    scale: 0.5,\n    remOptions: {\n    // base on 750px standard.\n      rootValue: 75,\n      // to leave 1px alone.\n      minPixelValue: 1.01\n    },\n    autoprefixOptions: {\n      browsers: ['> 0.1%', 'ios >= 8', 'not ie < 12']\n    }\n  },\n  usingComponents: [{\n    tagName: 'thirdComp1',\n    refUrl: '/path/to/ref1',\n    filePath: 'path/to/real1',\n    isNative: true\n  }, {\n    tagName: 'thirdComp2',\n    refUrl: '/path/to/ref2',\n    filePath: 'path/to/real2',\n    isNative: false\n  }]\n};\nfunction compileTemplate(source, type, options, callback) {\n  const ast = babylon.parse(source, {\n    plugins: ['jsx']\n  })\n  traverse(ast, {\n    enter(path) {\n      callback(path, type, options);\n    }\n  });\n  let result = generate(ast).code;\n  if (/;$/.test(result)) { // 这里有个坑，jsx解析语法的时候，默认解析的是js语法，所以会在最后多了一个 ; 字符串；但是在 html中 ; 是无法解析的；\n    result = result.slice(0, -1);\n  }\n\n  return result;\n}\n// cml语法的单元测试\ndescribe('parse-template-vue', function() {\n  describe('parseTag', function() { // 各个端的标签转化单元测试不做全覆盖，逻辑相对简单\n    let source = `<view></view>`;\n\n    let callback = parseTemplate.parseTag;\n    let result = compileTemplate(source, 'web', options, callback);\n    it('test-tag-transform', function() {\n      expect(result).to.equal(`<div></div>`)\n    });\n  });\n  describe('afterParseTag', function() { // 各个端的标签转化单元测试不做全覆盖，逻辑相对简单\n    let source = `<block></block>`;\n\n    let callback = parseTemplate.afterParseTag;\n    it('test-after-tag-transform-web-weex', function() {\n      expect(compileTemplate(source, 'web', options, callback)).to.equal(`<template></template>`)\n    });\n    it('test-after-tag-transform-miniapp', function() {\n      expect(compileTemplate(source, 'wx', options, callback)).to.equal(`<block></block>`)\n    });\n  });\n  describe('parseBuildTag', function() { // 各个端的标签转化单元测试不做全覆盖，逻辑相对简单\n    let source = `<button></button>`;\n    let callback = parseTemplate.parseBuildTag;\n    let result = compileTemplate(source, 'web', options, callback);\n    it('test-build-tag-transform', function() {\n      expect(result).to.equal(`<cml-buildin-button></cml-buildin-button>`)\n    });\n  });\n  describe('parseTagForSlider', function() {\n    let source = `<carousel><carousel-item></carousel-item></carousel>`;\n\n    let callback = parseTemplate.parseTagForSlider;\n    let result = compileTemplate(source, 'wx', options, callback);\n    it('parseTagForSlider for wx', function() {\n      expect(result).to.equal(`<swiper><swiper-item></swiper-item></swiper>`)\n    });\n  });\n  // parseRefStatement:仅在所有的小程序端进行处理\n  describe('parseRefStatement-miniapp', function() {\n    let source = `<view ref=\"flag\"></view>`;\n\n    let callback = parseTemplate.parseRefStatement;\n    let result = compileTemplate(source, 'wx', options, callback);\n    it('test-ref-transform', function() {\n      expect(result).to.equal(`<view id=\"flag\" class=\"_cml_ref_lmc_\"></view>`)\n    });\n  });\n  // parseVue2WxStatement:测试v-if语法转化为小程序\n  describe('parseVue2WxStatement-miniapp', function() {\n    let source = `<view><view v-if=\"true\"></view><view v-else-if=\"true\"></view><view v-else=\"true\"></view></view>`;\n\n    let callback = parseTemplate.parseVue2WxStatement;\n    let result_wx = compileTemplate(source, 'wx', options, callback);\n    let result_baidu = compileTemplate(source, 'baidu', options, callback);\n    let result_alipay = compileTemplate(source, 'alipay', options, callback);\n    it('test-condition-web-transform', function() {\n      expect(result_wx).to.equal(`<view><view wx:if=\"{{true}}\"></view><view wx:elif=\"{{true}}\"></view><view wx:else=\"{{true}}\"></view></view>`)\n      expect(result_alipay).to.equal(`<view><view a:if=\"{{true}}\"></view><view a:elif=\"{{true}}\"></view><view a:else=\"{{true}}\"></view></view>`)\n      expect(result_baidu).to.equal(`<view><view s-if=\"true\"></view><view s-elif=\"true\"></view><view s-else=\"true\"></view></view>`)\n    });\n  });\n  // parseVue2WxStatement：测试v-for语法转化为小程序\n  describe('parseVue2WxStatement-web', function() {\n    let source = `<view v-for=\"(m,i) in array\" v-bind:key=\"item.id\"><view v-for=\"item in array\"></view></view>`;\n\n    let callback = parseTemplate.parseVue2WxStatement;\n    let result = compileTemplate(source, 'web', options, callback);\n    it('test-Iteration-transform', function() {\n      expect(result).to.equal(`<view v-for=\"(m,i) in array\" v-bind:key=\"item.id\"><view v-for=\"item in array\"></view></view>`)\n    });\n  });\n  describe('parseVue2WxStatement-weex', function() {\n    let source = `<view v-for=\"(m,i) in array\" v-bind:key=\"id\"><view v-for=\"item in array\"></view></view>`;\n\n    let callback = parseTemplate.parseVue2WxStatement;\n    let result = compileTemplate(source, 'weex', options, callback);\n    it('test-Iteration-transform', function() {\n      expect(result).to.equal(`<view v-for=\"(m,i) in array\" v-bind:key=\"id\"><view v-for=\"item in array\"></view></view>`)\n    });\n  });\n  describe('parseVue2WxStatement-wx', function() {\n    let source = `<view v-for=\"(m,i) in array\" v-bind:key=\"id\"><view v-for=\"item in array\"></view></view>`;\n\n    let callback = parseTemplate.parseVue2WxStatement;\n    let result = compileTemplate(source, 'wx', options, callback);\n    it('test-Iteration-transform', function() {\n      expect(result).to.equal(`<view wx:for-item=\"m\" wx:for-index=\"i\" wx:for=\"{{array}}\" wx:key=\"id\"><view wx:for-item=\"item\" wx:for-index=\"index\" wx:for=\"{{array}}\"></view></view>`)\n    });\n  });\n  describe('parseVue2WxStatement-alipay', function() {\n    let source = `<view v-for=\"(m,i) in array\" v-bind:key=\"id\"><view v-for=\"item in array\"></view></view>`;\n\n    let callback = parseTemplate.parseVue2WxStatement;\n    let result = compileTemplate(source, 'alipay', options, callback);\n    it('test-Iteration-transform', function() {\n      expect(result).to.equal(`<view a:for-item=\"m\" a:for-index=\"i\" a:for=\"{{array}}\" a:key=\"id\"><view a:for-item=\"item\" a:for-index=\"index\" a:for=\"{{array}}\"></view></view>`)\n    });\n  });\n  describe('parseVue2WxStatement-baidu', function() {\n    let source = `<view v-for=\"(m,i) in array\" v-bind:key=\"id\"><view v-for=\"item in array\"></view></view>`;\n\n    let callback = parseTemplate.parseVue2WxStatement;\n    let result = compileTemplate(source, 'baidu', options, callback);\n    it('test-Iteration-transform', function() {\n      expect(result).to.equal(`<view s-for-item=\"m\" s-for-index=\"i\" s-for=\"array\" s-key=\"id\"><view s-for-item=\"item\" s-for-index=\"index\" s-for=\"array\"></view></view>`)\n    });\n  });\n\n  // parseVue2WxStatement:测试 v-bind转化为小程序端的响应值\n  describe('parseVue2WxStatement-miniapp', function() {\n    let source = `<view><view prop1=\"static\" v-bind:prop2=\"dynamic\"></view></view>`;\n\n    let callback = parseTemplate.parseVue2WxStatement;\n    let result_wx = compileTemplate(source, 'wx', options, callback);\n    let result_alipay = compileTemplate(source, 'alipay', options, callback);\n    let result_baidu = compileTemplate(source, 'baidu', options, callback);\n    it('test-attribute-transform', function() {\n      expect(result_wx).to.equal(`<view><view prop1=\"static\" prop2=\"{{dynamic}}\"></view></view>`)\n      expect(result_alipay).to.equal(`<view><view prop1=\"static\" prop2=\"{{dynamic}}\"></view></view>`)\n      expect(result_baidu).to.equal(`<view><view prop1=\"static\" prop2=\"{{dynamic}}\"></view></view>`)\n    });\n  });\n  describe('parseAttributeStatement-web-weex', function() {\n    let source = `<view><view prop1=\"static\" v-bind:prop2=\"dynamic\"></view></view>`;\n\n    let callback = parseTemplate.parseAttributeStatement;\n    let result = compileTemplate(source, 'web', options, callback);\n    it('test-attribute-transform', function() {\n      expect(result).to.equal(`<view><view prop1=\"static\" v-bind:prop2=\"dynamic\"></view></view>`)\n    });\n  });\n  // vue语法下style只支持一个style；parseStyleStatement\n  describe('parseStyleStatement-web', function() {\n    let source = `<view v-bind:style=\"dynamicColor\"><view style=\"color:red\"></view></view>`;\n    let callback = parseTemplate.parseStyleStatement;\n    let result = compileTemplate(source, 'web', options, callback);\n    it('test-style-transform', function() {\n      expect(result).to.equal(`<view v-bind:style=\"_cmlStyleProxy((dynamicColor),{'rem':true,'scale':0.5,'remOptions':{'rootValue':75,'minPixelValue':1.01},'autoprefixOptions':{'browsers':['> 0.1%','ios >= 8','not ie < 12']}})\"><view style=\"color:red\"></view></view>`)\n    });\n  });\n  describe('parseStyleStatement-weex', function() {\n    let source = `<view v-bind:style=\"dynamicColor\"><view style=\"color:red;width:20px\"></view></view>`;\n    let callback = parseTemplate.parseStyleStatement;\n    let result = compileTemplate(source, 'weex', options, callback);\n    it('test-style-transform', function() {\n      expect(result).to.equal(`<view v-bind:style=\"_cmlStyleProxy((dynamicColor))\"><view style=\"color: #ff0000;width: 20px\"></view></view>`)\n    });\n  });\n  describe('parseStyleStatement-miniapp', function() {\n    let source = `<view ><view style=\"color:red;width:20px\"></view></view>`;\n    let callback = parseTemplate.parseStyleStatement;\n    let result_wx = compileTemplate(source, 'wx', options, callback);\n    let result_alipay = compileTemplate(source, 'alipay', options, callback);\n    let result_baidu = compileTemplate(source, 'baidu', options, callback);\n    it('test-style-transform', function() {\n      expect(result_wx).to.equal(`<view><view style=\"color:red;width:20px\"></view></view>`)\n      expect(result_alipay).to.equal(`<view><view style=\"color:red;width:20px\"></view></view>`)\n      expect(result_baidu).to.equal(`<view><view style=\"color:red;width:20px\"></view></view>`)\n    });\n  });\n  // parseClassStatement\n  describe('parseClassStatement-web', function() {\n    let source = `<view><view class=\"cls1 cls2\" v-bind:class=\"true?'cls3':'cls4'\"></view></view>`;\n\n    let callback = parseTemplate.parseClassStatement;\n    let result = compileTemplate(source, 'web', options, callback);\n    it('test-class-transform', function() {\n      expect(result).to.equal(`<view class=\" cml-base cml-view\"><view class=\"cls1 cls2   cml-base cml-view\" v-bind:class=\"true?'cls3':'cls4'\"></view></view>`)\n    });\n  });\n  describe('parseClassStatement-weex', function() {\n    let source = `<view><view class=\"cls1 cls2\" v-bind:class=\"true?'cls3':'cls4'\"></view></view>`;\n\n    let callback = parseTemplate.parseClassStatement;\n    let result = compileTemplate(source, 'weex', options, callback);\n\n    it('test-class-transform', function() {\n      expect(result).to.equal(`<view class=\" cml-base cml-view\"><view class=\"  cml-base cml-view cls1 cls2\" v-bind:class=\"_weexClassProxy((true?'cls3':'cls4'))\"></view></view>`)\n    });\n  });\n  describe('parseClassStatement-wx-alipay-baidu', function() {\n    let source = `<view><view class=\"cls1 cls2\" v-bind:class=\"true?'cls3':'cls4'\"></view></view>`;\n\n    let callback = parseTemplate.parseClassStatement;\n    let result = compileTemplate(source, 'wx', options, callback);\n    it('test-class-transform', function() {\n      expect(result).to.equal(`<view class=\" cml-base cml-view\"><view class=\"{{true?'cls3':'cls4'}} cls1 cls2  cml-base cml-view\"></view></view>`)\n    });\n  });\n  // parseDirectiveStatement\n  describe('parseDirectiveStatement-web-weex', function() {\n    let source = `<view><input v-model=\" searchText \" /><custom-input v-model=\"search\"></custom-input></view>`;\n\n    let callback = parseTemplate.parseDirectiveStatement;\n    let result = compileTemplate(source, 'web', options, callback);\n    it('parseDirectiveStatement-v-model-web', function() {\n      expect(result).to.equal(`<view><input v-on:input=\"_cmlModelEventProxy($event,'searchText')\" v-bind:value=\"searchText\" /><custom-input v-on:input=\"_cmlModelEventProxy($event,'search')\" v-bind:value=\"search\"></custom-input></view>`)\n    });\n  });\n  describe('parseDirectiveStatement-wx-v-model', function() {\n    let source = `<view><input v-model=\" searchText \" /><custom-input v-model=\"search\"></custom-input></view>`;\n\n    let callback = parseTemplate.parseDirectiveStatement;\n    let result = compileTemplate(source, 'wx', options, callback);\n    it('test-v-model', function() {\n      expect(result).to.equal(`<view><input data-modelkey=\"searchText\" bindinput=\"_cmlModelEventProxy\" value=\"{{ searchText }}\" /><custom-input data-modelkey=\"search\" bindinput=\"_cmlModelEventProxy\" value=\"{{search}}\"></custom-input></view>`)\n    });\n  });\n  describe('parseDirectiveStatement-baidu-v-mode', function() {\n    let source = `<view><input v-model=\" searchText \" /><custom-input v-model=\"search\"></custom-input></view>`;\n\n    let callback = parseTemplate.parseDirectiveStatement;\n    let result = compileTemplate(source, 'baidu', options, callback);\n    it('test-v-model', function() {\n      expect(result).to.equal(`<view><input data-modelkey=\"searchText\" bindinput=\"_cmlModelEventProxy\" value=\"{{ searchText }}\" /><custom-input data-modelkey=\"search\" bindinput=\"_cmlModelEventProxy\" value=\"{{search}}\"></custom-input></view>`)\n    });\n  });\n  describe('parseDirectiveStatement-alipay-v-model', function() {\n    let source = `<view><input v-model=\" searchText \" /><custom-input v-model=\"search\"></custom-input></view>`;\n\n    let callback = parseTemplate.parseDirectiveStatement;\n    let result = compileTemplate(source, 'alipay', options, callback);\n    it('test-v-model', function() {\n      expect(result).to.equal(`<view><input data-modelkey=\"searchText\" data-eventinput=\"_cmlModelEventProxy\" onInput=\"_cmlModelEventProxy\" value=\"{{ searchText }}\" /><custom-input data-modelkey=\"search\" data-eventinput=\"_cmlModelEventProxy\" onInput=\"_cmlModelEventProxy\" value=\"{{search}}\"></custom-input></view>`)\n    });\n  });\n  // c-show\n  describe('parseDirectiveStatement-web', function() {\n    let source = `<view v-show=\"true\"></view>`;\n\n    let callback = parseTemplate.parseDirectiveStatement;\n    let result = compileTemplate(source, 'web', options, callback);\n    it('test-c-show-transform', function() {\n      // style后续会通过parseStyle接着进行解析；\n      expect(result).to.equal(`<view v-show=\"true\"></view>`)\n    });\n  });\n  // c-text\n  describe('parseDirectiveStatement-web-miniapp', function() {\n    let source = `<view v-text=\"value1\">everything will be replaced</view>`;\n\n    let callback = parseTemplate.parseDirectiveStatement;\n    it('test-c-text-transform', function() {\n      expect(compileTemplate(source, 'web', options, callback)).to.equal(`<view>{{value1}}</view>`)\n    });\n    it('test-c-text-transform', function() {\n      expect(compileTemplate(source, 'wx', options, callback)).to.equal(`<view>{{value1}}</view>`)\n    });\n    it('test-c-text-transform', function() {\n      expect(compileTemplate(source, 'weex', options, callback)).to.equal(`<view>{{value1}}</view>`)\n    });\n  });\n  describe('parseDirectiveStatement-weex', function() {\n    let source = `<view v-show=\"true\"></view>`;\n\n    let callback = parseTemplate.parseDirectiveStatement;\n    let result = compileTemplate(source, 'weex', options, callback);\n    it('test-c-show-transform', function() {\n      // style后续会通过parseStyle接着进行解析；\n      expect(result).to.equal(`<view :style=\"_cmlStyleProxy(\\'display:\\'+(true?\\'\\':\\'none\\')+\\';\\'+(true?\\'\\':\\'height:0px;width:0px;overflow:hidden\\'))\"></view>`)\n    });\n  });\n  describe('parseDirectiveStatement-wx-alipay-baidu', function() {\n    let source = `<view v-show=\"true\"></view>`;\n\n    let callback = parseTemplate.parseDirectiveStatement;\n    let result_wx = compileTemplate(source, 'wx', options, callback);\n    let result_baidu = compileTemplate(source, 'baidu', options, callback);\n    let result_alipay = compileTemplate(source, 'alipay', options, callback);\n\n    it('test-class-transform', function() {\n      expect(result_wx).to.equal(`<view style=\"display:{{true?'':'none'}};{{true?'':'height:0px;width:0px;overflow:hidden'}}\"></view>`)\n      expect(result_baidu).to.equal(`<view style=\"display:{{true?'':'none'}};{{true?'':'height:0px;width:0px;overflow:hidden'}}\"></view>`)\n      expect(result_alipay).to.equal(`<view style=\"display:{{true?'':'none'}};{{true?'':'height:0px;width:0px;overflow:hidden'}}\"></view>`)\n    });\n  });\n\n  describe('parse-vue2wx-wx', function() {\n    let source = `<component v-bind:is=\"currentComp\" shrinkcomponents=\"comp,comp1\"></component>`;\n\n    let callback = parseTemplate.parseVue2WxStatement;\n    let result = compileTemplate(source, 'alipay', options, callback);\n\n    it('component is', function() {\n      // cml语法下线解析成style后续会通过parseStyle接着进行解析；\n      expect(result).to.equal(`<comp1 a:if=\"{{currentComp === \\'comp1\\'}}\" is=\"{{currentComp}}\" shrinkcomponents=\"comp,comp1\"></comp1>;\\n<comp a:if=\"{{currentComp === \\'comp\\'}}\" is=\"{{currentComp}}\" shrinkcomponents=\"comp,comp1\"></comp>`)\n    });\n  });\n  describe('parse-vue2wx-baidu', function() {\n    let source = `<component v-bind:is=\"currentComp\" shrinkcomponents=\"comp,comp1\"></component>`;\n\n    let callback = parseTemplate.parseVue2WxStatement;\n    let result = compileTemplate(source, 'baidu', options, callback);\n    it('component is', function() {\n      // cml语法下线解析成style后续会通过parseStyle接着进行解析；\n      expect(result).to.equal(`<comp1 s-if=\"{{currentComp === \\'comp1\\'}}\" is=\"{{currentComp}}\" shrinkcomponents=\"comp,comp1\"></comp1>;\\n<comp s-if=\"{{currentComp === \\'comp\\'}}\" is=\"{{currentComp}}\" shrinkcomponents=\"comp,comp1\"></comp>`)\n    });\n  });\n  describe('parse-vue2wx-alipay', function() {\n    let source = `<component v-bind:is=\"currentComp\" shrinkcomponents=\"comp,comp1\"></component>`;\n\n    let callback = parseTemplate.parseVue2WxStatement;\n    let result = compileTemplate(source, 'alipay', options, callback);\n    it('component is', function() {\n      expect(result).to.equal(`<comp1 a:if=\"{{currentComp === \\'comp1\\'}}\" is=\"{{currentComp}}\" shrinkcomponents=\"comp,comp1\"></comp1>;\\n<comp a:if=\"{{currentComp === \\'comp\\'}}\" is=\"{{currentComp}}\" shrinkcomponents=\"comp,comp1\"></comp>`)\n    });\n  });\n\n\n})\n"
  },
  {
    "path": "packages/chameleon-template-parse/test/parser/vue.test.js",
    "content": "// cml 或者vue语法整体单元测试\nconst compileTemplate = require('../../src/index.js');\nconst expect = require('chai').expect;\nlet options = {lang: 'vue',\n  buildInComponents: {button: \"cml-buildin-button\"},\n  filePath: '/User/Jim-W/didi/component/button.cml',\n  isInjectBaseStyle: true,\n  cmss: {\n    rem: true,\n    scale: 0.5,\n    remOptions: {\n      // base on 750px standard.\n      rootValue: 75,\n      // to leave 1px alone.\n      minPixelValue: 1.01\n    },\n    autoprefixOptions: {\n      browsers: ['> 0.1%', 'ios >= 8', 'not ie < 12']\n    }\n  },\n  usingComponents: [{\n    tagName: 'thirdComp1',\n    refUrl: '/path/to/ref1',\n    filePath: 'path/to/real1',\n    isNative: true\n  }, {\n    tagName: 'thirdComp2',\n    refUrl: '/path/to/ref2',\n    filePath: 'path/to/real2',\n    isNative: false\n  }]\n};\ndescribe('parse-template-vue-all', function() {\n  // parseTag\n  describe('parse-tag-transform', function() {\n    let source = `<view><button></button><thirdComp1></thirdComp1><thirdComp2></thirdComp2></view>`;\n    it('test-tag-transform', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\"></cml-buildin-button><thirdComp1 class=\" cml-base cml-thirdComp1\"></thirdComp1><thirdComp2 class=\" cml-base cml-thirdComp2\"></thirdComp2></div>`);\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\"></cml-buildin-button><thirdComp1 class=\" cml-view cml-thirdComp1\"></thirdComp1><thirdComp2 class=\" cml-view cml-thirdComp2\"></thirdComp2></view>`)\n    });\n  });\n  // directive v-model\n  describe('parse-directive-transform', function() {\n    let source = `<view><button v-model=\" value1\"></button></view>`;\n    it('test-directive-v-model-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button v-on:input=\"_cmlModelEventProxy($event,\\'value1\\')\" v-bind:value=\"value1\" class=\" cml-base cml-button\"></cml-buildin-button></div>`);\n    });\n    it('test-directive-v-model-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button v-on:input=\"_cmlModelEventProxy($event,\\'value1\\')\" v-bind:value=\"value1\" class=\" cml-base cml-button\"></cml-buildin-button></div>`)\n    });\n    it('test-directive-v-model-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button data-modelkey=\"value1\" bindinput=\"_cmlModelEventProxy\" value=\"{{ value1}}\" class=\" cml-base cml-button\"></cml-buildin-button></view>`)\n    });\n    it('test-directive-v-model-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button data-modelkey=\"value1\" bindinput=\"_cmlModelEventProxy\" value=\"{{ value1}}\" class=\" cml-base cml-button\"></cml-buildin-button></view>`)\n    });\n    it('test-directive-v-model-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view class=\" cml-base cml-view cml-5766bf8a\"><view class=\" cml-base cml-view cml-5766bf8a\"><cml-buildin-button data-modelkey=\"value1\" data-eventinput=\"_cmlModelEventProxy\" onInput=\"_cmlModelEventProxy\" value=\"{{ value1}}\" class=\" cml-base cml-button cml-5766bf8a\"></cml-buildin-button></view></view>`)\n    });\n    it('test-directive-v-model-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button data-modelkey=\"value1\" bindinput=\"_cmlModelEventProxy\" value=\"{{ value1}}\" class=\" cml-base cml-button\"></cml-buildin-button></view>`)\n    });\n  });\n  // directive v-show\n  describe('parse-directive-transform', function() {\n    let source = `<view><button v-show=\"  value1\"></button></view>`;\n    it('test-directive-v-show-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\" v-show=\"  value1\"></cml-buildin-button></div>`);\n    });\n    it('test-directive-v-show-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\" v-bind:style=\"_cmlStyleProxy(\\'display:\\'+(  value1?\\'\\':\\'none\\')+\\';\\'+(  value1?\\'\\':\\'height:0px;width:0px;overflow:hidden\\'))\"></cml-buildin-button></div>`)\n    });\n    it('test-directive-v-show-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\" style=\"display:{{  value1?\\'\\':\\'none\\'}};{{  value1?\\'\\':\\'height:0px;width:0px;overflow:hidden\\'}}\"></cml-buildin-button></view>`)\n    });\n    it('test-directive-v-show-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\" style=\"display:{{  value1?\\'\\':\\'none\\'}};{{  value1?\\'\\':\\'height:0px;width:0px;overflow:hidden\\'}}\"></cml-buildin-button></view>`)\n    });\n    it('test-directive-v-show-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view class=\" cml-base cml-view cml-5766bf8a\"><view class=\" cml-base cml-view cml-5766bf8a\" style=\"display:{{  value1?\\'\\':\\'none\\'}};{{  value1?\\'\\':\\'height:0px;width:0px;overflow:hidden\\'}}\"><cml-buildin-button class=\" cml-base cml-button cml-5766bf8a\" style=\"display:{{  value1?\\'\\':\\'none\\'}};{{  value1?\\'\\':\\'height:0px;width:0px;overflow:hidden\\'}}\"></cml-buildin-button></view></view>`)\n    });\n    it('test-directive-v-show-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\" style=\"display:{{  value1?\\'\\':\\'none\\'}};{{  value1?\\'\\':\\'height:0px;width:0px;overflow:hidden\\'}}\"></cml-buildin-button></view>`)\n    });\n  });\n  // directive v-text\n  describe('parse-directive-transform', function() {\n    let source = `<view><button v-text=\"  value1\"></button></view>`;\n    it('test-directive-v-text-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\">{{value1}}</cml-buildin-button></div>`);\n    });\n    it('test-directive-v-text-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\">{{value1}}</cml-buildin-button></div>`)\n    });\n    it('test-directive-v-text-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\">{{value1}}</cml-buildin-button></view>`)\n    });\n    it('test-directive-v-text-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\">{{value1}}</cml-buildin-button></view>`)\n    });\n    it('test-directive-v-text-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view class=\" cml-base cml-view cml-5766bf8a\"><view class=\" cml-base cml-view cml-5766bf8a\"><cml-buildin-button class=\" cml-base cml-button cml-5766bf8a\">{{value1}}</cml-buildin-button></view></view>`)\n    });\n    it('test-directive-v-text-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button class=\" cml-base cml-button\">{{value1}}</cml-buildin-button></view>`)\n    });\n  });\n  // directive v-if  v-else-if  v-else\n  describe('parse-directive-transform', function() {\n    let source = `<view><button v-if=\"value1\"></button>\n    <view v-else-if=\"value1\"></view>\n    <view v-else=\"value1\"></view></view>`;\n    it('test-directive-v-condition-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button v-if=\"value1\" class=\" cml-base cml-button\"></cml-buildin-button>\\n    <div v-else-if=\"value1\" class=\" cml-base cml-view\"></div>\\n    <div v-else=\"value1\" class=\" cml-base cml-view\"></div></div>`);\n    });\n    it('test-directive-v-condition-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button v-if=\"value1\" class=\" cml-base cml-button\"></cml-buildin-button>\\n    <div v-else-if=\"value1\" class=\" cml-base cml-view\"></div>\\n    <div v-else=\"value1\" class=\" cml-base cml-view\"></div></div>`)\n    });\n    it('test-directive-v-condition-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button wx:if=\"{{value1}}\" class=\" cml-base cml-button\"></cml-buildin-button>\\n    <view wx:elif=\"{{value1}}\" class=\" cml-base cml-view\"></view>\\n    <view wx:else=\"{{value1}}\" class=\" cml-base cml-view\"></view></view>`)\n    });\n    it('test-directive-v-condition-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button qq:if=\"{{value1}}\" class=\" cml-base cml-button\"></cml-buildin-button>\\n    <view qq:elif=\"{{value1}}\" class=\" cml-base cml-view\"></view>\\n    <view qq:else=\"{{value1}}\" class=\" cml-base cml-view\"></view></view>`)\n    });\n    it('test-directive-v-condition-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view class=\" cml-base cml-view cml-5766bf8a\"><view a:if=\"{{value1}}\" class=\" cml-base cml-view cml-5766bf8a\"><cml-buildin-button class=\" cml-base cml-button cml-5766bf8a\"></cml-buildin-button></view>\\n    <view a:elif=\"{{value1}}\" class=\" cml-base cml-view cml-5766bf8a\"></view>\\n    <view a:else=\"{{value1}}\" class=\" cml-base cml-view cml-5766bf8a\"></view></view>`)\n    });\n    it('test-directive-v-condition-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button s-if=\"value1\" class=\" cml-base cml-button\"></cml-buildin-button>\\n    <view s-elif=\"value1\" class=\" cml-base cml-view\"></view>\\n    <view s-else=\"value1\" class=\" cml-base cml-view\"></view></view>`)\n    });\n  });\n  // directive v-for\n  describe('parse-directive-transform', function() {\n    let source = `<view><view v-for=\"(item ,index) in array\">{{item.id}}  </view></view>`;\n    it('test-directive-v-interator-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><div v-for=\"(item ,index) in array\" class=\" cml-base cml-view\">{{item.id}}  </div></div>`);\n    });\n    it('test-directive-v-interator-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><div v-for=\"(item ,index) in array\" class=\" cml-base cml-view\">{{item.id}}  </div></div>`)\n    });\n    it('test-directive-v-interator-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><view wx:for-item=\"item\" wx:for-index=\"index\" wx:for=\"{{array}}\" class=\" cml-base cml-view\">{{item.id}}  </view></view>`)\n    });\n    it('test-directive-v-interator-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view class=\" cml-base cml-view\"><view qq:for-item=\"item\" qq:for-index=\"index\" qq:for=\"{{array}}\" class=\" cml-base cml-view\">{{item.id}}  </view></view>`)\n    });\n    it('test-directive-v-interator-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view class=\" cml-base cml-view cml-5766bf8a\"><view a:for-item=\"item\" a:for-index=\"index\" a:for=\"{{array}}\" class=\" cml-base cml-view cml-5766bf8a\">{{item.id}}  </view></view>`)\n    });\n    it('test-directive-v-interator-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view class=\" cml-base cml-view\"><view s-for-item=\"item\" s-for-index=\"index\" s-for=\"array\" class=\" cml-base cml-view\">{{item.id}}  </view></view>`)\n    });\n  });\n  // directive c-for  c-for-index  c-for-item c-key\n  describe('parse-directive-transform', function() {\n    let source = `<view><view v-for=\"(item,index) in array\" :key=\"item.id\">{{item.id}}  </view></view>`;\n    it('test-directive-v-interator-key-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><div v-for=\"(item,index) in array\" v-bind:key=\"item.id\" class=\" cml-base cml-view\">{{item.id}}  </div></div>`);\n    });\n    it('test-directive-v-interator-key-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><div v-for=\"(item,index) in array\" v-bind:key=\"item.id\" class=\" cml-base cml-view\">{{item.id}}  </div></div>`)\n    });\n    it('test-directive-v-interator-key-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><view wx:for-item=\"item\" wx:for-index=\"index\" wx:for=\"{{array}}\" wx:key=\"id\" class=\" cml-base cml-view\">{{item.id}}  </view></view>`)\n    });\n    it('test-directive-v-interator-key-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view class=\" cml-base cml-view\"><view qq:for-item=\"item\" qq:for-index=\"index\" qq:for=\"{{array}}\" qq:key=\"id\" class=\" cml-base cml-view\">{{item.id}}  </view></view>`)\n    });\n    it('test-directive-v-interator-key-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view class=\" cml-base cml-view cml-5766bf8a\"><view a:for-item=\"item\" a:for-index=\"index\" a:for=\"{{array}}\" a:key=\"id\" class=\" cml-base cml-view cml-5766bf8a\">{{item.id}}  </view></view>`)\n    });\n    it('test-directive-v-interator-key-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view class=\" cml-base cml-view\"><view s-for-item=\"item\" s-for-index=\"index\" s-for=\"array\" s-key=\"id\" class=\" cml-base cml-view\">{{item.id}}  </view></view>`)\n    });\n  });\n  // directive c-for  c-for-index  c-for-item c-key:*this\n  describe('parse-directive-transform', function() {\n    let source = `<view><view v-for=\"(item,index) in array\" :key=\"item\">{{item.id}}  </view></view>`;\n    it('test-directive-v-interator-*this-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><div v-for=\"(item,index) in array\" v-bind:key=\"item\" class=\" cml-base cml-view\">{{item.id}}  </div></div>`);\n    });\n    it('test-directive-v-interator-*this-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><div v-for=\"(item,index) in array\" v-bind:key=\"item\" class=\" cml-base cml-view\">{{item.id}}  </div></div>`)\n    });\n    it('test-directive-v-interator-*this-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><view wx:for-item=\"item\" wx:for-index=\"index\" wx:for=\"{{array}}\" wx:key=\"*this\" class=\" cml-base cml-view\">{{item.id}}  </view></view>`)\n    });\n    it('test-directive-v-interator-*this-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view class=\" cml-base cml-view\"><view qq:for-item=\"item\" qq:for-index=\"index\" qq:for=\"{{array}}\" qq:key=\"*this\" class=\" cml-base cml-view\">{{item.id}}  </view></view>`)\n    });\n    it('test-directive-v-interator-*this-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view class=\" cml-base cml-view cml-5766bf8a\"><view a:for-item=\"item\" a:for-index=\"index\" a:for=\"{{array}}\" a:key=\"*this\" class=\" cml-base cml-view cml-5766bf8a\">{{item.id}}  </view></view>`)\n    });\n    it('test-directive-v-interator-*this-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view class=\" cml-base cml-view\"><view s-for-item=\"item\" s-for-index=\"index\" s-for=\"array\" s-key=\"*this\" class=\" cml-base cml-view\">{{item.id}}  </view></view>`)\n    });\n  });\n  // parseEvent\n  describe('parse-event-transform', function() {\n    let source = `<view><origin-tag v-on:tap=\"handleClick\"></origin-tag><thirdComp1 @tap=\"handleClick(1,item,'str')\"></thirdComp1><thirdComp2 v-on:tap=\"handleClick(1,item,'str')\"></thirdComp2><view v-on:touchend=\"handleClick()\" v-on:touchmove=\"handleClick\"></view></view>`;\n    it('test-event-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><tag v-on:tap=\"handleClick\" class=\" cml-base cml-origin-tag\"></tag><thirdComp1 v-on:tap=\"handleClick(1,item,'str')\" class=\" cml-base cml-thirdComp1\"></thirdComp1><thirdComp2 v-on:tap.native=\"_cmlInline('handleClick',false,1,item,'str')\" class=\" cml-base cml-thirdComp2\"></thirdComp2><div v-on:touchend=\"_cmlInline('handleClick',false)\" v-on:touchmove=\"_cmlEventProxy($event,'handleClick',false)\" class=\" cml-base cml-view\"></div></div>`);\n    });\n    it('test-event-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><tag v-on:click=\"handleClick\" class=\" cml-base cml-origin-tag\"></tag><thirdComp1 v-on:click=\"handleClick(1,item,'str')\" class=\" cml-base cml-thirdComp1\"></thirdComp1><thirdComp2 v-on:click.native=\"_cmlInline('handleClick',false,1,item,'str')\" class=\" cml-base cml-thirdComp2\"></thirdComp2><div v-on:touchend=\"_cmlInline('handleClick',false)\" v-on:touchmove=\"_cmlEventProxy($event,'handleClick',false)\" class=\" cml-base cml-view\"></div></div>`);\n    });\n    it('test-event-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><tag bindtap=\"handleClick\" class=\" cml-base cml-origin-tag\"></tag><thirdComp1 bindtap=\"handleClick(1,item,'str')\" class=\" cml-view cml-thirdComp1\"></thirdComp1><thirdComp2 bindtap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" class=\" cml-view cml-thirdComp2\"></thirdComp2><view bindtouchend=\"_cmlInline\" data-eventtouchend=\"{{['handleClick']}}\" bindtouchmove=\"_cmlEventProxy\" data-eventtouchmove=\"{{['handleClick']}}\" class=\" cml-base cml-view\"></view></view>`);\n    });\n    it('test-event-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view class=\" cml-base cml-view\"><tag bindtap=\"handleClick\" class=\" cml-base cml-origin-tag\"></tag><thirdComp1 bindtap=\"handleClick(1,item,'str')\" class=\" cml-view cml-thirdComp1\"></thirdComp1><thirdComp2 bindtap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" class=\" cml-view cml-thirdComp2\"></thirdComp2><view bindtouchend=\"_cmlInline\" data-eventtouchend=\"{{['handleClick']}}\" bindtouchmove=\"_cmlEventProxy\" data-eventtouchmove=\"{{['handleClick']}}\" class=\" cml-base cml-view\"></view></view>`);\n    });\n    it('test-event-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view class=\" cml-base cml-view cml-5766bf8a\"><tag onTap=\"handleClick\" class=\" cml-base cml-origin-tag cml-5766bf8a\"></tag><view onTap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" class=\" cml-base cml-view cml-5766bf8a\"><thirdComp1 onTap=\"handleClick(1,item,'str')\" class=\" cml-base cml-thirdComp1 cml-5766bf8a\"></thirdComp1></view><view onTap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" class=\" cml-base cml-view cml-5766bf8a\"><thirdComp2 onTap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" class=\" cml-base cml-thirdComp2 cml-5766bf8a\"></thirdComp2></view><view onTouchEnd=\"_cmlInline\" data-eventtouchend=\"{{['handleClick']}}\" onTouchMove=\"_cmlEventProxy\" data-eventtouchmove=\"{{['handleClick']}}\" class=\" cml-base cml-view cml-5766bf8a\"></view></view>`);\n    });\n    it('test-event-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view class=\" cml-base cml-view\"><tag bindtap=\"handleClick\" class=\" cml-base cml-origin-tag\"></tag><thirdComp1 bindtap=\"handleClick(1,item,'str')\" class=\" cml-view cml-thirdComp1\"></thirdComp1><thirdComp2 bindtap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" class=\" cml-view cml-thirdComp2\"></thirdComp2><view bindtouchend=\"_cmlInline\" data-eventtouchend=\"{{['handleClick']}}\" bindtouchmove=\"_cmlEventProxy\" data-eventtouchmove=\"{{['handleClick']}}\" class=\" cml-base cml-view\"></view></view>`);\n    });\n  });\n  // parseEvent-.stop  web weex\n  describe('parse-event-transform-stop', function() {\n    let source = `<view><origin-tag v-on:tap.stop=\"handleClick\"></origin-tag><thirdComp1 @tap.stop=\"handleClick(1,item,'str')\"></thirdComp1><thirdComp2 v-on:tap.stop=\"handleClick(1,item,'str')\"></thirdComp2></view>`;\n    it('test-event-transform-web-stop', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><tag v-on:tap=\"handleClick\" class=\" cml-base cml-origin-tag\"></tag><thirdComp1 v-on:tap=\"handleClick(1,item,'str')\" class=\" cml-base cml-thirdComp1\"></thirdComp1><thirdComp2 v-on:tap.native=\"_cmlInline('handleClick',true,1,item,'str')\" class=\" cml-base cml-thirdComp2\"></thirdComp2></div>`);\n    });\n    it('test-event-transform-weex-stop', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><tag v-on:click=\"handleClick\" class=\" cml-base cml-origin-tag\"></tag><thirdComp1 v-on:click=\"handleClick(1,item,'str')\" class=\" cml-base cml-thirdComp1\"></thirdComp1><thirdComp2 v-on:click.native=\"_cmlInline('handleClick',true,1,item,'str')\" class=\" cml-base cml-thirdComp2\"></thirdComp2></div>`);\n    });\n    it('test-event-transform-wx-stop', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><tag catchtap=\"handleClick\" class=\" cml-base cml-origin-tag\"></tag><thirdComp1 catchtap=\"handleClick(1,item,'str')\" class=\" cml-view cml-thirdComp1\"></thirdComp1><thirdComp2 catchtap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" class=\" cml-view cml-thirdComp2\"></thirdComp2></view>`);\n    });\n    it('test-event-transform-qq-stop', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view class=\" cml-base cml-view\"><tag catchtap=\"handleClick\" class=\" cml-base cml-origin-tag\"></tag><thirdComp1 catchtap=\"handleClick(1,item,'str')\" class=\" cml-view cml-thirdComp1\"></thirdComp1><thirdComp2 catchtap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" class=\" cml-view cml-thirdComp2\"></thirdComp2></view>`);\n    });\n    it('test-event-transform-baidu-stop', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view class=\" cml-base cml-view\"><tag catchtap=\"handleClick\" class=\" cml-base cml-origin-tag\"></tag><thirdComp1 catchtap=\"handleClick(1,item,'str')\" class=\" cml-view cml-thirdComp1\"></thirdComp1><thirdComp2 catchtap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" class=\" cml-view cml-thirdComp2\"></thirdComp2></view>`);\n    });\n    it('test-event-transform-alipay-stop', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view class=\" cml-base cml-view cml-5766bf8a\"><tag catchTap=\"handleClick\" class=\" cml-base cml-origin-tag cml-5766bf8a\"></tag><view catchTap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" class=\" cml-base cml-view cml-5766bf8a\"><thirdComp1 catchTap=\"handleClick(1,item,'str')\" class=\" cml-base cml-thirdComp1 cml-5766bf8a\"></thirdComp1></view><view catchTap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" class=\" cml-base cml-view cml-5766bf8a\"><thirdComp2 catchTap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" class=\" cml-base cml-thirdComp2 cml-5766bf8a\"></thirdComp2></view></view>`);\n    });\n  });\n  // parseEvent- origin-tag 的click不处理成tap\n  describe('parse-event-transform-origin-tag', function() {\n    let source = `<view><origin-tag v-on:tap.stop=\"handleClick\" @click=\"handleClick\"></origin-tag><thirdComp1 @tap.stop=\"handleClick(1,item,'str')\" @click=\"handleClick\"></thirdComp1><thirdComp2 v-on:tap.stop=\"handleClick(1,item,'str')\"></thirdComp2></view>`;\n    it('test-event-transform-web-origin-tag', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><tag v-on:tap=\"handleClick\" v-on:click=\"handleClick\" class=\" cml-base cml-origin-tag\"></tag><thirdComp1 v-on:tap=\"handleClick(1,item,'str')\" v-on:click=\"handleClick\" class=\" cml-base cml-thirdComp1\"></thirdComp1><thirdComp2 v-on:tap.native=\"_cmlInline('handleClick',true,1,item,'str')\" class=\" cml-base cml-thirdComp2\"></thirdComp2></div>`);\n    });\n    it('test-event-transform-weex-origin-tag', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><tag v-on:click=\"handleClick\" v-on:click=\"handleClick\" class=\" cml-base cml-origin-tag\"></tag><thirdComp1 v-on:click=\"handleClick(1,item,'str')\" v-on:click=\"handleClick\" class=\" cml-base cml-thirdComp1\"></thirdComp1><thirdComp2 v-on:click.native=\"_cmlInline('handleClick',true,1,item,'str')\" class=\" cml-base cml-thirdComp2\"></thirdComp2></div>`);\n    });\n  });\n  // 非原生组件外面包的view要添加原生事件\n  describe('parse-event-transform-alicomponent', function() {\n    let source = `<view><thirdComp2 @tap.stop=\"handleClick(1,item,'str')\" data-args=\"1\" v-on:touchstart.stop=\"handleClick(1,item,'str')\"></thirdComp2></view>`;\n    it('test-event-transform-alipay-alicomponent', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view class=\" cml-base cml-view cml-5766bf8a\"><view catchTap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" data-args=\"1\" catchTouchStart=\"_cmlInline\" data-eventtouchstart=\"{{['handleClick',1,item,'str']}}\" class=\" cml-base cml-view cml-5766bf8a\"><thirdComp2 catchTap=\"_cmlInline\" data-eventtap=\"{{['handleClick',1,item,'str']}}\" data-args=\"1\" catchTouchStart=\"_cmlInline\" data-eventtouchstart=\"{{['handleClick',1,item,'str']}}\" class=\" cml-base cml-thirdComp2 cml-5766bf8a\"></thirdComp2></view></view>`);\n    });\n\n  });\n  // class\n  describe('parse-class-transform', function() {\n    let source = `<view><button :class=\"true ? 'cls2':'cls3'\" class=\"cls1\"></button><thirdComp1 class=\"cls4\"></thirdComp1><view :class=\"computedCls\"></view></view>`;\n    it('parse-class-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button v-bind:class=\"true ? \\'cls2\\':\\'cls3\\'\" class=\"cls1   cml-base cml-button\"></cml-buildin-button><thirdComp1 class=\"cls4   cml-base cml-thirdComp1\"></thirdComp1><div v-bind:class=\"computedCls\" class=\" cml-base cml-view\"></div></div>`);\n    });\n    it('parse-class-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button v-bind:class=\"_weexClassProxy((true ? 'cls2':'cls3'))\" class=\"  cml-base cml-button cls1\"></cml-buildin-button><thirdComp1 class=\"  cml-base cml-thirdComp1 cls4\"></thirdComp1><div v-bind:class=\"_weexClassProxy((computedCls))\" class=\" cml-base cml-view\"></div></div>`);\n    });\n    // wx baidu alipay\n    it('parse-class-miniapp', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button class=\"{{true ? 'cls2':'cls3'}} cls1  cml-base cml-button\"></cml-buildin-button><thirdComp1 class=\"cls4  cml-view cml-thirdComp1\"></thirdComp1><view class=\"{{computedCls}}  cml-base cml-view\"></view></view>`);\n    });\n  });\n  // style 以及 miniappp端cpx动态测试\n  describe('parse-style-transform', function() {\n    let source = `<view><button :style=\"'width:'+cpx+'cpx;'+'height:'+cpx2+'cpx;background-color:red'\"></button></view>`;\n    it('parse-style-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button v-bind:style=\"_cmlStyleProxy((\\'width:\\'+cpx+\\'cpx;\\'+\\'height:\\'+cpx2+\\'cpx;background-color:red\\'),{\\'rem\\':true,\\'scale\\':0.5,\\'remOptions\\':{\\'rootValue\\':75,\\'minPixelValue\\':1.01},\\'autoprefixOptions\\':{\\'browsers\\':[\\'> 0.1%\\',\\'ios >= 8\\',\\'not ie < 12\\']}})\" class=\" cml-base cml-button\"></cml-buildin-button></div>`);\n    });\n    it('parse-style-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><cml-buildin-button v-bind:style=\"_cmlStyleProxy((\\'width:\\'+cpx+\\'cpx;\\'+\\'height:\\'+cpx2+\\'cpx;background-color:red\\'))\" class=\" cml-base cml-button\"></cml-buildin-button></div>`);\n    });\n    // wx baidu alipay\n    it('parse-style-miniapp', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><cml-buildin-button style=\"{{\\'width:\\' + cpx + \\'rpx;\\' + \\'height:\\' + cpx2 + \\'rpx;background-color:red\\'}}\" class=\" cml-base cml-button\"></cml-buildin-button></view>`);\n    });\n  });\n  // ref  动态\n  describe('parse-ref-transform', function() {\n    let source = `<view id=\"value\" :ref=' refVlaue '></view>`;\n    it('test-ref-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div id=\"value\" v-bind:ref=\" refVlaue \" class=\" cml-base cml-view\"></div>`);\n    });\n    it('test-ref-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div id=\"value\" v-bind:ref=\" refVlaue \" class=\" cml-base cml-view\"></div>`);\n    });\n    it('test-ref-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view id=\"{{ refVlaue }}\" class=\" cml-base cml-view  _cml_ref_lmc_\"></view>`);\n    });\n    it('test-ref-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view id=\"{{ refVlaue }}\" class=\" cml-base cml-view  _cml_ref_lmc_\"></view>`);\n    });\n    it('test-ref-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view id=\"{{ refVlaue }}\" class=\" cml-base cml-view  _cml_ref_lmc_\"></view>`);\n    });\n    it('test-ref-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view id=\"{{ refVlaue }}\" class=\" cml-base cml-view cml-5766bf8a  _cml_ref_lmc_\"></view>`);\n    });\n  });\n  // ref  静态\n  describe('parse-ref-transform', function() {\n    let source = `<view id='value' ref=' refVlaue '></view>`;\n    it('test-ref-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div id=\"value\" ref=\" refVlaue \" class=\" cml-base cml-view\"></div>`);\n    });\n    it('test-ref-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div id=\"value\" ref=\" refVlaue \" class=\" cml-base cml-view\"></div>`);\n    });\n    it('test-ref-transform-miniapp', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view id=\" refVlaue \" class=\" cml-base cml-view  _cml_ref_lmc_\"></view>`);\n    });\n  });\n  //  component is\n  describe('parse-component-is-transform', function() {\n    let source = `<component :is=\"currentComp\" shrinkcomponents=\"comp1,comp2\" :image-src=\"chameleonSrc\" title=\"this is title\" @click=\"handleClick()\" @userEvent=\"handleUserEvent\" @lowerevent=\"handleLowerEvent(1,$event)\"></component>`;\n    it('test-component-is-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<component v-bind:is=\"currentComp\" shrinkcomponents=\"comp1,comp2\" v-bind:image-src=\"chameleonSrc\" title=\"this is title\" v-on:click.native=\"_cmlInline('handleClick',false)\" v-on:userEvent=\"_cmlEventProxy($event,'handleUserEvent',false)\" v-on:lowerevent=\"_cmlInline('handleLowerEvent',false,1,$event)\" class=\" cml-base cml-component\"></component>`);\n    });\n    it('test-component-is-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<component v-bind:is=\"currentComp\" shrinkcomponents=\"comp1,comp2\" v-bind:image-src=\"chameleonSrc\" title=\"this is title\" v-on:click.native=\"_cmlInline('handleClick',false)\" v-on:userEvent=\"_cmlEventProxy($event,'handleUserEvent',false)\" v-on:lowerevent=\"_cmlInline('handleLowerEvent',false,1,$event)\" class=\" cml-base cml-component\"></component>`);\n    });\n    it('test-component-is-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<comp2 wx:if=\"{{currentComp === \\'comp2\\'}}\" is=\"{{currentComp}}\" shrinkcomponents=\"comp1,comp2\" image-src=\"{{chameleonSrc}}\" title=\"this is title\" bindtap=\"_cmlInline\" data-eventtap=\"{{[\\'handleClick\\']}}\" binduserEvent=\"_cmlEventProxy\" data-eventuserevent=\"{{[\\'handleUserEvent\\']}}\" bindlowerevent=\"_cmlInline\" data-eventlowerevent=\"{{[\\'handleLowerEvent\\',1,\\'$event\\']}}\" class=\" cml-base cml-component  cml-base cml-comp2\"></comp2>;\\n<comp1 wx:if=\"{{currentComp === \\'comp1\\'}}\" is=\"{{currentComp}}\" shrinkcomponents=\"comp1,comp2\" image-src=\"{{chameleonSrc}}\" title=\"this is title\" bindtap=\"_cmlInline\" data-eventtap=\"{{[\\'handleClick\\']}}\" binduserEvent=\"_cmlEventProxy\" data-eventuserevent=\"{{[\\'handleUserEvent\\']}}\" bindlowerevent=\"_cmlInline\" data-eventlowerevent=\"{{[\\'handleLowerEvent\\',1,\\'$event\\']}}\" class=\" cml-base cml-component  cml-base cml-comp1\"></comp1>`);\n    });\n    it('test-component-is-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<comp2 qq:if=\"{{currentComp === \\'comp2\\'}}\" is=\"{{currentComp}}\" shrinkcomponents=\"comp1,comp2\" image-src=\"{{chameleonSrc}}\" title=\"this is title\" bindtap=\"_cmlInline\" data-eventtap=\"{{[\\'handleClick\\']}}\" binduserEvent=\"_cmlEventProxy\" data-eventuserevent=\"{{[\\'handleUserEvent\\']}}\" bindlowerevent=\"_cmlInline\" data-eventlowerevent=\"{{[\\'handleLowerEvent\\',1,\\'$event\\']}}\" class=\" cml-base cml-component  cml-base cml-comp2\"></comp2>;\\n<comp1 qq:if=\"{{currentComp === \\'comp1\\'}}\" is=\"{{currentComp}}\" shrinkcomponents=\"comp1,comp2\" image-src=\"{{chameleonSrc}}\" title=\"this is title\" bindtap=\"_cmlInline\" data-eventtap=\"{{[\\'handleClick\\']}}\" binduserEvent=\"_cmlEventProxy\" data-eventuserevent=\"{{[\\'handleUserEvent\\']}}\" bindlowerevent=\"_cmlInline\" data-eventlowerevent=\"{{[\\'handleLowerEvent\\',1,\\'$event\\']}}\" class=\" cml-base cml-component  cml-base cml-comp1\"></comp1>`);\n    });\n    it('test-component-is-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<comp2 a:if=\"{{currentComp === \\'comp2\\'}}\" is=\"{{currentComp}}\" shrinkcomponents=\"comp1,comp2\" image-src=\"{{chameleonSrc}}\" title=\"this is title\" onTap=\"_cmlInline\" data-eventtap=\"{{[\\'handleClick\\']}}\" onUserEvent=\"_cmlEventProxy\" data-eventuserevent=\"{{[\\'handleUserEvent\\']}}\" onLowerevent=\"_cmlInline\" data-eventlowerevent=\"{{[\\'handleLowerEvent\\',1,\\'$event\\']}}\" class=\" cml-base cml-component cml-5766bf8a  cml-base cml-comp2 cml-5766bf8a\"></comp2>;\\n<comp1 a:if=\"{{currentComp === \\'comp1\\'}}\" is=\"{{currentComp}}\" shrinkcomponents=\"comp1,comp2\" image-src=\"{{chameleonSrc}}\" title=\"this is title\" onTap=\"_cmlInline\" data-eventtap=\"{{[\\'handleClick\\']}}\" onUserEvent=\"_cmlEventProxy\" data-eventuserevent=\"{{[\\'handleUserEvent\\']}}\" onLowerevent=\"_cmlInline\" data-eventlowerevent=\"{{[\\'handleLowerEvent\\',1,\\'$event\\']}}\" class=\" cml-base cml-component cml-5766bf8a  cml-base cml-comp1 cml-5766bf8a\"></comp1>`);\n    });\n    it('test-component-is-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<comp2 s-if=\"{{currentComp === \\'comp2\\'}}\" is=\"{{currentComp}}\" shrinkcomponents=\"comp1,comp2\" image-src=\"{{chameleonSrc}}\" title=\"this is title\" bindtap=\"_cmlInline\" data-eventtap=\"{{[\\'handleClick\\']}}\" binduserEvent=\"_cmlEventProxy\" data-eventuserevent=\"{{[\\'handleUserEvent\\']}}\" bindlowerevent=\"_cmlInline\" data-eventlowerevent=\"{{[\\'handleLowerEvent\\',1,\\'$event\\']}}\" class=\" cml-base cml-component  cml-base cml-comp2\"></comp2>;\\n<comp1 s-if=\"{{currentComp === \\'comp1\\'}}\" is=\"{{currentComp}}\" shrinkcomponents=\"comp1,comp2\" image-src=\"{{chameleonSrc}}\" title=\"this is title\" bindtap=\"_cmlInline\" data-eventtap=\"{{[\\'handleClick\\']}}\" binduserEvent=\"_cmlEventProxy\" data-eventuserevent=\"{{[\\'handleUserEvent\\']}}\" bindlowerevent=\"_cmlInline\" data-eventlowerevent=\"{{[\\'handleLowerEvent\\',1,\\'$event\\']}}\" class=\" cml-base cml-component  cml-base cml-comp1\"></comp1>`);\n    });\n  });\n\n  // // animation\n  describe('parse-v-animation-transform', function() {\n    let source = `<view v-animation=' animationData '></view>`;\n    it('test-c-animation-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div v-animation=\" animationData \" class=\" cml-base cml-view\"></div>`);\n    });\n    it('test-c-animation-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div v-animation=\" animationData \" class=\" cml-base cml-view\"></div>`);\n    });\n    it('test-c-animation-transform-wx', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view v-animation=\" animationData \" bindtransitionend=\"_cmlInline\" data-eventtransitionend=\"{{['_animationCb','animationData','$event']}}\" class=\" cml-base cml-view\"></view>`);\n    });\n    it('test-c-animation-transform-qq', function() {\n      expect(compileTemplate(source, 'qq', options).source).to.equal(`<view v-animation=\" animationData \" bindtransitionend=\"_cmlInline\" data-eventtransitionend=\"{{['_animationCb','animationData','$event']}}\" class=\" cml-base cml-view\"></view>`);\n    });\n    it('test-c-animation-transform-baidu', function() {\n      expect(compileTemplate(source, 'baidu', options).source).to.equal(`<view v-animation=\" animationData \" bindtransitionend=\"_cmlInline\" data-eventtransitionend=\"{{['_animationCb','animationData','$event']}}\" class=\" cml-base cml-view\"></view>`);\n    });\n    it('test-c-animation-transform-alipay', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view v-animation=\" animationData \" onTransitionend=\"_cmlInline\" data-eventtransitionend=\"{{['_animationCb','animationData','$event']}}\" class=\" cml-base cml-view cml-5766bf8a\"></view>`);\n    });\n  });\n  // // attribute\n  describe('parse-attribute-transform', function() {\n    let source = `<view prop1=\"static\" :prop2=\"dynamic\"></view>`;\n    it('test-attribute-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div prop1=\"static\" v-bind:prop2=\"dynamic\" class=\" cml-base cml-view\"></div>`);\n    });\n    it('test-attribute-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div prop1=\"static\" v-bind:prop2=\"dynamic\" class=\" cml-base cml-view\"></div>`);\n    });\n    it('test-attribute-transform-miniapp', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view prop1=\"static\" prop2=\"{{dynamic}}\" class=\" cml-base cml-view\"></view>`);\n    });\n  })\n  // //各种 <  > 的转化\n  describe('parse-gtlt-transform', function() {\n    let source = `<view><view :prop=\"dynamic\" :id=\"5 < 6 ? '5':'6'\">{{ 5 > 6 ? 'this is 5':'this is 6'}}</view><view :name=\"5 < 6?'7':'8'\"></view></view>`;\n    it('test-gtlt-transform-web', function() {\n      expect(compileTemplate(source, 'web', options).source).to.equal(`<div class=\" cml-base cml-view\"><div v-bind:prop=\"dynamic\" v-bind:id=\"5 < 6 ? \\'5\\':\\'6\\'\" class=\" cml-base cml-view\">{{5 > 6 ? \\'this is 5\\' : \\'this is 6\\'}}</div><div v-bind:name=\"5 < 6?\\'7\\':\\'8\\'\" class=\" cml-base cml-view\"></div></div>`);\n    });\n    it('test-gtlt-transform-weex', function() {\n      expect(compileTemplate(source, 'weex', options).source).to.equal(`<div class=\" cml-base cml-view\"><div v-bind:prop=\"dynamic\" v-bind:id=\"5 < 6 ? \\'5\\':\\'6\\'\" class=\" cml-base cml-view\">{{5 > 6 ? \\'this is 5\\' : \\'this is 6\\'}}</div><div v-bind:name=\"5 < 6?\\'7\\':\\'8\\'\" class=\" cml-base cml-view\"></div></div>`);\n    });\n    it('test-gtlt-transform-miniapp', function() {\n      expect(compileTemplate(source, 'wx', options).source).to.equal(`<view class=\" cml-base cml-view\"><view prop=\"{{dynamic}}\" id=\"{{5 < 6 ? \\'5\\':\\'6\\'}}\" class=\" cml-base cml-view\">{{5 > 6 ? \\'this is 5\\' : \\'this is 6\\'}}</view><view name=\"{{5 < 6?\\'7\\':\\'8\\'}}\" class=\" cml-base cml-view\"></view></view>`);\n    });\n  });\n  describe('test-alipaycomponent-wraped-vue', function() {\n    let source = `<view><thirdComp2 v-on:click=\"handleClick\" data-a=\"a\" @touchstart=\"handleStart\" ></thirdComp2></view>`;\n    it('test-alipaycomponent-wraped', function() {\n      expect(compileTemplate(source, 'alipay', options).source).to.equal(`<view class=\" cml-base cml-view cml-5766bf8a\"><view onTap=\"_cmlEventProxy\" data-eventtap=\"{{['handleClick']}}\" data-a=\"a\" onTouchStart=\"_cmlEventProxy\" data-eventtouchstart=\"{{['handleStart']}}\" class=\" cml-base cml-view cml-5766bf8a\"><thirdComp2 onTap=\"_cmlEventProxy\" data-eventtap=\"{{['handleClick']}}\" data-a=\"a\" onTouchStart=\"_cmlEventProxy\" data-eventtouchstart=\"{{['handleStart']}}\" class=\" cml-base cml-thirdComp2 cml-5766bf8a\"></thirdComp2></view></view>`);\n    });\n  });\n  describe('test-class-noinjected', function() {\n    let source = `<view ><view class=\"cls1\"><thirdComp2 class=\"cls2 cls3\"></thirdComp2></view></view>`;\n    let cpOptions = JSON.parse(JSON.stringify(options));\n    cpOptions.isInjectBaseStyle = false;\n    it('test-class-noinjected-web', function() {\n      expect(compileTemplate(source, 'web', cpOptions).source).to.equal(`<div><div class=\"cls1  \"><thirdComp2 class=\"cls2 cls3  \"></thirdComp2></div></div>`);\n    });\n    it('test-class-noinjected-weex', function() {\n      expect(compileTemplate(source, 'weex', cpOptions).source).to.equal(`<div><div class=\"  cls1\"><thirdComp2 class=\"  cls2 cls3\"></thirdComp2></div></div>`);\n    });\n    it('test-class-noinjected-alipay', function() {\n      expect(compileTemplate(source, 'alipay', cpOptions).source).to.equal(`<view class=\" cml-5766bf8a\"><view class=\"cls1  cml-5766bf8a\"><view class=\"cls2 cls3  cml-5766bf8a\"><thirdComp2 class=\"cls2 cls3  cml-5766bf8a\"></thirdComp2></view></view></view>`);\n    });\n    it('test-class-noinjected-baidu', function() {\n      expect(compileTemplate(source, 'baidu', cpOptions).source).to.equal(`<view><view class=\"cls1 \"><thirdComp2 class=\"cls2 cls3 \"></thirdComp2></view></view>`);\n    });\n    it('test-class-noinjected-wx', function() {\n      expect(compileTemplate(source, 'wx', cpOptions).source).to.equal(`<view><view class=\"cls1 \"><thirdComp2 class=\"cls2 cls3 \"></thirdComp2></view></view>`);\n    });\n  });\n})\n"
  },
  {
    "path": "packages/chameleon-template-parse/webpack.config.js",
    "content": "var webpack = require('webpack');\nvar path = require('path');\nvar HtmlWebpackPlugin = require('html-webpack-plugin');\nvar WebpackDevServer = require('webpack-dev-server');\nvar CleanWebpackPlugin = require('clean-webpack-plugin');\nvar UglifyJsPlugin = require('uglifyjs-webpack-plugin');\n\n\nmodule.exports = {\n  mode:'production',\n  entry:{\n    app:path.resolve(__dirname,'./old-test/index.js')\n  },\n  output:{\n    path:path.resolve(__dirname,'distdev'),\n    filename:'[name].js',\n  },\n  resolve:{\n    extensions: [ '.js','.vue'],\n  },\n  devtool: 'inline-source-map',//方便调试的时候定位到源码，而不是经过打包压缩之后的代码；\n  plugins:[\n    new HtmlWebpackPlugin({\n      title:'webpack-base-learn',\n      filename:'index.html',\n      template:'./index.html',\n      inject: true\n\n    }),\n    new CleanWebpackPlugin(path.resolve(__dirname,'distdev')),\n  ],\n  devServer:{\n    contentBase:path.join(__dirname,'distdev'),\n    compress:true,\n    port:9000,\n  },\n}"
  },
  {
    "path": "packages/chameleon-templates/.eslintrc",
    "content": "{\n    // 在配置文件里配置全局变量时，使用 globals 指出你要使用的全局变量。将变量设置为 true 将允许变量被重写，或 false 将不允许被重写\n    \"globals\": {\n        \"cml\": false\n    },\n    // 环境定义了预定义的全局变量。\n    \"env\": {\n        //环境定义了预定义的全局变量。更多在官网查看\n        \"browser\": true,\n        \"node\": true,\n        \"commonjs\": true,\n        \"amd\": true,\n        \"es6\": true,\n        \"mocha\": true\n    },\n    // JavaScript 语言选项\n    \"parserOptions\": {\n        // ECMAScript 版本\n        \"ecmaVersion\": 6,\n        \"sourceType\": \"module\", //设置为 \"script\" (默认) 或 \"module\"（如果你的代码是 ECMAScript 模块)。\n        //想使用的额外的语言特性:\n        \"ecmaFeatures\": {\n            // 允许在全局作用域下使用 return 语句\n            \"globalReturn\": true,\n            // impliedStric\n            \"impliedStrict\": true,\n            // 启用 JSX\n            \"jsx\": true,\n            \"modules\": true\n        }\n    },\n    //-----让eslint支持 JSX start\n    \"plugins\": [\n\n    ],\n    \"extends\": [\n        \"eslint:recommended\"\n    ],\n    //-----让eslint支持 JSX end\n\n\n    /**\n     * \"off\" 或 0 - 关闭规则\n     * \"warn\" 或 1 - 开启规则，使用警告级别的错误：warn (不会导致程序退出),\n     * \"error\" 或 2 - 开启规则，使用错误级别的错误：error (当被触发的时候，程序会退出)\n     */\n    \"rules\": {\n\n        ////////////////\n        // 可能的错误 //\n        ////////////////\n\n        // 禁止条件表达式中出现赋值操作符\n        \"no-cond-assign\": 2,\n        // 禁用 console\n        \"no-console\": 0,\n        // 禁止在条件中使用常量表达式\n        // if (false) {\n        // doSomethingUnfinished();\n        // } //cuowu\n        \"no-constant-condition\": 2,\n        // 禁止在正则表达式中使用控制字符 ：new RegExp(\"\\x1f\")\n        \"no-control-regex\": 2,\n        // 数组和对象键值对最后一个逗号， never参数：不能带末尾的逗号, always参数：必须带末尾的逗号，\n        // always-multiline：多行模式必须带逗号，单行模式不能带逗号\n        \"comma-dangle\": [1, \"never\"],\n        // 禁用 debugger\n        \"no-debugger\": 2,\n        // 禁止 function 定义中出现重名参数\n        \"no-dupe-args\": 2,\n        // 禁止对象字面量中出现重复的 key\n        \"no-dupe-keys\": 2,\n        // 禁止重复的 case 标签\n        \"no-duplicate-case\": 2,\n        // 禁止空语句块\n        \"no-empty\": 2,\n        // 禁止在正则表达式中使用空字符集 (/^abc[]/)\n        \"no-empty-character-class\": 2,\n        // 禁止对 catch 子句的参数重新赋值\n        \"no-ex-assign\": 2,\n        // 禁止不必要的布尔转换\n        \"no-extra-boolean-cast\": 2,\n        // 禁止不必要的括号 //(a * b) + c;//报错\n        \"no-extra-parens\": 0,\n        // 禁止不必要的分号\n        \"no-extra-semi\": 2,\n        // 禁止对 function 声明重新赋值\n        \"no-func-assign\": 2,\n        // 禁止在嵌套的块中出现 function 或 var 声明\n        \"no-inner-declarations\": [2, \"functions\"],\n        // 禁止 RegExp 构造函数中无效的正则表达式字符串\n        \"no-invalid-regexp\": 2,\n        // 禁止在字符串和注释之外不规则的空白\n        \"no-irregular-whitespace\": 2,\n        // 禁止在 in 表达式中出现否定的左操作数\n        \"no-negated-in-lhs\": 2,\n        // 禁止把全局对象 (Math 和 JSON) 作为函数调用 错误：var math = Math();\n        \"no-obj-calls\": 2,\n        // 禁止直接使用 Object.prototypes 的内置属性\n        \"no-prototype-builtins\": 0,\n        // 禁止正则表达式字面量中出现多个空格\n        \"no-regex-spaces\": 2,\n        // 禁用稀疏数组\n        \"no-sparse-arrays\": 2,\n        // 禁止出现令人困惑的多行表达式\n        \"no-unexpected-multiline\": 2,\n        // 禁止在return、throw、continue 和 break语句之后出现不可达代码\n        \"no-unreachable\": 2,\n        // 要求使用 isNaN() 检查 NaN\n        \"use-isnan\": 2,\n        // 强制使用有效的 JSDoc 注释\n        \"valid-jsdoc\": 0,\n        // 强制 typeof 表达式与有效的字符串进行比较\n        // typeof foo === \"undefimed\" 错误\n        \"valid-typeof\": 2,\n\n\n        //////////////\n        // 最佳实践 //\n        //////////////\n\n        // 定义对象的set存取器属性时，强制定义get\n        \"accessor-pairs\": 2,\n        // 强制数组方法的回调函数中有 return 语句\n        \"array-callback-return\": 0,\n        // 强制把变量的使用限制在其定义的作用域范围内\n        \"block-scoped-var\": 0,\n        // 限制圈复杂度，也就是类似if else能连续接多少个\n        \"complexity\": [2, 9],\n        // 要求 return 语句要么总是指定返回的值，要么不指定\n        \"consistent-return\": 0,\n        // 强制所有控制语句使用一致的括号风格\n        \"curly\": [2, \"all\"],\n        // switch 语句强制 default 分支，也可添加 // no default 注释取消此次警告\n        \"default-case\": 2,\n        // 强制object.key 中 . 的位置，参数:\n        // property，'.'号应与属性在同一行\n        // object, '.' 号应与对象名在同一行\n        \"dot-location\": [2, \"property\"],\n        // 强制使用.号取属性\n        // 参数： allowKeywords：true 使用保留字做属性名时，只能使用.方式取属性\n        // false 使用保留字做属性名时, 只能使用[]方式取属性 e.g [2, {\"allowKeywords\": false}]\n        // allowPattern: 当属性名匹配提供的正则表达式时，允许使用[]方式取值,否则只能用.号取值 e.g [2, {\"allowPattern\": \"^[a-z]+(_[a-z]+)+$\"}]\n        \"dot-notation\": [2, {\n            \"allowKeywords\": false\n        }],\n        // 使用 === 替代 == allow-null允许null和undefined==\n        \"eqeqeq\": [0, \"allow-null\"],\n        // 要求 for-in 循环中有一个 if 语句\n        \"guard-for-in\": 2,\n        // 禁用 alert、confirm 和 prompt\n        \"no-alert\": 0,\n        // 禁用 arguments.caller 或 arguments.callee\n        \"no-caller\": 2,\n        // 不允许在 case 子句中使用词法声明\n        \"no-case-declarations\": 2,\n        // 禁止除法操作符显式的出现在正则表达式开始的位置\n        \"no-div-regex\": 2,\n        // 禁止 if 语句中有 return 之后有 else\n        \"no-else-return\": 0,\n        // 禁止出现空函数.如果一个函数包含了一条注释，它将不会被认为有问题。\n        \"no-empty-function\": 2,\n        // 禁止使用空解构模式no-empty-pattern\n        \"no-empty-pattern\": 2,\n        // 禁止在没有类型检查操作符的情况下与 null 进行比较\n        \"no-eq-null\": 1,\n        // 禁用 eval()\n        \"no-eval\": 2,\n        // 禁止扩展原生类型\n        \"no-extend-native\": 2,\n        // 禁止不必要的 .bind() 调用\n        \"no-extra-bind\": 2,\n        // 禁用不必要的标签\n        \"no-extra-label:\": 0,\n        // 禁止 case 语句落空\n        \"no-fallthrough\": 2,\n        // 禁止数字字面量中使用前导和末尾小数点\n        \"no-floating-decimal\": 2,\n        // 禁止使用短符号进行类型转换(!!fOO)\n        \"no-implicit-coercion\": 0,\n        // 禁止在全局范围内使用 var 和命名的 function 声明\n        \"no-implicit-globals\": 1,\n        // 禁止使用类似 eval() 的方法\n        \"no-implied-eval\": 2,\n        // 禁止 this 关键字出现在类和类对象之外\n        \"no-invalid-this\": 0,\n        // 禁用 __iterator__ 属性\n        \"no-iterator\": 2,\n        // 禁用标签语句\n        \"no-labels\": 2,\n        // 禁用不必要的嵌套块\n        \"no-lone-blocks\": 2,\n        // 禁止在循环中出现 function 声明和表达式\n        \"no-loop-func\": 1,\n        // 禁用魔术数字(3.14什么的用常量代替)\n        \"no-magic-numbers\": [1, {\n            \"ignore\": [0, -1, 1]\n        }],\n        // 禁止使用多个空格\n        \"no-multi-spaces\": 2,\n        // 禁止使用多行字符串，在 JavaScript 中，可以在新行之前使用斜线创建多行字符串\n        \"no-multi-str\": 2,\n        // 禁止对原生对象赋值\n        \"no-native-reassign\": 2,\n        // 禁止在非赋值或条件语句中使用 new 操作符\n        \"no-new\": 2,\n        // 禁止对 Function 对象使用 new 操作符\n        \"no-new-func\": 0,\n        // 禁止对 String，Number 和 Boolean 使用 new 操作符\n        \"no-new-wrappers\": 2,\n        // 禁用八进制字面量\n        \"no-octal\": 2,\n        // 禁止在字符串中使用八进制转义序列\n        \"no-octal-escape\": 2,\n        // 不允许对 function 的参数进行重新赋值\n        \"no-param-reassign\": 0,\n        // 禁用 __proto__ 属性\n        \"no-proto\": 2,\n        // 禁止使用 var 多次声明同一变量\n        \"no-redeclare\": 2,\n        // 禁用指定的通过 require 加载的模块\n        \"no-return-assign\": 0,\n        // 禁止使用 javascript: url\n        \"no-script-url\": 0,\n        // 禁止自我赋值\n        \"no-self-assign\": 2,\n        // 禁止自身比较\n        \"no-self-compare\": 2,\n        // 禁用逗号操作符\n        \"no-sequences\": 2,\n        // 禁止抛出非异常字面量\n        \"no-throw-literal\": 2,\n        // 禁用一成不变的循环条件\n        \"no-unmodified-loop-condition\": 2,\n        // 禁止出现未使用过的表达式\n        \"no-unused-expressions\": 0,\n        // 禁用未使用过的标签\n        \"no-unused-labels\": 2,\n        // 禁止不必要的 .call() 和 .apply()\n        \"no-useless-call\": 2,\n        // 禁止不必要的字符串字面量或模板字面量的连接\n        \"no-useless-concat\": 0,\n        // 禁用不必要的转义字符\n        \"no-useless-escape\": 0,\n        // 禁用 void 操作符\n        \"no-void\": 0,\n        // 禁止在注释中使用特定的警告术语\n        \"no-warning-comments\": 0,\n        // 禁用 with 语句\n        \"no-with\": 2,\n        // 强制在parseInt()使用基数参数\n        \"radix\": 2,\n        // 要求所有的 var 声明出现在它们所在的作用域顶部\n        \"vars-on-top\": 0,\n        // 要求 IIFE 使用括号括起来\n        \"wrap-iife\": [2, \"any\"],\n        // 要求或禁止 “Yoda” 条件\n        \"yoda\": [2, \"never\"],\n        // 要求或禁止使用严格模式指令\n        \"strict\": 0,\n\n\n        //////////////\n        // 变量声明 //\n        //////////////\n\n        // 要求或禁止 var 声明中的初始化(初值)\n        \"init-declarations\": 0,\n        // 不允许 catch 子句的参数与外层作用域中的变量同名\n        \"no-catch-shadow\": 0,\n        // 禁止删除变量\n        \"no-delete-var\": 2,\n        // 不允许标签与变量同名\n        \"no-label-var\": 2,\n        // 禁用特定的全局变量\n        \"no-restricted-globals\": 0,\n        // 禁止 var 声明 与外层作用域的变量同名\n        \"no-shadow\": 0,\n        // 禁止覆盖受限制的标识符\n        \"no-shadow-restricted-names\": 2,\n        // 禁用未声明的变量，除非它们在 /*global */ 注释中被提到\n        \"no-undef\": 2,\n        // 禁止将变量初始化为 undefined\n        \"no-undef-init\": 2,\n        // 禁止将 undefined 作为标识符\n        \"no-undefined\": 0,\n        // 禁止出现未使用过的变量\n        \"no-unused-vars\": [2, {\n            \"vars\": \"all\",\n            \"args\": \"none\"\n        }],\n        // 不允许在变量定义之前使用它们\n        \"no-use-before-define\": 0,\n\n        //////////////////////////\n        // Node.js and CommonJS //\n        //////////////////////////\n\n        // require return statements after callbacks\n        \"callback-return\": 0,\n        // 要求 require() 出现在顶层模块作用域中\n        \"global-require\": 1,\n        // 要求回调函数中有容错处理\n        \"handle-callback-err\": [2, \"^(err|error)$\"],\n        // 禁止混合常规 var 声明和 require 调用\n        \"no-mixed-requires\": 0,\n        // 禁止调用 require 时使用 new 操作符\n        \"no-new-require\": 2,\n        // 禁止对 __dirname 和 __filename进行字符串连接\n        \"no-path-concat\": 0,\n        // 禁用 process.env\n        \"no-process-env\": 0,\n        // 禁用 process.exit()\n        \"no-process-exit\": 0,\n        // 禁用同步方法\n        \"no-sync\": 0,\n\n        //////////////\n        // 风格指南 //\n        //////////////\n\n        // 指定数组的元素之间要以空格隔开(, 后面)， never参数：[ 之前和 ] 之后不能带空格，always参数：[ 之前和 ] 之后必须带空格\n        \"array-bracket-spacing\": [2, \"never\"],\n        // 禁止或强制在单行代码块中使用空格(禁用)\n        \"block-spacing\": [1, \"never\"],\n        //强制使用一致的缩进 第二个参数为 \"tab\" 时，会使用tab，\n        // if while function 后面的{必须与if在同一行，java风格。\n        \"brace-style\": [2, \"1tbs\", {\n            \"allowSingleLine\": true\n        }],\n        // 双峰驼命名格式\n        \"camelcase\": 2,\n        // 控制逗号前后的空格\n        \"comma-spacing\": [2, {\n            \"before\": false,\n            \"after\": true\n        }],\n        // 控制逗号在行尾出现还是在行首出现 (默认行尾)\n        // http://eslint.org/docs/rules/comma-style\n        \"comma-style\": [2, \"last\"],\n        //\"SwitchCase\" (默认：0) 强制 switch 语句中的 case 子句的缩进水平\n        // 以方括号取对象属性时，[ 后面和 ] 前面是否需要空格, 可选参数 never, always\n        \"computed-property-spacing\": [2, \"never\"],\n        // 用于指统一在回调函数中指向this的变量名，箭头函数中的this已经可以指向外层调用者，应该没卵用了\n        // e.g [0,\"that\"] 指定只能 var that = this. that不能指向其他任何值，this也不能赋值给that以外的其他值\n        \"consistent-this\": [1, \"that\"],\n        // 强制使用命名的 function 表达式\n        \"func-names\": 0,\n        // 文件末尾强制换行\n        \"eol-last\": 2,\n        \"indent\": [2, 2, {\n            \"SwitchCase\": 1\n        }],\n        // 强制在对象字面量的属性中键和值之间使用一致的间距\n        \"key-spacing\": [2, {\n            \"beforeColon\": false,\n            \"afterColon\": true\n        }],\n        // 强制使用一致的换行风格\n        \"linebreak-style\": [1, \"unix\"],\n        // 要求在注释周围有空行 ( 要求在块级注释之前有一空行)\n        \"lines-around-comment\": [1, {\n            \"beforeBlockComment\": true\n        }],\n        // 强制一致地使用函数声明或函数表达式，方法定义风格，参数：\n        // declaration: 强制使用方法声明的方式，function f(){} e.g [2, \"declaration\"]\n        // expression：强制使用方法表达式的方式，var f = function() {} e.g [2, \"expression\"]\n        // allowArrowFunctions: declaration风格中允许箭头函数。 e.g [2, \"declaration\", { \"allowArrowFunctions\": true }]\n        \"func-style\": 0,\n        // 强制回调函数最大嵌套深度 5层\n        \"max-nested-callbacks\": [1, 5],\n        // 禁止使用指定的标识符\n        \"id-blacklist\": 0,\n        // 强制标识符的最新和最大长度\n        \"id-length\": 0,\n        // 要求标识符匹配一个指定的正则表达式\n        \"id-match\": 0,\n        // 强制在 JSX 属性中一致地使用双引号或单引号\n        \"jsx-quotes\": 0,\n        // 强制在关键字前后使用一致的空格 (前后腰需要)\n        \"keyword-spacing\": 2,\n        // 强制一行的最大长度\n        \"max-len\": [1, 200],\n        // 强制最大行数\n        \"max-lines\": 0,\n        // 强制 function 定义中最多允许的参数数量\n        \"max-params\": [1, 7],\n        // 强制 function 块最多允许的的语句数量\n        \"max-statements\": [1, 200],\n        // 强制每一行中所允许的最大语句数量\n        \"max-statements-per-line\": 0,\n        // 要求构造函数首字母大写 （要求调用 new 操作符时有首字母大小的函数，允许调用首字母大写的函数时没有 new 操作符。）\n        \"new-cap\": [2, {\n            \"newIsCap\": true,\n            \"capIsNew\": false\n        }],\n        // 要求调用无参构造函数时有圆括号\n        \"new-parens\": 2,\n        // 要求或禁止 var 声明语句后有一行空行\n        \"newline-after-var\": 0,\n        // 禁止使用 Array 构造函数\n        \"no-array-constructor\": 2,\n        // 禁用按位运算符\n        \"no-bitwise\": 0,\n        // 要求 return 语句之前有一空行\n        \"newline-before-return\": 0,\n        // 要求方法链中每个调用都有一个换行符\n        \"newline-per-chained-call\": 1,\n        // 禁用 continue 语句\n        \"no-continue\": 0,\n        // 禁止在代码行后使用内联注释\n        \"no-inline-comments\": 0,\n        // 禁止 if 作为唯一的语句出现在 else 语句中\n        \"no-lonely-if\": 0,\n        // 禁止混合使用不同的操作符\n        \"no-mixed-operators\": 0,\n        // 不允许空格和 tab 混合缩进\n        \"no-mixed-spaces-and-tabs\": 2,\n        // 不允许多个空行\n        \"no-multiple-empty-lines\": [2, {\n            \"max\": 2\n        }],\n        // 不允许否定的表达式\n        \"no-negated-condition\": 0,\n        // 不允许使用嵌套的三元表达式\n        \"no-nested-ternary\": 0,\n        // 禁止使用 Object 的构造函数\n        \"no-new-object\": 2,\n        // 禁止使用一元操作符 ++ 和 --\n        \"no-plusplus\": 0,\n        // 禁止使用特定的语法\n        \"no-restricted-syntax\": 0,\n        // 禁止 function 标识符和括号之间出现空格\n        \"no-spaced-func\": 2,\n        // 不允许使用三元操作符\n        \"no-ternary\": 0,\n        // 禁用行尾空格\n        \"no-trailing-spaces\": 2,\n        // 禁止标识符中有悬空下划线_bar\n        \"no-underscore-dangle\": 0,\n        // 禁止可以在有更简单的可替代的表达式时使用三元操作符\n        \"no-unneeded-ternary\": 2,\n        // 禁止属性前有空白\n        \"no-whitespace-before-property\": 0,\n        // 强制花括号内换行符的一致性\n        \"object-curly-newline\": 0,\n        // 强制在花括号中使用一致的空格\n        \"object-curly-spacing\": 0,\n        // 强制将对象的属性放在不同的行上\n        \"object-property-newline\": 0,\n        // 强制函数中的变量要么一起声明要么分开声明\n        \"one-var\": [2, {\n            \"initialized\": \"never\"\n        }],\n        // 要求或禁止在 var 声明周围换行\n        \"one-var-declaration-per-line\": 0,\n        // 要求或禁止在可能的情况下要求使用简化的赋值操作符\n        \"operator-assignment\": 0,\n        // 强制操作符使用一致的换行符\n        \"operator-linebreak\": [2, \"after\", {\n            \"overrides\": {\n                \"?\": \"before\",\n                \":\": \"before\"\n            }\n        }],\n        // 要求或禁止块内填充\n        \"padded-blocks\": 0,\n        // 要求对象字面量属性名称用引号括起来\n        \"quote-props\": 0,\n        // 强制使用一致的反勾号、双引号或单引号\n        \"quotes\": [2, \"single\", \"avoid-escape\"],\n        // 要求使用 JSDoc 注释\n        \"require-jsdoc\": 0,\n        // 要求或禁止使用分号而不是 ASI（这个才是控制行尾部分号的，）\n        \"semi\": [0, \"always\"],\n        // 强制分号之前和之后使用一致的空格\n        \"semi-spacing\": 0,\n        // 要求同一个声明块中的变量按顺序排列\n        \"sort-vars\": 0,\n        // 强制在块之前使用一致的空格\n        \"space-before-blocks\": [2, \"always\"],\n        // 强制在 function的左括号之前使用一致的空格\n        \"space-before-function-paren\": [0, \"always\"],\n        // 强制在圆括号内使用一致的空格\n        \"space-in-parens\": [2, \"never\"],\n        // 要求操作符周围有空格\n        \"space-infix-ops\": 2,\n        // 强制在一元操作符前后使用一致的空格\n        \"space-unary-ops\": [2, {\n            \"words\": true,\n            \"nonwords\": false\n        }],\n        // 强制在注释中 // 或 /* 使用一致的空格\n        \"spaced-comment\": [2, \"always\", {\n            \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n        }],\n        // 要求或禁止 Unicode BOM\n        \"unicode-bom\": 0,\n        // 要求正则表达式被括号括起来\n        \"wrap-regex\": 0,\n\n        //////////////\n        // ES6.相关 //\n        //////////////\n\n        // 要求箭头函数体使用大括号\n        \"arrow-body-style\": 2,\n        // 要求箭头函数的参数使用圆括号\n        \"arrow-parens\": 0,\n        \"arrow-spacing\": [2, {\n            \"before\": true,\n            \"after\": true\n        }],\n        // 强制在子类构造函数中用super()调用父类构造函数，TypeScrip的编译器也会提示\n        \"constructor-super\": 0,\n        // 强制 generator 函数中 * 号周围使用一致的空格\n        \"generator-star-spacing\": [2, {\n            \"before\": true,\n            \"after\": true\n        }],\n        // 禁止修改类声明的变量\n        \"no-class-assign\": 2,\n        // 不允许箭头功能，在那里他们可以混淆的比较\n        \"no-confusing-arrow\": 0,\n        // 禁止修改 const 声明的变量\n        \"no-const-assign\": 2,\n        // 禁止类成员中出现重复的名称\n        \"no-dupe-class-members\": 2,\n        // 不允许复制模块的进口\n        \"no-duplicate-imports\": 0,\n        // 禁止 Symbol 的构造函数\n        \"no-new-symbol\": 2,\n        // 允许指定模块加载时的进口\n        \"no-restricted-imports\": 0,\n        // 禁止在构造函数中，在调用 super() 之前使用 this 或 super\n        \"no-this-before-super\": 2,\n        // 禁止不必要的计算性能键对象的文字\n        \"no-useless-computed-key\": 0,\n        // 要求使用 let 或 const 而不是 var\n        \"no-var\": 0,\n        // 要求或禁止对象字面量中方法和属性使用简写语法\n        \"object-shorthand\": 0,\n        // 要求使用箭头函数作为回调\n        \"prefer-arrow-callback\": 0,\n        // 要求使用 const 声明那些声明后不再被修改的变量\n        \"prefer-const\": 0,\n        // 要求在合适的地方使用 Reflect 方法\n        \"prefer-reflect\": 0,\n        // 要求使用扩展运算符而非 .apply()\n        \"prefer-spread\": 0,\n        // 要求使用模板字面量而非字符串连接\n        \"prefer-template\": 0,\n        // Suggest using the rest parameters instead of arguments\n        \"prefer-rest-params\": 0,\n        // 要求generator 函数内有 yield\n        \"require-yield\": 0,\n        // enforce spacing between rest and spread operators and their expressions\n        \"rest-spread-spacing\": 0,\n        // 强制模块内的 import 排序\n        \"sort-imports\": 0,\n        // 要求或禁止模板字符串中的嵌入表达式周围空格的使用\n        \"template-curly-spacing\": 1,\n        // 强制在 yield* 表达式中 * 周围使用空格\n        \"yield-star-spacing\": 2\n    }\n}\n"
  },
  {
    "path": "packages/chameleon-templates/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n.vscode\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\n# dist\ndist/\noutput/\n.temp\nnode_modules\n"
  },
  {
    "path": "packages/chameleon-templates/component/component/index.cml",
    "content": "<template>\n  <view><text>Hello Chameleon!</text></view>\n</template>\n\n<script>\n\nclass Replace {\n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new Replace();\n</script>\n<style>\n\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-templates/component/interface-component/index.alipay.cml",
    "content": "<template>\n  <view>\n    <text>alipay端自定义组件</text>\n    <text>props:{{name}}</text>\n  </view>\n</template>\n\n<script>\n\nclass Replace implements ReplaceInterface {\n  props = {\n    name: {\n      type: String,\n      default: '默认值'\n    }\n  }\n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch = {\n  }\n\n  methods = {\n    \n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n    this.$cmlEmit('onshow',{\n      value: this.name\n    })\n  }\n\n  beforeDestroy() {\n  }\n  \n  destroyed() {\n  }\n}\n\nexport default new Replace();\n</script>\n\n<style >\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  }\n}\n</script>"
  },
  {
    "path": "packages/chameleon-templates/component/interface-component/index.baidu.cml",
    "content": "<template>\n  <view>\n    <text>baidu端自定义组件</text>\n    <text>props:{{name}}</text>\n  </view>\n</template>\n\n<script>\n\nclass Replace implements ReplaceInterface {\n  props = {\n    name: {\n      type: String,\n      default: '默认值'\n    }\n  }\n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch = {\n  }\n\n  methods = {\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n    this.$cmlEmit('onshow',{\n      value: this.name\n    })\n  }\n\n  beforeDestroy() {\n  }\n  \n  destroyed() {\n  }\n}\n\nexport default new Replace();\n</script>\n\n<style >\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  }\n}\n</script>"
  },
  {
    "path": "packages/chameleon-templates/component/interface-component/index.interface",
    "content": "<script cml-type=\"interface\">\n/*\n定义一个inteface用于描述组件的属性和事件\n1、 如何区分组件属性和事件？\n通过类型来区分，事件为函数类型，属性为非函数类型\n2、 如何定义组件属性\n给interface添加同名的属性即可，指定类型\n3、 如何定义组件事件\n以事件名称为key值给interface定义属性，该属性是一个函数类型，返回值为void，\n定义函数的第一个参数为自定义事件传递的detail对象类型\n*/\n\n//定义事件detail对象的参数\ntype EventDetail = {\n  value: String\n}\ninterface ReplaceInterface {\n  name: String,\n  onshow(eventDetail: EventDetail): void;\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-templates/component/interface-component/index.qq.cml",
    "content": "<template>\n  <view>\n    <text>qq端自定义组件</text>\n    <text>props:{{name}}</text>\n  </view>\n</template>\n\n<script>\n\nclass Replace implements ReplaceInterface {\n  props = {\n    name: {\n      type: String,\n      default: '默认值'\n    }\n  }\n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch = {\n  }\n\n  methods = {\n    \n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n    this.$cmlEmit('onshow',{\n      value: this.name\n    })\n  }\n\n  beforeDestroy() {\n  }\n  \n  destroyed() {\n  }\n}\n\nexport default new Replace();\n</script>\n\n<style >\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  }\n}\n</script>"
  },
  {
    "path": "packages/chameleon-templates/component/interface-component/index.tt.cml",
    "content": "<template>\n  <view>\n    <text>tt端自定义组件</text>\n    <text>props:{{name}}</text>\n  </view>\n</template>\n\n<script>\n\nclass Replace implements ReplaceInterface {\n  props = {\n    name: {\n      type: String,\n      default: '默认值'\n    }\n  }\n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch = {\n  }\n\n  methods = {\n    \n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n    this.$cmlEmit('onshow',{\n      value: this.name\n    })\n  }\n\n  beforeDestroy() {\n  }\n  \n  destroyed() {\n  }\n}\n\nexport default new Replace();\n</script>\n\n<style >\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  }\n}\n</script>"
  },
  {
    "path": "packages/chameleon-templates/component/interface-component/index.web.cml",
    "content": "<template>\n  <view>\n    <text>web端自定义组件</text>\n    <text>props:{{name}}</text>\n  </view>\n</template>\n\n<script>\n\nclass Replace implements ReplaceInterface {\n  props = {\n    name: {\n      type: String,\n      default: '默认值'\n    }\n  }\n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch = {\n  }\n  \n  methods = {\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n    this.$cmlEmit('onshow',{\n      value: this.name\n    })\n  }\n\n  beforeDestroy() {\n  }\n  \n  destroyed() {\n  }\n}\n\nexport default new Replace();\n</script>\n\n<style >\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  }\n}\n</script>\n\n\n\n"
  },
  {
    "path": "packages/chameleon-templates/component/interface-component/index.weex.cml",
    "content": "<template>\n  <view>\n    <text>weex端自定义组件</text>\n    <text>props:{{name}}</text>\n  </view>\n</template>\n\n<script>\n\nclass Replace implements ReplaceInterface {\n  props = {\n    name: {\n      type: String,\n      default: '默认值'\n    }\n  }\n\n  mounted() {\n    this.$cmlEmit('onshow',{\n      value: this.name\n    })\n  }\n}\n\nexport default new Replace();\n</script>\n\n<style >\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  }\n}\n</script>"
  },
  {
    "path": "packages/chameleon-templates/component/interface-component/index.wx.cml",
    "content": "<template>\n  <view>\n    <text>wx端自定义组件</text>\n    <text>props:{{name}}</text>\n  </view>\n</template>\n\n<script>\n\nclass Replace implements ReplaceInterface {\n  props = {\n    name: {\n      type: String,\n      default: '默认值'\n    }\n  }\n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch = {\n  }\n\n  methods = {\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n    this.$cmlEmit('onshow',{\n      value: this.name\n    })\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new Replace();\n</script>\n\n<style >\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  }\n}\n</script>"
  },
  {
    "path": "packages/chameleon-templates/component/interface-js/index.interface",
    "content": "<script cml-type=\"interface\">\ninterface ReplaceInterface {\n  getMsg(msg: String): String;\n}\n\n</script>\n\n<script cml-type=\"web\">\n\nclass Method implements ReplaceInterface {\n  getMsg(msg) {\n    return 'web:' + msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"weex\">\n\nclass Method implements ReplaceInterface {\n  getMsg(msg) {\n    return 'weex:' + msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"wx\">\n\nclass Method implements ReplaceInterface {\n  getMsg(msg) {\n    return 'wx:' + msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"alipay\">\n\nclass Method implements ReplaceInterface {\n  getMsg(msg) {\n    return 'alipay:' + msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"baidu\">\n\nclass Method implements ReplaceInterface {\n  getMsg(msg) {\n    return 'baidu:' + msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"qq\">\n\nclass Method implements ReplaceInterface {\n  getMsg(msg) {\n    return 'qq:' + msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"tt\">\n\nclass Method implements ReplaceInterface {\n  getMsg(msg) {\n    return 'tt:' + msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n\n"
  },
  {
    "path": "packages/chameleon-templates/index.js",
    "content": "const path = require('path');\n\nexports.serverTpl = path.join(__dirname, './server');\nexports.blankDemoTpl = path.join(__dirname, './project');\nexports.pageTpl = path.join(__dirname, './page');\nexports.componentTpl = path.join(__dirname, './component');\nexports.package = path.join(__dirname, './package.json');\nexports.todoDemoTpl = path.join(__dirname, './todo-demo');\n\n\n\n"
  },
  {
    "path": "packages/chameleon-templates/package.json",
    "content": "{\n  \"name\": \"chameleon-templates\",\n  \"version\": \"1.0.8\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" \"\n  },\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"gitHead\": \"0cd244cfa971463102a7bef668921b38a9d42fac\"\n}"
  },
  {
    "path": "packages/chameleon-templates/page/index.cml",
    "content": "<template>\n  <view><text>Hello Chameleon!</text></view>\n</template>\n\n<script>\n\nclass Replace   {\n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n  }\n\n  beforeCreate(query) {\n  }\n\n  created(query) {\n  }\n\n  beforeMount(query) {\n  }\n\n  onShow() {\n  }\n\n  mounted() {\n  }\n\n  onHide() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new Replace();\n</script>\n\n<style>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  },\n  \"wx\": {\n    \"navigationBarTitleText\": \"index\",\n    \"backgroundTextStyle\": \"dark\",\n    \"backgroundColor\": \"#E2E2E2\"\n  },\n  \"alipay\": {\n    \"defaultTitle\": \"index\",\n    \"pullRefresh\": false,\n    \"allowsBounceVertical\": \"YES\",\n    \"titleBarColor\": \"#ffffff\"\n  },\n  \"baidu\": {\n    \"navigationBarBackgroundColor\": \"#ffffff\",\n    \"navigationBarTextStyle\": \"white\",\n    \"navigationBarTitleText\": \"index\",\n    \"backgroundColor\": \"#ffffff\",\n    \"backgroundTextStyle\": \"dark\",\n    \"enablePullDownRefresh\": false,\n    \"onReachBottomDistance\": 50\n  },\n  \"qq\": {\n    \"navigationBarTitleText\": \"index\",\n    \"backgroundTextStyle\": \"dark\",\n    \"backgroundColor\": \"#E2E2E2\"\n  },\n  \"tt\": {\n    \"navigationBarTitleText\": \"index\",\n    \"backgroundTextStyle\": \"dark\",\n    \"backgroundColor\": \"#E2E2E2\"\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-templates/project/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n.vscode\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\n# dist\ndist/\noutput/\n.temp\nnode_modules\n"
  },
  {
    "path": "packages/chameleon-templates/project/chameleon.config.js",
    "content": "\n// 设置静态资源的线上路径\nconst publicPath = '//www.static.chameleon.com/cml';\n// 设置api请求前缀\nconst apiPrefix = 'https://api.chameleon.com';\n\ncml.config.merge({\n  templateLang: 'cml',\n  templateType: 'html',\n  platforms: ['web', 'weex', 'wx'],\n  buildInfo: {\n    wxAppId: '123456'\n  },\n  wx: {\n    dev: {\n    },\n    build: {\n      apiPrefix\n    }\n  },\n  web: {\n    dev: {\n      analysis: false,\n      console: false,\n      isWrapComponent: false // 取消默认对组件的包裹\n    },\n    build: {\n      analysis: false,\n      publicPath: `${publicPath}/web/`,\n      apiPrefix,\n      isWrapComponent: false // 取消默认对组件的包裹\n    }\n  },\n  weex: {\n    dev: {\n      isWrapComponent: false // 取消默认对组件的包裹\n    },\n    build: {\n      publicPath: `${publicPath}/weex/`,\n      apiPrefix,\n      isWrapComponent: false // 取消默认对组件的包裹\n    },\n    custom: {\n      publicPath: `${publicPath}/wx/`,\n      apiPrefix\n    }\n  },\n  optimize: {\n    watchNodeModules: false, // 设置为true对于调试 node_modules 里面的内容很有帮助\n    showWarning: false, // 设置为true可以在构建过程中看到警告信息，比如编译过程中引入了同一个npm包的不同版本会在终端输出信息\n    dropConsole: true, // 可以配置是否压缩模式下删除调试信息\n    processBar: true // 可以配置是否需要构建进度条\n  }\n})\n\n"
  },
  {
    "path": "packages/chameleon-templates/project/mock/api/index.js",
    "content": "\nmodule.exports = [\n  {\n    method: ['get', 'post'],\n    path: '/api/getMessage',\n    controller: function (req, res, next) {\n      res.json({\n        total: 0,\n        message: [{\n          name: 'Hello chameleon!'\n        }]\n      });\n    }\n  }\n]\n"
  },
  {
    "path": "packages/chameleon-templates/project/mock/template/index.php",
    "content": "<?php\n\t$chameleon = array(\n\t\t\"errno\"=> \"0\",\n\t\t\"errmsg\"=> \"\",\n\t\t\"pageData\"=> array(\n\t\t\t\"name\"=>\"chameleon\",\n\t\t\t\"age\" => 10\n\t\t)\n\t);"
  },
  {
    "path": "packages/chameleon-templates/project/package.json",
    "content": "{\n  \"name\": \"chameleon\",\n  \"version\": \"1.0.0\",\n  \"description\": \"A chameleon project\",\n  \"author\": \"\",\n  \"private\": true,\n  \"scripts\": {},\n  \"license\": \"MIT\",\n  \"dependencies\": {\n    \"chameleon-api\": \"1.0.0\",\n    \"chameleon-runtime\": \"1.0.1\",\n    \"chameleon-store\": \"1.0.1\",\n    \"chameleon-ui-builtin\": \"1.0.6\",\n    \"cml-ui\": \"1.0.3\"\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-templates/project/src/app/app.cml",
    "content": "<template>\n  <app router-config=\"{{routerConfig}}\"></app>\n</template>\n\n<script>\nimport routerConfig from '../router.config.json';\n\nclass App {\n  data = {\n    routerConfig\n  }\n  created(res) {\n  }\n}\n\nexport default new App();\n</script>\n\n<style>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\":\"light\",\n      \"navigationBarBackgroundColor\": \"#fff\",\n      \"navigationBarTitleText\": \"Chameleon\",\n      \"navigationBarTextStyle\":\"black\"\n    }\n  },\n  \"baidu\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"light\",\n      \"navigationBarBackgroundColor\": \"#ffffff\",\n      \"navigationBarTitleText\": \"Chameleon\",\n      \"navigationBarTextStyle\": \"black\"\n    }\n  },\n  \"alipay\": {\n      \"window\": {\n        \"defaultTitle\": \"Chameleon\"\n      }\n  },\n  \"qq\": {\n    \"window\": {\n      \"backgroundTextStyle\":\"light\",\n      \"navigationBarBackgroundColor\": \"#fff\",\n      \"navigationBarTitleText\": \"Chameleon\",\n      \"navigationBarTextStyle\":\"black\"\n    }\n  },\n  \"tt\": {\n    \"window\": {\n      \"backgroundTextStyle\":\"light\",\n      \"navigationBarBackgroundColor\": \"#fff\",\n      \"navigationBarTitleText\": \"Chameleon\",\n      \"navigationBarTextStyle\":\"black\"\n    }\n  }\n}\n</script>"
  },
  {
    "path": "packages/chameleon-templates/project/src/components/demo-com/demo-com.cml",
    "content": "<template>\n  <view class=\"demo-com\">\n    <text class=\"title\">{{title}}</text>\n    <image src=\"{{imageSrc}}\" class=\"logo\"></image>  \n  </view>\n</template>\n\n<script>\n\nclass DemoCom {\n  props = {\n    title: {\n      type: String,\n      default: ''\n    },\n    imageSrc: {\n      type: String,\n      default: ''\n    },\n  }\n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new DemoCom();\n</script>\n<style>\n.demo-com {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n.title {\n  align-self: center;\n  color: #61c7fc;\n  font-size: 72cpx;\n  margin-top: 160cpx;\n  margin-bottom: 20cpx;\n}\n.logo {\n  width: 150cpx;\n  height: 150cpx;\n  margin-top: 100cpx;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {}\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-templates/project/src/pages/index/index.cml",
    "content": "<template>\n  <page title=\"chameleon\">\n      <scroller height=\"{{-1}}\">\n        <view class=\"scroller-wrap\">\n          <demo-com title=\"{{title}}\" image-src=\"{{chameleonSrc}}\"></demo-com>\n        </view>\n      </scroller>\n  </page>\n</template>\n\n<script>\n\nclass Index  {\n  data = {\n    title: \"chameleon\",\n    chameleonSrc: require('../../assets/images/chameleon.png')\n  }\n}\n\nexport default new Index();\n\n</script>\n<style>\n\n.scroller-wrap {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"demo-com\": \"/components/demo-com/demo-com\"\n    }\n  },\n  \"wx\": {\n    \"navigationBarTitleText\": \"index\",\n    \"backgroundTextStyle\": \"dark\",\n    \"backgroundColor\": \"#E2E2E2\"\n  },\n  \"alipay\": {\n    \"defaultTitle\": \"index\",\n    \"pullRefresh\": false,\n    \"allowsBounceVertical\": \"YES\",\n    \"titleBarColor\": \"#ffffff\"\n  },\n  \"baidu\": {\n    \"navigationBarBackgroundColor\": \"#ffffff\",\n    \"navigationBarTextStyle\": \"white\",\n    \"navigationBarTitleText\": \"index\",\n    \"backgroundColor\": \"#ffffff\",\n    \"backgroundTextStyle\": \"dark\",\n    \"enablePullDownRefresh\": false,\n    \"onReachBottomDistance\": 50\n  },\n  \"qq\": {\n    \"navigationBarTitleText\": \"index\",\n    \"backgroundTextStyle\": \"dark\",\n    \"backgroundColor\": \"#E2E2E2\"\n  },\n  \"tt\": {\n    \"navigationBarTitleText\": \"index\",\n    \"backgroundTextStyle\": \"dark\",\n    \"backgroundColor\": \"#E2E2E2\"\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-templates/project/src/router.config.json",
    "content": "{\n  \"mode\": \"history\",\n  \"domain\": \"https://www.chameleon.com\",\n  \"routes\":[\n    {\n      \"url\": \"/cml/h5/index\",\n      \"path\": \"/pages/index/index\",\n      \"name\": \"首页\",\n      \"mock\": \"index.php\"\n    }\n  ]\n}"
  },
  {
    "path": "packages/chameleon-templates/project/src/store/actions.js",
    "content": "\nexport default {\n}\n"
  },
  {
    "path": "packages/chameleon-templates/project/src/store/getters.js",
    "content": "export default {\n}\n"
  },
  {
    "path": "packages/chameleon-templates/project/src/store/index.js",
    "content": "import actions from './actions'\nimport getters from './getters'\nimport state from './state'\nimport mutations from './mutations'\nimport createStore from \"chameleon-store\";\n\nexport default createStore({\n  actions,\n  getters,\n  state,\n  mutations\n})\n"
  },
  {
    "path": "packages/chameleon-templates/project/src/store/mutations.js",
    "content": "\nexport default {\n}\n"
  },
  {
    "path": "packages/chameleon-templates/project/src/store/state.js",
    "content": "\nconst state = {\n}\n\nexport default state\n"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/FISData.class.php",
    "content": "<?php\n\nabstract class FISData {\n    public $datatype;\n\n\n    public function getDatatype() {\n        return $this->datatype;\n    }\n\n    protected function existDataFile($id) {\n        $filepath = Util::normalizePath(WWW_ROOT . '/test/' . preg_replace('/\\.[a-z]{2,6}$/i', '.' . $this->getDatatype(), $id));\n        if (is_file($filepath)) {\n            return $filepath;\n        }\n        return false;\n    }\n\n    /**\n     * @param $tmpl 当前渲染模板路径\n     */\n    protected function getId($tmpl) {\n        $root = Util::normalizePath(WWW_ROOT . 'template');\n        $id = str_replace($root, '', Util::normalizePath($tmpl));\n\n        //add zhangnan03\n        $root_page =  Util::normalizePath(WWW_ROOT . 'page');\n        $id = str_replace($root_page, '', $id);\n        //add end\n        return $id;\n    }\n\n    public function getCookieId() {\n        $cookie_id = $_COOKIE['FIS_DEBUG_DATA_ID'];\n        if ($cookie_id) {\n            $cookie_id = trim($cookie_id);\n            if ($cookie_id !== '') {\n                $arr = explode('|', $cookie_id);\n                if (trim($arr[0]) == $this->datatype) {\n                    $cookie_id = $arr[1];\n                } else {\n                    $cookie_id = '';\n                }\n            }\n        } else {\n            $cookie_id = '';\n        }\n        return $cookie_id;\n    }\n\n    public function getData($tmpl) {}\n\n    /**\n     * 获取选定的数据文件路径\n     * @param $tmpl\n     * @return bool|string\n     */\n    protected function getFile($tmpl) {\n        $id = $this->getId($tmpl);\n        $info = pathinfo($id);\n        $filepath = '';\n        //特定数据\n        if ($cookie_id = $this->getCookieId()) {\n            $tmp_id = $info['dirname'] . '/' .$info['filename'] .'/'. $cookie_id;\n            $filepath = $this->existDataFile($tmp_id);\n        } else if (($list = $this->getDataList($tmpl))) {\n            //当前提供多份数据\n            $filepath = current($list); //first\n        }\n        if (!$filepath) {\n            //没有多份数据时，默认数据路径\n            $filepath = Util::normalizePath(WWW_ROOT . '/test/' . preg_replace('/\\.[a-z]{2,6}$/i', '.' . $this->datatype, $id));\n        }\n        return $filepath;\n    }\n\n    /**\n     * 多份测试数据\n     * @param $tmpl\n     * @return array\n     */\n    public function getDataList($tmpl) {\n        $id = $this->getId($tmpl);\n        $info = pathinfo($id);\n        $test_dir = Util::normalizePath(WWW_ROOT . '/test/' . $info['dirname'] . '/' . $info['filename']);\n        $files = Util::find($test_dir, '/' . $info['filename'] . '_\\d+\\.'.$this->datatype.'/i');\n        if ($files) {\n            foreach ($files as $k => $filepath) {\n                $files[str_replace($test_dir . '/', '', $filepath)] = $filepath;\n                unset($files[$k]);\n            }\n        }\n        return $files;\n    }\n\n    public function get($post) {\n        $filepath = $post['path'];\n        if (!is_file($filepath)) {\n            echo \"\";\n            return;\n        }\n        echo file_get_contents($filepath);\n    }\n\n    public function save($post) {\n        $file = $post['path'];\n        $dir = dirname($file);\n        if (!is_dir($dir) && !mkdir($dir, 0755, true)) {\n            echo '{\"message\": \"填写的路径无法创建，请重新填写！\", \"code\": 1}';\n            exit(1);\n        }\n        if (!is_file($file) && false === file_put_contents($file, '')) {\n            echo '{\"message\": \"填写的路径无法创建，请重新填写！\", \"code\": 1}';\n            exit(1);\n        }\n        $data = $post['data'];\n        file_put_contents($file, $data);\n        echo '{\"message\": \"保存成功\", \"code\": 0}';\n    }\n\n    public function getCurrentFilePath($tmpl) {\n        //以后支持多份测试数据\n        return $this->getFile($tmpl);\n    }\n\n}\n"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/Manager.class.php",
    "content": "<?php\n/**\n * 数据管理，包括展示，保存，选择默认数据等\n * Class Manager\n */\nclass Manager {\n\n    private $_data_arr = array();\n    private $_tmpl;\n\n    /**\n     * @param $data_arr array('php' => <Object FISData>, 'json' => <Object FISData>...)\n     * @param $tmpl 当前展示页面的模板路径\n     */\n    public function __construct($data_arr, $tmpl) {\n        $this->_data_arr = $data_arr;\n        $this->_tmpl = $tmpl;\n    }\n\n    public function getDefault() {\n        $default_arr = array();\n        $default =  $this->_data_arr[$this->getCurrentDatatype()];\n        $default_arr['datatype'] = $default->getDatatype();\n        $default_arr['path'] = $default->getCurrentFilepath($this->_tmpl);\n        $default_arr['data'] = htmlspecialchars(file_get_contents($default->getCurrentFilepath($this->_tmpl)));\n        $default_arr['list'] = $default->getDataList($this->_tmpl);\n        //默认选定\n        $default_arr['list_default'] = $default->getCookieId();\n        return $default_arr;\n    }\n\n    public function getCurrentDatatype() {\n        $datatype = trim($_COOKIE['FIS_DEBUG_DATATYPE']);\n        if (!$datatype) {\n            $datatype = 'php';\n        }\n        return $datatype;\n    }\n\n    public function getRenderData() {\n        $datatypes = array();\n        foreach ($this->_data_arr as $data_instance) {\n            $datatypes[] = $data_instance->getDatatype();\n        }\n\n        return array(\n            'datatypes' => $datatypes,\n            'default' => $this->getDefault(),\n        );\n    }\n\n    public function render() {\n        require_once (WWW_ROOT . 'smarty/Smarty.class.php');\n        $smarty = new Smarty();\n        $smarty->setPluginsDir(array(\n            WWW_ROOT . 'smarty/plugins'\n        ));\n        $smarty->setLeftDelimiter('{%');\n        $smarty->setRightDelimiter('%}');\n        $smarty->assign($this->getRenderData());\n        $smarty->display(dirname(__FILE__) . '/index.tpl');\n        exit();\n    }\n}\n"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/README.md",
    "content": "##fis-server-fisdata\n\n使用FIS开发时，提供本地调试数据功能。\n\n\n###使用\n\n    //require必要的类文件\n    require_once (\"<DIR_FIS_DATA>/TestData.php\");\n\n    //初始化类，必须放在其他router的最前面\n    TestData::init();\n    \n    //渲染数据\n    // $templateEngine 模板引擎，必须包含方法assign, display 如:smarty\n    // $tmpl 当前要渲染的模板\n    TestData::renderHelper($templateEngine, $tmpl);\n\n####浏览器书签\n    \n    //新建浏览器书签，网址为以下内容\n    javascript: void function() {var d = new Date();d.setFullYear(d.getFullYear() + 1);document.cookie='FIS_DEBUG_DATA=4f10e208f47bfb4d35a5e6f115a6df1a;path=/;expires=' + d.toGMTString() + '';location.reload(); }();\n\n在预览的时候点击书签，进入数据管理页面，修改数据后再进行渲染。\n\n\n###在FIS安装\n\n    //安装特定版本\n    fis server install fisdata@1.0.1\n    \n    or\n    \n    //安装最新版本\n    fis server install fisdata\n\n\n###测试数据\n测试数据存储在网站根目录的test目录下。\n模板文件放在网站根目录的template目录下。\n\n模板文件和测试数据文件对应关系如下：\n\n模板:\n    `<www>/template/page/photo/index.tpl`\n\n对应数据文件:\n\n    0. <www>/test/page/photo/index.php (php格式)\n    0. <www>/test/page/photo/index.json (json格式)\n    0. <www>/test/page/photo/index.text (adoc格式)\n\n也支持多份数据(php格式为例):\n\n    0. <www>/test/page/photo/index/index_1.php\n    0. <www>/test/page/photo/index/index_2.php\n    ...\n\n文件名: `index_\\d+.php`\n\n**注：adoc多份数据参见http://fe.baidu.com/doc/fis**\n\n"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/TestData.class.php",
    "content": "<?php\nif (!defined('WWW_ROOT')) define('WWW_ROOT', realpath(dirname(__FILE__) . '/../') . DIRECTORY_SEPARATOR);\nif (!defined('ROOT')) define('ROOT', dirname(__FILE__) . DIRECTORY_SEPARATOR);\nif (!defined('PLUGIN_ROOT')) define('PLUGIN_ROOT', ROOT . DIRECTORY_SEPARATOR . 'plugin' . DIRECTORY_SEPARATOR);\nif (!defined('LIBS_ROOT')) define('LIBS_ROOT', ROOT . DIRECTORY_SEPARATOR . 'libs' . DIRECTORY_SEPARATOR);\n\nrequire_once LIBS_ROOT . 'Util.class.php';\nrequire_once ROOT . 'Manager.class.php';\nrequire_once ROOT . 'FISData.class.php';\nrequire_once PLUGIN_ROOT . 'plugins.php';\n\nclass TestData {\n\n    static private $_data_queue = array();\n    static private $_flush_data_queue = array();\n    static public $_chameleon_data = array();\n\n   \n\n    private static $MIME = array(\n        'bmp' => 'image/bmp',\n        'css' => 'text/css',\n        'doc' => 'application/msword',\n        'dtd' => 'text/xml',\n        'gif' => 'image/gif',\n        'hta' => 'application/hta',\n        'htc' => 'text/x-component',\n        'htm' => 'text/html',\n        'html' => 'text/html',\n        'xhtml' => 'text/html',\n        'ico' => 'image/x-icon',\n        'jpe' => 'image/jpeg',\n        'jpeg' => 'image/jpeg',\n        'jpg' => 'image/jpeg',\n        'js' => 'text/javascript',\n        'json' => 'application/json',\n        'mocha' => 'text/javascript',\n        'mp3' => 'audio/mp3',\n        'mp4' => 'video/mpeg4',\n        'mpeg' => 'video/mpg',\n        'mpg' => 'video/mpg',\n        'manifest' => 'text/cache-manifest',\n        'pdf' => 'application/pdf',\n        'png' => 'image/png',\n        'ppt' => 'application/vnd.ms-powerpoint',\n        'rmvb' => 'application/vnd.rn-realmedia-vbr',\n        'rm' => 'application/vnd.rn-realmedia',\n        'rtf' => 'application/msword',\n        'svg' => 'image/svg+xml',\n        'swf' => 'application/x-shockwave-flash',\n        'tif' => 'image/tiff',\n        'tiff' => 'image/tiff',\n        'txt' => 'text/plain',\n        'vml' => 'text/xml',\n        'vxml' => 'text/xml',\n        'wav' => 'audio/wav',\n        'wma' => 'audio/x-ms-wma',\n        'wmv' => 'video/x-ms-wmv',\n        'xml' => 'text/xml',\n        'xls' => 'application/vnd.ms-excel',\n        'xq' => 'text/xml',\n        'xql' => 'text/xml',\n        'xquery' => 'text/xml',\n        'xsd' => 'text/xml',\n        'xsl' => 'text/xml',\n        'xslt' => 'text/xml'\n    );\n\n\n    public static function register(FISData $data_instance) {\n        self::$_data_queue[$data_instance->getDatatype()] = $data_instance;\n    }\n\n    public static function init() {\n        //注册对象\n        self::register(new FISPHPData());\n        self::register(new FISJSONData());\n        self::register(new FISAdocData());\n        self::$_chameleon_data = new ChameleonData();\n        \n        self::$_flush_data_queue = array(); //暂时只需要一份数据\n        $datatype = $_COOKIE['FIS_DEBUG_DATATYPE'];\n       \n        $flush_data = self::$_data_queue[$datatype];\n        \n        if (!$flush_data) { \n            //取数组第一个元素    FISPHPData对象     \n            $flush_data = current(self::$_data_queue);\n        }\n        if ($flush_data) {\n            self::$_flush_data_queue[] = $flush_data;\n        }\n        self::router();\n    }\n\n    public static function renderHelper($template_instance, $candidate_tmpl) {\n             \n        $mockData = self::$_chameleon_data->getMockContent();\n        //如果通过json文件找到mock数据\n        if($mockData) {\n            $puredata=$_GET[puredata];\n            //返回ajax数据\n            if($puredata == 1) {\n                $ajaxData = array();\n                $ajaxData[errno] = $mockData[errno];\n                $ajaxData[errmsg] = $mockData[errmsg];\n                $ajaxData[data] = $mockData[pageData];\n                echo json_encode($ajaxData);\n                return;\n            } else {\n                $template_instance->assign($mockData);\n            }\n        } else {\n            // 走之前的mock逻辑 mock与模板同名的php文件\n            foreach (self::$_flush_data_queue as $data_instance) {\n                //$data_instance FISPHPData对象\n                $template_instance->assign($data_instance->getData($candidate_tmpl));\n            }\n        }\n\n        $template_instance->display($candidate_tmpl);\n    }\n    public static function router() {\n        $request_uri = $_SERVER['REQUEST_URI'];\n        \n        $pos = strpos($request_uri, '?');\n        if ($pos !== false) {\n            $request_uri = substr($request_uri, 0, $pos);\n        }\n        $uris = explode('/', $request_uri);\n        //没有进入\n        if ($uris[1] == 'fisdata') {\n            if ($uris[2] == 'static') {\n                $uri_file = realpath(WWW_ROOT . $request_uri);\n                if (is_file($uri_file)) {\n                    $info = pathinfo($uri_file);\n                    header(\"Content-Type: \" . self::$MIME[$info['extension']]);\n                    echo file_get_contents($uri_file);\n                    exit;\n                }\n            } else {\n                self::doAction($uris[2]);\n            }\n        }\n    }\n\n    private static function doAction($action) {\n        $params = $_POST;\n        foreach (self::$_flush_data_queue as $data_instance) {\n            if (method_exists($data_instance, $action)) {\n                call_user_func_array(array($data_instance, $action), array('params' => $params));\n            }\n        }\n        exit();\n    }\n}\n"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/bookmark.js",
    "content": "javascript: void\nfunction() {\n    var d = new Date();\n    d.setFullYear(d.getFullYear() + 1);\n    document.cookie = 'FIS_DEBUG_DATA=4f10e208f47bfb4d35a5e6f115a6df1a;path=/;expires=' + d.toGMTString() + '';\n    location.reload();\n}();"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/index.tpl",
    "content": "<!DOCTYPE html>\n<html>\n<head>\n    <meta charset=\"utf-8\"/>\n    <title>FIS - 本地测试数据</title>\n    <link rel=\"stylesheet\" href=\"/fisdata/static/style.css\" />\n    <script type=\"text/javascript\" src=\"/fisdata/static/jquery-2.0.0.min.js\"></script>\n</head>\n<body>\n<div id=\"container\">\n    <div id=\"nav\">\n    </div>\n    <div id=\"main\">\n        <div id=\"top-toolbar\" class=\"toolbar\">\n            <div id=\"datatype-choice-toolbar\">\n                {%foreach $datatypes as $datatype%}\n                <label for=\"{%$datatype%}\">\n                    <input type=\"radio\" id=\"{%$datatype%}\" name=\"datatype\" value=\"{%$datatype%}\" {%if $default.datatype == $datatype %}checked=\"checked\"{%/if%} /> {%$datatype%}\n                </label>\n                {%/foreach%}\n            </div>\n            <div id=\"render-toolbar\">\n                <a href=\"/\" id=\"render-btn\">Render</a>\n            </div>\n            <div id=\"data-choice-toolbar\">\n                {%if (count($default.list) > 0) and ($default.datatype !== 'adoc')%}\n                <select name=\"data_id\">\n                    {%foreach $default.list as $k => $filepath%}\n                        <option value=\"{%$k%}\" filepath=\"{%$filepath%}\" {%if $default.list_default == $k%}selected=\"selected\"{%/if%}>{%$k%}</option>\n                    {%/foreach%}\n                </select>\n                {%elseif (count($default.list) > 0)%}\n                    {%foreach $default.list as $key => $data%}\n                    <div class=\"adoc-data-box\">\n                        <div class=\"adoc-data-box-title\">\n                            <input type=\"radio\" value=\"{%$key%}\" name=\"data-id\" value=\"{%$key%}\" {%if $default.list_default == $key %}checked=\"checked\"{%/if%} />&nbsp;&nbsp;数据{%$key%}\n                        </div>\n                        <div class=\"adoc-data-box-content\">\n                            {%$data%}\n                        </div>\n                    </div>\n                    {%/foreach%}\n                {%/if%}\n            </div>\n        </div>\n        <div id=\"editor\">{%$default.data%}</div>\n        <div id=\"bottom-toolbar\" class=\"toolbar\">\n            <input type=\"text\"  id=\"save-path\" default-value=\"{%$default.path%}\" value=\"{%$default.path%}\"/>\n            <button type=\"submit\" id=\"save-btn\">Save</button>\n        </div>\n        <script type=\"text/javascript\" src=\"/fisdata/static/ace.js\"></script>\n        <script>\n            function save() {\n                $.post('/fisdata/save', {\n                    'data': editor.getValue(),\n                    'path': $('#save-path').val()\n                }, function(res) {\n                    //reload\n                    res = eval('(' + res + ')');\n                    if (res.code != 0) {\n                        alert(res.message);\n                    } else {\n                        window.location.reload();\n                    }\n                });\n            }\n            var editor = ace.edit(\"editor\");\n            editor.setTheme(\"ace/theme/textmate\");\n            editor.getSession().setMode(\"ace/mode/{%$default.datatype%}\");\n\n            $('#datatype-choice-toolbar input[type=\"radio\"]').each(function() {\n                $(this).click(function() {\n                    editor.getSession().setMode(\"ace/mode/\" + $(this).val());\n                    //set datatype\n                    document.cookie = 'FIS_DEBUG_DATATYPE=' + $(this).val() + '; path=/';\n                    //reload\n                    window.location.reload();\n                });\n            });\n\n            $('#data-choice-toolbar input[type=\"radio\"]').each(function() {\n                $(this).click(function() {\n                    var val = $(this).val();\n                    document.cookie = 'FIS_DEBUG_DATA_ID={%$default.datatype%}|' + val + '; path=' + location.href + ';';\n                });\n            });\n\n            $('#save-btn').click(function(){\n                save();\n            });\n\n            $('#render-btn').click(function(event) {\n                event.preventDefault();\n                document.cookie = 'FIS_DEBUG_DATA=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/;';\n                save();\n            });\n\n            $('#data-choice-toolbar select').change(function() {\n                var val = $(this).val();\n                $('option', this).each(function() {\n                    if (this.selected) {\n                        $('#save-path').attr('default-value', $(this).attr('filepath')).val($(this).attr('filepath'));\n                    }\n                });\n                document.cookie = 'FIS_DEBUG_DATA_ID={%$default.datatype%}|' + val + '; path=' + location.href + ';';\n                $('#save-path').val();\n                $.post('/fisdata/get', {\n                    'path': $('#save-path').val()\n                }, function(res) {\n                    console.log(res);\n                    editor.setValue(res);\n                });\n            });\n        </script>\n    </div>\n</div>\n</body>\n</html>\n"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/libs/JsonPro/CommonHelper.php",
    "content": "<?php\n/*\n * Created on 2012-4-11\n * Created by Guo Xubin.\n */\nclass CommonHelper\n{\n\tpublic static function makeDir($dirPath)\n\t{\n\t\tif($dirPath==null or trim($dirPath)==\"\") return;//·��Ϊ�յĻ���ֱ�ӷ���\n\t\tif (is_dir($dirPath)) return ;//Ŀ¼�Ѿ�����\n\t\t\n\t\tif (!mkdir($dirPath, 0777, true)) \n\t\t{\n    \t\tdie(\"����Ŀ¼ʧ�ܣ�\".$dirPath);\n\t\t}\n\t}\n\t\n\tpublic static function json_format($json) \n\t{ \n\t\t//echo $json;\n\t    $tab = \"  \"; \n\t    $new_json = \"\"; \n\t    $indent_level = 0; \n\t    $in_string = false; \n\t\t//var_dump($json);\n\t    $json_obj = json_decode($json); \n\t\t//var_dump($json_obj);\n\t    if($json_obj === false) \n\t        return false; \n\t\n\t    $json = json_encode($json_obj); \n\t    $len = strlen($json); \n\t\n\t    for($c = 0; $c < $len; $c++) \n\t    { \n\t        $char = $json[$c]; \n\t        switch($char) \n\t        { \n\t            case '{': \n\t            case '[': \n\t                if(!$in_string) \n\t                { \n\t                    $new_json .= $char . \"\\n\" . str_repeat($tab, $indent_level+1); \n\t                    $indent_level++; \n\t                } \n\t                else \n\t                { \n\t                    $new_json .= $char; \n\t                } \n\t                break; \n\t            case '}': \n\t            case ']': \n\t                if(!$in_string) \n\t                { \n\t                    $indent_level--; \n\t                    $new_json .= \"\\n\" . str_repeat($tab, $indent_level) . $char; \n\t                } \n\t                else \n\t                { \n\t                    $new_json .= $char; \n\t                } \n\t                break; \n\t            case ',': \n\t                if(!$in_string) \n\t                { \n\t                    $new_json .= \",\\n\" . str_repeat($tab, $indent_level); \n\t                } \n\t                else \n\t                { \n\t                    $new_json .= $char; \n\t                } \n\t                break; \n\t            case ':': \n\t                if(!$in_string) \n\t                { \n\t                    $new_json .= \": \"; \n\t                } \n\t                else \n\t                { \n\t                    $new_json .= $char; \n\t                } \n\t                break; \n\t            case '\"': \n\t                if($c > 0 && $json[$c-1] != '\\\\') \n\t                { \n\t                    $in_string = !$in_string; \n\t                } \n\t            default: \n\t                $new_json .= $char; \n\t                break;                    \n\t        } \n\t    } \n\t\t//echo $new_json;\n\t    return $new_json; \n\t} \n\t\n\tpublic static function json_Html_format($json) \n\t{ \n\t    //echo $json;\n\t\t$tab = \"  \"; \n\t    $new_json = \"\"; \n\t    $indent_level = 0; \n\t    $in_string = false; \n\t\n\t    $json_obj = json_decode($json); \n\t\n\t    if($json_obj === false) \n\t        return false; \n\t\n\t//\t$json = json_encode($json_obj); \n\t    $len = strlen($json); \n\t\n\t    $strBlank = \"\";\n\t    for($c = 0; $c < $len; $c++) \n\t    { \n\t        $char = $json[$c]; \n\t        switch($char) \n\t        { \n\t            case '{': \n\t            case '[': \n\t                if(!$in_string) \n\t                { \n\t                \t$strBlank .= \"&nbsp;&nbsp;&nbsp;\";\n\t                    $new_json .= $char . \"<br>\\n $strBlank\" . str_repeat($tab, $indent_level+1); \n\t                    $indent_level++; \n\t                } \n\t                else \n\t                { \n\t                    $new_json .= $char; \n\t                } \n\t                break; \n\t            case '}': \n\t            case ']': \n\t                if(!$in_string) \n\t                { \n\t                \t$strBlank = substr($strBlank, 0, (strlen($strBlank) - 18));\n\t                    $indent_level--; \n\t                    $new_json .= \"<br>\\n $strBlank\" . str_repeat($tab, $indent_level) . $char; \n\t                } \n\t                else \n\t                { \n\t                    $new_json .= $char; \n\t                } \n\t                break; \n\t            case ',': \n\t                if(!$in_string) \n\t                { \n\t                    $new_json .= \",<br>\\n $strBlank\" . str_repeat($tab, $indent_level); \n\t                } \n\t                else \n\t                { \n\t                    $new_json .= $char; \n\t                } \n\t                break; \n\t            case ':': \n\t                if(!$in_string) \n\t                { \n\t                    $new_json .= \": \"; \n\t                } \n\t                else \n\t                { \n\t                    $new_json .= $char; \n\t                } \n\t                break; \n\t            case '\"': \n\t                if($c > 0 && $json[$c-1] != '\\\\') \n\t                { \n\t                    $in_string = !$in_string; \n\t                } \n\t            default: \n\t                $new_json .= $char; \n\t                break;                    \n\t        } \n\t    } \n\t\n\t    return $new_json; \n\t} \n\t\n\t//û�õ�\n\tpublic static function remove_redundant_backslash($json) //ɾ��������json_encode()����Ķ���ķ�б�� \n\t{ \n\t//\t$trans = array('\\\\\\/' => '/', '\\\"' => '\"', '\\/\\/' => '//');\n\t\t$trans = array('\\\\\\/' => '/');\n\t    $new_json = strtr($json, $trans);\n\t\n\t    return $new_json; \n\t} \n\t\n\t\n\t//�������е������ַ���utf8����     ���õݹ�\n\tpublic static function array_utf8_encode($arrSrc)\n\t{\n\t\tif (is_array($arrSrc))\n\t\t{\n\t\t//\techo \"111111111111\\n\";\n\t\t\tforeach($arrSrc as $k=>$v)\n\t\t\t{\n\t\t\t\tif (is_array($v))\n\t\t\t\t{\n\t\t\t\t\t$arrSrc[$k] = CommonHelper::array_utf8_encode($v);\n\t\t\t\t}\n\t\t\t\telse if(is_string($v))\n\t\t\t\t{\n\t\t\t\t\t$v = urlencode($v);\n\t\t\t\t\t$arrSrc[$k] = $v;\n\t    \t\t//\techo \"22222222222\".$v.\"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if(is_string($arrSrc))\n\t\t{\n\t\t\t$arrSrc = urlencode($arrSrc);\n    \t//\techo \"33333333\".$arrSrc.\"\\n\";\n\t\t}\n\t    return $arrSrc;\n\t}\n\n}\n \n \n?>\n"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/libs/JsonPro/Demo.php",
    "content": "<?php\n\trequire_once('./genInterface.php');\n\t\n\t//通过svn获取adoc文档内容，IDE单独实现\n\t//$adocFile = \"http://fe.baidu.com/repos/doc/iknow/fetest/home/home.text\";\n\t//$adocFile = \"http://fe.baidu.com/repos/doc/tieba/i18n/data/demo/index.text\";\n//\t$adocFile = \"http://fe.baidu.com/repos/doc/iknow/fetest/home/home.text\";\n//\t$adocFile = \"http://fe/repos/doc/iknow/exp/api/list/index.text\";\n//\t$adocFile = \"http://fe.baidu.com/repos/doc/tieba/i18n/module/frs/index.text\";\n\n\t$adocFile = dirname(__FILE__).\"/./data/json_Adoc.php\";\n\t//$adocFile = dirname(__FILE__).\"/./data/php_Adoc.php\";\n\t\n\t//$adocFile = \"http://127.0.0.1:8080/static/en/list/fisApi/list/tmp.text\";\n\t//$adocFile = \"http://fe.baidu.com/repos/doc/iknow/exp/api/fisApi/php/list/index.text\";\n\t//$adocFile = \"http://localhost/php/index.text\";\n\t\n\t$Content = file_get_contents($adocFile);\n\t//$Content = file_get_contents($AdocFile);\n\t\n\t\n\t//echo \"JsonContent:$JsonContent\\n\";\n\t//echo \"phpContent:$phpContent\\n\";\n\t\n\t//三个接口演示，以类的方式调用\n\t$demo = new genInterface();\n\t\n\t/*接口1 设置路径\n\t * 输入：参数是保存的case文档的绝对路径\n\t * \t\t  默认参数为 /工具的绝对路径/JsonPro/data/\n\t * 返回：true or false 提示设置成功或失败\n\t */\n\t$demo->setPath();\n\t\n\t/*\n\t * 接口2 生成测试数据，并将数据保存至接口1设置的位置\n\t * 输入：adoc文档的内容\n\t * 返回： true or false 提示生成成功或失败\n\t */\n\t//$demo->genCaseData($Content,\"http://fe.baidu.com/repos/doc/iknow/exp/api/fisApi/php\");\n\t$demo->genCaseData($Content,\"D:/build20120809/sample01/list/test/adoc/\");\n\t  //$demo->genCaseData($Content);\n\t  \n\t  \n\t/*\n\t * 接口3 测试数据case获取\n\t * 输入：uri，不包含地址及参数\n\t * 返回：json格式的case内容，包含多份case数据\n\t */\n\t$testCase = $demo->getCaseData(\"list\");\n\t\n\t//echo $testJsonCase;\n\n\tfile_put_contents(Config::$strPath.'/./tmp/Terminal.php',print_r($testCase, true));\n\n\t$testHtmlCase = $demo->getHtmlCaseData(\"list\");\n//\techo \"\".$testHtmlCase;\n\tfile_put_contents(Config::$strPath.'/./tmp/TerminalHtml.php',print_r($testHtmlCase, true));\n/*\t$aa=$testCase[1];\n\t\n\tforeach ( $aa as $key=>$value ) \n\t{\n    \techo \"key=\".$key.\" and value=\".$value.\"<br />\";   \n\t}\n\t//echo $testCase;*/\n\techo \"OK\";\n\n?>\n"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/libs/JsonPro/adocParser.php",
    "content": "<?php\n\nrequire_once(dirname(__FILE__).'/genArray.php');\n\n/*\n * Created on 2012-4-6\n * Created by Guo Xubin.\n * 这个类用于解析adoc文件内容。\n */\n\n class AdocParser\n {\n\n \t//从adoc解析出需要动态生成值的字段及其可选的值\n \tpublic function getJsonNotes($adocFilePath)\n \t{\n \t//\t$this->getInheritNewAdoc($jsonFileContent);\n\t//\t$newAdocArray = $this->getNewAdocArray($jsonFileContent);\n \t\t$newAdocArray = $this->getJsonInheritNewAdoc($adocFilePath);\n \t\t//var_dump($newAdocArray);\n\n\t\t$posNote = array();\n\t\t$this->array_all(\"\", $newAdocArray, \"\", $posNote);\n\t\tfile_put_contents(Config::$strPath.\"/./tmp/PosNote.php\", print_r($posNote, true));\n\n \t\t//首先去掉无用的注释，无用的注释指非范围标识的注释\n \t//\t$adocAfterStep1 = preg_replace('/\\/\\/[\\s]*[\\((.*)\\)/]', '', $jsonFileContent);\n \t//\tfile_put_contents(dirname(__FILE__).\"/./tmp/adocAfterStep1.php\", $adocAfterStep1);\n\t//\treturn $arrPosNote;\n\t\treturn $posNote;\n \t}\n\n  \tpublic function getPhpNotes($adocFilePath)\n \t{\n \t//\t$this->getInheritNewAdoc($jsonFileContent);\n\t//\t$newAdocArray = $this->getNewAdocArray($jsonFileContent);\n \t\t$newAdocArray = $this->getPhpInheritNewAdoc($adocFilePath);\n \t\t//var_dump($newAdocArray);\n\n\t\t$posNote = array();\n\t\t$this->array_all(\"\", $newAdocArray, \"\", $posNote);\n\t\tfile_put_contents(Config::$strPath.\"/./tmp/PosNote.php\", print_r($posNote, true));\n\n \t\t//首先去掉无用的注释，无用的注释指非范围标识的注释\n \t//\t$adocAfterStep1 = preg_replace('/\\/\\/[\\s]*[\\((.*)\\)/]', '', $jsonFileContent);\n \t//\tfile_put_contents(dirname(__FILE__).\"/./tmp/adocAfterStep1.php\", $adocAfterStep1);\n\t//\treturn $arrPosNote;\n\t\treturn $posNote;\n \t}\n\n \t//从adoc解析出需要动态生成值的字段及其可选的值\n\n\n\n\n //将注释\"na=>me\" => \"network\"中的双引号中的'=>'转变为\"||ArRoW_In_StR||\"\n\tpublic function changeArrowInNote($note)\n\t{\n\t\t\t$notelen = strlen($note);\n\t\t// $idxFront = strpos($note, '\"') -1;\n\t\t// $idxRear = strpos($note, '\"') + 1;\n\t\t $i = 0;\n\t\t $bInString = false;\n\t\t while($i != $notelen)\n\t\t {\n\t\t\t$oneChar = substr($note, $i, 1);\n\t\t\t$twoChar = substr($note, $i, 2);\n\t\t\t$frontChar = \"\";\n\t\t\tif($i > 1)\n\t\t\t{\n\t\t\t\t$frontChar = substr($note, $i - 1, 1);\n\t\t\t}\n\t\t\t//echo \"oneChar: $oneChar, frontChar: $frontChar\\n\";\n\t\t\tif($oneChar == '\"')\n\t\t\t{\n\t\t\t\tif(!$bInString)\n\t\t\t\t{\n\t\t\t\t\t$bInString = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$bInString = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($bInString && $twoChar == '=>')\n\t\t\t{\n\t\t\t\t$strFront = substr($note, 0, $i);\n\t\t\t\t$strRear = substr($note, ($i + 2));\n\t\t\t\t$note = $strFront.\"||ArRoW_In_StR||\".$strRear;\n\t\t\t\t//echo \"$note\\n\";\n\t\t\t\t$notelen = strlen($note);\n\t\t\t}\n\t\t\t$i ++;\n\t\t}\n\t\t//file_put_contents(dirname(__FILE__).\"/./tmp/note.php\", \"NOTE: $note\\n\");\n\t\treturn $note;\n\t}\n\n\n //将字符串中的\"||ArRoW_In_StR||\"变回\"=>\"\n\tfunction changeArrowBack($value)\n\t{\n\t\t$trans = array(\"||ArRoW_In_StR||\" => \"=>\");\n\t\t$value = strtr($value, $trans);\n\t\t//file_put_contents(dirname(__FILE__).\"/./tmp/note.php\", \"BACK: $value\\n\");\n\t\treturn $value;\n\t}\n\n\n \t//将注释//<\"st,r1\", \"str2\">中的双引号中的','转变为\"||CoMmA_In_StR||\"\n\tpublic function changeCommaInNote($note)\n\t{\n\t\t// $note = '//<\"点,心1\",\"饼干1\">';\n\t\t //echo \"NOTE: $note\\n\";\n\t\t $notelen = strlen($note);\n\t\t// $idxFront = strpos($note, '\"') -1;\n\t\t// $idxRear = strpos($note, '\"') + 1;\n\t\t $i = 0;\n\t\t $bInString = false;\n\t\t while($i != $notelen)\n\t\t {\n\t\t\t$oneChar = substr($note, $i, 1);\n\t\t\t$frontChar = \"\";\n\t\t\tif($i > 1)\n\t\t\t{\n\t\t\t\t$frontChar = substr($note, $i - 1, 1);\n\t\t\t}\n\t\t\t//echo \"oneChar: $oneChar, frontChar: $frontChar\\n\";\n\t\t\tif($oneChar == '\"' && $frontChar != '\\\\')\n\t\t\t{\n\t\t\t\tif(!$bInString)\n\t\t\t\t{\n\t\t\t\t\t$bInString = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$bInString = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($bInString && $oneChar == ',')\n\t\t\t{\n\t\t\t\t$strFront = substr($note, 0, $i);\n\t\t\t\t$strRear = substr($note, ($i + 1));\n\t\t\t\t$note = $strFront.\"||CoMmA_In_StR||\".$strRear;\n\t\t\t\t//echo \"$note\\n\";\n\t\t\t\t$notelen = strlen($note);\n\t\t\t}\n\t\t\t$i ++;\n\t\t}\n\t\t//file_put_contents(dirname(__FILE__).\"/./tmp/note.php\", \"NOTE: $note\\n\");\n\t\treturn $note;\n\t}\n\n \t//由 修改后的adoc文档生成的数组$newAdocArray 生成范围数组\n \t//$key 传入的element的key\n \t//$arrSrc 传入的element的value\n \t//$parentKey 传入的element的路径\n \t//$posNote 记录用的数组\n \tpublic function array_all($key, $arrSrc, $parentKey, &$posNote)\n\t{\n\t\tif (is_array($arrSrc))\n\t\t{\n\t\t\tif($parentKey == \"\")\n\t\t\t{\n\t\t\t\t$parentKey = $key;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$parentKey .= \",$key\";\n\t\t\t}\n\t\t\tforeach($arrSrc as $k=>$v)\n\t\t\t{\n\t\t\t\t$this->array_all($k, $v, $parentKey, $posNote);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$elementPath = \"\";\n\t\t\t$elementValue = \"\";\n\t\t\t$elementType = \"\";\n\t\t\t//获取$elementPath\n\t\t\tif($parentKey == \"\")\n\t\t\t{\n\t\t\t\t//echo \"$key $arrSrc\\n\";\n\t\t\t\t//echo \"$key\\n\";\n\t\t\t\t$elementPath = $key;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//echo \"$parentKey,$key $arrSrc\\n\";\n\t\t\t\t//echo \"$parentKey,$key\\n\";\n\t\t\t\t$elementPath = $parentKey.\",\".$key;\n\t\t\t}\n\t\t\t//获取$elementValue\n\t\t\t$elementValue = $arrSrc;\n\t\t\t$tmpValueStrArray = explode(\":\", $elementValue);\n\t\t\t$tmpValueStr = $tmpValueStrArray[0];\n\t\t\t$colonPos = strpos($elementValue, \":\");\n\t\t\tif($tmpValueStr == \"STRsHoUlDbE\")\n\t\t\t{\n\t\t\t//\t$elementValue = $tmpValueStrArray[1];\n\t\t\t\t$elementValue = substr($elementValue, $colonPos + 1);\n\t\t\t\t$elementType = \"string\";\n\t\t\t}\n\t\t\telse if($tmpValueStr == \"INTsHoUlDbE\")\n\t\t\t{\n\t\t\t//\t$elementValue = $tmpValueStrArray[1];\n\t\t\t\t$elementValue = substr($elementValue, $colonPos + 1);\n\t\t\t\t$elementType = \"int\";\n\t\t\t}\n\t\t\telse if($tmpValueStr == \"ArRaYrEpEaTe\")\n\t\t\t{\n\t\t\t\t$elementPath = $this->popJsonPos($elementPath);\n\t\t\t\t//$elementPath = $this->popJsonPos($elementPath);\n\n\t\t\t\t$elementValue = substr($elementValue, $colonPos + 1);\n\t\t\t\t$elementValue = trim($elementValue);\n\t\t\t\t$elementValue = \"/...\".$elementValue;\n\t\t\t\t$elementType = \"object\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$elementValue = $arrSrc;\n\t\t\t//\t//var_dump($elementValue);\n\t\t\t\t//echo \"NIMA!!!\\n\";\n\t\t\t\tif(is_int($elementValue))\n\t\t\t\t{\n\t\t\t\t\t$elementType = \"int\";\n\t\t\t\t}\n\t\t\t\telse if(is_string($elementValue))\n\t\t\t\t{\n\t\t\t\t\t$elementType = \"string\";\n\t\t\t\t}\n\t\t\t\telse if(is_bool($elementValue))\n\t\t\t\t{\n\t\t\t\t\t$elementType = \"string\";\n\t\t\t\t}\n\t\t\t\telse if(is_array($elementValue))\n\t\t\t\t{\n\t\t\t\t\t//echo \"NIMEI???\\n\";\n\t\t\t\t}\n\t\t\t\t$elementValue = \"\";\n\t\t\t}\n\t\t//\t//echo \"posNote\\n\";\n\t\t//\t//var_dump($posNote);\n\t\t\t//echo \"key: $elementPath; value: $elementValue; type: $elementType\\n\";\n\t\t\t$elementArray = array();\n\t\t\tarray_push($elementArray, $elementPath);\n\t\t\tarray_push($elementArray, $elementValue);\n\t\t\tarray_push($elementArray, $elementType);\n\t\t\tarray_push($posNote, $elementArray);\n\t\t//\treturn $posNote;\n\t\t}\n\n\t}\n\n \t//从adoc文件中解析出json部分。\n \tpublic function getJsonBlock($adocPath)\n \t{\n \t\t$contant=$this->getDataBlock($adocPath,\"main\");\n \t\t//echo \"ctctctctct\".$contant.\"END\";\n \t\treturn  $contant;\n\n \t\t//return $this->getDataBlock($adocPath,\"main\");\n \t}\n\n    public function getDefineBlock($adocPath){\n \t\t$contant=$this->getDataBlock($adocPath,\"define\");\n \t\treturn  $contant;\n    }\n\n \t//从adoc中解析出url内容。\n \tpublic function getUrlBlock($adocPath)\n \t{\n\n \t\t$contant=$this->getDataBlock($adocPath,\"url\");\n \t\t//echo \"ctctctctct\".$contant.\"END\";\n \t\treturn $contant;\n\n \t}\n\n\n \t//从adoc文件中解析出adoctype部分。\n \tpublic function getAdocTypeBlock($adocPath)\n \t{\n \t\t$contant=$this->getDataBlock($adocPath,\"adoctype\");\n \t\t//echo \"contant:$contant\\n\";\n \t\treturn  $contant;\n\n \t\t//return $this->getDataBlock($adocPath,\"main\");\n \t}\n \t//从adoc中解析出ref内容,即异步数据文件的相对路径。\n \tpublic function getRefPathArr($adocPath)\n \t{\n \t\t$asyncPathString=$this->getDataBlock($adocPath,\"ref\");\n \t\treturn explode(\",\",$asyncPathString);\n \t}\n\n  \tpublic function getParentAdocPath($adocPath)\n \t{\n \t\t//echo \"getParentAdocPath\\n\";\n\t\t$content=$this->getDataBlock($adocPath,\"parent\");\n\t\t//echo \"content:$content\\n\";\n\t\treturn $content;\n \t}\n\n  \t//从aodc中解析出addon内容，即模板组件的相对路径\n \tpublic function getAddonArr($adocPath)\n \t{\n \t\t$addonString=$this->getDataBlock($adocPath,\"addon\");\n \t\t//echo \"addonString: \".$addonString.\"\\n\";\n \t\tif($addonString == \"\")\n \t\t{\n\t \t\t$addonString = trim($addonString);\n \t\t\treturn null;\n \t\t}\n \t\treturn explode(\",\",$addonString);\n \t}\n\n \t/*\n\t *由Adoc文档路径\n\t *提取json和url串并返回\n\t */\n\tprivate function getDataBlock($adocPath,$blockName)\n\t{\n\t\t$fOpen = fopen($adocPath,\"r\");\n\n\t\t$content = \"\";\n\t\t$isJsonStr = false;\n\t\twhile(!feof($fOpen))\n\t\t{\n\t\t\t$line = fgets($fOpen);\n\t\t\t//echo $line.\"\\n\";\n\t\t\tif(preg_match('/^\\s*\\#\\#\\#\\#'.$blockName.'$/',trim($line)))\n\t\t\t{\n\t\t\t\t$isJsonStr = true;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if(preg_match('/\\#\\#\\#\\#/i',trim($line)) && $isJsonStr)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif(!$isJsonStr || (trim($line) == \"\") || (trim($line) == \":::javascript\"))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ($blockName==\"main\")\n\t\t\t\t{\n\t\t\t\t\t//we need the \\n at the end of line.\n\t\t\t\t\t$content = $content.$line;\n\t\t\t\t}\n\t\t\t\telseif ( $blockName==\"url\" )\n\t\t\t\t{\n\t\t\t\t\t$content = $content.trim($line);\n\t\t\t\t}\n\t\t\t\telseif ( $blockName==\"parent\" )\n\t\t\t\t{\n\t\t\t\t\t$content = $content.trim($line);\n\t\t\t\t}\n\t\t\t\telseif ($blockName==\"ref\")\n\t\t\t\t{\n\t\t\t\t\t$content = $content.trim($line).\",\";\n\t\t\t\t}\n\t\t\t\telseif ($blockName == \"addon\")\n\t\t\t\t{\n\t\t\t\t\t$content = $content.trim($line).\",\";\n\t\t\t\t}\n\t\t\t\telseif ($blockName==\"define\")\n\t\t\t\t{\n\t\t\t\t\t//we need the \\n at the end of line.\n\t\t\t\t\t$content = $content.$line;\n\t\t\t\t}\n\t\t\t\telseif ($blockName == \"adoctype\")\n\t\t\t\t{\n\t\t\t\t\t$content = $content.trim($line);\n\t\t\t\t\t//echo $content;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfclose($fOpen);\n\t\t//echo $content;\n\t\treturn $content;\n\t}\n\n\t//拼接处json中的所有需要改值的key。\n\tprivate function pushJsonPos($arrPos,$key)\n\t{\n\t\t$inStr = \"\";//最终入串的字符串\n\t\t$reStr = \"\";\n\t\t//echo \"push json pos function param: \".$key.\"  line:\".__LINE__.\"<br />\";\n\t\tif(substr($key,0,1) == \"'\" || substr($key,0,1) == '\"')\n\t\t{\n\t\t\t//去掉引号\n\t\t\t$inStr = substr($key,1,strlen($key)-2);\n\t\t\t//echo $inStr.\"\\n\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//不带引号的，直接添加。\n\t\t\t$inStr = $key;\n\t\t}\n\t\tif($arrPos != \"\")\n\t\t{\n\t\t\t$reStr = $arrPos.\",\".$inStr;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$reStr = $inStr;\n\t\t}\n\t//\t//echo \"push json pos function return: \".$reStr.\"<br />\\n\";\n\t\treturn $reStr;\n\t}\n\n\tprivate function popJsonPos($arrPos)\n\t{\n\t\t//echo \"before pop: \".$arrPos.\" line:\".__LINE__.\"\\n\";\n\t\t$arr = explode(\",\",$arrPos);\n\t\t$reStr = \"\";\n\n\t\tif(is_array($arr))\n\t\t{\n\t\t\t//var_dump($arr);\n\t\t\t$tmpPop = array_pop($arr);\n\t\t\t//var_dump($tmpPop);\n\t\t\tif(is_int($tmpPop))\n\t\t\t{\n\t\t\t\t$this->strPop = $tmpPop;\n\t\t\t\t//echo \"pop array no \".$this->strPop.\" line:\".__LINE__;\n\t\t\t}\n\t\t\t$lastNum = count($arr) - 1;\n\t\t\t$arr[$lastNum] = $arr[$lastNum] - 1;\n\n\t\t\tfor($i=0;$i<count($arr);$i++)\n\t\t\t{\n\t\t\t\tif($i != 0)\n\t\t\t\t{\n\t\t\t\t\t$reStr .= \",\".$arr[$i];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$reStr = $arr[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$reStr = \"\";\n\t\t}\n\t//\t//echo \"after pop: \".$reStr.\" line:\".__LINE__.\"\\n\";\n\t\treturn $reStr;\n\t}\n\n \t//拼接arrIndexQue。\n\tprivate function pushArrIndex($arrIndex,$key)\n\t{\n\t\tif($arrIndex == \"\") {\n\t\t\t$reStr = \"\".$key;\n\t\t} else {\n\t\t\t$reStr = $arrIndex.\",\".$key;\n\t\t}\n\t//\t//echo \"pushArrIndex return: \".$reStr.\"<br />\\n\";\n\t\treturn $reStr;\n\t}\n\n\tprivate function popArrIndex($arrIndex)\n\t{\n\t\t//echo \"before pop: \".$arrIndex.\" line:\".__LINE__.\"\\n\";\n\t\t$arr = explode(\",\",$arrIndex);\n\t\t$reStr = \"\";\n\n\t\tif(is_array($arr))\n\t\t{\n\t\t\t$tmpPop = array_pop($arr);\n\n\t\t\tfor($i=0;$i<count($arr);$i++)\n\t\t\t{\n\t\t\t\tif($i != 0)\n\t\t\t\t{\n\t\t\t\t\t$reStr .= \",\".$arr[$i];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$reStr = $arr[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t//\t//echo \"reStr = null!\\n\";\n\t\t\t$reStr = \"\";\n\t\t}\n\t//\t//echo \"popArrIndex return: \" . $reStr . \"\\n\";\n\t\treturn $reStr;\n\t}\n\n\tprivate function getTopArrIndex($arrIndex)\n\t{\n\t\t$arr = explode(\",\",$arrIndex);\n\t\t$reStr = \"\";\n\n\t\tif(is_array($arr))\n\t\t{\n\t\t\t$reStr = array_pop($arr);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$reStr = \"\";\n\t\t}\n\t//\t//echo \"getTopArrIndex return: \" . $reStr . \"\\n\";\n\t\treturn $reStr;\n\t}\n\n\t//对adoc文档进行处理，找到带有范围注释的可变元素，用范围替换可变元素的值。\n\t//然后去掉所有的注释，生成新的adoc文档。再将这个文档转化成php数组$newAdocArray\n\t//输入：$jsonFileContent adoc文档的main部分\n\t//返回：$newAdocArray\n \tpublic function getJsonNewAdocArray($jsonFileContent)\n \t{\n \t\t$genArray = new genArray();\n \t\t//CommonHelper::makeDir(dirname(__FILE__).\"/./tmp\");\n \t\tCommonHelper::makeDir(Config::$strPath.\"/./tmp\");\n\n \t\t//将adoc文档另外存一个文件\n \t\tfile_put_contents(Config::$strPath.\"/./tmp/AdocFile2.php\", $jsonFileContent);\n \t\t//按行读入文件，匹配处理\n \t\t$file_handle = fopen(Config::$strPath.\"/./tmp/AdocFile2.php\", \"r\");\n \t\t$newAdoc = \"\";\n \t\t$commaMark = 0; // 后续用于判断是否要加逗号\n\t\twhile (!feof($file_handle)) {\n\t\t   $line = fgets($file_handle);\n\t\t   $matchs = array();\n\n\t\t   // 判断是否要在...[]后加逗号\n\t\t   \tif ($commaMark == 1)\n\t\t   \t{\n\t\t   \t\t$lineTem = $genArray->reduce_string($line);\n\t\t   \t\tif ($lineTem != \"\") {\n\t\t   \t\t\t$commaMark = 0;\n\t\t   \t\t\tif ( substr($lineTem, 0, 1) != \"]\") {\n\t\t\t\t\t\t$newAdoc = trim($newAdoc);\n\t\t\t\t\t\t$newAdoc .= \",\\n\";\n\t\t   \t\t\t}\n\t\t   \t\t}\n\t\t   \t}\n\n\t\t    //preg_match执行一个正则表达式匹配“枚举类型”\n\t\t\tif(preg_match('/\\/\\/[\\s]*<(.*)>[\\s]*/', $line, $matchs) || preg_match('/\\/\\/[\\s]*\\[(.*)\\][\\s]*/', $line, $matchs) || preg_match('/\\/\\/[\\s]*\\((.*)\\)[\\s]*/', $line, $matchs))\n\t\t\t{\n\t\t\t\t//echo $line;\n\t\t\t\t//获取范围注释内容\n\t\t\t\t$note = $matchs[0];\n\t\t\t\t//echo \"note: $note\\n\";\n\t\t\t\t//将注释//<\"st,r1\", \"str2\">中的双引号中的','转变为\"||CoMmA_In_StR||\"\n\t\t\t\t$note = $this->changeCommaInNote($note);\n\t\t\t\t//echo \"note: $note\\n\";\n\n\n\t\t\t\t//将$line中的\"key\":\"value\"的value用可选的值$strNote替换\n\t\t\t\t$line = $genArray->reduce_string($line);//删除所有注释\n\t\t\t//\t$line = $genArray->trim_string($line);\n\t\t\t\t$lastSymbol = substr($line, -1);//\n\t\t\t\t//echo \"lastSymbol: \".$lastSymbol.\"\\n\";\n\t\t\t\t$hasComos = false;\n\t\t\t\tif(',' == $lastSymbol)\n\t\t\t\t{\n\t\t\t\t\t$line = substr($line, 0, strlen($line)-1);\n\t\t\t\t\t$hasComos = true;\n\t\t\t\t}\n\t\t\t\t$line = \"{\".$line.\"}\";\n\t\t\t\t//echo \"line:\".$line.\"\\n\";\n\n\n\t\t\t\t$lineArray = json_decode($line);\n\t\t\t\t//var_dump($lineArray);\n\t\t\t\t$key = \"\";\n\t\t\t\t$value = \"\";\n\t\t\t\t//var_dump($lineArray);\n\t\t\t\tforeach ($lineArray as $k => $v)\n\t\t\t\t{\n\t\t\t\t\t$key = $k;\n\t\t\t\t\t$value = $v;\n\t\t\t\t}\n\t\t\t\t//echo \"type: \".gettype($value).\"\\n\";\n\n\n\t\t\t\t//获取value要改成的字符串$strNote\n\t\t\t\t//获取$line中\"key\":\"value\"的value的类型，写入$strValueType\n\t\t\t\t$strValueType = gettype($value);\n\t\t\t\tif($strValueType != \"string\")\n\t\t\t\t{\n\t\t\t\t\t$strValueType = \"int\";\n\t\t\t\t}\n\t\t\t\t//echo \"strValueType : $strValueType\\n\";\n\t\t\t\t//根据注释内容$note和类型$strValueType生成可选的值$strNote\n\t\t\t\trequire_once(dirname(__FILE__).'/genValue.php');\n\t\t\t\t$genValue = new genValue($note,$strValueType);\n\t\t\t\t$strNote = $genValue->getValue($value);\n\t\t\t\tif($strValueType == \"string\")\n\t\t\t\t{\n\t\t\t\t\t$strNote = \"STRsHoUlDbE:\".$strNote;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$strNote = \"INTsHoUlDbE:\".$strNote;\n\t\t\t\t}\n\t\t\t\t//echo \"note : $note\\n\";\n                //echo \"strNote : $strNote\\n\";\n\n\n\t\t\t\t$lineArray = array(urlencode($key) => urlencode($strNote));\n\t\t\t\t//var_dump($lineArray);\n\t\t\t\t$line = json_encode($lineArray);\n\t\t\t\t$line = urldecode($line);\n\t\t\t\t$line = substr($line, 1, strlen($line)-2);\n\t\t\t\tif($hasComos)\n\t\t\t\t\t$line .= \",\";\n\t\t\t\t$line .= \"\\n\";\n\t\t\t\t//echo \"newline: $line\";\n\t\t\t}\n\t\t\t//匹配//(messycode)\n\n\t\t\tif(preg_match('/\\/\\/\\(messycode\\)[\\s]*$/', $line, $matchs))\n\t\t\t{\n\t\t\t\t//echo \"55555555555555555555555555555555555\\n\";\n\t\t\t\t//echo $line;\n\t\t\t\t//获取注释内容\n\t\t\t\t$note = $matchs[0];\n\t\t\t\t//获取$line中\"key\":\"value\"的value的类型，写入$strValueType\n\t\t\t\t$strValueType = \"string\";\n\t\t\t\t//echo \"$note\\n\";\n\t\t\t\trequire_once(dirname(__FILE__).'/genValue.php');\n\t\t\t\t$genValue = new genValue($note,$strValueType);\n\t\t\t\t$value=\"\";\n\t\t\t\t$strNote = $genValue->getValue($value);\n\t\t\t\t$strNote = \"STRsHoUlDbE:\".$strNote;\n\n\n\t\t\t\t//将$line中的\"key\":\"value\"的value用可选的值$strNote替换\n\t\t\t\t$line = $genArray->reduce_string($line);\n\t\t\t//\t$line = $genArray->trim_string($line);\n\t\t\t\t$lastSymbol = substr($line, -1);\n\t\t\t\t$hasComos = false;\n\t\t\t\tif(',' == $lastSymbol)\n\t\t\t\t{\n\t\t\t\t\t$line = substr($line, 0, strlen($line)-1);\n\t\t\t\t\t$hasComos = true;\n\t\t\t\t}\n\t\t\t\t$line = \"{\".$line.\"}\";\n\t\t\t\t$lineArray = json_decode($line);\n\t\t\t\t//var_dump($lineArray);\n\t\t\t\t$key = \"\";\n\t\t\t\tforeach ($lineArray as $k => $v)\n\t\t\t\t{\n\t\t\t\t\t$key = $k;\n\t\t\t\t}\n\t\t\t\t$lineArray = array(urlencode($key) => urlencode($strNote));\n\t\t\t\t//var_dump($lineArray);\n\t\t\t\t$line = json_encode($lineArray);\n\t\t\t\t$line = urldecode($line);\n\t\t\t\t$line = substr($line, 1, strlen($line)-2);\n\t\t\t\tif($hasComos)\n\t\t\t\t\t$line .= \",\";\n\t\t\t\t$line .= \"\\n\";\n\t\t\t\t//echo \"newline: $line\";\n\t\t\t}\n\t\t   \tif(preg_match('/\\/\\/...\\[(.*)\\][\\s]*$/', $line))\n\t\t   \t{\n\t\t   \t\t//echo $line;\n\t\t   \t\t$line = trim($line);\n\t\t   \t\t$line = substr($line, 5);\n\t\t   \t\t$line = \"{\\\"arrayRepeate\\\" :\\\"ArRaYrEpEaTe: $line\\\"}\\n\";\n\t\t   \t\t$commaMark = 1; // 后续用于判断是否要加逗号\n\t\t   \t\t//echo \"newline: $line\\n\";\n\t\t   \t\t//判断是否给上一行补\",\"\n\t\t   \t\t$newAdoc = trim($newAdoc);\n\t\t   \t\tif (substr($newAdoc, -1) != \",\") {\n\t\t   \t\t\t$newAdoc .= \",\\n\";\n\t\t   \t\t}else {\n\t\t   \t\t\t$newAdoc .= \"\\n\";\n\t\t   \t\t}\n\t\t   \t}\n\t\t  \t$newAdoc .= $line;\n\t\t}\n\t\tfclose($file_handle);\n\t//\t//echo \"newAdoc: $newAdoc\\n\";\n\t\t//echo \"\\n\\n\\n\\n\\n\\n\\n\\n\";\n\t\t//错误，getArray()传入参数是路径\n\t//\t$newAdocArray = $genArray->getArray($newAdoc);\n\n\t\t//读取json数据,并进行替换写回\n\n\t\t$fileStr = $genArray->reduce_string($newAdoc);\n\t\t$tmpPath = Config::$strPath.\"/./tmp/AdocAfterStep1.php\";\n\t\tfile_put_contents($tmpPath,$fileStr);\n\n\t\t//逐行trim decode 获得array\n\t\t$jsonStr = $genArray->trim_string($tmpPath);\n\t\t//$jsonStr = iconv(\"GBK\",\"UTF-8\",$jsonStr);\n\t\t//echo \"encoding\".mb_detect_encoding($jsonStr).\"\\n\";\n\t\t//echo \"before\".$jsonStr;\n        //echo \"jsonStr: $jsonStr\\n\";\n\t\t$newAdocArray = json_decode($jsonStr,true);\n        //print_r($newAdocArray);\n\n\t\treturn $newAdocArray;\n \t}\n\n\n public function getPhpNewAdocArray($jsonFileContent)\n \t{\n \t\t//echo \"jsonFileContent:$jsonFileContent\\n\";\n \t\t$genArray = new genArray();\n \t\t//CommonHelper::makeDir(dirname(__FILE__).\"/./tmp\");\n \t\tCommonHelper::makeDir(Config::$strPath.\"/./tmp\");\n\n \t\t//将adoc文档另外存一个文件\n \t\tfile_put_contents(Config::$strPath.\"/./tmp/AdocFile2.php\", $jsonFileContent);\n \t\t//按行读入文件，匹配处理\n \t\t$file_handle = fopen(Config::$strPath.\"/./tmp/AdocFile2.php\", \"r\");\n \t\t$newAdoc = \"\";\n \t\t$commaMark = 0; // 后续用于判断是否要加逗号\n\t\twhile (!feof($file_handle)) {\n\t\t   $line = fgets($file_handle);\n\t\t   $matchs = array();\n\n\t\t\t// 判断是否要在...[]后加逗号\n\t\t   \tif ($commaMark == 1)\n\t\t   \t{\n\t\t   \t\t$lineTem = $genArray->reduce_string($line);\n\t\t   \t\tif ($lineTem != \"\") {\n\t\t   \t\t\t$commaMark = 0;\n\t\t   \t\t\tif ( substr($lineTem, 0, 1) != \")\") {\n\t\t\t\t\t\t$newAdoc = trim($newAdoc);\n\t\t\t\t\t\t$newAdoc .= \",\\n\";\n\t\t\t\t\t\t//echo \"a\";\n\t\t   \t\t\t}\n\t\t   \t\t}\n\t\t   \t}\n\n\t\t    //preg_match执行一个正则表达式匹配\n\t\t\tif(preg_match('/\\/\\/[\\s]*<(.*)>[\\s]*/', $line, $matchs) || preg_match('/\\/\\/[\\s]*\\[(.*)\\][\\s]*/', $line, $matchs))\n\t\t\t{\n\t\t\t\t//获取范围注释内容\n\t\t\t\t$note = $matchs[0];\n\t\t\t\t//echo \"note: $note\\n\";\n\t\t\t\t//将注释//<\"st,r1\", \"str2\">中的双引号中的','转变为\"||CoMmA_In_StR||\"\n\t\t\t\t$note = $this->changeCommaInNote($note);\n\t\t\t\t//echo \"note: $note\\n\";\n\n\n\t\t\t\t//将$line中的\"key\":\"value\"的value用可选的值$strNote替换\n\t\t\t\t$line = $genArray->reduce_string($line);//删除所有注释\n\t\t\t\t//echo $line;\n\t\t\t\t$lastSymbol = substr($line, -1);//\n\t\t\t\t//echo \"lastSymbol: \".$lastSymbol.\"\\n\";\n\t\t\t\t$hasComos = false;\n\t\t\t\tif(',' == $lastSymbol)\n\t\t\t\t{\n\t\t\t\t\t$line = substr($line, 0, strlen($line)-1);\n\t\t\t\t\t$hasComos = true;\n\t\t\t\t}\n\n\t\t\t\t$line=$this->changeArrowInNote($line);\n\t\t\t\t//var_dump($line);\n\t\t\t\t$lineArray = explode(\" => \", $line);\n\n\t\t\t\t//将字符串中的\"||ArRoW_In_StR||\"变回\"=>\"\n\t\t\t\t$lineArray[0]=$this->changeArrowBack($lineArray[0]);\n\t\t\t\t$lineArray[1]=$this->changeArrowBack($lineArray[1]);\n\t\t\t\t//var_dump($lineArray);\n\n\n\t\t\t\t//----------change by xumeng02----------------\n\t\t\t\tif('\"'==substr($lineArray[1],0,1)) {\n\t\t\t\t\t$strValueType=\"string\";\n\t\t\t\t\t$value = substr($lineArray[1],1,strlen($lineArray[1])-2);\n\t\t\t\t\t//var_dump($value);\n\t\t\t\t}else {\n\t\t\t\t\t$strValueType = \"int\";\n\t\t\t\t\t$value = intval($lineArray[1]);\n\t\t\t\t}\n\t\t\t\t//--end-----change by xumeng02----------------\n\n\t\t\t\t//echo \"strValueType : $strValueType\\n\";\n\t\t\t\t//根据注释内容$note和类型$strValueType生成可选的值$strNote\n\t\t\t\trequire_once(dirname(__FILE__).'/genValue.php');\n\t\t\t\t$genValue = new genValue($note,$strValueType);\n\t\t\t\t$strNote = $genValue->getValue($value);\n\t\t\t\tif($strValueType == \"string\")\n\t\t\t\t{\n\t\t\t\t\t$strNote = \"STRsHoUlDbE:\".$strNote;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$strNote = \"INTsHoUlDbE:\".$strNote;\n\t\t\t\t}\n\n\t\t\t\t$line=$lineArray[0].\"=>\\\"\".$strNote.\"\\\"\";\n\t\t\t\t//echo \"newline:\".$line.\"\\n\";\n\n\t\t\t\tif($hasComos)\n\t\t\t\t\t$line .= \",\";\n\t\t\t\t$line .= \"\\n\";\n\t\t\t}\n\t\t\t//匹配//(messycode)\n\t\t\tif(preg_match('/\\/\\/\\(messycode\\)[\\s]*$/', $line, $matchs))\n\t\t\t{\n\t\t\t\t//获取注释内容\n\t\t\t\t$note = $matchs[0];\n\t\t\t\t//获取$line中\"key\":\"value\"的value的类型，写入$strValueType\n\t\t\t\t$strValueType = \"string\";\n\t\t\t\t//echo \"$note\\n\";\n\t\t\t\trequire_once(dirname(__FILE__).'/genValue.php');\n\t\t\t\t$genValue = new genValue($note,$strValueType);\n\t\t\t\t$value = \"\";\n\t\t\t\t$strNote = $genValue->getValue($value);\n\t\t\t\t$strNote = \"STRsHoUlDbE:\".$strNote;\n\n\n\t\t\t\t//将$line中的\"key\":\"value\"的value用可选的值$strNote替换\n\t\t\t\t$line = $genArray->reduce_string($line);\n\t\t\t\t$lastSymbol = substr($line, -1);\n\t\t\t\t$hasComos = false;\n\t\t\t\tif(',' == $lastSymbol)\n\t\t\t\t{\n\t\t\t\t\t$line = substr($line, 0, strlen($line)-1);\n\t\t\t\t\t$hasComos = true;\n\t\t\t\t}\n\n\t\t\t\t$line=$this->changeArrowInNote($line);\n\n\t\t\t\t$lineArray=explode(\" => \", $line);\n\n\t\t\t\t$lineArray[0]=$this->changeArrowBack($lineArray[0]);\n\t\t\t\t$lineArray[1]=$this->changeArrowBack($lineArray[1]);\n\n\t\t\t\t$line=$lineArray[0].\" => \\\"\".$strNote.\"\\\"\";\n\t\t\t\t//$line = urldecode($line);\n\n\n\t\t\t\tif($hasComos)\n\t\t\t\t\t$line .= \",\";\n\t\t\t\t$line .= \"\\n\";\n\t\t\t\t//echo \"newline: $line\";\n\t\t\t}\n\t\t   \tif(preg_match('/\\/\\/...\\[(.*)\\][\\s]*$/', $line))\n\t\t   \t{\n\t\t   \t\t//echo $line;\n\n\t\t   \t\t$line = trim($line);\n\t\t   \t\t$line = substr($line, 5);\n\t\t   \t\t$commaMark = 1;\n\n\t\t   \t\t//判断范围注释前是否有逗号，如果没有，加上逗号\n\t\t   \t\t$comos_test = substr(trim($newAdoc),-1,1);\n\t\t   \t\tif($comos_test != \",\")\n\t\t   \t\t\t$newAdoc=trim($newAdoc).\",\".\"\\n\";\n\t\t   \t\t$line = \"array(\\n\\\"arrayRepeate\\\" => \\\"ArRaYrEpEaTe: $line\\\")\\n\";\n\t\t   \t}\n\n\t\t  \t$newAdoc .= $line;\n\t\t  \t//echo $newAdoc;\n\n\n\t\t}\n\t\tfclose($file_handle);\n\n\n\t\t//读取json数据,并进行替换写回\n\n\t\t$fileStr = $genArray->reduce_string($newAdoc);\n\t\t//echo \"fileStr:$fileStr\\n\";\n\t\t$tmpPath = Config::$strPath.\"/./tmp/AdocAfterStep1.php\";\n\t\tfile_put_contents($tmpPath,$fileStr);\n\n\t\teval($newAdoc);\n\t\t//print_r($newAdocArray);\n\n\t\treturn $newAdocArray;\n \t}\n\n \tpublic function getJsonInheritNewAdoc($adocFilePath)\n\t{\n\t\t$jsonFileContent = $this->getJsonBlock($adocFilePath);//得到main中的json数据块\n\t\t//echo $jsonFileContent;\n\t\t//获取  父adoc的内容，传入参数是  子adoc的本地地址;如果没有父adoc则返回\"\"\n\t\t$parentContent = $this->getParentContent($adocFilePath);\n\t\tif($parentContent == \"\")\n\t\t{\n\t\t\t$inheritNewAdoc = $this->getJsonNewAdocArray($jsonFileContent);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfile_put_contents(Config::$strPath.\"/./Parent.php\", $parentContent);\n\t\t\t$parentJson = $this->getJsonBlock(Config::$strPath.\"/./Parent.php\");\n\t\t\t//echo \"parentJson:\\n\".$parentJson.\"\\n\";\n\t\t\t$parentNewAdocArray = $this->getJsonNewAdocArray($parentJson);\n\t\t\t//echo \"\\n\\n\\nparentNewAdocArray:\\n\";\n\t\t\t//var_dump($parentNewAdocArray);\n\t\t\tfile_put_contents(Config::$strPath.\"/./tmp/ParentNewAdocArray.php\",print_r($parentNewAdocArray,true));\n\n\t\t\t//echo \"childJson:\\n$jsonFileContent\\n\";\n\t\t\t$childNewAdocArray = $this->getJsonNewAdocArray($jsonFileContent);\n\t\t\t//echo \"\\n\\n\\nchildNewAdocArray:\\n\";\n\t\t\t//var_dump($childNewAdocArray);\n\t\t\tfile_put_contents(Config::$strPath.\"/./tmp/ChildNewAdocArray.php\",print_r($childNewAdocArray,true));\n\t\t\t$inheritNewAdoc = $this->getInheritResult($parentNewAdocArray, $childNewAdocArray);\n\t\t\tfile_put_contents(Config::$strPath.\"/./tmp/InheritNewAdoc.php\",print_r($inheritNewAdoc,true));\n\t\t}\n\n\t\treturn $inheritNewAdoc;\n\t}\n public function getPhpInheritNewAdoc($adocFilePath)\n\t{\n\t\t$jsonFileContent = $this->getJsonBlock($adocFilePath);//得到main中的json数据块\n\t\t//echo $jsonFileContent;\n\n\t\t//获取  父adoc的内容，传入参数是  子adoc的本地地址;如果没有父adoc则返回\"\"\n\t\t$parentContent = $this->getParentContent($adocFilePath);\n\t\t//echo \"parentContent:$parentContent\\n\";\n\t\tif($parentContent == \"\")\n\t\t{\n\t\t\t$inheritNewAdoc = $this->getPhpNewAdocArray($jsonFileContent);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfile_put_contents(Config::$strPath.\"/./Parent.php\", $parentContent);\n\t\t\t$parentJson = $this->getJsonBlock(Config::$strPath.\"/./Parent.php\");\n\t\t\t//echo \"parentJson:\\n\".$parentJson.\"\\n\";\n\t\t\t$parentNewAdocArray = $this->getPhpNewAdocArray($parentJson);\n\t\t\t//echo \"\\n\\n\\nparentNewAdocArray:\\n\";\n\t\t\t//var_dump($parentNewAdocArray);\n\t\t\tfile_put_contents(Config::$strPath.\"/./tmp/ParentNewAdocArray.php\",print_r($parentNewAdocArray,true));\n\n\t\t\t//echo \"childJson:\\n$jsonFileContent\\n\";\n\t\t\t$childNewAdocArray = $this->getPhpNewAdocArray($jsonFileContent);\n\t\t\t//echo \"\\n\\n\\nchildNewAdocArray:\\n\";\n\t\t\t//var_dump($childNewAdocArray);\n\t\t\tfile_put_contents(Config::$strPath.\"/./tmp/ChildNewAdocArray.php\",print_r($childNewAdocArray,true));\n\n\t\t\t$inheritNewAdoc = $this->getInheritResult($parentNewAdocArray, $childNewAdocArray);\n\t\t\tfile_put_contents(Config::$strPath.\"/./tmp/InheritNewAdoc.php\",print_r($inheritNewAdoc,true));\n\t\t}\n\t\t//echo $inheritNewAdoc;\n\t\treturn $inheritNewAdoc;\n\t}\n\n\tpublic function getInheritResult($parentNewAdocArray, $childNewAdocArray)\n\t{\n\t\t$inheritResult = $parentNewAdocArray;\n\t\t//遍历$childNewAdocArray，当\n\t\tforeach ($childNewAdocArray as $childKey => $childValue)\n\t\t{\n\t\t\t//echo \"childKey: $childKey\\n\";\n\t\t//\t$inheritResult[$childKey] = $childValue;\t//替换已有内容，或添加没有的内容\n\t\t\tif(array_key_exists($childKey, $inheritResult))\n\t\t\t{\n\t\t\t\t//echo \"Exists, \";\n\t\t\t\tif(is_array($childValue))\n\t\t\t\t{\n\t\t\t\t\t//echo \"but is array!\\n\";\n\t\t\t\t\t$inheritResult[$childKey] = $this->getInheritResult($inheritResult[$childKey], $childValue);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//echo \"and is not array!\\n\";\n\t\t\t\t\t$inheritResult[$childKey] = $childValue;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//echo \"Not exists!\\n\";\n\t\t\t\t$inheritResult[$childKey] = $childValue;\n\t\t\t}\n\t\t}\n\t\t//var_dump($inheritResult);\n\t\treturn $inheritResult;\n\t}\n\n\t//获取  父adoc的内容，传入参数是  子adoc的本地地址\n\t//如果没有父adoc则返回\"\"\n\tpublic function getParentContent($adocFilePath)\n\t{\n\t\t$parentAdocPath = $this->getParentAdocPath($adocFilePath);\n\t\t//echo \"parentAdocPath:$parentAdocPath\\n\";\n\t\t//var_dump($parentAdocPath);\n\t\tif(trim($parentAdocPath) == \"\")\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t\t//echo \"asyncBasePath: \".Config::$asyncBasePath.\"\\n\";\n\t\t$parentAdocPath = Config::$asyncBasePath.trim($parentAdocPath).\".text\";\n\t\t//echo $parentAdocPath;\n\t\t$parentContent = file_get_contents($parentAdocPath);\n\t\t//echo \"parentContent: \".$parentContent.\"\\n\";\n\t\treturn $parentContent;\n\t}\n }\n\n?>\n"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/libs/JsonPro/genArray.php",
    "content": "<?php\n\trequire_once(dirname(__FILE__).'/genLog.php');\n\t\n\tclass genArray\n\t{\n\t\tpublic function __construct()\n\t\t{\n\t\t\tJson_Log::init();//Json_Log::fatal(\"in genarray\",__FILE__,__LINE__);\n\t\t}\n\t\t\n\t\tpublic function getJsonInheritStandArray($jsonFilePath, $adocFilePath)\n\t\t{\n\t\t\t//echo \"getInheritStandArray\\n\";\n\t\t\t//存储父adoc文档的main部分到/tmp/parentJsonFile.php\n\t\t\t$adocParser = new AdocParser();\n\t\t\t$parentContent = $adocParser->getParentContent($adocFilePath);\n\t\t\t//echo $parentContent;\n\t\t\tif($parentContent == \"\")\n\t\t\t{\n\t\t\t\t$inheritStandArray = $this->getJsonArray($jsonFilePath);\n\t\t\t\t//echo $inheritStandArray;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$parentJsonFileContent = $adocParser->getJsonBlock(Config::$strPath.\"/./Parent.php\");\n\t\t\t\t$parentJsonFilePath = Config::$strPath.\"/./tmp/parentFile.php\";\n\t\t\t\tfile_put_contents($parentJsonFilePath,$parentJsonFileContent);\n\t\t\t\t\n\t\t\t\t//分别获取 子adoc文档的标准数组  和  父adoc文档的标准数组\n\t\t\t\t$childStandArr = $this->getJsonArray($jsonFilePath);\n\t\t\t\t//echo \"childStandArr:\\n\";\n\t\t\t\t//var_dump($childStandArr);\n\t\t\t\t$parentStandArr = $this->getJsonArray($parentJsonFilePath);\n\t\t\t\t//echo \"parentStandArr:\\n\";\n\t\t\t\t//var_dump($parentStandArr);\n\t\t\t\t\n\t\t\t\t//合并 子adoc文档的标准数组  和  父adoc文档的标准数组，得到$inheritStandArray\n\t\t\t\t$inheritStandArray = $this->getInheritStand($parentStandArr, $childStandArr);\n\t\t\t\t//var_dump($inheritStandArray);\n\t\t\t}\n\t\t\treturn $inheritStandArray;\n\t\t\t\n\t\t}\n\tpublic function getPhpInheritStandArray($jsonFilePath, $adocFilePath)\n\t\t{\n\t\t\t//echo \"getInheritStandArray\\n\";\n\t\t\t//存储父adoc文档的main部分到/tmp/parentJsonFile.php\n\t\t\t$adocParser = new AdocParser();\n\t\t\t$parentContent = $adocParser->getParentContent($adocFilePath);\n\t\t\tif($parentContent == \"\")\n\t\t\t{\n\t\t\t\t$inheritStandArray = $this->getPhpArray($jsonFilePath);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$parentJsonFileContent = $adocParser->getJsonBlock(Config::$strPath.\"/./Parent.php\");\n\t\t\t\t$parentJsonFilePath = Config::$strPath.\"/./tmp/parentFile.php\";\n\t\t\t\tfile_put_contents($parentJsonFilePath,$parentJsonFileContent);\n\t\t\t\t\n\t\t\t\t//分别获取 子adoc文档的标准数组  和  父adoc文档的标准数组\n\t\t\t\t$childStandArr = $this->getPhpArray($jsonFilePath);\n\t\t\t\t//echo \"childStandArr:\\n\";\n\t\t\t\t//var_dump($childStandArr);\n\t\t\t\t$parentStandArr = $this->getPhpArray($parentJsonFilePath);\n\t\t\t\t//echo \"parentStandArr:\\n\";\n\t\t\t\t//var_dump($parentStandArr);\n\t\t\t\t\n\t\t\t\t//合并 子adoc文档的标准数组  和  父adoc文档的标准数组，得到$inheritStandArray\n\t\t\t\t$inheritStandArray = $this->getInheritStand($parentStandArr, $childStandArr);\n\t\t\t\t//var_dump($inheritStandArray);\n\t\t\t}\n\t\t\treturn $inheritStandArray;\n\t\t\t\n\t\t}\n\t\t\n\t\tpublic function getInheritStand($parentStandArr, $childStandArr)\n\t\t{\n\t\t\t$inheritResult = $parentStandArr;\n\t\t\t//遍历$childNewAdocArray，当\n\t\t\tforeach ($childStandArr as $childKey => $childValue)\n\t\t\t{\n\t\t\t\t//echo \"childKey: $childKey\\n\";\n\t\t\t//\t$inheritResult[$childKey] = $childValue;\t//替换已有内容，或添加没有的内容\n\t\t\t\tif(array_key_exists($childKey, $inheritResult))\n\t\t\t\t{\n\t\t\t\t\t//echo \"Exists, \";\n\t\t\t\t\tif(is_array($childValue))\n\t\t\t\t\t{\n\t\t\t\t\t\t//echo \"but is array!\\n\";\n\t\t\t\t\t\t$inheritResult[$childKey] = $this->getInheritStand($inheritResult[$childKey], $childValue);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//echo \"and is not array!\\n\";\n\t\t\t\t\t\t$inheritResult[$childKey] = $childValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//echo \"Not exists!\\n\";\n\t\t\t\t\t$inheritResult[$childKey] = $childValue;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//var_dump($inheritResult);\n\t\t\treturn $inheritResult;\n\t\t}\n\t\t\n\t\tpublic function getJsonArray($jsonFilePath)\n\t\t{\n\t\t\t//读取adoc文档，获取json串\n\t\t\t/*$fileAdoc = dirname(__FILE__).\"/./home.text\";//home5.text、home.text\n\t\t\t$path = dirname(__FILE__).\"/./jsonData.json\";\n\t\t\t$fileAdoc = $this->gen_JsonData($fileAdoc);\n\t\t\tfile_put_contents($path,$fileAdoc);*/\n\t\t\t\n\t\t\t//读取json数据,并进行替换写回 \n\t\t\t$fileStr = file_get_contents($jsonFilePath);\n\t\t\t\n\t\t\t$fileStr = $this->reduce_string($fileStr);\n\t\t\t$tmpPath = dirname($jsonFilePath).\"/StanStr.php\";\n\t\t\tfile_put_contents($tmpPath,$fileStr);\n\n\t\t\t//逐行trim decode 获得array\n\t\t\t$jsonStr = $this->trim_string($tmpPath);\n\t\t\t//$jsonStr = iconv(\"GBK\",\"UTF-8\",$jsonStr);\n\t\t\t//echo \"encoding\".mb_detect_encoding($jsonStr).\"\\n\";\n\t\t\t//echo \"before\".$jsonStr;\n\t\t\t$jsonArr = json_decode($jsonStr,true);\n\t\t//\tif($jsonArr == null) {\n\t\t//\t\techo \"\\n stanArr is null!\\n\";\n\t\t//\t}\n\t\t\tfile_put_contents(dirname($jsonFilePath).\"/Standard.php\",print_r($jsonArr,true));\n\n\t\t\treturn $jsonArr;\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\tpublic function getPhpArray($jsonFilePath)\n\t\t{\n\t\t\t//echo \"getArray\\n\";\n\n\t\t\t//读取adoc文档，获取json串\n\t\t\t/*$fileAdoc = dirname(__FILE__).\"/./home.text\";//home5.text、home.text\n\t\t\t$path = dirname(__FILE__).\"/./jsonData.json\";\n\t\t\t$fileAdoc = $this->gen_JsonData($fileAdoc);\n\t\t\tfile_put_contents($path,$fileAdoc);*/\n\t\t\t\n\t\t\t//读取json数据,并进行替换写回 \n\t\t\t$fileStr = file_get_contents($jsonFilePath);\n\t\t\t//echo \"fileStr: $fileStr\\n\";\n\t\t\t$fileStr = $this->reduce_string($fileStr);\n\n\t\t\t//echo \"jsonFilePath:$jsonFilePath\\n\\n\";\n\t\t\t//jsonFilePath:GAEA_TEMP_PATHdata/File.php\n\t\t\t//jsonFilePath:GAEA_TEMP_PATHdata//./tmp/parentFile.php\n\t\t\t//jsonFilePath:GAEA_TEMP_PATHdata/File.php\n\t\t\t//jsonFilePath:GAEA_TEMP_PATHdata//./tmp/parentFile.php\n\t\t\t$tmpPath = dirname($jsonFilePath).\"/StanStr.php\";\n\t\t\tfile_put_contents($tmpPath,$fileStr);\n\n\t\t\t//逐行trim decode 获得array\n\t\t//\t$jsonStr = $this->trim_string($tmpPath);\n\t\t\t//$jsonStr = iconv(\"GBK\",\"UTF-8\",$jsonStr);\n\t\t\t//echo \"encoding\".mb_detect_encoding($jsonStr).\"\\n\";\n\t\t\t//echo \"before\".$jsonStr;\n\t\t//\t$jsonArr = json_decode($jsonStr,true);\n\t\t\teval($fileStr);\n\t\t\t//echo \"newAdocArray:\\n\";\n\t\t\t//print_r($newAdocArray);\n\t\t//\tif($jsonArr == null) {\n\t\t//\t\techo \"\\n stanArr is null!\\n\";\n\t\t//\t}\n\t\t//\tfile_put_contents(dirname($jsonFilePath).\"/standard.php\",print_r($jsonArr,true));\n\t\t\tfile_put_contents(dirname($jsonFilePath).\"/Standard.php\",print_r($newAdocArray,true));\n\t\t\treturn $newAdocArray;\t\n\t\t}\n\t\t\n\t\t\n    \n\t\tfunction gen_JsonData($pathAdoc,$keyStartAdoc=\"main\")\n\t\t{\n\t\t\t$fOpen = fopen($pathAdoc,\"r\");\n\t\t\t$content = \"\";\n\t\t\t$isJsonStr = false;\n\t\t\twhile(!feof($fOpen))\n\t\t\t{\n\t\t\t\t$line = fgets($fOpen);\n\t\t\t\t//if(preg_match('/^\\s*\\#\\#\\#\\#'.$keyStartAdoc.'(.+)$/',$line))\n\t\t\t\tif(preg_match('/^\\s*\\#\\#\\#\\#'.$keyStartAdoc.'$/',$line) || preg_match('/^\\s*\\#\\#\\#\\#'.$keyStartAdoc.'(.+)$/',$line))\n\t\t\t\t{\n\t\t\t\t\t$isJsonStr = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse if(preg_match('/\\#\\#\\#\\#/i',$line))\n\t\t\t\t{\n\t\t\t\t\t$isJsonStr = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$isJsonStr || (trim($line) == \"\") || (trim($line) == \":::javascript\"))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(content != \"\")\n\t\t\t\t{\n\t\t\t\t\t$content = $content.$line;\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$content = $line;\n\t\t\t\t}\n\t\t\t}   \n\t\t\tfclose($fOpen);\n\t\t\treturn $content;\n\t\t}\n\t   /*\n\t    * 匹配正则，删除// 等注释语句（包括范围注释）\n\t    * @param    string  $str    json string\n\t    * @return   string  $str    去除注释后的语句                 \n\t    * @access   public\n\t    */\n\t     function reduce_string($str)\n\t    {\n\t        $str = preg_replace(array(\n\t\n\t        \t//m 则^、$针对行的开始和结尾\n\t        \t//s 匹配多行\n\t                // eliminate single line comments in '// ...' form\n\t                '#\\s*(?<!:)//(.+)$#m',\n\t\n\t                // eliminate multi-line comments in '/* ... */' form, at start of string\n\t                '#^\\s*/\\*(.+)\\*/#m',\n\t\n\t                // eliminate multi-line comments in '/* ... */' form, at end of string\n\t                '#/\\*(.+)\\*/\\s*$#m',\n\t        \n\t        \t\t'#^\\s*/\\*(.+)\\*/\\s*$#ms',\n\t\n\t            ), array('','',''), $str);\n\t\n\t        // eliminate extraneous space\n\t        //echo trim($str);\n\t        return trim($str);\n\t    }\n\t    \n\t    /*\n\t    * 读取文件内容，返回trim后的string串\n\t    * @param    string  $filePath   文件路径（中间文件或ADOC文档）\n\t    * @return   string  $content    标准json串或字符串                 \n\t    * @access   public\n\t    */\n\t    function trim_string($filePath,$split = \"\")\n\t    {\n\t    \t$fOpen = fopen($filePath,\"r\");\n\t\t\t$content = \"\";\n\t\t\twhile(!feof($fOpen))\n\t\t\t{\n\t\t\t\t$line = fgets($fOpen);\n\t\t\t\t$line = trim($line);\n\t\t\t\t//todo 在key值添加双引号 便于被json_decode解析\n\t\t\t//\t$line = $this->process_json($line);\n\t\t\t\tif(content != \"\")\n\t\t\t\t{\n\t\t\t\t\t$content = $content.$split.$line;\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$content = $line;\n\t\t\t\t}\n\t\t\t}   \n\t\t\tfclose($fOpen);\n\t\t\treturn $content;\n\t    }\n\t    \n\t    /*\n\t     * 用于json标准化处理\n\t     * 1 key值添加双引号\n\t     * 2 value值如果是单引号变成双引号\n\t     * 输入 $line 一行数据\n\t     * 输出 $reStr \n\t     */\n\t    function process_json($line)\n\t    {\n\t    \t//source: {url:'#',name:'奇艺'}\n\t    \t//{name:'词条/关系名',semanticName:'义项名', \n\t    \t$bInString = false;\n\t    \t$strS = \"\";\n\t    \t$strKey = \"\";\n\t    \t$reStr = \"\";\n\t    \tfor($i=0;$i<strlen($line);$i++)\n\t    \t{\n\t    \t\t$oneChar = substr($line,$i,1);\n\t    \t\tif($oneChar == \"'\")\n\t    \t\t{\n\t    \t\t\t$reStr = $reStr.'\"';\n\t    \t\t}\n\t    \t\telse \n\t    \t\t{\n\t    \t\t\t$reStr = $reStr.$oneChar;\n\t    \t\t}\n\t    \t\t\n\t    \t\tif(!$bInString && ($oneChar == \"'\" || $oneChar == '\"'))\n\t    \t\t{\n\t    \t\t\t$bInString = true;\n\t    \t\t\t$strS = $oneChar;\n\t    \t\t\tcontinue;\n\t    \t\t}\n\t    \t\telse if($bInString && $oneChar == $strS)\n\t    \t\t{\n\t    \t\t\t$bInString = false;\n\t    \t\t\t$strS = \"\";\n\t    \t\t\tcontinue;\n\t    \t\t}\n\t    \t\t\n\t    \t\tif(!$bInString && $oneChar == \":\" && trim($strKey) != \"\")\n\t    \t\t{\n\t    \t\t\t$reStr = substr($reStr,0,strlen($reStr)-strlen($strKey)-1);\n\t    \t\t\t$reStr = $reStr.'\"'.trim($strKey).'\"'.\" :\";\n\t    \t\t\t$strKey = \"\";\n\t    \t\t}\n\t    \t\tif(!$bInString && ($oneChar == \",\" || $oneChar == \"{\"))\n\t    \t\t{\n\t    \t\t\t$strKey = \"\";\n\t    \t\t}\n\t    \t\t\n\t    \t\tif(!$bInString && \n\t    \t\t   $oneChar != \"'\" &&\n\t    \t\t   $oneChar != '\"' &&\n\t    \t\t   $oneChar != \"{\" &&\n\t    \t\t   $oneChar != \"}\" &&\n\t    \t\t   $oneChar != \",\" &&\n\t    \t\t   $oneChar != \"[\" &&\n\t    \t\t   $oneChar != \"]\" &&\n\t    \t\t   $oneChar != \"\")\n\t    \t\t   {\n\t    \t\t   \t\t$strKey = $strKey.$oneChar;\n\t    \t\t   }\n\t    \t\t\t\n\t    \t}\n\t    \t\n\t    \treturn  $reStr;\n\t    }\n\t    \n\t    /*\n\t     * 全半角转换函数\n\t     * 输入$str \n\t     */\n\t \tfunction sbc2dbc($str)\n\t\t{               \n        \t$arrWordMap = array('！'=>'!', '＂'=>'\"', '＃'=>'#', '￥'=>'$', '％'=>'%', '＆'=>'&', '＇'=>\"'\", '（'=>'(', '）'=>')', '＊'=>'*', '＋'=>'+', '，'=>',', '－'=>'-', '．'=>'.', '／'=>'/', '０'=>'0', '１'=>'1', '２'=>'2', '３'=>'3', '４'=>'4', '５'=>'5', '６'=>'6', '７'=>'7', '８'=>'8', '９'=>'9', '：'=>':', '；'=>';', '＜'=>'<', '＝'=>'=', '＞'=>'>', '？'=>'?', '＠'=>'@', 'Ａ'=>'A', 'Ｂ'=>'B', 'Ｃ'=>'C', 'Ｄ'=>'D', 'Ｅ'=>'E', 'Ｆ'=>'F', 'Ｇ'=>'G', 'Ｈ'=>'H', 'Ｉ'=>'I', 'Ｊ'=>'J', 'Ｋ'=>'K', 'Ｌ'=>'L', 'Ｍ'=>'M', 'Ｎ'=>'N', 'Ｏ'=>'O', 'Ｐ'=>'P',  'Ｑ'=>'Q', 'Ｒ'=>'R', 'Ｓ'=>'S', 'Ｔ'=>'T', 'Ｕ'=>'U', 'Ｖ'=>'V', 'Ｗ'=>'W', 'Ｘ'=>'X', 'Ｙ'=>'Y', 'Ｚ'=>'Z', '［'=>'[', '＼'=>'\\\\','］'=>']', '＾'=>'^', '＿'=>'_', '｀'=>'`', 'ａ'=>'a', 'ｂ'=>'b', 'ｃ'=>'c', 'ｄ'=>'d', 'ｅ'=>'e', 'ｆ'=>'f', 'ｇ'=>'g', 'ｈ'=>'h', 'ｉ'=>'i', 'ｊ'=>'j', 'ｋ'=>'k', 'ｌ'=>'l', 'ｍ'=>'m', 'ｎ'=>'n', 'ｏ'=>'o', 'ｐ'=>'p', 'ｑ'=>'q', 'ｒ'=>'r', 'ｓ'=>'s', 'ｔ'=>'t', 'ｕ'=>'u', 'ｖ'=>'v', 'ｗ'=>'w', 'ｘ'=>'x', 'ｙ'=>'y', 'ｚ'=>'z',  '｛'=>'{', '｜'=>'|', '｝'=>'}', '、'=>',', '。'=>'.', '∶'=>':','＄'=>'$'); \n\t\t\treturn strtr($str,$arrWordMap);\n\t\t}\n\t}\n\n\t\t\n    \n?>\n"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/libs/JsonPro/genCase.php",
    "content": "<?php\n\nrequire_once(dirname(__FILE__).'/genLog.php');\nrequire_once(dirname(__FILE__).'/genArray.php');\n\nclass genCase\n{\n\tprivate $arrNormal =null;\n\tprivate $arrCase =null;\n\t\n\t\n\t\n\tpublic function __construct($standJson,$arrC)\n\t{\n\t\tJson_Log::init();//Json_Log::fatal(\"in genCase\",__FILE__,__LINE__);\n\t\t$this->arrCase = $arrC;          //范围数组$arrPosNote\n\t\t$this->arrNormal = $standJson;   //标准数组$standJson\n\t}\n\t\n\t//注多数组重复构造在此处进行 ，需要传入位置及数组边界值提条件\n\tpublic function getCase()\n\t{\t\t\n\t\t$arrReCase = array();\n\t\t$maxCaseNo = 0;//最大case数\n\t\t$tmpCaseNo = 0;//接口字段的case数\n\t\t\n\t\t$randomInfoArray = array();\t//记录需要重复的数组的可变元素的信息\n\t\t\n\t\t//$arrCase[$i][0] 位置 [1]所有可能值[2]类型\n\t\tfor($i=0;$i<count($this->arrCase);$i++)\n\t\t{\n\t\t\t$tmpArr = explode(\",\",$this->arrCase[$i][1]);\n\t\t\t$tmpCaseNo = count($tmpArr);\n\t\t\tif($tmpCaseNo > $maxCaseNo)\n\t\t\t{\n\t\t\t\t$maxCaseNo = $tmpCaseNo;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$randomInfoArray = $this->getRandomInfoArray();\t\n\t\t//var_dump($randomInfoArray);\n\t\t//echo \"MAX_CASE_NO: $maxCaseNo\\n\";\n        if($maxCaseNo > 1)\n        {\n        \tarray_push($arrReCase,$this->arrNormal);    //标准数组是  最终数组  中的第一个数组\n        }\n        \n\t\tfor($i=0;$i<$maxCaseNo+1;$i++)\t//将循环次数上限加1，用来生成最后一个所有数组重复都是中间值的数据\n\t\t{\n\t\t//\t//echo \"\\ni: $i  maxCaseNo: $maxCaseNo\\n\";\n\t\t\t$tmpArrNormal = $this->arrNormal;\n\t\t\t$arrCaseCount = count($this->arrCase);\n\t\t\t//总共进行$maxCaseNo次大循环，当$arrValueCount<$maxCaseNo的情况，会求余$i%$arrValueCount\n\t\t\tfor($j=0;$j<$arrCaseCount;$j++)\n\t\t\t{\n\t\t\t\t$arrKey = explode(\",\",$this->arrCase[$j][0]);//拆分后的位置信息\n\t\t\t\t//$arrKey 是 $arrPosNote的一个条目的key\n\t\t\t\t$arrValue = explode(\",\",$this->arrCase[$j][1]);\n\t\t\t\t//$arrValue 是 $arrPosNote的一个条目的所有可能value\n\t\t\t\t//将可选取值数组中的\",\"变回来\n\t\t\t\tforeach ($arrValue as $keyInArrValue => $valueInArrValue)\n\t\t\t\t{\n\t\t\t\t\t// ---add by xumeng change string to int---\n\t\t\t\t\tif ($this->arrCase[$j][2]==\"int\") {\n\t\t\t\t\t\t$arrValue[$keyInArrValue] = intval($valueInArrValue);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$arrValue[$keyInArrValue] = $this->changeCommaBack($valueInArrValue);\n\t\t\t\t\t}\n\t\t\t\t\t// ---end---\n\t\t\t\t}\n\t\t\t\t//var_dump($arrValue);\n\t\t\t\t$arrKeyCount = count($arrKey);\n\t\t\t\t$arrValueCount = count($arrValue);\n\t\t\t\t$t = $arrKey[$arrKeyCount-1];   // add by xumeng02\n\t\t\t\tif($arrValueCount == 1 && $arrValue[$i%$arrValueCount] == \"\")\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$assign_cmd = \"\\$tmpArrNormal\";   //下面都是拼装命令的，会在eval()中执行\n\t\t\t\tfor ( $c=0;$c<$arrKeyCount;$c++) \n\t\t\t\t{\n\t\t\t\t\t$assign_cmd=$assign_cmd.\"[\\\"$arrKey[$c]\\\"]\";\n\t\t\t\t}\n\t\t\t\tif(substr($assign_cmd,-4)==\"[\\\"\\\"]\")\n\t\t\t\t{\n\t\t\t\t\t//去掉类似这种key：$tmpArrNormal[\"index_show_movie_hot\"][\"videos\"][\"0\"][\"\"]\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//如果是数组 则特殊处理\n\t\t\t\tif(substr($this->arrCase[$j][1],0,4) == \"/...\")\n\t\t\t\t{\n\t\t\t\t\t$change_cmd = \"\\$tmpArrNormal\";\n\t\t\t\t\tfor ( $c=0;$c<$arrKeyCount-1;$c++) \n\t\t\t\t\t{\n\t\t\t\t\t\t$change_cmd=$change_cmd.\"[\\\"$arrKey[$c]\\\"]\";\n\t\t\t\t\t}\n\t\t\t\t\t//echo $assign_cmd;\n\t\t\t\t\t$start = stripos($this->arrCase[$j][1],\"[\",0);\n\t\t\t\t\t$end = stripos($this->arrCase[$j][1],\"]\",0);\n\t\t\t\t\t$strArray = substr($this->arrCase[$j][1],$start+1,$end - $start-1);\n\t\t\t\t\t$arrArray = explode(\",\",$strArray);\n\t\t\t\t\t//var_dump($arrArray);\n\t\t\t\t\t$arrArrayCount = array();\n\t\t\t\t\t\n\t\t\t\t\t// 数组的个数策略：lowBorder-1, lowBorder, mid, highBorder, highBorder+1\n\t\t\t\t\t$numTem = intval($arrArray[0]-1);\n\t\t\t\t\tif ($numTem < 1) {\n\t\t\t\t\t\tarray_push($arrArrayCount,1); \n\t\t\t\t\t}else {\n\t\t\t\t\t\tarray_push($arrArrayCount,$numTem); \n\t\t\t\t\t}\n\t\t\t\t\t$numTem = intval($arrArray[0]);\n\t\t\t\t\tif ($numTem < 1) {\n\t\t\t\t\t\tarray_push($arrArrayCount,1); \n\t\t\t\t\t}else {\n\t\t\t\t\t\tarray_push($arrArrayCount,$numTem); \n\t\t\t\t\t}\n\t\t\t\t\t$numTem = intval(floor( ($arrArray[0]+$arrArray[1])/2 ));\n\t\t\t\t\tif ($numTem < 1) {\n\t\t\t\t\t\tarray_push($arrArrayCount,1); \n\t\t\t\t\t}else {\n\t\t\t\t\t\tarray_push($arrArrayCount,$numTem); \n\t\t\t\t\t}\n\t\t\t\t\t$numTem = intval($arrArray[1]);\n\t\t\t\t\tif ($numTem < 1) {\n\t\t\t\t\t\tarray_push($arrArrayCount,1); \n\t\t\t\t\t}else {\n\t\t\t\t\t\tarray_push($arrArrayCount,$numTem); \n\t\t\t\t\t}\n\t\t\t\t\t$numTem = intval($arrArray[1]+1);\n\t\t\t\t\tif ($numTem < 1) {\n\t\t\t\t\t\tarray_push($arrArrayCount,1); \n\t\t\t\t\t}else {\n\t\t\t\t\t\tarray_push($arrArrayCount,$numTem); \n\t\t\t\t\t}\t\t\n\t\t\t\t\t//var_dump($arrArrayCount);\n\t\t\t\t\t\n\t\t\t\t\t//当$maxCaseNo比数组的变化次数少的话，将$maxCaseNo设为$arrArrayCount\n\t\t\t\t\tif($maxCaseNo < count($arrArrayCount))\n\t\t\t\t\t{\n\t\t\t\t\t//\t//echo \"\\nSET maxCaseNo to NEW NUM!!!\\n\";\n\t\t\t\t\t\t$maxCaseNo = count($arrArrayCount);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//计算数组的重复次数索引 $repeateIdx\n\t\t\t\t\t//如果不是最后一个，即$i<$maxCaseNo，则$repeateIdx = $i%count($arrArrayCount)\n\t\t\t\t\t//如果是最后一个，即$i=$maxCaseNo，则$repeateIdx = count($arrArrayCount)/2\n\t\t\t\t\t$repeateIdx = $i%count($arrArrayCount);\n\t\t\t\t\tif($i == $maxCaseNo)\t//count($arrArrayCount)只有4和5两种情况\n\t\t\t\t\t{\n\t\t\t\t\t\tif(count($arrArrayCount) == 5)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$repeateIdx = 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (count($arrArrayCount) == 4)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$repeateIdx = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//echo \"i: $i; repeateIdx: $repeateIdx; $arrArrayCount[$repeateIdx]\\n\";\n\t\t\t\t\t\n\t\t\t\t//\t$repeate = $arrArrayCount[$i%count($arrArrayCount)];\n\t\t\t\t//\t//echo \"Repeate: $repeate\\n\";\n\t\t\t\t//\tfor($k=1;$k<$arrArrayCount[$i%count($arrArrayCount)];$k++)   //用$i余count($arrArrayCount)，这里$arrArrayCount应该是5吧。如果 $maxCaseNo<5 呢？\n\t\t\t\n\t\t\t\t\t//------ 改变序列，防止覆盖------\n\t\t\t\t\t//if ($i==4)var_dump($this->arrCase[$j][0]);\n\t\t\t\t\t$tmpArrNormal = $this->changeIndex($tmpArrNormal,$arrArrayCount[$repeateIdx],$this->arrCase[$j][0]);\n\t\t\t\t\t//------end---------------------\n\t\t\t\t\t//if ($i==4) var_dump($tmpArrNormal);\n\t\t\t\t\tfor($k=1;$k<$arrArrayCount[$repeateIdx];$k++)   //用$i余count($arrArrayCount)，这里$arrArrayCount应该是5吧。如果 $maxCaseNo<5 呢？\n\t\t\t\t\t{\n\t\t\t\t\t\t//echo $k.\"\\n\";\n\t\t\t\t\t\t//Like this: $tmpArrNormal[\"obj\"][0][1][$k]=$tmpArrNormal[\"obj\"][0][1][0];\n\t\t\t\t\t\t$tem = $t + $k;\n\t\t\t\t\t\t$result_cmd=$change_cmd.\"[\\\"\".$tem.\"\\\"]=\".$assign_cmd.\";\"; \n\t\t\t\t\t\t//echo $result_cmd.\"\\n\";\n\t\t\t\t\t\t//上面是 让后面重复的数组和第一个数组内容一样。如果数组里的条目有多个选项呢？重复的是数组处理前的赋值，这个每次都不同的\n\t\t\t\t\t\t//echo $result_cmd.\"\\n\";\n\t\t\t\t\t\teval($result_cmd);\n\t\t\t\t\t\t//if ($i==4) var_dump($tmpArrNormal);\n\t\t\t\t\t\t//除数组的第一个重复外，其余的重复里的 可变元素的值 随机改变\n\t\t\t\t\t\tif(array_key_exists($this->arrCase[$j][0], $randomInfoArray))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$randomInfo = $randomInfoArray[$this->arrCase[$j][0]];\n\t\t\t\t\t\t\t$arrayNameLength = strlen($this->arrCase[$j][0]);\n\t\t\t\t\t\t\tforeach ($randomInfo as $key => $value) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$inArray_cmd = $change_cmd.\"[\\\"\".$tem.\"\\\"]\";//$assign_cmd.\"[\\$k]\";\n\t\t\t\t\t\t\t\t//echo $inArray_cmd.\"\\n\";\n\t\t\t\t\t\t\t\t$tempArrKey = substr($value[0], ($arrayNameLength + 1));\n\t\t\t\t\t\t\t\t//echo \"tempArrKey: $tempArrKey\\n\";\n\t\t\t\t\t\t\t\t$arrKey = explode(\",\",$tempArrKey);//拆分后的位置信息\n\t\t\t\t\t\t\t\t//unset($arrKey[0]);\n\t\t\t\t\t\t\t\t//var_dump($arrKey);\n\t\t\t\t\t\t\t\t//$arrKey 是 $arrPosNote的一个条目的key\n\t\t\t\t\t\t\t\t$arrValue = explode(\",\",$value[1]);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//-----------xumeng02--------------\n\t\t\t\t\t\t\t\tif ($value[2]==\"int\") {\n\t\t\t\t\t\t\t\t\tforeach ($arrValue as $kk => $vv) {\n\t\t\t\t\t\t\t\t\t\t$arrValue[$kk] = intval($vv);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//var_dump($arrValue);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//-----------end-------------------\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//$arrValue 是 $arrPosNote的一个条目的所有可能value\n\t\t\t\t\t\t\t\t$arrKeyCount = count($arrKey);\n\t\t\t\t\t\t\t\t$arrValueCount = count($arrValue);\n\t\t\t\t\t\t\t\t//准备赋值语句的前半段\n\t\t\t\t\t\t\t\tforeach ($arrKey as $arrKeyElement) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$inArray_cmd=$inArray_cmd.\"[\\\"$arrKeyElement\\\"]\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$inArray_cmd .= \"=\";\n\t\t\t\t\t\t\t\t//准备要赋的值，给出的值是从可选范围中随机选出的\n\t\t\t\t\t\t\t\t$randonValue = $arrValue[rand(0, $arrValueCount - 1)];\n\t\t\t\t\t\t\t\tif (!is_int($randonValue)) {\n\t\t\t\t\t\t\t\t\t$randonValue = $this->changeCommaBack($randonValue);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//var_dump($randonValue);\n\t\t\t\t\t\t\t\t//当要赋的值是异常字符时，使这个值只有1/4的概率是异常字符，让fe看的舒服些\n\t\t\t\t\t\t\t\tif($randonValue == \"&#1234%璎玥£123丂 亐 儈 凗 狛 癄 鳌 煪 伄  骺牛肩猪肉 \")\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//echo \"11111\\n\";\n\t\t\t\t\t\t\t\t\t$randomRlt = rand(0, 3);\n\t\t\t\t\t\t\t\t\t//echo \"i: $i, maxCaseNo: $maxCaseNo\\n\";\n\t\t\t\t\t\t\t\t\tif($randomRlt != 3 || $i == $maxCaseNo)\t//如果是最后一个数组使用原值\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$specialStr_cmd = \"\\$randonValue = \\$arrReCase[0]\";\n\t\t\t\t\t\t\t\t\t\t$speicalKey = $value[0];\n\t\t\t\t\t\t\t\t\t\t$arrSpecialKey = explode(\",\", $speicalKey);\n\t\t\t\t\t\t\t\t\t\tforeach ($arrSpecialKey as $arrSpecialKeyElement) \n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$specialStr_cmd = $specialStr_cmd.\"[\\\"$arrSpecialKeyElement\\\"]\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t$specialStr_cmd .= \";\";\n\t\t\t\t\t\t\t\t\t\t//echo $specialStr_cmd.\"\\n\";\n\t\t\t\t\t\t\t\t\t\teval($specialStr_cmd);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$inArray_cmd .= \"\\$randonValue;\";\t//遇到异常字符使用了原值时不飘红\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$inArray_cmd .= \"\\$randonValue;\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//var_dump($tmpArrNormal);\n\t\t\t\t\t\t\t\teval($inArray_cmd);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t//如果是最后一个数组，替换掉所有的异常字符\n\t\t\t\t\tif($arrValue[$i%$arrValueCount] === \"&#1234%璎玥£123丂 亐 儈 凗 狛 癄 鳌 煪 伄  骺牛肩猪肉 \" && $i == $maxCaseNo)\n\t\t\t\t\t{\n\t\t\t\t\t\t//echo \"11111\\n\";\n\t\t\t\t\t\t$randonValue1 = \"\";\n\t\t\t\t\t\t//echo \"i: $i, maxCaseNo: $maxCaseNo\\n\";\n\t\t\t\t\t\t$specialStr_cmd1 = \"\\$randonValue1 = \\$arrReCase[0]\";\n\t\t\t\t\t\t$arrSpecialKey1 = $arrKey;\n\t\t\t\t\t\tforeach ($arrSpecialKey1 as $arrSpecialKeyElement) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$specialStr_cmd1 = $specialStr_cmd1.\"[\\\"$arrSpecialKeyElement\\\"]\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$specialStr_cmd1 .= \";\";\n\t\t\t\t\t\t//echo $specialStr_cmd.\"\\n\";\n\t\t\t\t\t\teval($specialStr_cmd1);\n\t\t\t\t\t\t//echo \"randonValue1: $randonValue1\\n\";\n\t\t\t\t\t\t$assign_cmd = $assign_cmd.\"=\\$randonValue1;\";\t\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//Like this:$tmpArrNormal[\"obj\"][0][1]=$arrValue[$i%$arrValueCount];\n\t\t\t\t\t\t$assign_cmd=$assign_cmd.\"=\\$arrValue[$i%$arrValueCount];\";\n\t\t\t\t\t\t//echo $assign_cmd.\"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\t//echo \"result1: $assign_cmd\\n\";\n\t\t\t\t\teval($assign_cmd);\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t//if ($i == 4)var_dump($tmpArrNormal);\n\t\t\t\n\t\t\t// 自动计数\n\t\t\t$dfssubstr=\"ImageIndexNumber\";\n\t\t\t$dfsindex=0;\n\t\t\t$dfsi=0;\n\t\t\t//var_dump($arrFinalCase[0]);\n\t\t\t$this->dfs($tmpArrNormal,$dfssubstr,$dfsindex,0,$dfsi);\n\t\t\t\n\t\t\tarray_push($arrReCase,$tmpArrNormal);\n\t\t}\n\t\t\n\t\t\n\t\treturn $arrReCase;\n\t}\n\t\n\t\n\tpublic function getHtmlCase($srcArrReCase)\n\t{\t\t\n\t\t$arrReCase = array();\n\t\t$maxCaseNo = 0;//最大case数\n\t\t$tmpCaseNo = 0;//接口字段的case数\n\t\t\n\t\t$randomInfoArray = array();\t//记录需要重复的数组的可变元素的信息\n\t\t\n\t\t//$arrCase[$i][0] 位置 [1]所有可能值[2]类型\n\t\tfor($i=0;$i<count($this->arrCase);$i++)\n\t\t{\n\t\t\t$tmpArr = explode(\",\",$this->arrCase[$i][1]);\n\t\t\t$tmpCaseNo = count($tmpArr);\n\t\t\tif($tmpCaseNo > $maxCaseNo)\n\t\t\t{\n\t\t\t\t$maxCaseNo = $tmpCaseNo;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$randomInfoArray = $this->getRandomInfoArray();\t\n\t\t\n\t\t//echo \"MAX_CASE_NO: $maxCaseNo\\n\";\n        if($maxCaseNo > 1)\n        {\n        \tarray_push($arrReCase,$this->arrNormal);    //标准数组是  最终数组  中的第一个数组\n        }\n        \n\t\tfor($i=0;$i<$maxCaseNo+1;$i++)\t//将循环次数上限加1，用来生成最后一个所有数组重复都是中间值的数据\n\t\t{\n\t\t//\t//echo \"\\ni: $i  maxCaseNo: $maxCaseNo\\n\";\n\t\t\t$tmpArrNormal = $this->arrNormal;\n\t\t\t$arrCaseCount = count($this->arrCase);\n\t\t\t//总共进行$maxCaseNo次大循环，当$arrValueCount<$maxCaseNo的情况，会求余$i%$arrValueCount\n\t\t\tfor($j=0;$j<$arrCaseCount;$j++)\n\t\t\t{\n\t\t\t\t$arrKey = explode(\",\",$this->arrCase[$j][0]);//拆分后的位置信息\n\t\t\t\t//$arrKey 是 $arrPosNote的一个条目的key\n\t\t\t\t$arrValue = explode(\",\",$this->arrCase[$j][1]);\n\t\t\t\t//$arrValue 是 $arrPosNote的一个条目的所有可能value\n\t\t\t\t//将可选取值数组中的\",\"变回来\n\t\t\t\tforeach ($arrValue as $keyInArrValue => $valueInArrValue)\n\t\t\t\t{\n\t\t\t\t\t// ---add by xumeng change string to int---\n\t\t\t\t\tif ($this->arrCase[$j][2]==\"int\") {\n\t\t\t\t\t\t$arrValue[$keyInArrValue] = intval($valueInArrValue);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$arrValue[$keyInArrValue] = $this->changeCommaBack($valueInArrValue);\n\t\t\t\t\t}\n\t\t\t\t\t// ---end---\n\t\t\t\t}\n\t\t\t\t//var_dump($arrValue);\n\t\t\t\t$arrKeyCount = count($arrKey);\n\t\t\t\t$arrValueCount = count($arrValue);\n\t\t\t\t$t = $arrKey[$arrKeyCount-1];   // add by xumeng02\n\t\t\t\tif($arrValueCount == 1 && $arrValue[$i%$arrValueCount] == \"\")\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$assign_cmd = \"\\$tmpArrNormal\";   //下面都是拼装命令的，会在eval()中执行\n\t\t\t\tfor ( $c=0;$c<$arrKeyCount;$c++) \n\t\t\t\t{\n\t\t\t\t\t$assign_cmd=$assign_cmd.\"[\\\"$arrKey[$c]\\\"]\";\n\t\t\t\t}\n\t\t\t\tif(substr($assign_cmd,-4)==\"[\\\"\\\"]\")\n\t\t\t\t{\n\t\t\t\t\t//去掉类似这种key：$tmpArrNormal[\"index_show_movie_hot\"][\"videos\"][\"0\"][\"\"]\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//如果是数组 则特殊处理\n\t\t\t\tif(substr($this->arrCase[$j][1],0,4) == \"/...\")\n\t\t\t\t{\n\t\t\t\t\t$change_cmd = \"\\$tmpArrNormal\";\n\t\t\t\t\tfor ( $c=0;$c<$arrKeyCount-1;$c++) \n\t\t\t\t\t{\n\t\t\t\t\t\t$change_cmd=$change_cmd.\"[\\\"$arrKey[$c]\\\"]\";\n\t\t\t\t\t}\n\t\t\t\t\t//echo $assign_cmd;\n\t\t\t\t\t$start = stripos($this->arrCase[$j][1],\"[\",0);\n\t\t\t\t\t$end = stripos($this->arrCase[$j][1],\"]\",0);\n\t\t\t\t\t$strArray = substr($this->arrCase[$j][1],$start+1,$end - $start-1);\n\t\t\t\t\t$arrArray = explode(\",\",$strArray);\n\t\t\t\t\t//var_dump($arrArray);\n\t\t\t\t\t$arrArrayCount = array();\n\t\t\t\t\t\n\t\t\t\t\t// 数组的个数策略：lowBorder-1, lowBorder, mid, highBorder, highBorder+1\n\t\t\t\t\t$numTem = intval($arrArray[0]-1);\n\t\t\t\t\tif ($numTem < 1) {\n\t\t\t\t\t\tarray_push($arrArrayCount,1); \n\t\t\t\t\t}else {\n\t\t\t\t\t\tarray_push($arrArrayCount,$numTem); \n\t\t\t\t\t}\n\t\t\t\t\t$numTem = intval($arrArray[0]);\n\t\t\t\t\tif ($numTem < 1) {\n\t\t\t\t\t\tarray_push($arrArrayCount,1); \n\t\t\t\t\t}else {\n\t\t\t\t\t\tarray_push($arrArrayCount,$numTem); \n\t\t\t\t\t}\n\t\t\t\t\t$numTem = intval(floor( ($arrArray[0]+$arrArray[1])/2 ));\n\t\t\t\t\tif ($numTem < 1) {\n\t\t\t\t\t\tarray_push($arrArrayCount,1); \n\t\t\t\t\t}else {\n\t\t\t\t\t\tarray_push($arrArrayCount,$numTem); \n\t\t\t\t\t}\n\t\t\t\t\t$numTem = intval($arrArray[1]);\n\t\t\t\t\tif ($numTem < 1) {\n\t\t\t\t\t\tarray_push($arrArrayCount,1); \n\t\t\t\t\t}else {\n\t\t\t\t\t\tarray_push($arrArrayCount,$numTem); \n\t\t\t\t\t}\n\t\t\t\t\t$numTem = intval($arrArray[1]+1);\n\t\t\t\t\tif ($numTem < 1) {\n\t\t\t\t\t\tarray_push($arrArrayCount,1); \n\t\t\t\t\t}else {\n\t\t\t\t\t\tarray_push($arrArrayCount,$numTem); \n\t\t\t\t\t}\t\t\n\t\t\t\t\t//var_dump($arrArrayCount);\n\t\t\t\t\t\n\t\t\t\t\t//当$maxCaseNo比数组的变化次数少的话，将$maxCaseNo设为$arrArrayCount\n\t\t\t\t\tif($maxCaseNo < count($arrArrayCount))\n\t\t\t\t\t{\n\t\t\t\t\t//\t//echo \"\\nSET maxCaseNo to NEW NUM!!!\\n\";\n\t\t\t\t\t\t$maxCaseNo = count($arrArrayCount);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//计算数组的重复次数索引 $repeateIdx\n\t\t\t\t\t//如果不是最后一个，即$i<$maxCaseNo，则$repeateIdx = $i%count($arrArrayCount)\n\t\t\t\t\t//如果是最后一个，即$i=$maxCaseNo，则$repeateIdx = count($arrArrayCount)/2\n\t\t\t\t\t$repeateIdx = $i%count($arrArrayCount);\n\t\t\t\t\tif($i == $maxCaseNo)\t//count($arrArrayCount)只有4和5两种情况\n\t\t\t\t\t{\n\t\t\t\t\t\tif(count($arrArrayCount) == 5)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$repeateIdx = 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (count($arrArrayCount) == 4)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$repeateIdx = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//echo \"i: $i; repeateIdx: $repeateIdx; $arrArrayCount[$repeateIdx]\\n\";\n\t\t\t\t\t\n\t\t\t\t//\t$repeate = $arrArrayCount[$i%count($arrArrayCount)];\n\t\t\t\t//\t//echo \"Repeate: $repeate\\n\";\n\t\t\t\t//\tfor($k=1;$k<$arrArrayCount[$i%count($arrArrayCount)];$k++)   //用$i余count($arrArrayCount)，这里$arrArrayCount应该是5吧。如果 $maxCaseNo<5 呢？\n\t\t\t\t\t\n\t\t\t\t\t//------ 改变序列，防止覆盖------\n\t\t\t\t\t//var_dump($this->arrCase[$j][0]);\n\t\t\t\t\t$tmpArrNormal = $this->changeIndex($tmpArrNormal,$arrArrayCount[$repeateIdx],$this->arrCase[$j][0]);\n\t\t\t\t\t//------end---------------------\t\t\t\t\n\t\t\t\t\tfor($k=1;$k<$arrArrayCount[$repeateIdx];$k++)   //用$i余count($arrArrayCount)，这里$arrArrayCount应该是5吧。如果 $maxCaseNo<5 呢？\n\t\t\t\t\t{\n\t\t\t\t\t\t//Like this: $tmpArrNormal[\"obj\"][0][1][$k]=$tmpArrNormal[\"obj\"][0][1][0];\n\t\t\t\t\t\t$tem = $t + $k;\n\t\t\t\t\t\t$result_cmd=$change_cmd.\"[\\\"\".$tem.\"\\\"]=\".$assign_cmd.\";\"; \n\t\t\t\t\t\t//上面是 让后面重复的数组和第一个数组内容一样。如果数组里的条目有多个选项呢？重复的是数组处理前的赋值，这个每次都不同的\n\t\t\t\t\t\t//echo \"result2: $result_cmd\\n\";\n\t\t\t\t\t\teval($result_cmd);\n\t\t\t\t\t\t//除数组的第一个重复外，其余的重复里的 可变元素的值 随机改变\n\t\t\t\t\t\tif(array_key_exists($this->arrCase[$j][0], $randomInfoArray))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//var_dump($randomInfoArray);\n\t\t\t\t\t\t\t$randomInfo = $randomInfoArray[$this->arrCase[$j][0]];\n\t\t\t\t\t\t\t$arrayNameLength = strlen($this->arrCase[$j][0]);\n\t\t\t\t\t\t\tforeach ($randomInfo as $key => $value) \n\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t//echo \"arrName: \".$this->arrCase[$j][0].\"\\n\";\n\t\t\t\t\t\t\t\t//echo \"randomElement : $value[0]\\n\";\n\t\t\t\t\t\t\t\t$inArray_cmd = $change_cmd.\"[\\\"\".$tem.\"\\\"]\";//$assign_cmd.\"[\\$k]\";\n\t\t\t\t\t\t\t\t$tempArrKey = substr($value[0], ($arrayNameLength + 1));\n\t\t\t\t\t\t\t\t//echo \"tempArrKey: $tempArrKey\\n\";\n\t\t\t\t\t\t\t\t$arrKey = explode(\",\",$tempArrKey);//拆分后的位置信息\n\t\t\t\t\t\t\t\t//unset($arrKey[0]);\n\t\t\t\t\t\t\t\t//var_dump($arrKey);\n\t\t\t\t\t\t\t\t//$arrKey 是 $arrPosNote的一个条目的key\n\t\t\t\t\t\t\t\t$arrValue = explode(\",\",$value[1]);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//-----------xumeng02--------------\n\t\t\t\t\t\t\t\tif ($value[2]==\"int\") {\n\t\t\t\t\t\t\t\t\tforeach ($arrValue as $kk => $vv) {\n\t\t\t\t\t\t\t\t\t\t$arrValue[$kk] = intval($vv);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//var_dump($arrValue);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//-----------end-------------------\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//var_dump($arrValue);\n\t\t\t\t\t\t\t\t//$arrValue 是 $arrPosNote的一个条目的所有可能value\n\t\t\t\t\t\t\t\t$arrKeyCount = count($arrKey);\n\t\t\t\t\t\t\t\t$arrValueCount = count($arrValue);\n\t\t\t\t\t\t\t\t//准备赋值语句的前半段\n\t\t\t\t\t\t\t\tforeach ($arrKey as $arrKeyElement) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$inArray_cmd=$inArray_cmd.\"[\\\"$arrKeyElement\\\"]\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//echo $inArray_cmd.\"\\n\";\n\t\t\t\t\t\t\t\t$orgArray_cmd  = substr($inArray_cmd, 13);\n\t\t\t\t\t\t\t\t$orgArray_cmd = \"\\$srcArrReCase[\\$i+1]\".$orgArray_cmd;\t//拼装原case用对应的值的位置\n\t\t\t\t\t\t\t\t$inArray_cmd .= \"=\";\n\t\t\t\t\t\t\t\t//从getCase()产生的数据拿值\n\t\t\t\t\t\t\t\t$randonValue = \"\";\n\t\t\t\t\t\t\t\t$orgArray_cmd = \"\\$randonValue = \".$orgArray_cmd.\";\";\n\t\t\t\t\t\t\t\t//echo \"orgArray_cmd: $orgArray_cmd  i:$i k: $k\\n\";\n\t\t\t\t\t\t\t\teval($orgArray_cmd);\n\n\t\t\t\t\t\t\t\t//echo \"randonValue: $randonValue\\n\";\n\t\t\t\t\t\t\t\tif ($value[2] == \"int\") {\n\t\t\t\t\t\t\t\t\t$inArray_cmd .= \"\\\"****<span style='background-color:#FF9797;'>\\\".\\$randonValue.\\\"</span>****\\\";\";\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t$inArray_cmd .= \"\\\"<span style='background-color:#FF9797;'>\\\".\\$randonValue.\\\"</span>\\\";\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//echo $inArray_cmd.\"\\n\";\n\t\t\t\t\t\t\t\teval($inArray_cmd);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\t\n\t\t\t\t\t//如果是最后一个数组，替换掉所有的异常字符\n\t\t\t\t\tif($arrValue[$i%$arrValueCount] === \"&#1234%璎玥£123丂 亐 儈 凗 狛 癄 鳌 煪 伄  骺牛肩猪肉 \" && $i == $maxCaseNo)\n\t\t\t\t\t{\n\t\t\t\t\t\t//echo \"11111\\n\";\n\t\t\t\t\t\t$randonValue1 = \"\";\n\t\t\t\t\t\t//echo \"i: $i, maxCaseNo: $maxCaseNo\\n\";\n\t\t\t\t\t\t$specialStr_cmd1 = \"\\$randonValue1 = \\$arrReCase[0]\";\n\t\t\t\t\t\t$arrSpecialKey1 = $arrKey;\n\t\t\t\t\t\tforeach ($arrSpecialKey1 as $arrSpecialKeyElement) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$specialStr_cmd1 = $specialStr_cmd1.\"[\\\"$arrSpecialKeyElement\\\"]\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$specialStr_cmd1 .= \";\";\n\t\t\t\t\t\t//echo $specialStr_cmd.\"\\n\";\n\t\t\t\t\t\teval($specialStr_cmd1);\n\t\t\t\t\t\t//echo \"randonValue1: $randonValue1\\n\";\n\t\t\t\t\t\t$assign_cmd=$assign_cmd.\"=\\\"<span style='background-color:#FF9797;'>\\\".\\$randonValue1.\\\"</span>\\\";\";\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//Like this:$tmpArrNormal[\"obj\"][0][1]=$arrValue[$i%$arrValueCount];\n\t\t\t\t\t\tif ($this->arrCase[$j][2] == \"int\") {\n\t\t\t\t\t\t\t$assign_cmd=$assign_cmd.\"=\\\"****<span style='background-color:#FF9797;'>\\\".\\$arrValue[$i%$arrValueCount].\\\"</span>****\\\";\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$assign_cmd=$assign_cmd.\"=\\\"<span style='background-color:#FF9797;'>\\\".\\$arrValue[$i%$arrValueCount].\\\"</span>\\\";\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//var_dump($arrValue[$i%$arrValueCount]);\n\t\t\t\t\t}\n\t\t\t\t\teval($assign_cmd);\n\t\t\t\t\t//echo \"result1: $assign_cmd\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// 自动计数\n\t\t\t$dfssubstr=\"ImageIndexNumber\";\n\t\t\t$dfsindex=0;\n\t\t\t$dfsi=0;\n\t\t\t//var_dump($arrFinalCase[0]);\n\t\t\t$this->dfs($tmpArrNormal,$dfssubstr,$dfsindex,0,$dfsi);\n\t\t\t\n\t\t\tarray_push($arrReCase,$tmpArrNormal);\n\t\t}\n\t\t\n\t\t\n\t\treturn $arrReCase;\n\t}\n\t\n\t\n\t//填充$randomInfoArray（记录需要重复的数组的可变元素的信息）\n\tpublic function getRandomInfoArray()\n\t{\n\t\t//填充$randomInfoArray\n\t\t$randomInfoArray = array();\n\t\t$arrCaseCount = count($this->arrCase);\n\t\tfor($idx=0; $idx<$arrCaseCount; $idx++)\n\t\t{\n\t\t\tif(substr($this->arrCase[$idx][1],0,4) == \"/...\")\n\t\t\t{\n\t\t\t\t//echo $this->arrCase[$idx][0].\"\\n\";\n\t\t\t\t//获取范围数组$this->arrCase中需要随机的element\n\t\t\t\t$elementToRandom = array();\n\t\t\t\t$objectName = $this->arrCase[$idx][0];\n\t\t\t\tif(!array_key_exists($objectName, $randomInfoArray))\n\t\t\t\t{\n\t\t\t\t\t$nameLength = strlen($objectName);\n\t\t\t\t\tforeach($this->arrCase as $element)\n\t\t\t\t\t{\n\t\t\t\t\t//\t//echo \"currName: $element[0]\\n\";\n\t\t\t\t\t\t$currNameLength = strlen($element[0]);\n\t\t\t\t\t\tif($currNameLength < $nameLength)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$tmpNameStr = substr($element[0], 0, ($nameLength));\n\t\t\t\t\t//\t//echo \"tmpNameStr: $tmpNameStr\\n\";\n\t\t\t\t\t\tif($tmpNameStr == $objectName)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(substr($element[1],0,4) == \"/...\" && $objectName == $element[0])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(count($elementToRandom) > 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$randomInfoArray[$objectName] = $elementToRandom;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//如果发现子数组，把已经记录下来的子数组的可变元素的信息都unset掉\n\t\t\t\t\t\t\telse if(substr($element[1],0,4) == \"/...\" && $objectName != $element[0])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//echo \"has child array!!!\\n\";\n\t\t\t\t\t\t\t\t$childArrayName = $element[0];\n\t\t\t\t\t\t\t\t//echo \"childArrayName: $childArrayName\\n\";\n\t\t\t\t\t\t\t\t$childArrayNameLength = strlen($childArrayName);\n\t\t\t\t\t\t\t\t$elementCount = count($elementToRandom);\n\t\t\t\t\t\t\t\t//echo \"elementCount: $elementCount\\n\";\n\t\t\t\t\t\t\t\tif($elementCount != 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tforeach ($elementToRandom as $key => $randomElement)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$randElementName = $randomElement[0];\n\t\t\t\t\t\t\t\t\t\t$currRandEleNameLen = strlen($randElementName);\n\t\t\t\t\t\t\t\t\t\t//echo \"randElementName: $randElementName\\n\";\n\t\t\t\t\t\t\t\t\t\tif($currRandEleNameLen < $childArrayNameLength)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t$tmpRandEleNameStr = substr($randElementName, 0, ($childArrayNameLength));\n\t\t\t\t\t\t\t\t\t\t//echo \"tmpRandEleNameStr: $tmpRandEleNameStr\\n\";\n\t\t\t\t\t\t\t\t\t\tif($tmpRandEleNameStr == $childArrayName)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t//echo \"key: $key\\n\";\n\t\t\t\t\t\t\t\t\t\t\tunset($elementToRandom[$key]);\n\t\t\t\t\t\t\t\t\t\t//\tarray_pop($elementToRandom);\n\t\t\t\t\t\t\t\t\t\t\t//var_dump($elementToRandom);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if($element[1] != \"\")\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//echo \"currName: $element[0]\\n\";\n\t\t\t\t\t\t\t\t//echo \"push in.\\n\";\n\t\t\t\t\t\t\t\tarray_push($elementToRandom, $element);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//var_dump($randomInfoArray);\n\t\treturn $randomInfoArray;\n\t}\n\t\n\t//将字符串中的\"||CoMmA_In_StR||\"变回\",\"\n\tfunction changeCommaBack($value)\n\t{\n\t\t$trans = array(\"||CoMmA_In_StR||\" => \",\");\n\t\t$value = strtr($value, $trans);\n\t\t//file_put_contents(dirname(__FILE__).\"/./tmp/note.php\", \"BACK: $value\\n\");\n\t\treturn $value;\n\t}\n\t\n\tfunction dfs(&$arr,$substr,&$index,$flag,&$i)\n\t{\n\t\t\n\t\t$n=count($arr);\n\t\t//echo $flag;\n\t\tforeach($arr as $k => &$v)\n\t\t{\n\t\t\tif(is_array($v) && $i==0)\n\t\t\t{\n\t\t\t\t$this-> dfs($v,$substr,$index,0,$i);\n\t\t\t}\n\t\t\telse if(is_array($v))\n\t\t\t{\n\t\t\t\t$this-> dfs($v,$substr,$index,1,$i);\n\t\t\t}\n\t\t\telse if($k==$substr)\n\t\t\t{\n\t\t\t\t$i++;\n\t\t\t\tif($flag==0)\n\t\t\t\t{\n\t\t\t\t\t//echo \"a\";\n\t\t\t\t\t$index=$v;\n\t\t\t\t\t$index=$index+1;\n\t\t\t\t}\n\t\t\t\telse if($flag==1)\n\t\t\t\t{\n\t\t\t\t\t//echo \"b\";\n\t\t\t\t\t$v=$index;\n\t\t\t\t\t$index=$index+1;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\t// 在需要重复的数组后面插入模板数据，防止最后的原始数据被覆盖\n\tfunction changeIndex($tmpArrNormal,$n,$keys)\n\t{\n\t\t$Arr = array();\n\t\tunset($Arr);\n\t\t//var_dump($tmpArrNormal);\n\t\t\n\t\t$tmpArr = explode(\",\",$keys);\n\t\t$tmpNum = count($tmpArr);\n\t\t$index = intval( $tmpArr[$tmpNum-1] );\n\t\t//var_dump($index);\n\t\t$count = 0;\n\t\t$parent = array();\n\t\t$this->searchIndex($count, $Arr, $tmpArrNormal, $tmpArr, $parent, $n);\n\t\t//var_dump($Arr);\n\t\treturn $Arr;\n\t}\n\t\n\tfunction searchIndex(&$count, &$Arr, $ArrNormal, $tmpArr, $parent, $n)\n\t{\n\t\t$tmpNum = count($tmpArr);\n\t\t$cmd = \"\\$Arr\";   //下面都是拼装命令的，会在eval()中执行\n\t\tfor ($c = 0; $c < count($parent); $c++) {\n\t\t\t$cmd = $cmd.\"[\\\"\".$parent[$c].\"\\\"]\";\n\t\t}\n\t\tif ($count < $tmpNum) {\n\t\t\t$count++;\n\t\t\t$sign = 0;\n\t\t\tif(is_array($ArrNormal)) {\n\t\t\t\tforeach ($ArrNormal as $k => $v) {\n\t\t\t\t\tif ($sign == 1) {\n\t\t\t\t\t\t$kTmp = intval($k) + $n - 1;\n\t\t\t\t\t}else {\n\t\t\t\t\t\t$kTmp = $k;\n\t\t\t\t\t}\n\t\t\t\t\t$cmdTmp = $cmd.\"[\\\"\".$kTmp.\"\\\"]=\\$v;\";\n\t\t\t\t\t//echo $kTmp.\"\\n\";\n\t\t\t\t\teval($cmdTmp);\n\t\t\t\t\tif ($kTmp == $tmpArr[$count-1]) {\n\t\t\t\t\t\tarray_push($parent, $kTmp);\n\t\t\t\t\t\t$this->searchIndex($count, $Arr, $v, $tmpArr, $parent, $n);\n\t\t\t\t\t\tif (count == $tmpNum) {\n\t\t\t\t\t\t\t$sign = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$count--;\n\t\t}else {\n\t\t\t$cmd = \"\\$Arr\";   //下面都是拼装命令的，会在eval()中执行\n\t\t\tfor ($c = 0; $c < count($parent)-1; $c++) {\n\t\t\t\t$cmd = $cmd.\"[\\\"\".$parent[$c].\"\\\"]\";\n\t\t\t}\n\t\t\tfor ($j = 1; $j < $n; $j++) {\n\t\t\t\t$jmp = $parent[$c]+$j;\n\t\t\t\t$emptyArr = array();\n\t\t\t\t$cmdTmp = $cmd.\"[\\\"\".$jmp.\"\\\"]=\\$emptyArr;\";\n\t\t\t\teval($cmdTmp);\n\t\t\t\t//echo $cmdTmp.\"\\n\";\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\t\n}\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/libs/JsonPro/genConf.php",
    "content": "<?php\n    class Config{\n        public static $strAdocPath = \"\"; //Adoc文档路径\n        public static $bCharData = true; //字符截断or字节截断\n        public static $bGenRef = false; //是否生成异步数据\n        public static $logLevel = 4;//日志级别 暂时没有级别限制 \n        public static $intUser = 1;//1 fis 2 火麒麟调试服务器 3 fe自测平台使用\n        public static $strPath = \"/home/iknow/\";//绝对路径\n        public static $asyncBasePath = \"\";\n        \n        public static $mess_arr = array(\n                             \"强制转义字符\" => \"&#1234\",\n                             \"sprintf函数的敏感\" => \"%\",\n                             \"gbk utf8冲突部分\" => \"璎玥\",\n                             \"含有欧元符号\" => \"£123\",\n                             \"边界字符\" => \"丂 亐 儈 凗 狛 癄 鳌 煪 伄  骺\",\n                             \"相邻字节\" => \"牛肩猪肉\",\n                             \"空格\" => \" \");\n    }\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/libs/JsonPro/genFile.php",
    "content": "<?php\n\trequire_once(dirname(__FILE__).'/genLog.php');\n\trequire_once(dirname(__FILE__).'/genConf.php');\n\trequire_once(dirname(__FILE__).'/CommonHelper.php');\n\t\n\tclass genFile\n\t{\n\t\tprivate $arrFinal = array();\n\t\tpublic function __construct($arr)\n\t\t{\n\t\t\tJson_Log::init();//Json_Log::fatal(\"in genfile\",__FILE__,__LINE__);\n\t\t\t$this->arrFinal = $arr;\n\t\t}\n\t\t\n\t\tpublic function getFISFile($strUrl)\n\t\t{\n\t\t\t//echo $strUrl.\"\\n\";\n\t\t\t$arrTmp = explode(\"/\",$strUrl);\n\t\t\t$strFileName = \"\";\n\t\t\t$nameArray = array();\n\t\t\tforeach($arrTmp as $key)\n\t\t\t{\n\t\t\t\tif(trim($key) != \"\")\n\t\t\t\t{\n\t\t\t\t\tif($strFileName == \"\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$strFileName .= $key;\n\t\t\t\t\t}\n\t\t\t\t\telse \n\t\t\t\t\t{\n\t\t\t\t\t\t$strFileName .= \"_\".$key;\n\t\t\t\t\t}\n\t\t\t\t\tarray_push($nameArray, $key);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//var_dump($nameArray);\n\t\t\t$tmpJson = json_encode($this->arrFinal);\n\t\t\t$strJson = CommonHelper::json_format($tmpJson);\n\t\t\tif($nameArray[0] == \"widget\" && array_key_exists(1, $nameArray))\n\t\t\t{\n\t\t\t\t$strModule = $nameArray[1];\n\t\t\t//\t$fisFileName=Config::$strPath.\"../$strModule/\".$strFileName.\".php\";\n\t\t\t\t$fisFileName=Config::$strPath.$strFileName.\".php\";\n\t\t\t//\tCommonHelper::makeDir(Config::$strPath.\"../$strModule\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$fisFileName=Config::$strPath.$strFileName.\".php\";\n\t\t\t}\n\t\t\t//echo \"fisFileName:\" . $fisFileName . \"\\n\";\n\t\t\t//echo \"strJson:\" . $strJson . \"\\n\";\n\t\t\tfile_put_contents($fisFileName,$strJson);\n\t\t\t\n\t\t\treturn $fisFileName;\n\t\t}\n\t\t\n\t\tpublic function getFISHtmlFile($strUrl)\n\t\t{\n\t\t//\techo $strUrl.\"\\n\";\n\t\t\t$arrTmp = explode(\"/\",$strUrl);\n\t\t\t$strFileName = \"\";\n\t\t\t$nameArray = array();\n\t\t\tforeach($arrTmp as $key)\n\t\t\t{\n\t\t\t\tif(trim($key) != \"\")\n\t\t\t\t{\n\t\t\t\t\tif($strFileName == \"\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$strFileName .= $key;\n\t\t\t\t\t}\n\t\t\t\t\telse \n\t\t\t\t\t{\n\t\t\t\t\t\t$strFileName .= \"_\".$key;\n\t\t\t\t\t}\n\t\t\t\t\tarray_push($nameArray, $key);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$tmpJson = \"[\\n\";\n\t\t\t$tmpElementJson = \"\";\n\t\t\t$strElementJson = \"\";\n\t\t\t$arrWholeTmp = array();\n\t\t\t$wholeTmpElementJson = \"\";\n\t\t\t//1、utf8编码\n\t\t\t//var_dump($this->arrFinal);\n\t\t\t$this->arrFinal = CommonHelper::array_utf8_encode($this->arrFinal);\n\t\t\t//var_dump($this->arrFinal);\n\t\t\tforeach ($this->arrFinal as $k => $arrElement)\n\t\t\t{\n\t\t\t\t$tmpElementJson = json_encode($arrElement); //2、Json编码\n\t\t\t\t//3、utf8解码。得到的字符串中 中文正常\n\t\t\t\t$tmpElementJson = urldecode($tmpElementJson);\n\t\t\t\t//var_dump($tmpElementJson);\n\t\t\t\t$wholeTmpElementJson .= $tmpElementJson.\"\\n\";\n\t\t\t//\techo \"tmpElementJson: \".$tmpElementJson.\"\\n\";\n\t\t\t\t$strElementJson = CommonHelper::json_Html_format($tmpElementJson);\n\t\t\t\tarray_push($arrWholeTmp, $strElementJson);\n\t\t\t}\n\t\t\t\n\t\t\tfile_put_contents(Config::$strPath.\"/tmp/\".$strFileName.\"WTJson.php\",$wholeTmpElementJson);\n\t\t\t$tmpJson = json_encode($arrWholeTmp);\n\t\t\t//var_dump($tmpJson);\n\n\t\t\t$tmpJson = CommonHelper::json_format($tmpJson);\n\t\t\t\n\t\t\t\n\t\t\t//-----解决int显示时带引号的问题-xumeng02----\n\t\t\t//var_dump($tmpJson);\n\t\t\t$patterns = array();\n\t\t\t$patterns[0] = '#.\"\\*\\*\\*\\*#m';\n\t\t\t$patterns[1] = '#\\*\\*\\*\\*.\"#m';\n\t\t\t$replacements = array();\n\t\t\t$replacements[0] = '';\n\t\t\t$replacements[1] = '';\n\t\t\t$tmpJson =  preg_replace($patterns, $replacements, $tmpJson);\n\t\t\t\n\t\t\t//-----end----------------\n\t\t\t\t\n\t\t//\t$strJson = CommonHelper::remove_redundant_backslash($strJson);\n\t\t\t\n\t\t\tif($nameArray[0] == \"widget\" && array_key_exists(1, $nameArray))\n\t\t\t{\n\t\t\t\t$strModule = $nameArray[1];\n\t\t\t//\t$fisFileName=Config::$strPath.\"../$strModule/\".$strFileName.\"Html.php\";\n\t\t\t\t$fisFileName=Config::$strPath.$strFileName.\"Html.php\";\n\t\t\t//\tCommonHelper::makeDir(Config::$strPath.\"../$strModule\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$fisFileName=Config::$strPath.$strFileName.\"Html.php\";\n\t\t\t}\n\t\t\t//echo \"fisHtmlFileName:\" . $fisFileName . \"\\n\";\n\t\t\tfile_put_contents($fisFileName,$tmpJson);\n\n\t\t\t//打印测试信息\n\t\t\t$arrDecode = json_decode($tmpJson);\n\t\t\tfile_put_contents(Config::$strPath.\"/tmp/\".$strFileName.\"HtmlTest.php\",$arrDecode[0]);  //utf8解码\n\t\t\t\n\t\t\t/*\n\t\t\t//测试array_utf8_encode方法\n\t\t\t$arrTest = array('video_num' => 5, 'videos' => array(0 => array(title => '暮光之城', 'imgh_url' => 'http://t1.baidu.com/it/u=3490919773,988116911&fm=20')));\n\t\t\tprint_r($arrTest);\n\t\t\t$arrTest = CommonHelper::array_utf8_encode($arrTest);\n\t\t//\tCommonHelper::array_utf8_encode($arrTest);\n\t\t\tprint_r($arrTest);\n\t\t\t$strTest = json_encode($arrTest);\n\t\t\t$strTest = urldecode($strTest);\n\t\t\techo mb_convert_encoding(\"strTest: $strTest\\n\", \"GBK\", \"UTF-8\");\n\t\t\t*/\n\t\t\t\n\t\t\treturn $fisFileName;\n\t\t}\n\t\t\n\t\tpublic function getFile()\n\t\t{\n\t\t\t$strReFile = \"\";\n\t\t\t$strReFile .=  \"//@fileOverview\";\n\t\t\t$strReFile .= \"\\n\";\n\t\t\t\n\t\t\tfor($i=0;$i<count($this->arrFinal);$i++)\n\t\t\t{\n\t\t\t\t$strJson = json_encode($this->arrFinal[$i]);\n\t\t\t\t/*$tmpJson = \"\";\n\t\t\t\tfor($j=0;$j<strlen($strJson);$j++)\n\t\t\t\t{\n\t\t\t\t\t$tmpJson.=$strJson{$j};\n\t\t\t\t\tif($strJson{$j} == \"{\" || $strJson{})\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}*/\n\t\t\t\t$strJson = $this->json_format($strJson);\n\t\t\t\t$tmpReFile = $strReFile.$strJson;\n\t\t\t\tfile_put_contents(Config::$strPath.'/./data/testcase'.$i,$tmpReFile);\n\n\t\t\t}\t\t\t\n\t\t}\n\t}\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/libs/JsonPro/genInterface.php",
    "content": "<?php\nrequire_once(dirname(__FILE__).'/adocParser.php');\nrequire_once(dirname(__FILE__).'/genCase.php');\nrequire_once(dirname(__FILE__).'/genFile.php');\nrequire_once(dirname(__FILE__).'/genLog.php');\nrequire_once(dirname(__FILE__).'/genConf.php');\nrequire_once(dirname(__FILE__).'/CommonHelper.php');\n\nclass genInterface\n{\n\tprivate $parser=null;\n\tprivate $tmpDataPath = \"\";\n\tpublic function __construct()\n\t{\n\t\t$this->parser = new AdocParser();\n\t\tJson_Log::init();\n\t//\t$this->tmpDataPath = dirname(__FILE__).\"/tmp/\";\n\t\t$this->tmpDataPath = WWW_ROOT .\"/tmp/data/\";\n\t\tCommonHelper::makeDir($this->tmpDataPath);\n\n\t\t//如果没有通过setPath方法设置存放路径的话，默认的case存放路径\n\t//\tConfig::$strPath = dirname(__FILE__).\"/data/\";\n\t\tConfig::$strPath = WWW_ROOT .\"/test/data/\";\n\t\tif(substr(Config::$strPath,-1)!=\"/\")\n\t\t{\n\t\t\tConfig::$strPath.=\"/\";//保证最后一个字符是\"/\",以免拼接路径出错\n\t\t}\n\t\tCommonHelper::makeDir(Config::$strPath);\n\t\tCommonHelper::makeDir(Config::$strPath.\"/./tmp\");\n\t}\n\n\t/*\n\t * 输入$strAdoc 输入是adoc文档内容\n\t * 输出 生成指定文件\n\t */\n\n\tpublic function genCaseData($adocFileContent,$asyncBasePath=\"\")\n\t{\n\t\tConfig::$asyncBasePath = $asyncBasePath;\n\t\t//echo  Config::$asyncBasePath.\"\\n\";\n\t\tif($adocFileContent==null) return false;\n\t\t$adocFilePath = $this->tmpDataPath.'adocFile.php';\n\t\t//echo $adocFileContent;\n\t\t//echo $adocFilePath;\n\t\tfile_put_contents($adocFilePath,$adocFileContent);//将用户传过来的content保存到本地\n\t\t$adocType=$this->parser->getAdocTypeBlock($adocFilePath);\n\n\t\t$adocType=strtolower($adocType);\n\t\t//echo $adocType.\"\\n\";\n\t\tif($adocType==\"json\")\n\t\t\t$this->genJsonCaseData($adocFileContent,$asyncBasePath);\n\t\telse if($adocType==\"php\")\n\t\t\t$this->genPhpCaseData($adocFileContent,$asyncBasePath);\n\n\t}\n\tpublic function genJsonCaseData($adocFileContent,$asyncBasePath)\n\t{\n\t\tif($adocFileContent==null) return false;\n\t\t//echo $this->tmpDataPath.\"\\n\";\n\t\t$adocFilePath = $this->tmpDataPath.'AdocFile.php';\n\t\t//echo $adocFileContent;\n\t\t//echo $adocFilePath;\n\t\tfile_put_contents($adocFilePath,$adocFileContent);//将用户传过来的content保存到本地\n\n\t\t$localAdocPathArr=array();//存放本地adoc文件路径的数组\n\t\t//先生成同步数据case及其飘红数据，和addon数据以及飘红数据\n\t\t$mainFisFileName = $this->translateJsonAdocToCase($adocFilePath);\n\t\t//echo $mainFisFileName;\n\t\t//保存同步数据和异步数据的关联关系\n\t\t$caseRelationArray=array();\n\t\t$caseRelationArray[$mainFisFileName]=array();\n\n\t\t//获取异步adoc数据的本地路径数组\n\t\t$asyncPathArr=$this->parser->getRefPathArr($adocFilePath);\n\t\t//var_dump($asyncPathArr);\n\t\t$asyncLocalAdocPathArr=$this->getAsyncLocalAdocPaths($asyncPathArr,$asyncBasePath);\n\t\t//var_dump($asyncLocalAdocPathArr);\n\t\t//逐个生成异步数据case\n\n\t\tforeach ( $asyncLocalAdocPathArr as $asynUrl=>$asynAdocPath )\n\t\t{\n\t\t\t//echo \"dealing:\".$asynAdocPath.\"<br />\";\n       \t\t$asynFisFileName = $this->translateJsonAdocToCase($asynAdocPath);\n       \t\t$caseRelationArray[$mainFisFileName][$asynUrl]=$asynFisFileName;\n\t\t}\n\t//\tvar_dump($caseRelationArray);\n\n\t\tif(count($caseRelationArray[$mainFisFileName])>0)\n\t\t{\n\t\t\t$this->saveAsyncFileNames($caseRelationArray,$mainFisFileName);\n\t\t\t$this->saveHtmlAsyncFileNames($caseRelationArray,$mainFisFileName);\n\t\t}\n\t\treturn true;\n\t}\npublic function genPhpCaseData($adocFileContent,$asyncBasePath)\n\t{\n\t\t//echo  Config::$asyncBasePath.\"\\n\";\n\t\tif($adocFileContent==null) return false;\n\n\t\t$adocFilePath = $this->tmpDataPath.'AdocFile.php';\n\n\n\t\t//echo $adocFilePath;\n\t\tfile_put_contents($adocFilePath,$adocFileContent);//将用户传过来的content保存到本地\n\t\t//echo $adocFileContent;\n\t\t$localAdocPathArr=array();//存放本地adoc文件路径的数组\n\t\t//先生成同步数据case\n\t\t$mainFisFileName = $this->translatePhpAdocToCase($adocFilePath);\n\t\t//echo $mainFisFileName;\n\t\t//保存同步数据和异步数据的关联关系\n\t\t$caseRelationArray=array();\n\t\t$caseRelationArray[$mainFisFileName]=array();\n\n\t\t//获取异步adoc数据的本地路径数组\n\t\t$asyncPathArr=$this->parser->getRefPathArr($adocFilePath);\n\t\t//var_dump($asyncPathArr);\n\t\t$asyncLocalAdocPathArr=$this->getAsyncLocalAdocPaths($asyncPathArr,$asyncBasePath);\n\t\t//echo \"1243124132413245213432\\n\";\n\t\t//var_dump($asyncLocalAdocPathArr);\n\t\t//逐个生成异步数据case\n\n\t\tforeach ( $asyncLocalAdocPathArr as $asynUrl=>$asynAdocPath )\n\t\t{\n\t\t\t//echo \"dealing:\".$asynAdocPath.\"<br />\";\n       \t\t$asynFisFileName = $this->translatePhpAdocToCase($asynAdocPath);\n       \t\t//echo \"dealing:\".$asynAdocPath.\"<br />\";\n       \t\t$caseRelationArray[$mainFisFileName][$asynUrl]=$asynFisFileName;\n\t\t}\n\t//\tvar_dump($caseRelationArray);\n\n\t\tif(count($caseRelationArray[$mainFisFileName])>0)\n\t\t{\n\t\t\t$this->saveAsyncFileNames($caseRelationArray,$mainFisFileName);\n\t\t\t$this->saveHtmlAsyncFileNames($caseRelationArray,$mainFisFileName);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t//保存同步case所对应的异步数据文件名到文件中，以备后续使用。\n\t//文件命名方式为同步数据文件名_async.php.如user.php对用的异步数据关系文件名为user_async.php。\n\t//\n\tprivate function saveAsyncFileNames($caseRelationArray,$mainFisFileName)\n\t{\n\t\tif($caseRelationArray==null or $mainFisFileName==null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\t//echo \"main fis file name=\".$mainFisFileName.\"<br />\";\n\n\t\t$pathArr=explode(\"/\",$mainFisFileName);\n\t\t$fileName=end($pathArr);//取出最后一个元素\n\t\t//echo \"file name=\".$fileName.\"<br />\";\n\n\t\t//拼接处新的文件名\n\t\t$newFileName=substr($fileName,0,-4).\"_async.php\";\n\t\t$caseRelationFile=Config::$strPath.$newFileName;\n\n\t\t$asyncNameStr = \"\";\n\t\tforeach ( $caseRelationArray[$mainFisFileName] as $url=>$name )\n\t\t{\n\t\t\t$name = end(explode(\"/\",$name));//单纯出去文件名，不带路径\n   \t\t\t$asyncNameStr.=$url.\"=\".$name.\"\\n\";//home/demo=demo.php的形式\n\t\t}\n\t\tfile_put_contents($caseRelationFile,$asyncNameStr);\n\t}\n\n\t//保存Html版本同步case所对应的异步数据文件名到文件中，以备后续使用。\n\t//文件命名方式为同步数据文件名_async.php.如user.php对用的异步数据关系文件名为user_async.php。\n\t//\n\tprivate function saveHtmlAsyncFileNames($caseRelationArray,$mainFisFileName)\n\t{\n\t\tif($caseRelationArray==null or $mainFisFileName==null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\t//echo \"main fis file name=\".$mainFisFileName.\"<br />\";\n\n\t\t$pathArr=explode(\"/\",$mainFisFileName);\n\t\t$fileName=end($pathArr);//取出最后一个元素\n\t\t//echo \"file name=\".$fileName.\"<br />\";\n\n\t\t//拼接处新的文件名\n\t\t$newFileName=substr($fileName,0,-4).\"_asyncHtml.php\";\n\t\t$caseRelationFile=Config::$strPath.$newFileName;\n\n\t\t$asyncNameStr = \"\";\n\t\tforeach ( $caseRelationArray[$mainFisFileName] as $url=>$name )\n\t\t{\n\t\t\t$name = end(explode(\"/\",$name));//单纯出去文件名，不带路径\n\t\t\t$nameArr = explode(\".\",$name);\n\t\t\t$name = $nameArr[0].\"Html.\".$nameArr[1];\n   \t\t\t$asyncNameStr.=$url.\"=\".$name.\"\\n\";//home/demo=demo.php的形式\n\t\t}\n\t\tfile_put_contents($caseRelationFile,$asyncNameStr);\n\t\t//echo \"asyncNameStr: $asyncNameStr\\n\";\n\t}\n\n\t//将所有待转化的adoc文档内容存储到本地，并且返回这些本地adoc文档的文件路径\n\tprivate function getAsyncLocalAdocPaths($asyncPathArr,$asyncBasePath=\"\")\n\t{\n\t\t$localAdocPathArr=array();\n\t\t//echo \"asyncBasePath:$asyncBasePath\\n\\n\\n\";\n\t\t$fileIndex=0;\n\t\tforeach ( $asyncPathArr as $path )\n\t\t{\n\t\t\tif(trim($path)==\"\") continue;\n\t\t\t$fullAsyncPath=$asyncBasePath.$path.\".text\";\n\t\t\t//echo \"before exist check:\".$fullAsyncPath.\"<br />\";\n\n\t\t\t//如果远端异步数据文件不存在，则跳过它，不转化\n\t\t\tif($this->url_file_exists($fullAsyncPath)===false) continue;\n\t\t\t//echo \"lalalal\\n\\n\\n\";\n\t\t\t$tempDocFile=$this->tmpDataPath.$fileIndex.\".php\";//异步数据本地临时文件名\n\t\t\t$tmpContent = file_get_contents($fullAsyncPath);//读取远端数据\n\t\t\tfile_put_contents($tempDocFile,$tmpContent);//写入本地文件\n\t\t\tif(file_exists($tempDocFile))\n\t\t\t{\n\t\t\t\t//写成功，一个新的本地adoc文档，加入待转化数组\n\t\t\t\t$localAdocPathArr[$path]=$tempDocFile;\n\t\t\t}\n\t\t\t$fileIndex+=1;\n\t\t}\n\t\treturn $localAdocPathArr;\n\t}\n\n\t//将指定路径下的adoc文档转换成case。\n\tprivate function translatePhpAdocToCase($phpAdocFilePath)\n\t{\n\t\t//echo \"translatePhpAdocToCase\\n\";\n\t\t//先取出adoc中的json数据\n \t\t$jsonFileContent = $this->parser->getJsonBlock($phpAdocFilePath);\n\n \t\t//echo $adocFilePath.\"=====\".$jsonFileContent.\"<br />\";\n \t\tif (trim($jsonFileContent)==\"\" or $jsonFileContent==null)\n \t\t{\n \t\t\treturn false;\n \t\t}\n\n \t\t//将解析出的json内容单独存放到临时文件中\n\t\t$jsonFilePath = $this->tmpDataPath.\"File.php\";\n\t\t//echo \"jsonFilePath:$jsonFilePath\\n\";\n\t\tfile_put_contents($jsonFilePath,$jsonFileContent);\n\t\t//解析json中需要变动的字段值\n\t//\t$arrPosNote=$this->parser->getNotes($jsonFileContent);\n\t\t$arrPhpPosNote=$this->parser->getPhpNotes($phpAdocFilePath);\n\t\t//var_dump($arrPhpPosNote);\n\t\tif($arrPhpPosNote==null or trim($arrPhpPosNote)==\"\")\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tfile_put_contents(Config::$strPath.\"/./tmp/PosNote.php\",print_r($arrPhpPosNote,true));\n\t//\t//echo \"arrPosNote: \";\n\t//\tvar_dump($arrPosNote);\n\n\t\t//调用array生成类 genArray 生成php array\n\t\t$genArray = new genArray();\n\t//\t$standJosn = $genArray->getArray($jsonFilePath);#这是一个得到的标准数组\n\t\t$standJosn = $genArray->getPhpInheritStandArray($jsonFilePath, $phpAdocFilePath);#这是一个得到的标准数组\n\t\t//var_dump($standJosn);\n\t\tif($standJosn == null) {\n\t\t\t//\t//echo \"\\n standJosn is null!\\n\";\n\t\t}\n\n\t\t//调用case组织类 genCase 原则是 case数=max(接口可能值)\n\t\t//返回的是一个大的数组 $arr[0] 为case0以此类推\n\t\t$genCase = new genCase($standJosn,$arrPhpPosNote);\n\t\t$arrFinalCase = $genCase->getCase();//最终所有case均保存在该数组中\n\t\t//var_dump($arrFinalCase);\n\t\t$arrFinalHtmlCase = $genCase->getHtmlCase($arrFinalCase);//最终所有Html case均保存在该数组中\n\n\t\t$arrFinalCase = $this->adjustCaseOrder($arrFinalCase);\n//\t\t$substr=\"imageIndexNumber\";\n//\t\t$index=0;\n//\t\t$i = 0;\n//\t\t$genCase->dfs($arrFinalCase,$substr,$index,0,$i);\n\t\tfile_put_contents(Config::$strPath.\"/./tmp/ArrFinalCase.php\",print_r($arrFinalCase,true));\n\n\t\t$arrFinalHtmlCase = $this->adjustCaseOrder($arrFinalHtmlCase);\n//\t\t$i = 0;\n//\t\t$genCase->dfs($arrFinalHtmlCase,$substr,$index,0,$i);\n\t\tfile_put_contents(Config::$strPath.\"/./tmp/ArrFinalHtmlCase.php\",print_r($arrFinalHtmlCase,true));\n\n\t\t//调用文件生成类 用于FIS、百科、其他产品线文件调用\n\t\t//该内容可以从配置文件中读,保存adoc中所写的url\n\t\t$fileUrl=$this->parser->getUrlBlock($phpAdocFilePath);\n\t\t//将case信息生成为文件\n\t\t$genFile = new genFile($arrFinalCase);\n\t\t//$genFile->getFile();\n\t\t$fisFileName=$genFile->getFISFile($fileUrl);\n\t\t//echo \"fisFileName:$fisFileName\\n\";\n\n\t\t$genHtmlFile = new genFile($arrFinalHtmlCase);\n\t\t$tmpArrFinalHtmlCase = $arrFinalHtmlCase; //保存记录$arrFinalHtmlCase\n\t\t$genHtmlFile->getFISHtmlFile($fileUrl); //产生html case的文件///////////////////////////////////////\n\n\t\t//add by zs 解析addon数据获取数组\n\t\t$addonArr = $this->parser->getAddonArr($phpAdocFilePath);\n\t\t//var_dump($addonArr);\n\t\tif($addonArr != null)\n\t\t{\n\t\t\tforeach($addonArr as $addonPath)\n\t\t\t{\n\t\t\t\t//todo change widget file name\n\t\t\t\tif(trim($addonPath) != \"\")\n\t\t\t\t{\n\t\t\t\t\t$addonPath = \"/widget\".$addonPath;\n\t\t\t\t\t$genFile->getFISFile($addonPath);\n\t\t\t\t\t$genAddFromHtmlFile = new genFile($tmpArrFinalHtmlCase);\n\t\t\t\t\t$genAddFromHtmlFile->getFISHtmlFile($addonPath);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $fisFileName;//暫時返回生成的case文件全路径。\n\t}\n\n\nprivate function translateJsonAdocToCase($jsonAdocFilePath)\n\t{\n\t\t//先取出adoc中的json数据\n \t\t$jsonFileContent = $this->parser->getJsonBlock($jsonAdocFilePath);\n\n \t\t//echo $adocFilePath.\"=====\".$jsonFileContent.\"<br />\";\n \t\tif (trim($jsonFileContent)==\"\" or $jsonFileContent==null)\n \t\t{\n \t\t\treturn false;\n \t\t}\n\n \t\t//将解析出的json内容单独存放到临时文件中\n\t\t$jsonFilePath = $this->tmpDataPath.\"File.php\";\n\t\tfile_put_contents($jsonFilePath,$jsonFileContent);\n\n\t\t//解析json中需要变动的字段值\n\t//\t$arrPosNote=$this->parser->getNotes($jsonFileContent);\n\t\t$arrJsonPosNote=$this->parser->getJsonNotes($jsonAdocFilePath);\n\t\tif($arrJsonPosNote==null or empty($arrJsonPosNote))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tfile_put_contents(Config::$strPath.\"/./tmp/PosNote.php\",print_r($arrJsonPosNote,true));\n\t//\t//echo \"arrPosNote: \";\n        //var_dump($arrJsonPosNote);\n\n\t\t//调用array生成类 genArray 生成php array\n\t\t$genArray = new genArray();\n\t//\t$standJosn = $genArray->getArray($jsonFilePath);#这是一个得到的标准数组\n\t\t$standJosn = $genArray->getjsonInheritStandArray($jsonFilePath, $jsonAdocFilePath);#这是一个得到的标准数组\n\t\tif($standJosn == null) {\n\t\t\t//\t//echo \"\\n standJosn is null!\\n\";\n\t\t}\n\n\t\t//调用case组织类 genCase 原则是 case数=max(接口可能值)\n\t\t//返回的是一个大的数组 $arr[0] 为case0以此类推\n\t\t$genCase = new genCase($standJosn,$arrJsonPosNote);\n\t\t$arrFinalCase = $genCase->getCase();//最终所有case均保存在该数组中\n\n        //define start\n        $defineContent = $this->parser->getDefineBlock($jsonAdocFilePath);\n         if(!empty($jsonFileContent) && trim($defineContent)!=\"\"){\n            $defineFilePath = $this->tmpDataPath.\"define.php\";\n            file_put_contents($defineFilePath,$defineContent);\n            $defineArr = $this->parser->getJsonNewAdocArray($defineContent);\n\n            if(!function_exists('_define_replace')){\n                function _define_replace($str, $map, $case){\n                    $tmp = array();\n                    if(preg_match_all(\"/\\[(.+?)\\]/\", $str, $tmp)){\n                        $params = $tmp[1];\n                        foreach($params as $v){\n                            // search case vars\n                            $case_params = array();\n                            if(preg_match_all(\"/#(.+?)#/\", $v, $case_params)){\n                                $case_tmp = $case;\n                                foreach($case_params[1] as $vv){\n                                    if(isset($case_tmp[$vv])) $case_tmp = $case_tmp[$vv];\n                                    else return '$' . $str . '$';\n                                }\n                                $v = $case_tmp;\n                            }\n                            // search case vars end\n                            if(isset($map[$v])) $map = $map[$v];\n                            else return '$' . $str . '$';\n                        }\n                        return $map;\n                    }\n                    return '$' . $str . '$';\n                }\n            }\n\n            if(!function_exists('_define_replace_deep')){\n                function _define_replace_deep(&$arr, &$map, &$case){\n                    foreach($arr as &$v){\n                        if(is_string($v)){\n                            $ret = array();\n                            if(preg_match_all('/\\$([^$]*?)\\$/', $v, $ret)){\n                                foreach($ret[1] as $k => $var){\n                                    $ttt = _define_replace($var, $map, $case);\n                                    if(is_string($ttt) || is_numeric($ttt))\n                                        $v = str_replace($ret[0][$k], $ttt, $v);\n                                    else\n                                        $v = $ttt;\n                                }\n                            }\n                        }elseif(is_array($v)){\n                            _define_replace_deep($v, $map, $case);\n                        }\n                    }\n                }\n            }\n        }\n        //define end\n        //var_dump($arrFinalCase);\n\n\t\t$arrFinalHtmlCase = $genCase->getHtmlCase($arrFinalCase);//最终所有Html case均保存在该数组中\n        if(!empty($jsonFileContent) && trim($defineContent)!=\"\"){\n            foreach($arrFinalCase as &$v){\n                _define_replace_deep($v, $defineArr, $v);\n            }\n            foreach($arrFinalHtmlCase as $k=>&$v){\n                _define_replace_deep($v, $defineArr, $arrFinalCase[$k]);\n            }\n        }\n        //var_dump($arrFinalCase);\n\t\t//var_dump($arrFinalHtmlCase);\n        //exit();\n\t\t$arrFinalCase = $this->adjustCaseOrder($arrFinalCase);\n\t\t//var_dump($arrFinalCase);\n//\t\t$substr=\"imageIndexNumber\";\n//\t\t$index=0;\n//\t\t$i=0;\n//\t\t//var_dump($arrFinalCase[0]);\n//\t\t$genCase->dfs($arrFinalCase,$substr,$index,0,$i);\n\t\tfile_put_contents(Config::$strPath.\"/./tmp/ArrFinalCase.php\",print_r($arrFinalCase,true));\n//\t\t$i=0;\n\t\t$arrFinalHtmlCase = $this->adjustCaseOrder($arrFinalHtmlCase);\n//\t\t$genCase->dfs($arrFinalHtmlCase,$substr,$index,0,$i);\n\t\t//var_dump($arrFinalHtmlCase);\n\t\tfile_put_contents(Config::$strPath.\"/./tmp/ArrFinalHtmlCase.php\",print_r($arrFinalHtmlCase,true));\n\n\t\t//调用文件生成类 用于FIS、百科、其他产品线文件调用\n\t\t//该内容可以从配置文件中读,保存adoc中所写的url\n\t\t$fileUrl=$this->parser->getUrlBlock($jsonAdocFilePath);\n\t\t//将case信息生成为文件\n\t\t$genFile = new genFile($arrFinalCase);\n\t\t//$genFile->getFile();\n\t\t$fisFileName=$genFile->getFISFile($fileUrl);\n\n\t\t$genHtmlFile = new genFile($arrFinalHtmlCase);\n\t\t$tmpArrFinalHtmlCase = $arrFinalHtmlCase; //保存记录$arrFinalHtmlCase\n\t\t$genHtmlFile->getFISHtmlFile($fileUrl); //产生html case的文件///////////////////////////////////////\n\n\t\t//add by zs 解析addon数据获取数组\n\t\t$addonArr = $this->parser->getAddonArr($jsonAdocFilePath);\n\t\t//var_dump($addonArr);\n\t\tif($addonArr != null)\n\t\t{\n\t\t\tforeach($addonArr as $addonPath)\n\t\t\t{\n\t\t\t\t//todo change widget file name\n\t\t\t\tif(trim($addonPath) != \"\")\n\t\t\t\t{\n\t\t\t\t\t$addonPath = \"/widget\".$addonPath;\n\t\t\t\t\t$genFile->getFISFile($addonPath);\n\t\t\t\t\t$genAddFromHtmlFile = new genFile($tmpArrFinalHtmlCase);\n\t\t\t\t\t$genAddFromHtmlFile->getFISHtmlFile($addonPath);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $fisFileName;//暫時返回生成的case文件全路径。\n\t}\n\n\n\t//判断一个url格式的文件是否存在，如http://fe.baidu.com/data/demo/list.text\n\tprivate function url_file_exists($url)\n\t{\n\t    $url = trim($url);\n\t    if(substr($url,0,7)==\"http://\")\n\t    {\n\t\t    $http_headers = @get_headers($url,1);\n\t\t    $exist_stat = \"200\";\n\t\t    $string_pieces = explode(\" \",$http_headers[0]);\n\t\t    for ($i = 0; $i < count($string_pieces);$i++)\n\t\t    {\n\t\t\t\tif (strcmp($exist_stat,$string_pieces[$i]) == 0)\n\t\t\t\t{\n\t\t\t\t    return true;\n\t\t\t\t}\n\t\t    }\n\t\t    return false;\n\t    }\n\t    else\n\t    {\n\t    \t$contents=file_get_contents($url);\n\t    \t//echo \"contents:$contents\\n\\n\\n\";\n\t    \tif($contents==\"\")\n\t    \t\treturn false;\n\t    \telse\n\t    \t\treturn true;\n\t    }\n\t}\n\n\t/*\n\t * 輸入url\n\t * 輸出返回 文件內容\n\t */\n\tpublic function getCaseData($url = \"\")\n\t{\n\t\tif($url==null or $url == \"\")\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\t$localFilePath=$this->getLocalFilePath($url);\n\t\t//echo \"localFilePath: $localFilePath\\n\";\n\n\t\t$resultArray=array();//返回值数组\n\t\t//读取同步case中的数据并放入返回值数组中。\n\t\t//echo Config::$strPath.\"\\n\";\n\t\t$mainFileName = Config::$strPath.$localFilePath.\".php\";\n\t\t//echo $mainFileName.\"\\n\";\n\t\t$mainCaseContent = file_get_contents($mainFileName);\n\t\t//将异步数据文件名放入返回值数组中。\n\t\t$resultArray[]=$mainCaseContent;\n\t\t$resultArray[]=$this->getAsyncFileArray($localFilePath);\n\t\t//var_dump($resultArray);\n\n\t\treturn $resultArray;\n\t}\n\n\t/*\n\t * 輸入url\n\t * 輸出返回 Html文件內容\n\t */\n\tpublic function getHtmlCaseData($url = \"\")\n\t{\n\t\tif($url==null or $url == \"\")\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t$localFilePath=$this->getLocalFilePath($url);\n\t\t//echo \"localFilePath:$localFilePath\\n\";\n\t\t//读取同步case中的数据并放入返回值数组中。\n\t\t$mainFileName = Config::$strPath.$localFilePath.\"Html.php\";\n\t\t//echo $mainFileName.\"\\n\";\n\t\t$htmlCaseContent = file_get_contents($mainFileName);\n\t\t//echo $htmlCaseContent;\n\t\t//将异步数据文件名放入返回值数组中。\n\t\t$resultArray[] = $htmlCaseContent;\n\t\t$resultArray[] = $this->getHtmlAsyncFileArray($localFilePath);\n\t//\tvar_dump($resultArray);\n\n\t\treturn $resultArray;\n\t}\n\n\t//将用户输入的url转换成本地文件名，如用户输入的是/user/tim,那么本地存储tim数据的文件名为./data/user_tim.php.\n\tprivate function getLocalFilePath($url)\n\t{\n\t\t$arrTmp = explode(\"/\",$url);\n\t\t$path = \"\";\n\t\tforeach ($arrTmp as $key)\n\t\t{\n\t\t\tif(trim($key) == \"\")\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif($path != \"\")\n\t\t\t{\n\t\t\t\t$path .= \"_\".$key;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$path .= $key;\n\t\t\t}\n\n\t\t}\n\t\treturn $path;\n\t}\n\n\t//获取同步数据所对应的异步文件的文件路径\n\tprivate function getAsyncFileArray($dataPath)\n\t{\n\t\t$asyncFileName=Config::$strPath.$dataPath.\"_async.php\";\n\t//\t//echo \"11222222222222222222223333333333333\\n\";\n\t//\t//echo \"asyncFileName: $asyncFileName\\n\";\n\t\t$asyncFilesArr=array();\n\t\tif(file_exists($asyncFileName))\n\t\t{\n\t\t\t$asyncFile = fopen($asyncFileName, \"r\");\n\t\t\twhile(!feof($asyncFile))\n  \t\t\t{\n\t\t\t\t$line = fgets($asyncFile);\n\t\t\t\tif($line!=null and trim($line)!=\"\")\n\t\t\t\t{\n\t\t\t\t\t$url_path_array=explode(\"=\",$line);\n\t\t\t\t\t$url = $url_path_array[0];\n\t\t\t\t\t$path = $url_path_array[1];\n\t\t\t\t\t$asyncFilesArr[$url]=Config::$strPath.$path;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfclose($asyncFile);\n\t\t}\n\t//\tvar_dump($asyncFilesArr);\n\t\treturn $asyncFilesArr;\n\t}\n\n\t//获取Html版本同步数据所对应的异步文件的文件路径\n\tprivate function getHtmlAsyncFileArray($dataPath)\n\t{\n\t\t$asyncFileName=Config::$strPath.$dataPath.\"_asyncHtml.php\";\n\t//\t//echo \"11222222222222222222223333333333333\\n\";\n\t//\t//echo \"asyncFileName: $asyncFileName\\n\";\n\t\t$asyncFilesArr=array();\n\t\tif(file_exists($asyncFileName))\n\t\t{\n\t\t\t$asyncFile = fopen($asyncFileName, \"r\");\n\t\t\twhile(!feof($asyncFile))\n  \t\t\t{\n\t\t\t\t$line = fgets($asyncFile);\n\t\t\t\tif($line!=null and trim($line)!=\"\")\n\t\t\t\t{\n\t\t\t\t\t$url_path_array=explode(\"=\",$line);\n\t\t\t\t\t$url = $url_path_array[0];\n\t\t\t\t\t$path = $url_path_array[1];\n\t\t\t\t\t$asyncFilesArr[$url]=Config::$strPath.$path;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfclose($asyncFile);\n\t\t}\n\t//\tvar_dump($asyncFilesArr);\n\t\treturn $asyncFilesArr;\n\t}\n\n\t/*\n\t * 设置数据文件的存放位置\n\t * 默认存放在jsonPro/data下\n\t */\n\tpublic function setPath($caseFilePath = \"\")\n\t{\n\t\tif($caseFilePath == \"\") return ;//直接返回，使用构造函数中默认的path。\n\n\t\tif(substr($caseFilePath,-1)!=\"/\")\n\t\t{\n\t\t\t$caseFilePath.=\"/\";//保证最后一个字符是\"/\",以免拼接路径出错\n\t\t}\n\t\tConfig::$strPath = $caseFilePath;\n\t\t//创建case路径，确保case有地方存放\n\t\tCommonHelper::makeDir(Config::$strPath);\n\n\t\treturn true;\n\t}\n\n\t//调整case的顺序，把case数组中的最后一个case（优化case）提到第一个case\n\t//其余case依次后移\n\t//输入是要调整次序的case数组\n\t//返回是调整后的数组\n\tpublic function adjustCaseOrder($arrCase)\n\t{\n\t\t$arrNewCase = array();\n\t\t$lastElement = end($arrCase);\n\t\t$arrNewCase[] = $lastElement;\n\t\tfor ($i = 0; $i < count($arrCase)-1; $i++)\n\t\t{\n\t\t\t$arrNewCase[] = $arrCase[$i];\n\t\t}\n\t\treturn $arrNewCase;\n\t}\n}\n?>\n"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/libs/JsonPro/genLog.php",
    "content": "<?php\n\tclass Json_Log\n\t{\n\t\tconst LOG_LEVEL_FATAL   = 0x01;\n\t    const LOG_LEVEL_WARNING = 0x02;\n\t    const LOG_LEVEL_NOTICE  = 0x04;\n\t    const LOG_LEVEL_TRACE   = 0x08;\n\t    const LOG_LEVEL_DEBUG   = 0x10;\n    \n\t\tpublic static $arrLogLevels = array(\n\t        self::LOG_LEVEL_FATAL   => 'FATAL',\n\t        self::LOG_LEVEL_WARNING => 'WARNING',\n\t        self::LOG_LEVEL_NOTICE  => 'NOTICE',\n\t        self::LOG_LEVEL_TRACE   => 'TRACE',\n\t        self::LOG_LEVEL_DEBUG   => 'DEBUG',\n    \t);\n    \t\n    \tprotected static $strLogFile = \"\";\n    \tprivate static $instance = null;\n    \t\n\t\tprivate function __construct($logFile)\n\t    {\n\t        self::$strLogFile = $logFile;\n\t    }\n\t    \n\t\tpublic static function init($logFile=\"\")\n\t    {\n\t        if(self::$instance == null)\n\t        {\n\t        \tif($logFile == \"\")\n\t        \t{\n\t        \t\t$logFile = dirname(__FILE__).\"/./log/jsonPro.log\";\n\t        \t\tself::$instance = new Json_Log($logFile);\n\t        \t}\n\t        \telse \n\t        \t{\n\t        \t\tself::$instance = new Json_Log($logFile);\n\t        \t}\n\t            \n\t        }\n\t    }\n\t    \n\t\tpublic static function debug($str,$file=\"\",$line=\"\")\n\t    {\n\t        return self::$instance->writeLog(self::LOG_LEVEL_DEBUG, $str,$file,$line);\n\t    }\n\t\n\t    public static function trace($str,$file=\"\",$line=\"\")\n\t    {\n\t        return self::$instance->writeLog(self::LOG_LEVEL_TRACE, $str,$file,$line);\n\t    }\n\t\n\t    public static function notice($str,$file=\"\",$line=\"\")\n\t    {\n\t        return self::$instance->writeLog(self::LOG_LEVEL_NOTICE, $str,$file,$line);\n\t    }\n\t\n\t    public static function warning($str,$file=\"\",$line=\"\")\n\t    {\n\t        return self::$instance->writeLog(self::LOG_LEVEL_WARNING, $str,$file,$line);\n\t    }\n\t\n\t    public static function fatal($str,$file=\"\",$line=\"\")\n\t    {\n\t        return self::$instance->writeLog(self::LOG_LEVEL_FATAL, $str,$file,$line);\n\t    }\n\t    \n\t    public static function writeLog($intLevel,$str,$file,$line)\n\t    {\n\t    \t$strLevel = self::$arrLogLevels[$intLevel];\n\t\t    $strLogFile = self::$strLogFile;\n\t        if(self::LOG_LEVEL_WARNING || self::LOG_LEVEL_FATAL)\n\t        {\n\t            $strLogFile .= '.wf';\n\t        }\n\t        \n\t        $str = sprintf(\"%s:%s print_word[%s],file[%s],line[%s] \\n\",\n\t        \t$strLevel,\n\t        \tdate('m-d H:i:s:',time()),\n\t        \t$str,\n\t        \t$file,\n\t        \t$line);\n\t        return file_put_contents($strLogFile,$str,FILE_APPEND);\n\t    }\n\t}\n\t\n    \n    \n"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/libs/JsonPro/genValue.php",
    "content": "<?php\n\nrequire_once(dirname(__FILE__).'/genConf.php');\nrequire_once(dirname(__FILE__).'/genLog.php');\n\nclass genValue\n{\n \tprivate $note = \"\";\n \tprivate $type = \"\";\n \tpublic function __construct($nt,$ty)\n \t{\n\t\tJson_Log::init();//Json_Log::fatal(\"in genvalue\",__FILE__,__LINE__);\n \t\t$this->note = $nt;\n \t\t$this->type = $ty;\n \t\t//echo \"NOTE: \" . mb_convert_encoding($nt, \"GBK\", \"UTF-8\") . \"\\n\";\n \t\t//echo \"TYPE: \".$ty.\"\\n\";\n \t}\n\n \t//目前只针对int string 类型的注释\n \tpublic function getValue($value)\n \t{\n \t\t$reStr = \"\";//返回结果\n \t\t$tmpValue = \"\";//临时的value值\n \t\t//echo $this->note;\n \t\t//$arrNote = explode('/',$this->note);\n \t\t$strNote = trim($this->note);\n \t\t$strNote = substr($strNote, 2);\n \t\t//echo \"strNote: $strNote\\n\";\n \t\t$arrNote = array();\n \t\t$arrNote[] = $strNote;\n \t\t//var_dump($arrNote);\n\n \t\t$arrNoteCount=count($arrNote);\n \t\tfor($i=0;$i<$arrNoteCount;$i++)\n \t\t{\n \t\t\tif(substr($arrNote[$i],0,1) == \"<\")//枚举\n \t\t\t{\n \t\t\t\t$arrNote[$i] = trim($arrNote[$i]);//过滤]之后的空格\n \t\t\t\t$strEnum = substr($arrNote[$i],1,strlen($arrNote[$i])-2);\n \t\t\t\t$arrEnum = explode(\",\",$strEnum);\n \t\t\t\t//var_dump($arrEnum);\n\n \t\t\t\t//去掉空格\n \t\t\t\tforeach ($arrEnum as $arrEnumKey => $arrEnumValue)\n \t\t\t\t{\n \t\t\t\t\t$arrEnum[$arrEnumKey] = trim($arrEnumValue);\n \t\t\t\t}\n\n \t\t\t\t$arrEnumCount=count($arrEnum);\n \t\t\t\tfor($j=0;$j<$arrEnumCount;$j++)//遍历所有枚举内容\n \t\t\t\t{\n \t\t\t\t\t//获取单个枚举内容\n \t\t\t\t\tif($arrEnum[$j]{0} == \"'\" || $arrEnum[$j]{0} == '\"')\n \t\t\t\t\t{\n\t\t\t\t\t\t$tmpValue = substr($arrEnum[$j],1,strlen($arrEnum[$j])-2);\n \t\t\t\t\t}\n \t\t\t\t\telse\n \t\t\t\t\t{\n \t\t\t\t\t\t$tmpValue = $arrEnum[$j];\n \t\t\t\t\t}\n \t\t\t\t\t//压入返回字符串中\n \t\t\t\t\tif($reStr == \"\")\n \t\t\t\t\t{\n \t\t\t\t\t\t$reStr .= $tmpValue;\n \t\t\t\t\t\t//echo $reStr.\"\\n\";\n \t\t\t\t\t}\n \t\t\t\t\telse\n \t\t\t\t\t{\n \t\t\t\t\t\t$reStr .= \",\".$tmpValue;\n \t\t\t\t\t\t//echo $reStr.\"\\n\";\n \t\t\t\t\t}\n\n \t\t\t\t}\n \t\t\t}\n \t\t\telse if(substr($arrNote[$i],0,1) == \"[\")//范围\n \t\t\t{\n \t\t\t\t$arrNote[$i] = trim($arrNote[$i]);//过滤]之后的空格\n \t\t\t\t$strBord = substr($arrNote[$i],1,strlen($arrNote[$i])-2);\n \t\t\t\t$arrBord = explode(\",\",$strBord);\n\n \t\t\t\t//去掉空格\n \t\t\t\tforeach ($arrBord as $arrBordKey => $arrBordValue)\n \t\t\t\t{\n \t\t\t\t\t$arrBord[$arrBordKey] = trim($arrBordValue);\n \t\t\t\t}\n\n \t\t\t\tif($this->type == \"string\")\n \t\t\t\t{\n \t\t\t\t\t//echo $reStr.\"\\n\";\n \t\t\t\t\t$this->putString($arrBord,$reStr,$value);\n \t\t\t\t}\n \t\t\t\telse if($this->type == \"int\")\n \t\t\t\t{\n \t\t\t\t\t$this->putInt($arrBord,$reStr);\n \t\t\t\t}\n \t\t\t}\n \t\t\telse if(substr($arrNote[$i],0,11) == \"(messycode)\")//乱码测试\n \t\t\t{\n \t\t\t\t$mess_string=$this->getMessStr();\n \t\t\t\t//在这里添加乱码测试使用的内容。\n\t\t\t\tif($reStr == \"\")\n\t\t\t\t{\n\t\t\t\t\t$reStr .= $mess_string;\n\t\t\t\t\t//echo $reStr;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$reStr .= \",\".$mess_string;\n\t\t\t\t\t//echo $reStr;\n\t\t\t\t}\n \t\t\t}\n \t\t\telse if(substr($arrNote[$i],0,1) == \"(\")//范围\n \t\t\t{\n \t\t\t\t$arrNote[$i] = trim($arrNote[$i]);//过滤]之后的空格\n \t\t\t\t$strBord = substr($arrNote[$i],1,strlen($arrNote[$i])-2);\n                $strnum = intval($strBord);\n\n                $reStr = \"\";\n                foreach(range(1,4) as $v){\n                    $tmp = ',';\n                    for($i = 1; $i <=$strnum;$i++){\n                        do{\n                            $n = mt_rand(35, 126);\n                        }while(92 == $n || 60 == $n || 62 == $n || 44 == $n);\n                        $tmp .= chr($n);\n                    }\n                    $reStr .= $tmp;\n                }\n                $reStr = substr($reStr, 1);\n \t\t\t}\n \t\t}\n\n \t\t//用于value值去重\n \t\t$arrTerminal = explode(\",\",$reStr);\n \t\t$reStr = \"\";\n \t\tfor($i=0;$i<count($arrTerminal);$i++)\n \t\t{\n \t\t\tif($reStr == \"\")\n \t\t\t{\n \t\t\t\t$reStr .= $arrTerminal[$i];\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\t$tmpBool = false;\n \t\t\t\tfor($j=0;$j<$i;$j++)\n \t\t\t\t{\n \t\t\t\t\tif($arrTerminal[$j] == $arrTerminal[$i])\n \t\t\t\t\t{\n \t\t\t\t\t\t$tmpBool = true;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tif($tmpBool)\n \t\t\t\t{\n \t\t\t\t\t//有重复则不入库\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t{\n \t\t\t\t\t$reStr .= \",\".$arrTerminal[$i];\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t//返回去重后的结果 以\",\"分割\n \t\t//echo \"RESTR: $reStr\\n\";\n \t\treturn $reStr;\n \t}\n\n \tprivate function getMessStr()\n \t{\n\t\t$mess_arr = Config::$mess_arr;\n\t\t$mess_str=\"\";#必定包含的部分放在这里\n\t\tforeach ( $mess_arr as $case )\n\t\t{\n\t\t\t//$mess_char = array_rand(str_split($case),1);\n       \t\t$mess_str=$mess_str.$case;\n\t\t}\n \t\treturn $mess_str;\n \t}\n\n \tpublic function putString($arrBord,&$reStr,$value)\n \t{\n \t\tif(is_numeric($arrBord[0]) && is_numeric($arrBord[1]))\n \t\t{\n \t\t\t//echo \"aaaaaaaaaa $arrBord[0] $arrBord[1] \\n\";\n \t\t\t//空串\n \t\t\tif($reStr == \"\")\n\t \t\t{\n\t \t\t\t$reStr .= $this->getString($arrBord[0]-1,$value);\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\t$reStr .= \",\".$this->getString($arrBord[0]-1,$value);\n\t \t\t}\n\n \t\t\t$reStr .= \",\".$this->getString($arrBord[0],$value);\n \t\t\t$reStr .= \",\".$this->getString(($arrBord[0]+$arrBord[1])/2,$value);\n \t\t\t$reStr .= \",\".$this->getString($arrBord[1],$value);\n \t\t\t$reStr .= \",\".$this->getString($arrBord[1]+1,$value);\n \t\t}\n \t}\n\n \tpublic function putInt($arrBord,&$reStr)\n \t{\n \t\t//echo \"before $arrBord[0] $arrBord[1] \\n\";\n\t \tif(is_numeric($arrBord[0]) && is_numeric($arrBord[1]))\n \t\t{\n \t\t\t//echo \"aaaaaaaaaa $arrBord[0] $arrBord[1] \\n\";\n \t\t\tif($reStr == \"\")\n \t\t\t{\n \t\t\t\t$reStr .= $this->getNum($arrBord[0]-1);\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\t$reStr .= \",\".$this->getNum($arrBord[0]-1);\n \t\t\t}\n \t\t\t$reStr .= \",\".$this->getNum($arrBord[0]);\n \t\t\t$reStr .= \",\".$this->getNum(($arrBord[0]+$arrBord[1])/2);\n \t\t\t$reStr .= \",\".$this->getNum($arrBord[1]);\n \t\t\t$reStr .= \",\".$this->getNum($arrBord[1]+1);\n\t \t}\n \t}\n\n\tpublic function getString($strLength,$value)\n\t{\n\t    $tmpStr = \"\";\n\t    $strLength = intval(floor($strLength));\n\t    if ($strLength <= 0) {\n\t    \t$strLength = 1;\n\t    }\n\t    for($i=0;$i<$strLength;$i++)\n\t    {\n\t       $tmpStr .= $value;\n\t    }\n\t    return $tmpStr;\n\t}\n\n\tpublic function getNum($numLength)\n\t{\n\t    $tmpStr = 0;\n\t    /*for($i=0;$i<$numLength;$i++)\n\t    {\n\t       $tmpStr = $tmpStr * 10 + 1;\n\t    }*/\n\t    $tmpStr = floor($numLength);\n\t\t$tmpStr = intval($tmpStr);\n\n\t    return $tmpStr;\n\t}\n\n}\n\n?>\n"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/libs/Util.class.php",
    "content": "<?php\n\nclass Util {\n    /**\n     * 格式化路径字符串\n     *\n     * * replace \"\\\" to \"/\"\n     * * replace contiguous \"/\" to one \"/\"\n     * * replace \"a/b/../c\" to \"a/c\"\n     * * remove \"/./\"\n     * * remove \"/\" at the end.\n     *\n     * @static\n     * @param string $path 路径字符串（路径存在与否）\n     * @return string\n     */\n    public static function normalizePath($path) {\n        $normal_path = preg_replace(\n            array('/[\\/\\\\\\\\]+/', '/\\/\\.\\//', '/^\\.\\/|\\/\\.$/', '/\\/$/'),\n            array('/', '/', '', ''),\n            $path\n        );\n        $path = $normal_path;\n        do {\n            $normal_path = $path;\n            $path = preg_replace('/[^\\\\/\\\\.]+\\\\/\\\\.\\\\.(?:\\\\/|$)/', '', $normal_path);\n        } while ($path != $normal_path);\n        $path = preg_replace('/\\/$/', '', $path);\n        return $path;\n    }\n\n    /**\n     * 判断给定文件路径是否符合include和exclude规则\n     * @static\n     * @param string $file 路径字符串\n     * @param null $include 包含文件的正则\n     * @param null $exclude 排除文件的正则\n     * @param null $m 从这个值可以获取包含正则的匹配分组\n     * @return bool\n     */\n    public static function filter($file, $include = null, $exclude = null, &$m = null) {\n        return !(($include && preg_match($include, $file, $m) == 0) || ($exclude && preg_match($exclude, $file) != 0));\n    }\n\n    /**\n     * 查找指定目录下的文件或目录\n     * @static\n     * @param string $path 目录路径\n     * @param null $include 要包含的文件正则，如果设置了，则只有符合这个正则的文件才能被请求到\n     * @param null $exclude  要排除的文件正则，如果设置了，即使是包含的文件，也会被排除\n     * @param bool $recursion 是否递归查找，默认是true\n     * @param bool $include_dir 找到的结果是否包含目录，默认为false，不包含\n     * @param array $files 递归用的存储容器，不应该被用到\n     * @return array 数组\n     */\n    public static function find($path, $include = null, $exclude = null, $recursion = true, $include_dir = false, &$files = array()) {\n        $path = realpath($path);\n        if (is_dir($path)) {\n            $path .= '/';\n            $dir = dir($path);\n            while (false !== ($entry = $dir->read())) {\n                if ($entry == '.' || $entry == '..' || ($entry{0} == '.' && is_dir($path . $entry))) {\n                    continue;\n                }\n                $entry = $path . $entry;\n                if (is_dir($entry)) {\n                    if ($include_dir && self::filter($entry, $include, $exclude)) {\n                        $files[] = $entry;\n                    }\n                    if ($recursion) {\n                        self::find($entry, $include, $exclude, true, $include_dir, $files);\n                    }\n                } else {\n                    if (!self::filter($entry, $include, $exclude)) {\n                        continue;\n                    }\n                    $files[] = $entry;\n                }\n            }\n            $dir->close();\n            return $files;\n        } else if (is_file($path) && self::filter($path, $include, $exclude)) {\n            $files[] = $path;\n        }\n        return $files;\n    }\n\n}"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/package.json",
    "content": "{\n    \"dependencies\" : {\n        \"smarty\" : \"*\"\n    }\n}"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/plugin/ChameleonData.class.php",
    "content": "<?php\n\nclass ChameleonData {\n    public function __construct() {\n    }\n\n    public function getData($file) {\n        $ret = array();\n        if (is_file($file)) {\n            $ret = json_decode(file_get_contents($file), true);\n            if ($ret === null) {\n                $ret = array();\n            }\n        }\n        return $ret;\n    }\n    //获取项目的名称 模板的名称,SPA 固定渲染一个模板\n    public function getProjectName() {\n      $jsonFile = WWW_ROOT . \"json/project.json\";\n      $content = $this->getData($jsonFile);\n      return $content[projectName];\n    }\n\n     //根据url，从配置的router.json中获取模拟php文件的数据\n     public function getMockContent() {\n        $jsonFile = WWW_ROOT . \"json/router.config.json\";\n        $content = $this->getData($jsonFile);\n        $path = $_SERVER['REQUEST_URI'];\n        if (($pos = strpos($path, '?')) !== false) {\n            $path = substr($path, 0, $pos);\n        }\n\n        $mockFileName;\n\n        if($content[mode] === \"history\") {\n            foreach ($content[routes] as $item) {\n                if($item[url] === $path) {\n                $mockFileName = $item[mock];\n                }\n            }\n        } else if ($content[mode] === \"hash\") {\n            $mockFileName = $this->getProjectName() . \".php\";\n        }\n        \n        if($mockFileName) {\n            $mockPath = WWW_ROOT . 'test/' . $mockFileName;\n        \n            if (is_file($mockPath)) {  \n            \n                require($mockPath);\n                $ret = $chameleon;\n                return $ret;\n            }\n        }\n\n      \n    \n    }\n}"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/plugin/FISADOCData.class.php",
    "content": "<?php\n\nclass FISADOCData extends FISData {\n\n    private $adoc_data_path;\n\n    public function __construct() {\n        $this->datatype = 'adoc';\n        $this->adoc_data_path = WWW_ROOT . '/test/data/';\n    }\n\n    protected function getId($tmpl) {\n        $uri = $_SERVER['REQUEST_URI'];\n        if (($p = strpos($uri, '?')) !== false) {\n            $uri = substr($uri, 0, $p);\n        }\n        $uris = explode('/', $uri);\n        if (isset($uris[1]) && $uris[1] !== '') {\n            unset($uris[0]);\n            $id = implode('_', $uris);\n        }\n        return $id;\n    }\n\n    protected function getFile($tmpl) {\n        $root = Util::normalizePath(WWW_ROOT . 'template');\n        $id = str_replace($root, '', Util::normalizePath($tmpl));\n        return Util::normalizePath(WWW_ROOT . '/test/' . preg_replace('/\\.[a-z]{2,6}$/i', '.text', $id));\n    }\n\n    private function parseAdocFile($filepath) {\n        $content = file_get_contents($filepath);\n        require_once(LIBS_ROOT . 'JsonPro' . DIRECTORY_SEPARATOR . 'genInterface.php');\n        $genHandle = new genInterface();\n        $genHandle->setPath($this->adoc_data_path);\n        $genHandle->genCaseData($content);\n    }\n\n    public function getData($tmpl) {\n        $id = $this->getId();\n        if (!$id) {\n            $this->parseAdocFile($this->getFile($tmpl));\n        }\n        $data_path = Util::normalizePath($this->adoc_data_path . $id . '.php');\n        if (!is_file($data_path)) {\n            return array();\n        }\n        ob_start();\n        require_once($data_path);\n        $data = ob_get_clean();\n        $data = json_decode($data, true);\n        $render_data = array();\n        if ($cookie_id = $this->getCookieId()) {\n            $render_data = $data[$cookie_id];\n        } else {\n            $render_data = current($data);\n        }\n        return $render_data;\n    }\n\n    public function fetchRemoteData($tmpl_id) {\n    }\n\n    public function getDataList($tmpl) {\n        $id = $this->getId();\n        if (!$id) {\n            $this->parseAdocFile($this->getFile($tmpl));\n        }\n        $data_path = Util::normalizePath($this->adoc_data_path . $id . 'HTML.php');\n        if (!is_file($data_path)) {\n            return array();\n        }\n        ob_start();\n        require_once($data_path);\n        $data = ob_get_clean();\n        $data = json_decode($data, true);\n        return $data;\n    }\n\n    public function save($post) {\n        $file = $post['path'];\n        $dir = dirname($file);\n        if (!is_dir($dir) && !mkdir($dir, 0755, true)) {\n            echo '{\"message\": \"填写的路径无法创建，请重新填写！\", \"code\": 1}';\n            exit(1);\n        }\n        if (!is_file($file) && false === file_put_contents($file, '')) {\n            echo '{\"message\": \"填写的路径无法创建，请重新填写！\", \"code\": 1}';\n            exit(1);\n        }\n        $data = $post['data'];\n        file_put_contents($file, $data);\n        $this->parseAdocFile($file);\n        echo '{\"message\": \"保存成功\", \"code\": 0}';\n    }\n}\n"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/plugin/FISJSONData.class.php",
    "content": "<?php\n\nclass FISJSONData extends FISData {\n    public function __construct() {\n        $this->datatype = 'json';\n    }\n\n    public function getData($tmpl) {\n        $file = $this->getFile($tmpl);\n        $ret = array();\n        if (is_file($file)) {\n            $ret = json_decode(file_get_contents($file), true);\n            if ($ret === null) {\n                $ret = array();\n            }\n        }\n        return $ret;\n    }\n}"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/plugin/FISPHPData.class.php",
    "content": "<?php\n\nclass FISPHPData extends FISData {\n    public function __construct() {\n        $this->datatype = 'php';\n    }\n\n    public function getData($tmpl) {\n        $file = $this->getFile($tmpl);\n        $ret = array();\n        if (is_file($file)) {            \n            require($file);\n            \n            $ret = $chameleon;\n        }\n        return $ret;\n    }\n}\n"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/plugin/gen_plugins.php.sh",
    "content": "#!/usr/bin/env sh\n\nd=`pwd`\n\ncd $d && ls -1 | grep 'class' | awk 'BEGIN{content=\"<?php\\n\"} {\n    content = content \"require_once(PLUGIN_ROOT . \\\"\"  $1  \"\\\");\\n\"\n} END { print content > \"plugins.php\" }'"
  },
  {
    "path": "packages/chameleon-templates/server/fisdata/plugin/plugins.php",
    "content": "<?php\nrequire_once(PLUGIN_ROOT . \"FISADOCData.class.php\");\nrequire_once(PLUGIN_ROOT . \"FISJSONData.class.php\");\nrequire_once(PLUGIN_ROOT . \"FISPHPData.class.php\");\nrequire_once(PLUGIN_ROOT . \"ChameleonData.class.php\");\n\n"
  },
  {
    "path": "packages/chameleon-templates/server/index.php",
    "content": "<?php\nini_set('display_errors', 1);\nerror_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);\n\n$root = dirname(__FILE__) . DIRECTORY_SEPARATOR;\nrequire_once $root . \"rewrite\" . DIRECTORY_SEPARATOR . \"Rewrite.php\";\nrequire_once $root . \"fisdata\" . DIRECTORY_SEPARATOR . \"TestData.class.php\";\n\nclass CITpl {\n\tprivate $assignData = array();\n\tpublic function display($candidate_tmpl){\n\t\tforeach ($this->assignData as $test_data) {\n\t\t\textract($test_data);\n\t    }\n\t\tob_start();\n\t\techo eval('?>'.preg_replace('/;*\\s*\\?>/', '; ?>', str_replace('<?=', '<?php echo ', file_get_contents($candidate_tmpl))));\n\t\tob_end_flush();\n\t}\n\n\tpublic function assign( $data ){\n\t\t$this->assignData[] = $this->object_to_array($data);\n\t}\n\tfunction object_to_array($object)\n\t{\n\t\treturn is_object($object) ? get_object_vars($object) : $object;\n\t}\n}\n\n\nTestData::init();\n/**\n* 先匹配server-conf/rewrite.conf里面匹配\n* 例如rewrite.conf里面写了：\n* template ^\\/hao123$ index/page/hao123_home.tpl\n* 则因为使用了\n* Rewrite::addRewriteRule('template', 'fis_debug_template_rewrite_rule');\n* 用户访问/hao123则命中fis_debug_template_rewrite_rule函数处理\n* \n* 固定如果是/static开头的则读取static目录的静态文件返回\n*\n* 其他情况则用 fis_debug_template_rewrite_rule 取自动匹配\n*\n*\n* 失败则返回错误\n*/\n$path = $_SERVER['REQUEST_URI'];\nfunction fis_debug_render_smarty($tpl = null, $data = array()) {\n\t$root = dirname(__FILE__) . DIRECTORY_SEPARATOR;\n\trequire_once $root . 'smarty/Smarty.class.php';\n\t$smarty = new Smarty();\n\t$default_conf = array(\n\t\t'template_dir' => 'template',\n\t\t'config_dir' => 'config',\n\t\t'plugins_dir' => array('plugin'),\n\t\t'left_delimiter' => '{%',\n\t\t'right_delimiter' => '%}',\n\t);\n\tif (file_exists($root . 'smarty.conf')) {\n\t\t$user_conf = parse_ini_file($root . 'smarty.conf');\n\t\tif (!empty($user_conf)) {\n\t\t\t$default_conf = array_merge($default_conf, $user_conf);\n\t\t}\n\t}\n\t$smarty->setTemplateDir($root . $default_conf['template_dir']);\n\t$smarty->setConfigDir($root . $default_conf['config_dir']);\n\tforeach ($default_conf['plugins_dir'] as $dir) {\n\t\t$smarty->addPluginsDir($root . $dir);\n\t}\n\t$smarty->setLeftDelimiter($default_conf['left_delimiter']);\n\t$smarty->setRightDelimiter($default_conf['right_delimiter']);\n\tTestData::renderHelper($smarty, $tpl);\n\t// $smarty->assign($data);\n\t// $smarty->display($tpl);\n}\n\nfunction fis_debug_template_rewrite_rule($rewrite, $url, $root, $matches) {\n\tif (file_exists($root . 'template/' . $rewrite)) {\n\t\theader('Content-Type: text/html');\n\t\tfis_debug_render_smarty($rewrite);\n\t} else {\n\t\tRewrite::header(404);\n\t}\n}\n\nfunction fis_debug_render_php_older($tpl = null, $data = array()){\n\t$root = dirname(__FILE__) ;//. DIRECTORY_SEPARATOR;\n\t$path = str_replace($root, '', $tpl);\n\tif (!$tpl) {\n\t\t$path = $_SERVER['REQUEST_URI'];\n\t\t$split = explode('/', $path);\n\t\t$last = array_pop($split);\n\t\t$len = count($split);\n\t\tif (($pos = strpos($path, '?')) !== false) {\n\t\t\t$path = substr($path, 0, $pos);\n\t\t}\n\t\tif ($path[strlen($path) - 1] === '/') {\n\t\t\t$path = substr($path, 0, -1);\n\t\t}\n\t\tif (1 === $len) {\n\t\t\t$path .= '/index.html';\n\t\t} else {\n\t\t\t$path .= '.html';\n\t\t}\n\t\t$tpl = $root  . $path;\n\t}\n\n\tif(file_exists($root . 'test' . $testDataFile . 'php')){\n\t\trequire($root . 'test' . $testDataFile . 'php');\n\t}\n\tif( file_exists($tpl) ){\n\t\trequire($tpl);\n\t}else{\n\t\t$pathbefore = explode('.html',$tpl );\n\t\trequire( $pathbefore[0].'.php' );\t\n\t}\n}\nfunction fis_debug_render_php($tpl = null, $data = array()) {\n\t$root = dirname(__FILE__) . DIRECTORY_SEPARATOR;\n\t$path = str_replace($root, '', $tpl);\n\tif (!$tpl) {\n\t\t$path = $_SERVER['REQUEST_URI'];\n\t\t$split = explode('/', $path);\n\t\t$last = array_pop($split);\n\t\t$len = count($split);\n\t\tif (($pos = strpos($path, '?')) !== false) {\n\t\t\t$path = substr($path, 0, $pos);\n\t\t}\n\t\tif ($path[strlen($path) - 1] === '/') {\n\t\t\t$path = substr($path, 0, -1);\n\t\t}\n\t\tif (1 === $len) {\n\t\t\t$path .= '/index.html';\n\t\t} else {\n\t\t\t$path .= '.html';\n\t\t}\n\t\t$tpl = $root . 'page' . $path;\n\t}\n\t$template_instance = new CITpl();\n\tif(file_exists($tpl)){\n\t\tTestData::renderHelper($template_instance , $tpl);\n\t}else{\n\t\tdie('Not found page '.$tpl);\n\t}\n}\n\n\n// Rewrite::addRewriteRule('php', 'fis_debug_php_rewrite_rule');\n// Rewrite::addRewriteRule('template', 'fis_debug_template_rewrite_rule');\n// if (!Rewrite::match($path)) {\n\t$projectName = TestData::$_chameleon_data->getProjectName();\n\t$tpl = $root . 'template/' . $projectName . '.tpl';\t\n\tfis_debug_render_smarty($tpl);\n\n// }\n"
  },
  {
    "path": "packages/chameleon-templates/server/rewrite/README.md",
    "content": "请求转发模块说明 ： \r\n\r\n## Install\r\n\r\n```bash\r\n$ fis server install rewrite\r\n```\r\n\r\n## Usage\r\n\r\n1. 对外提供match方法，供其他调试模块调用，具体方法参考代码注释说明。\r\n1. 默认读取根目录server.conf文件，书写方式是： \r\n    * rewrite和redirect开头的会被翻译成一条匹配规则，自上而下的匹配。所有非rewrite和redirect开头的会被当做注释处理。\r\n    * rewrite ： 匹配规则后转发到一个文件\r\n    * redirect ： 匹配规则后重定向到另一个url\r\n\r\n```conf\r\nrewrite ^\\/news\\?.*tn\\=[a-zA-Z0-9]+.* app/data/news.php\r\nredirect ^\\/index\\?.* /photo/index/a\r\nrewrite ^\\/(.*)\\?.*  app/data/$1.php\r\n```"
  },
  {
    "path": "packages/chameleon-templates/server/rewrite/Rewrite.php",
    "content": "<?php\n\nclass Rewrite{\n\n    private static $root = null;\n    private static $userRules = array();\n    private static $MIME = array(\n        'bmp' => 'image/bmp',\n        'css' => 'text/css',\n        'doc' => 'application/msword',\n        'dtd' => 'text/xml',\n        'gif' => 'image/gif',\n        'hta' => 'application/hta',\n        'htc' => 'text/x-component',\n        'htm' => 'text/html',\n        'html' => 'text/html',\n        'xhtml' => 'text/html',\n        'ico' => 'image/x-icon',\n        'jpe' => 'image/jpeg',\n        'jpeg' => 'image/jpeg',\n        'jpg' => 'image/jpeg',\n        'js' => 'text/javascript',\n        'json' => 'application/json',\n        'mocha' => 'text/javascript',\n        'mp3' => 'audio/mp3',\n        'mp4' => 'video/mpeg4',\n        'mpeg' => 'video/mpg',\n        'mpg' => 'video/mpg',\n        'manifest' => 'text/cache-manifest',\n        'pdf' => 'application/pdf',\n        'png' => 'image/png',\n        'ppt' => 'application/vnd.ms-powerpoint',\n        'rmvb' => 'application/vnd.rn-realmedia-vbr',\n        'rm' => 'application/vnd.rn-realmedia',\n        'rtf' => 'application/msword',\n        'svg' => 'image/svg+xml',\n        'swf' => 'application/x-shockwave-flash',\n        'tif' => 'image/tiff',\n        'tiff' => 'image/tiff',\n        'txt' => 'text/plain',\n        'vml' => 'text/xml',\n        'vxml' => 'text/xml',\n        'wav' => 'audio/wav',\n        'wma' => 'audio/x-ms-wma',\n        'wmv' => 'video/x-ms-wmv',\n        'woff' => 'image/woff',\n        'xml' => 'text/xml',\n        'xls' => 'application/vnd.ms-excel',\n        'xq' => 'text/xml',\n        'xql' => 'text/xml',\n        'xquery' => 'text/xml',\n        'xsd' => 'text/xml',\n        'xsl' => 'text/xml',\n        'xslt' => 'text/xml'\n    );\n\n    /**\n     * HTTP状态码表\n     * @var array\n     */\n    public static $statusMap = array(\n        200 => 'OK',\n        304 => 'Not Modified',\n        404 => 'File Not Found',\n        403 => 'Forbidden',\n        500 => 'Internal Server Error'\n    );\n\n    /**\n     * 设置HTTP请求头信息\n     * @param int $code HTTP状态码\n     * @param null|string $status 状态信息\n     */\n    public static function header($code = 200, $status = null) {\n        if ($status === null && isset(self::$statusMap[$code])) {\n            $status = self::$statusMap[$code];\n        }\n\n        if (php_sapi_name() == 'cgi') {\n            header(\"Status: $code $status\");\n        } else {\n            header(\"HTTP/1.1 $code $status\");\n        }\n    }\n\n    /**\n     * 添加用户自定义的url处理规则\n     * @param $type 规则名称\n     * @param callable $callback  用户处理callback函数，callback参数为匹配的$matches数组\n     */\n    public static function addRewriteRule($type, $callback){\n        if(is_callable($callback)){\n            $type = strtolower($type);\n            self::$userRules[$type] = $callback;\n        }\n    }\n\n    public static function setRoot($root){\n        self::$root = $root;\n    }\n\n    public static function getRoot(){\n        return isset(self::$root) ? self::$root : dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR;\n    }\n\n    private static function padString($path, $matches) {\n        for ($i = 1, $len = count($matches); $i < $len; $i++) {\n            $path = preg_replace('/\\\\$' . $i . '\\\\b/', $matches[$i], $path);\n            $path = preg_replace('/\\\\\\\\' . $i . '\\\\b/', $matches[$i], $path);\n        }\n        return $path;\n    }\n\n    /**\n     *  $url : 需要匹配的url\n     *  $matches : 正则匹配的引用\n     *  返回值 ：\n     *    true ： 表示命中正则\n     *    false ： 表示没有命中\n     */\n    public static function match($url, &$matches = null){\n        $root = self::getRoot();\n        //命中server.conf文件中定义的rewrite，redirect规则\n        // $configFile = $root . 'server.conf';\n        $configFiles = self::getConfigFiles($root . 'server-conf/');\n        for ($i=0; $i < count($configFiles); $i++) { \n            $configFile = $configFiles[$i];\n            if(file_exists($configFile) && ($handle = fopen($configFile, 'r'))){\n                while (($buffer = fgets($handle)) !== false) {\n                    $ruleTokens = preg_split('/\\s+/', trim($buffer));\n                    $type = strtolower($ruleTokens[0]);\n                    if(preg_match('/^\\w+$/', $type)){\n                        $rule = array(\n                            'rule' => $ruleTokens[1],\n                            'rewrite' => $ruleTokens[2],\n                            'type' => $type\n                        );\n                        $ret = self::_match($rule, $root, $url, $matches);\n                        if($ret) {\n                            fclose($handle);\n                            return $ret;\n                        }\n                    }\n                }\n                if (!feof($handle)) {\n                    echo \"Error: unexpected fgets() fail\\n\";\n                }\n                fclose($handle);\n            }\n        }\n        \n        return false;\n    }\n\n    private static function _match($rule, $root, $url, &$matches = null){\n        if(preg_match('/' . $rule['rule'] . '/', $url, $matches)){\n            $rewrite = self::padString($rule['rewrite'], $matches);\n            $type = $rule['type'];\n            if(isset(self::$userRules[$type])){\n                $ret = call_user_func(self::$userRules[$type], $rewrite, $url, $root, $matches);\n                if($ret === false){\n                    return false;\n                } else {\n                    return true;\n                }\n            } if($type == 'rewrite'){\n                if(file_exists($file = $root . $rewrite)){\n                    $pos = strrpos($rewrite, '.');\n                    if(false !== $pos){\n                        $ext = substr($rewrite, $pos + 1);\n                        if($ext == 'php'){\n                            self::includePhp($root . $rewrite, $matches);\n                        } else {\n                            self::header(200);\n                            if(isset(self::$MIME[$ext])){\n                                $content_type = 'Content-Type: ' . self::$MIME[$ext];\n                            } else {\n                                $content_type = 'Content-Type: application/x-' . $ext;\n                            }\n                            header($content_type);\n                            echo file_get_contents($root . $rewrite);\n                        }\n                    } else {\n                        echo file_get_contents($root . $rewrite);\n                    }\n                } else {\n                    self::header(404);\n                }\n            } else if($type == 'redirect'){\n                header('Location: ' . $rewrite);\n                exit();\n            }\n            return true;\n        }\n        return false;\n    }\n\n    private static function includePhp($file, $matches){\n        $fis_matches = $matches;\n        include($file);\n    }\n\n    private static function  getConfigFiles($path){\n        if(is_dir($path)){\n            $files = array();\n            $dir = dir($path);\n            $containCommon = false;\n            while (($file = $dir->read()) !== false) {\n                if ($file == '.' || $file == '..' || is_dir($path . $file)) {\n                    continue;\n                }\n                if($file == \"common.conf\"){\n                    $containCommon = true;\n                }\n                array_push($files, $path . $file);\n            }\n            if ($containCommon) {\n                array_unshift($files, $path . \"common.conf\");\n            }\n            return $files;\n        }\n        return array();\n    }\n}\n"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/Smarty.class.php",
    "content": "<?php\n/**\n * Project:     Smarty: the PHP compiling template engine\n * File:        Smarty.class.php\n * SVN:         $Id: Smarty.class.php 4694 2013-01-13 21:13:14Z uwe.tews@googlemail.com $\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the Free Software\n * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n *\n * For questions, help, comments, discussion, etc., please join the\n * Smarty mailing list. Send a blank e-mail to\n * smarty-discussion-subscribe@googlegroups.com\n *\n * @link http://www.smarty.net/\n * @copyright 2008 New Digital Group, Inc.\n * @author Monte Ohrt <monte at ohrt dot com>\n * @author Uwe Tews\n * @author Rodney Rehm\n * @package Smarty\n * @version 3.1.13\n */\n\n/**\n * define shorthand directory separator constant\n */\nif (!defined('DS')) {\n    define('DS', DIRECTORY_SEPARATOR);\n}\n\n/**\n * set SMARTY_DIR to absolute path to Smarty library files.\n * Sets SMARTY_DIR only if user application has not already defined it.\n */\nif (!defined('SMARTY_DIR')) {\n    define('SMARTY_DIR', dirname(__FILE__) . DS);\n}\n\n/**\n * set SMARTY_SYSPLUGINS_DIR to absolute path to Smarty internal plugins.\n * Sets SMARTY_SYSPLUGINS_DIR only if user application has not already defined it.\n */\nif (!defined('SMARTY_SYSPLUGINS_DIR')) {\n    define('SMARTY_SYSPLUGINS_DIR', SMARTY_DIR . 'sysplugins' . DS);\n}\nif (!defined('SMARTY_PLUGINS_DIR')) {\n    define('SMARTY_PLUGINS_DIR', SMARTY_DIR . 'plugins' . DS);\n}\nif (!defined('SMARTY_MBSTRING')) {\n    define('SMARTY_MBSTRING', function_exists('mb_split'));\n}\nif (!defined('SMARTY_RESOURCE_CHAR_SET')) {\n    // UTF-8 can only be done properly when mbstring is available!\n    /**\n     * @deprecated in favor of Smarty::$_CHARSET\n     */\n    define('SMARTY_RESOURCE_CHAR_SET', SMARTY_MBSTRING ? 'UTF-8' : 'ISO-8859-1');\n}\nif (!defined('SMARTY_RESOURCE_DATE_FORMAT')) {\n    /**\n     * @deprecated in favor of Smarty::$_DATE_FORMAT\n     */\n    define('SMARTY_RESOURCE_DATE_FORMAT', '%b %e, %Y');\n}\n\n/**\n * register the class autoloader\n */\nif (!defined('SMARTY_SPL_AUTOLOAD')) {\n    define('SMARTY_SPL_AUTOLOAD', 0);\n}\n\nif (SMARTY_SPL_AUTOLOAD && set_include_path(get_include_path() . PATH_SEPARATOR . SMARTY_SYSPLUGINS_DIR) !== false) {\n    $registeredAutoLoadFunctions = spl_autoload_functions();\n    if (!isset($registeredAutoLoadFunctions['spl_autoload'])) {\n        spl_autoload_register();\n    }\n} else {\n    spl_autoload_register('smartyAutoload');\n}\n\n/**\n * Load always needed external class files\n */\ninclude_once SMARTY_SYSPLUGINS_DIR.'smarty_internal_data.php';\ninclude_once SMARTY_SYSPLUGINS_DIR.'smarty_internal_templatebase.php';\ninclude_once SMARTY_SYSPLUGINS_DIR.'smarty_internal_template.php';\ninclude_once SMARTY_SYSPLUGINS_DIR.'smarty_resource.php';\ninclude_once SMARTY_SYSPLUGINS_DIR.'smarty_internal_resource_file.php';\ninclude_once SMARTY_SYSPLUGINS_DIR.'smarty_cacheresource.php';\ninclude_once SMARTY_SYSPLUGINS_DIR.'smarty_internal_cacheresource_file.php';\n\n/**\n * This is the main Smarty class\n * @package Smarty\n */\nclass Smarty extends Smarty_Internal_TemplateBase {\n\n    /**#@+\n     * constant definitions\n     */\n\n    /**\n     * smarty version\n     */\n    const SMARTY_VERSION = 'Smarty-3.1.13';\n\n    /**\n     * define variable scopes\n     */\n    const SCOPE_LOCAL = 0;\n    const SCOPE_PARENT = 1;\n    const SCOPE_ROOT = 2;\n    const SCOPE_GLOBAL = 3;\n    /**\n     * define caching modes\n     */\n    const CACHING_OFF = 0;\n    const CACHING_LIFETIME_CURRENT = 1;\n    const CACHING_LIFETIME_SAVED = 2;\n    /**\n     * define compile check modes\n     */\n    const COMPILECHECK_OFF = 0;\n    const COMPILECHECK_ON = 1;\n    const COMPILECHECK_CACHEMISS = 2;\n    /**\n     * modes for handling of \"<?php ... ?>\" tags in templates.\n     */\n    const PHP_PASSTHRU = 0; //-> print tags as plain text\n    const PHP_QUOTE = 1; //-> escape tags as entities\n    const PHP_REMOVE = 2; //-> escape tags as entities\n    const PHP_ALLOW = 3; //-> escape tags as entities\n    /**\n     * filter types\n     */\n    const FILTER_POST = 'post';\n    const FILTER_PRE = 'pre';\n    const FILTER_OUTPUT = 'output';\n    const FILTER_VARIABLE = 'variable';\n    /**\n     * plugin types\n     */\n    const PLUGIN_FUNCTION = 'function';\n    const PLUGIN_BLOCK = 'block';\n    const PLUGIN_COMPILER = 'compiler';\n    const PLUGIN_MODIFIER = 'modifier';\n    const PLUGIN_MODIFIERCOMPILER = 'modifiercompiler';\n\n    /**#@-*/\n\n    /**\n     * assigned global tpl vars\n     */\n    public static $global_tpl_vars = array();\n\n    /**\n     * error handler returned by set_error_hanlder() in Smarty::muteExpectedErrors()\n     */\n    public static $_previous_error_handler = null;\n    /**\n     * contains directories outside of SMARTY_DIR that are to be muted by muteExpectedErrors()\n     */\n    public static $_muted_directories = array();\n    /**\n     * Flag denoting if Multibyte String functions are available\n     */\n    public static $_MBSTRING = SMARTY_MBSTRING;\n    /**\n     * The character set to adhere to (e.g. \"UTF-8\")\n     */\n    public static $_CHARSET = SMARTY_RESOURCE_CHAR_SET;\n    /**\n     * The date format to be used internally\n     * (accepts date() and strftime())\n     */\n    public static $_DATE_FORMAT = SMARTY_RESOURCE_DATE_FORMAT;\n    /**\n     * Flag denoting if PCRE should run in UTF-8 mode\n     */\n    public static $_UTF8_MODIFIER = 'u';\n\n    /**\n     * Flag denoting if operating system is windows\n     */\n    public static $_IS_WINDOWS = false;\n\n    /**#@+\n     * variables\n     */\n\n    /**\n     * auto literal on delimiters with whitspace\n     * @var boolean\n     */\n    public $auto_literal = true;\n    /**\n     * display error on not assigned variables\n     * @var boolean\n     */\n    public $error_unassigned = false;\n    /**\n     * look up relative filepaths in include_path\n     * @var boolean\n     */\n    public $use_include_path = false;\n    /**\n     * template directory\n     * @var array\n     */\n    private $template_dir = array();\n    /**\n     * joined template directory string used in cache keys\n     * @var string\n     */\n    public $joined_template_dir = null;\n    /**\n     * joined config directory string used in cache keys\n     * @var string\n     */\n    public $joined_config_dir = null;\n    /**\n     * default template handler\n     * @var callable\n     */\n    public $default_template_handler_func = null;\n    /**\n     * default config handler\n     * @var callable\n     */\n    public $default_config_handler_func = null;\n    /**\n     * default plugin handler\n     * @var callable\n     */\n    public $default_plugin_handler_func = null;\n    /**\n     * compile directory\n     * @var string\n     */\n    private $compile_dir = null;\n    /**\n     * plugins directory\n     * @var array\n     */\n    private $plugins_dir = array();\n    /**\n     * cache directory\n     * @var string\n     */\n    private $cache_dir = null;\n    /**\n     * config directory\n     * @var array\n     */\n    private $config_dir = array();\n    /**\n     * force template compiling?\n     * @var boolean\n     */\n    public $force_compile = false;\n    /**\n     * check template for modifications?\n     * @var boolean\n     */\n    public $compile_check = true;\n    /**\n     * use sub dirs for compiled/cached files?\n     * @var boolean\n     */\n    public $use_sub_dirs = false;\n    /**\n     * allow ambiguous resources (that are made unique by the resource handler)\n     * @var boolean\n     */\n    public $allow_ambiguous_resources = false;\n    /**\n     * caching enabled\n     * @var boolean\n     */\n    public $caching = false;\n    /**\n     * merge compiled includes\n     * @var boolean\n     */\n    public $merge_compiled_includes = false;\n    /**\n     * cache lifetime in seconds\n     * @var integer\n     */\n    public $cache_lifetime = 3600;\n    /**\n     * force cache file creation\n     * @var boolean\n     */\n    public $force_cache = false;\n    /**\n     * Set this if you want different sets of cache files for the same\n     * templates.\n     *\n     * @var string\n     */\n    public $cache_id = null;\n    /**\n     * Set this if you want different sets of compiled files for the same\n     * templates.\n     *\n     * @var string\n     */\n    public $compile_id = null;\n    /**\n     * template left-delimiter\n     * @var string\n     */\n    public $left_delimiter = \"{\";\n    /**\n     * template right-delimiter\n     * @var string\n     */\n    public $right_delimiter = \"}\";\n    /**#@+\n     * security\n     */\n    /**\n     * class name\n     *\n     * This should be instance of Smarty_Security.\n     *\n     * @var string\n     * @see Smarty_Security\n     */\n    public $security_class = 'Smarty_Security';\n    /**\n     * implementation of security class\n     *\n     * @var Smarty_Security\n     */\n    public $security_policy = null;\n    /**\n     * controls handling of PHP-blocks\n     *\n     * @var integer\n     */\n    public $php_handling = self::PHP_PASSTHRU;\n    /**\n     * controls if the php template file resource is allowed\n     *\n     * @var bool\n     */\n    public $allow_php_templates = false;\n    /**\n     * Should compiled-templates be prevented from being called directly?\n     *\n     * {@internal\n     * Currently used by Smarty_Internal_Template only.\n     * }}\n     *\n     * @var boolean\n     */\n    public $direct_access_security = true;\n    /**#@-*/\n    /**\n     * debug mode\n     *\n     * Setting this to true enables the debug-console.\n     *\n     * @var boolean\n     */\n    public $debugging = false;\n    /**\n     * This determines if debugging is enable-able from the browser.\n     * <ul>\n     *  <li>NONE => no debugging control allowed</li>\n     *  <li>URL => enable debugging when SMARTY_DEBUG is found in the URL.</li>\n     * </ul>\n     * @var string\n     */\n    public $debugging_ctrl = 'NONE';\n    /**\n     * Name of debugging URL-param.\n     *\n     * Only used when $debugging_ctrl is set to 'URL'.\n     * The name of the URL-parameter that activates debugging.\n     *\n     * @var type\n     */\n    public $smarty_debug_id = 'SMARTY_DEBUG';\n    /**\n     * Path of debug template.\n     * @var string\n     */\n    public $debug_tpl = null;\n    /**\n     * When set, smarty uses this value as error_reporting-level.\n     * @var int\n     */\n    public $error_reporting = null;\n    /**\n     * Internal flag for getTags()\n     * @var boolean\n     */\n    public $get_used_tags = false;\n\n    /**#@+\n     * config var settings\n     */\n\n    /**\n     * Controls whether variables with the same name overwrite each other.\n     * @var boolean\n     */\n    public $config_overwrite = true;\n    /**\n     * Controls whether config values of on/true/yes and off/false/no get converted to boolean.\n     * @var boolean\n     */\n    public $config_booleanize = true;\n    /**\n     * Controls whether hidden config sections/vars are read from the file.\n     * @var boolean\n     */\n    public $config_read_hidden = false;\n\n    /**#@-*/\n\n    /**#@+\n     * resource locking\n     */\n\n    /**\n     * locking concurrent compiles\n     * @var boolean\n     */\n    public $compile_locking = true;\n    /**\n     * Controls whether cache resources should emply locking mechanism\n     * @var boolean\n     */\n    public $cache_locking = false;\n    /**\n     * seconds to wait for acquiring a lock before ignoring the write lock\n     * @var float\n     */\n    public $locking_timeout = 10;\n\n    /**#@-*/\n\n    /**\n     * global template functions\n     * @var array\n     */\n    public $template_functions = array();\n    /**\n     * resource type used if none given\n     *\n     * Must be an valid key of $registered_resources.\n     * @var string\n     */\n    public $default_resource_type = 'file';\n    /**\n     * caching type\n     *\n     * Must be an element of $cache_resource_types.\n     *\n     * @var string\n     */\n    public $caching_type = 'file';\n    /**\n     * internal config properties\n     * @var array\n     */\n    public $properties = array();\n    /**\n     * config type\n     * @var string\n     */\n    public $default_config_type = 'file';\n    /**\n     * cached template objects\n     * @var array\n     */\n    public $template_objects = array();\n    /**\n     * check If-Modified-Since headers\n     * @var boolean\n     */\n    public $cache_modified_check = false;\n    /**\n     * registered plugins\n     * @var array\n     */\n    public $registered_plugins = array();\n    /**\n     * plugin search order\n     * @var array\n     */\n    public $plugin_search_order = array('function', 'block', 'compiler', 'class');\n    /**\n     * registered objects\n     * @var array\n     */\n    public $registered_objects = array();\n    /**\n     * registered classes\n     * @var array\n     */\n    public $registered_classes = array();\n    /**\n     * registered filters\n     * @var array\n     */\n    public $registered_filters = array();\n    /**\n     * registered resources\n     * @var array\n     */\n    public $registered_resources = array();\n    /**\n     * resource handler cache\n     * @var array\n     */\n    public $_resource_handlers = array();\n    /**\n     * registered cache resources\n     * @var array\n     */\n    public $registered_cache_resources = array();\n    /**\n     * cache resource handler cache\n     * @var array\n     */\n    public $_cacheresource_handlers = array();\n    /**\n     * autoload filter\n     * @var array\n     */\n    public $autoload_filters = array();\n    /**\n     * default modifier\n     * @var array\n     */\n    public $default_modifiers = array();\n    /**\n     * autoescape variable output\n     * @var boolean\n     */\n    public $escape_html = false;\n    /**\n     * global internal smarty vars\n     * @var array\n     */\n    public static $_smarty_vars = array();\n    /**\n     * start time for execution time calculation\n     * @var int\n     */\n    public $start_time = 0;\n    /**\n     * default file permissions\n     * @var int\n     */\n    public $_file_perms = 0644;\n    /**\n     * default dir permissions\n     * @var int\n     */\n    public $_dir_perms = 0771;\n    /**\n     * block tag hierarchy\n     * @var array\n     */\n    public $_tag_stack = array();\n    /**\n     * self pointer to Smarty object\n     * @var Smarty\n     */\n    public $smarty;\n    /**\n     * required by the compiler for BC\n     * @var string\n     */\n    public $_current_file = null;\n    /**\n     * internal flag to enable parser debugging\n     * @var bool\n     */\n    public $_parserdebug = false;\n    /**\n     * Saved parameter of merged templates during compilation\n     *\n     * @var array\n     */\n    public $merged_templates_func = array();\n    /**#@-*/\n\n    /**\n     * Initialize new Smarty object\n     *\n     */\n    public function __construct()\n    {\n        // selfpointer needed by some other class methods\n        $this->smarty = $this;\n        if (is_callable('mb_internal_encoding')) {\n            mb_internal_encoding(Smarty::$_CHARSET);\n        }\n        $this->start_time = microtime(true);\n        // set default dirs\n        $this->setTemplateDir('.' . DS . 'templates' . DS)\n            ->setCompileDir('.' . DS . 'templates_c' . DS)\n            ->setPluginsDir(SMARTY_PLUGINS_DIR)\n            ->setCacheDir('.' . DS . 'cache' . DS)\n            ->setConfigDir('.' . DS . 'configs' . DS);\n\n        $this->debug_tpl = 'file:' . dirname(__FILE__) . '/debug.tpl';\n        if (isset($_SERVER['SCRIPT_NAME'])) {\n            $this->assignGlobal('SCRIPT_NAME', $_SERVER['SCRIPT_NAME']);\n        }\n    }\n\n\n    /**\n     * Class destructor\n     */\n    public function __destruct()\n    {\n        // intentionally left blank\n    }\n\n    /**\n     * <<magic>> set selfpointer on cloned object\n     */\n    public function __clone()\n    {\n        $this->smarty = $this;\n    }\n\n\n    /**\n     * <<magic>> Generic getter.\n     *\n     * Calls the appropriate getter function.\n     * Issues an E_USER_NOTICE if no valid getter is found.\n     *\n     * @param string $name property name\n     * @return mixed\n     */\n    public function __get($name)\n    {\n        $allowed = array(\n        'template_dir' => 'getTemplateDir',\n        'config_dir' => 'getConfigDir',\n        'plugins_dir' => 'getPluginsDir',\n        'compile_dir' => 'getCompileDir',\n        'cache_dir' => 'getCacheDir',\n        );\n\n        if (isset($allowed[$name])) {\n            return $this->{$allowed[$name]}();\n        } else {\n            trigger_error('Undefined property: '. get_class($this) .'::$'. $name, E_USER_NOTICE);\n        }\n    }\n\n    /**\n     * <<magic>> Generic setter.\n     *\n     * Calls the appropriate setter function.\n     * Issues an E_USER_NOTICE if no valid setter is found.\n     *\n     * @param string $name  property name\n     * @param mixed  $value parameter passed to setter\n     */\n    public function __set($name, $value)\n    {\n        $allowed = array(\n        'template_dir' => 'setTemplateDir',\n        'config_dir' => 'setConfigDir',\n        'plugins_dir' => 'setPluginsDir',\n        'compile_dir' => 'setCompileDir',\n        'cache_dir' => 'setCacheDir',\n        );\n\n        if (isset($allowed[$name])) {\n            $this->{$allowed[$name]}($value);\n        } else {\n            trigger_error('Undefined property: ' . get_class($this) . '::$' . $name, E_USER_NOTICE);\n        }\n    }\n\n    /**\n     * Check if a template resource exists\n     *\n     * @param string $resource_name template name\n     * @return boolean status\n     */\n    public function templateExists($resource_name)\n    {\n        // create template object\n        $save = $this->template_objects;\n        $tpl = new $this->template_class($resource_name, $this);\n        // check if it does exists\n        $result = $tpl->source->exists;\n        $this->template_objects = $save;\n        return $result;\n    }\n\n    /**\n     * Returns a single or all global  variables\n     *\n     * @param object $smarty\n     * @param string $varname variable name or null\n     * @return string variable value or or array of variables\n     */\n    public function getGlobal($varname = null)\n    {\n        if (isset($varname)) {\n            if (isset(self::$global_tpl_vars[$varname])) {\n                return self::$global_tpl_vars[$varname]->value;\n            } else {\n                return '';\n            }\n        } else {\n            $_result = array();\n            foreach (self::$global_tpl_vars AS $key => $var) {\n                $_result[$key] = $var->value;\n            }\n            return $_result;\n        }\n    }\n\n    /**\n     * Empty cache folder\n     *\n     * @param integer $exp_time expiration time\n     * @param string  $type     resource type\n     * @return integer number of cache files deleted\n     */\n    function clearAllCache($exp_time = null, $type = null)\n    {\n        // load cache resource and call clearAll\n        $_cache_resource = Smarty_CacheResource::load($this, $type);\n        Smarty_CacheResource::invalidLoadedCache($this);\n        return $_cache_resource->clearAll($this, $exp_time);\n    }\n\n    /**\n     * Empty cache for a specific template\n     *\n     * @param string  $template_name template name\n     * @param string  $cache_id      cache id\n     * @param string  $compile_id    compile id\n     * @param integer $exp_time      expiration time\n     * @param string  $type          resource type\n     * @return integer number of cache files deleted\n     */\n    public function clearCache($template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null)\n    {\n        // load cache resource and call clear\n        $_cache_resource = Smarty_CacheResource::load($this, $type);\n        Smarty_CacheResource::invalidLoadedCache($this);\n        return $_cache_resource->clear($this, $template_name, $cache_id, $compile_id, $exp_time);\n    }\n\n    /**\n     * Loads security class and enables security\n     *\n     * @param string|Smarty_Security $security_class if a string is used, it must be class-name\n     * @return Smarty current Smarty instance for chaining\n     * @throws SmartyException when an invalid class name is provided\n     */\n    public function enableSecurity($security_class = null)\n    {\n        if ($security_class instanceof Smarty_Security) {\n            $this->security_policy = $security_class;\n            return $this;\n        } elseif (is_object($security_class)) {\n            throw new SmartyException(\"Class '\" . get_class($security_class) . \"' must extend Smarty_Security.\");\n        }\n        if ($security_class == null) {\n            $security_class = $this->security_class;\n        }\n        if (!class_exists($security_class)) {\n            throw new SmartyException(\"Security class '$security_class' is not defined\");\n        } elseif ($security_class !== 'Smarty_Security' && !is_subclass_of($security_class, 'Smarty_Security')) {\n            throw new SmartyException(\"Class '$security_class' must extend Smarty_Security.\");\n        } else {\n            $this->security_policy = new $security_class($this);\n        }\n\n        return $this;\n    }\n\n    /**\n     * Disable security\n     * @return Smarty current Smarty instance for chaining\n     */\n    public function disableSecurity()\n    {\n        $this->security_policy = null;\n\n        return $this;\n    }\n\n    /**\n     * Set template directory\n     *\n     * @param string|array $template_dir directory(s) of template sources\n     * @return Smarty current Smarty instance for chaining\n     */\n    public function setTemplateDir($template_dir)\n    {\n        $this->template_dir = array();\n        foreach ((array) $template_dir as $k => $v) {\n            $this->template_dir[$k] = rtrim($v, '/\\\\') . DS;\n        }\n\n        $this->joined_template_dir = join(DIRECTORY_SEPARATOR, $this->template_dir);\n        return $this;\n    }\n\n    /**\n     * Add template directory(s)\n     *\n     * @param string|array $template_dir directory(s) of template sources\n     * @param string       $key          of the array element to assign the template dir to\n     * @return Smarty current Smarty instance for chaining\n     * @throws SmartyException when the given template directory is not valid\n     */\n    public function addTemplateDir($template_dir, $key=null)\n    {\n        // make sure we're dealing with an array\n        $this->template_dir = (array) $this->template_dir;\n\n        if (is_array($template_dir)) {\n            foreach ($template_dir as $k => $v) {\n                if (is_int($k)) {\n                    // indexes are not merged but appended\n                    $this->template_dir[] = rtrim($v, '/\\\\') . DS;\n                } else {\n                    // string indexes are overridden\n                    $this->template_dir[$k] = rtrim($v, '/\\\\') . DS;\n                }\n            }\n        } elseif ($key !== null) {\n            // override directory at specified index\n            $this->template_dir[$key] = rtrim($template_dir, '/\\\\') . DS;\n        } else {\n            // append new directory\n            $this->template_dir[] = rtrim($template_dir, '/\\\\') . DS;\n        }\n        $this->joined_template_dir = join(DIRECTORY_SEPARATOR, $this->template_dir);\n        return $this;\n    }\n\n    /**\n     * Get template directories\n     *\n     * @param mixed index of directory to get, null to get all\n     * @return array|string list of template directories, or directory of $index\n     */\n    public function getTemplateDir($index=null)\n    {\n        if ($index !== null) {\n            return isset($this->template_dir[$index]) ? $this->template_dir[$index] : null;\n        }\n\n        return (array)$this->template_dir;\n    }\n\n    /**\n     * Set config directory\n     *\n     * @param string|array $template_dir directory(s) of configuration sources\n     * @return Smarty current Smarty instance for chaining\n     */\n    public function setConfigDir($config_dir)\n    {\n        $this->config_dir = array();\n        foreach ((array) $config_dir as $k => $v) {\n            $this->config_dir[$k] = rtrim($v, '/\\\\') . DS;\n        }\n\n        $this->joined_config_dir = join(DIRECTORY_SEPARATOR, $this->config_dir);\n        return $this;\n    }\n\n    /**\n     * Add config directory(s)\n     *\n     * @param string|array $config_dir directory(s) of config sources\n     * @param string key of the array element to assign the config dir to\n     * @return Smarty current Smarty instance for chaining\n     */\n    public function addConfigDir($config_dir, $key=null)\n    {\n        // make sure we're dealing with an array\n        $this->config_dir = (array) $this->config_dir;\n\n        if (is_array($config_dir)) {\n            foreach ($config_dir as $k => $v) {\n                if (is_int($k)) {\n                    // indexes are not merged but appended\n                    $this->config_dir[] = rtrim($v, '/\\\\') . DS;\n                } else {\n                    // string indexes are overridden\n                    $this->config_dir[$k] = rtrim($v, '/\\\\') . DS;\n                }\n            }\n        } elseif( $key !== null ) {\n            // override directory at specified index\n            $this->config_dir[$key] = rtrim($config_dir, '/\\\\') . DS;\n        } else {\n            // append new directory\n            $this->config_dir[] = rtrim($config_dir, '/\\\\') . DS;\n        }\n\n        $this->joined_config_dir = join(DIRECTORY_SEPARATOR, $this->config_dir);\n        return $this;\n    }\n\n    /**\n     * Get config directory\n     *\n     * @param mixed index of directory to get, null to get all\n     * @return array|string configuration directory\n     */\n    public function getConfigDir($index=null)\n    {\n        if ($index !== null) {\n            return isset($this->config_dir[$index]) ? $this->config_dir[$index] : null;\n        }\n\n        return (array)$this->config_dir;\n    }\n\n    /**\n     * Set plugins directory\n     *\n     * @param string|array $plugins_dir directory(s) of plugins\n     * @return Smarty current Smarty instance for chaining\n     */\n    public function setPluginsDir($plugins_dir)\n    {\n        $this->plugins_dir = array();\n        foreach ((array)$plugins_dir as $k => $v) {\n            $this->plugins_dir[$k] = rtrim($v, '/\\\\') . DS;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Adds directory of plugin files\n     *\n     * @param object $smarty\n     * @param string $ |array $ plugins folder\n     * @return Smarty current Smarty instance for chaining\n     */\n    public function addPluginsDir($plugins_dir)\n    {\n        // make sure we're dealing with an array\n        $this->plugins_dir = (array) $this->plugins_dir;\n\n        if (is_array($plugins_dir)) {\n            foreach ($plugins_dir as $k => $v) {\n                if (is_int($k)) {\n                    // indexes are not merged but appended\n                    $this->plugins_dir[] = rtrim($v, '/\\\\') . DS;\n                } else {\n                    // string indexes are overridden\n                    $this->plugins_dir[$k] = rtrim($v, '/\\\\') . DS;\n                }\n            }\n        } else {\n            // append new directory\n            $this->plugins_dir[] = rtrim($plugins_dir, '/\\\\') . DS;\n        }\n\n        $this->plugins_dir = array_unique($this->plugins_dir);\n        return $this;\n    }\n\n    /**\n     * Get plugin directories\n     *\n     * @return array list of plugin directories\n     */\n    public function getPluginsDir()\n    {\n        return (array)$this->plugins_dir;\n    }\n\n    /**\n     * Set compile directory\n     *\n     * @param string $compile_dir directory to store compiled templates in\n     * @return Smarty current Smarty instance for chaining\n     */\n    public function setCompileDir($compile_dir)\n    {\n        $this->compile_dir = rtrim($compile_dir, '/\\\\') . DS;\n        if (!isset(Smarty::$_muted_directories[$this->compile_dir])) {\n            Smarty::$_muted_directories[$this->compile_dir] = null;\n        }\n        return $this;\n    }\n\n    /**\n     * Get compiled directory\n     *\n     * @return string path to compiled templates\n     */\n    public function getCompileDir()\n    {\n        return $this->compile_dir;\n    }\n\n    /**\n     * Set cache directory\n     *\n     * @param string $cache_dir directory to store cached templates in\n     * @return Smarty current Smarty instance for chaining\n     */\n    public function setCacheDir($cache_dir)\n    {\n        $this->cache_dir = rtrim($cache_dir, '/\\\\') . DS;\n        if (!isset(Smarty::$_muted_directories[$this->cache_dir])) {\n            Smarty::$_muted_directories[$this->cache_dir] = null;\n        }\n        return $this;\n    }\n\n    /**\n     * Get cache directory\n     *\n     * @return string path of cache directory\n     */\n    public function getCacheDir()\n    {\n        return $this->cache_dir;\n    }\n\n    /**\n     * Set default modifiers\n     *\n     * @param array|string $modifiers modifier or list of modifiers to set\n     * @return Smarty current Smarty instance for chaining\n     */\n    public function setDefaultModifiers($modifiers)\n    {\n        $this->default_modifiers = (array) $modifiers;\n        return $this;\n    }\n\n    /**\n     * Add default modifiers\n     *\n     * @param array|string $modifiers modifier or list of modifiers to add\n     * @return Smarty current Smarty instance for chaining\n     */\n    public function addDefaultModifiers($modifiers)\n    {\n        if (is_array($modifiers)) {\n            $this->default_modifiers = array_merge($this->default_modifiers, $modifiers);\n        } else {\n            $this->default_modifiers[] = $modifiers;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get default modifiers\n     *\n     * @return array list of default modifiers\n     */\n    public function getDefaultModifiers()\n    {\n        return $this->default_modifiers;\n    }\n\n\n    /**\n     * Set autoload filters\n     *\n     * @param array $filters filters to load automatically\n     * @param string $type \"pre\", \"output\", … specify the filter type to set. Defaults to none treating $filters' keys as the appropriate types\n     * @return Smarty current Smarty instance for chaining\n     */\n    public function setAutoloadFilters($filters, $type=null)\n    {\n        if ($type !== null) {\n            $this->autoload_filters[$type] = (array) $filters;\n        } else {\n            $this->autoload_filters = (array) $filters;\n        }\n\n        return $this;\n    }\n\n    /**\n     * Add autoload filters\n     *\n     * @param array $filters filters to load automatically\n     * @param string $type \"pre\", \"output\", … specify the filter type to set. Defaults to none treating $filters' keys as the appropriate types\n     * @return Smarty current Smarty instance for chaining\n     */\n    public function addAutoloadFilters($filters, $type=null)\n    {\n        if ($type !== null) {\n            if (!empty($this->autoload_filters[$type])) {\n                $this->autoload_filters[$type] = array_merge($this->autoload_filters[$type], (array) $filters);\n            } else {\n                $this->autoload_filters[$type] = (array) $filters;\n            }\n        } else {\n            foreach ((array) $filters as $key => $value) {\n                if (!empty($this->autoload_filters[$key])) {\n                    $this->autoload_filters[$key] = array_merge($this->autoload_filters[$key], (array) $value);\n                } else {\n                    $this->autoload_filters[$key] = (array) $value;\n                }\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Get autoload filters\n     *\n     * @param string $type type of filter to get autoloads for. Defaults to all autoload filters\n     * @return array array( 'type1' => array( 'filter1', 'filter2', … ) ) or array( 'filter1', 'filter2', …) if $type was specified\n     */\n    public function getAutoloadFilters($type=null)\n    {\n        if ($type !== null) {\n            return isset($this->autoload_filters[$type]) ? $this->autoload_filters[$type] : array();\n        }\n\n        return $this->autoload_filters;\n    }\n\n    /**\n     * return name of debugging template\n     *\n     * @return string\n     */\n    public function getDebugTemplate()\n    {\n        return $this->debug_tpl;\n    }\n\n    /**\n     * set the debug template\n     *\n     * @param string $tpl_name\n     * @return Smarty current Smarty instance for chaining\n     * @throws SmartyException if file is not readable\n     */\n    public function setDebugTemplate($tpl_name)\n    {\n        if (!is_readable($tpl_name)) {\n            throw new SmartyException(\"Unknown file '{$tpl_name}'\");\n        }\n        $this->debug_tpl = $tpl_name;\n\n        return $this;\n    }\n\n    /**\n     * creates a template object\n     *\n     * @param string $template the resource handle of the template file\n     * @param mixed $cache_id cache id to be used with this template\n     * @param mixed $compile_id compile id to be used with this template\n     * @param object $parent next higher level of Smarty variables\n     * @param boolean $do_clone flag is Smarty object shall be cloned\n     * @return object template object\n     */\n    public function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null, $do_clone = true)\n    {\n        if (!empty($cache_id) && (is_object($cache_id) || is_array($cache_id))) {\n            $parent = $cache_id;\n            $cache_id = null;\n        }\n        if (!empty($parent) && is_array($parent)) {\n            $data = $parent;\n            $parent = null;\n        } else {\n            $data = null;\n        }\n        // default to cache_id and compile_id of Smarty object\n        $cache_id = $cache_id === null ? $this->cache_id : $cache_id;\n        $compile_id = $compile_id === null ? $this->compile_id : $compile_id;\n        // already in template cache?\n        if ($this->allow_ambiguous_resources) {\n            $_templateId = Smarty_Resource::getUniqueTemplateName($this, $template) . $cache_id . $compile_id;\n        } else {\n            $_templateId = $this->joined_template_dir . '#' . $template . $cache_id . $compile_id;\n        }\n        if (isset($_templateId[150])) {\n            $_templateId = sha1($_templateId);\n        }\n        if ($do_clone) {\n            if (isset($this->template_objects[$_templateId])) {\n                // return cached template object\n                $tpl = clone $this->template_objects[$_templateId];\n                $tpl->smarty = clone $tpl->smarty;\n                $tpl->parent = $parent;\n                $tpl->tpl_vars = array();\n                $tpl->config_vars = array();\n            } else {\n                $tpl = new $this->template_class($template, clone $this, $parent, $cache_id, $compile_id);\n            }\n        } else {\n            if (isset($this->template_objects[$_templateId])) {\n                // return cached template object\n                $tpl = $this->template_objects[$_templateId];\n                $tpl->parent = $parent;\n                $tpl->tpl_vars = array();\n                $tpl->config_vars = array();\n            } else {\n                $tpl = new $this->template_class($template, $this, $parent, $cache_id, $compile_id);\n            }\n        }\n        // fill data if present\n        if (!empty($data) && is_array($data)) {\n            // set up variable values\n            foreach ($data as $_key => $_val) {\n                $tpl->tpl_vars[$_key] = new Smarty_variable($_val);\n            }\n        }\n        return $tpl;\n    }\n\n\n    /**\n     * Takes unknown classes and loads plugin files for them\n     * class name format: Smarty_PluginType_PluginName\n     * plugin filename format: plugintype.pluginname.php\n     *\n     * @param string $plugin_name    class plugin name to load\n     * @param bool   $check          check if already loaded\n     * @return string |boolean filepath of loaded file or false\n     */\n    public function loadPlugin($plugin_name, $check = true)\n    {\n        // if function or class exists, exit silently (already loaded)\n        if ($check && (is_callable($plugin_name) || class_exists($plugin_name, false))) {\n            return true;\n        }\n        // Plugin name is expected to be: Smarty_[Type]_[Name]\n        $_name_parts = explode('_', $plugin_name, 3);\n        // class name must have three parts to be valid plugin\n        // count($_name_parts) < 3 === !isset($_name_parts[2])\n        if (!isset($_name_parts[2]) || strtolower($_name_parts[0]) !== 'smarty') {\n            throw new SmartyException(\"plugin {$plugin_name} is not a valid name format\");\n            return false;\n        }\n        // if type is \"internal\", get plugin from sysplugins\n        if (strtolower($_name_parts[1]) == 'internal') {\n            $file = SMARTY_SYSPLUGINS_DIR . strtolower($plugin_name) . '.php';\n            if (file_exists($file)) {\n                require_once($file);\n                return $file;\n            } else {\n                return false;\n            }\n        }\n        // plugin filename is expected to be: [type].[name].php\n        $_plugin_filename = \"{$_name_parts[1]}.{$_name_parts[2]}.php\";\n\n        $_stream_resolve_include_path = function_exists('stream_resolve_include_path');\n\n        // loop through plugin dirs and find the plugin\n        foreach($this->getPluginsDir() as $_plugin_dir) {\n            $names = array(\n                $_plugin_dir . $_plugin_filename,\n                $_plugin_dir . strtolower($_plugin_filename),\n            );\n            foreach ($names as $file) {\n                if (file_exists($file)) {\n                    require_once($file);\n                    return $file;\n                }\n                if ($this->use_include_path && !preg_match('/^([\\/\\\\\\\\]|[a-zA-Z]:[\\/\\\\\\\\])/', $_plugin_dir)) {\n                    // try PHP include_path\n                    if ($_stream_resolve_include_path) {\n                        $file = stream_resolve_include_path($file);\n                    } else {\n                        $file = Smarty_Internal_Get_Include_Path::getIncludePath($file);\n                    }\n\n                    if ($file !== false) {\n                        require_once($file);\n                        return $file;\n                    }\n                }\n            }\n        }\n        // no plugin loaded\n        return false;\n    }\n\n    /**\n     * Compile all template files\n     *\n     * @param string $extension file extension\n     * @param bool $force_compile force all to recompile\n     * @param int $time_limit\n     * @param int $max_errors\n     * @return integer number of template files recompiled\n     */\n    public function compileAllTemplates($extention = '.tpl', $force_compile = false, $time_limit = 0, $max_errors = null)\n    {\n        return Smarty_Internal_Utility::compileAllTemplates($extention, $force_compile, $time_limit, $max_errors, $this);\n    }\n\n    /**\n     * Compile all config files\n     *\n     * @param string $extension file extension\n     * @param bool $force_compile force all to recompile\n     * @param int $time_limit\n     * @param int $max_errors\n     * @return integer number of template files recompiled\n     */\n    public function compileAllConfig($extention = '.conf', $force_compile = false, $time_limit = 0, $max_errors = null)\n    {\n        return Smarty_Internal_Utility::compileAllConfig($extention, $force_compile, $time_limit, $max_errors, $this);\n    }\n\n    /**\n     * Delete compiled template file\n     *\n     * @param string $resource_name template name\n     * @param string $compile_id compile id\n     * @param integer $exp_time expiration time\n     * @return integer number of template files deleted\n     */\n    public function clearCompiledTemplate($resource_name = null, $compile_id = null, $exp_time = null)\n    {\n        return Smarty_Internal_Utility::clearCompiledTemplate($resource_name, $compile_id, $exp_time, $this);\n    }\n\n\n    /**\n     * Return array of tag/attributes of all tags used by an template\n     *\n     * @param object $templae template object\n     * @return array of tag/attributes\n     */\n    public function getTags(Smarty_Internal_Template $template)\n    {\n        return Smarty_Internal_Utility::getTags($template);\n    }\n\n    /**\n     * Run installation test\n     *\n     * @param array $errors Array to write errors into, rather than outputting them\n     * @return boolean true if setup is fine, false if something is wrong\n     */\n    public function testInstall(&$errors=null)\n    {\n        return Smarty_Internal_Utility::testInstall($this, $errors);\n    }\n\n    /**\n     * Error Handler to mute expected messages\n     *\n     * @link http://php.net/set_error_handler\n     * @param integer $errno Error level\n     * @return boolean\n     */\n    public static function mutingErrorHandler($errno, $errstr, $errfile, $errline, $errcontext)\n    {\n        $_is_muted_directory = false;\n\n        // add the SMARTY_DIR to the list of muted directories\n        if (!isset(Smarty::$_muted_directories[SMARTY_DIR])) {\n            $smarty_dir = realpath(SMARTY_DIR);\n            if ($smarty_dir !== false) {\n                Smarty::$_muted_directories[SMARTY_DIR] = array(\n                    'file' => $smarty_dir,\n                    'length' => strlen($smarty_dir),\n                );\n            }\n        }\n\n        // walk the muted directories and test against $errfile\n        foreach (Smarty::$_muted_directories as $key => &$dir) {\n            if (!$dir) {\n                // resolve directory and length for speedy comparisons\n                $file = realpath($key);\n                if ($file === false) {\n                    // this directory does not exist, remove and skip it\n                    unset(Smarty::$_muted_directories[$key]);\n                    continue;\n                }\n                $dir = array(\n                    'file' => $file,\n                    'length' => strlen($file),\n                );\n            }\n            if (!strncmp($errfile, $dir['file'], $dir['length'])) {\n                $_is_muted_directory = true;\n                break;\n            }\n        }\n\n        // pass to next error handler if this error did not occur inside SMARTY_DIR\n        // or the error was within smarty but masked to be ignored\n        if (!$_is_muted_directory || ($errno && $errno & error_reporting())) {\n            if (Smarty::$_previous_error_handler) {\n                return call_user_func(Smarty::$_previous_error_handler, $errno, $errstr, $errfile, $errline, $errcontext);\n            } else {\n                return false;\n            }\n        }\n    }\n\n    /**\n     * Enable error handler to mute expected messages\n     *\n     * @return void\n     */\n    public static function muteExpectedErrors()\n    {\n        /*\n            error muting is done because some people implemented custom error_handlers using\n            http://php.net/set_error_handler and for some reason did not understand the following paragraph:\n\n                It is important to remember that the standard PHP error handler is completely bypassed for the\n                error types specified by error_types unless the callback function returns FALSE.\n                error_reporting() settings will have no effect and your error handler will be called regardless -\n                however you are still able to read the current value of error_reporting and act appropriately.\n                Of particular note is that this value will be 0 if the statement that caused the error was\n                prepended by the @ error-control operator.\n\n            Smarty deliberately uses @filemtime() over file_exists() and filemtime() in some places. Reasons include\n                - @filemtime() is almost twice as fast as using an additional file_exists()\n                - between file_exists() and filemtime() a possible race condition is opened,\n                  which does not exist using the simple @filemtime() approach.\n        */\n        $error_handler = array('Smarty', 'mutingErrorHandler');\n        $previous = set_error_handler($error_handler);\n\n        // avoid dead loops\n        if ($previous !== $error_handler) {\n            Smarty::$_previous_error_handler = $previous;\n        }\n    }\n\n    /**\n     * Disable error handler muting expected messages\n     *\n     * @return void\n     */\n    public static function unmuteExpectedErrors()\n    {\n        restore_error_handler();\n    }\n}\n\n// Check if we're running on windows\nSmarty::$_IS_WINDOWS = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN';\n\n// let PCRE (preg_*) treat strings as ISO-8859-1 if we're not dealing with UTF-8\nif (Smarty::$_CHARSET !== 'UTF-8') {\n    Smarty::$_UTF8_MODIFIER = '';\n}\n\n/**\n * Smarty exception class\n * @package Smarty\n */\nclass SmartyException extends Exception {\n    public static $escape = true;\n    public function __construct($message) {\n        $this->message = self::$escape ? htmlentities($message) : $message;\n    }\n}\n\n/**\n * Smarty compiler exception class\n * @package Smarty\n */\nclass SmartyCompilerException extends SmartyException  {\n}\n\n/**\n * Autoloader\n */\nfunction smartyAutoload($class)\n{\n    $_class = strtolower($class);\n    $_classes = array(\n        'smarty_config_source' => true,\n        'smarty_config_compiled' => true,\n        'smarty_security' => true,\n        'smarty_cacheresource' => true,\n        'smarty_cacheresource_custom' => true,\n        'smarty_cacheresource_keyvaluestore' => true,\n        'smarty_resource' => true,\n        'smarty_resource_custom' => true,\n        'smarty_resource_uncompiled' => true,\n        'smarty_resource_recompiled' => true,\n    );\n\n    if (!strncmp($_class, 'smarty_internal_', 16) || isset($_classes[$_class])) {\n        include SMARTY_SYSPLUGINS_DIR . $_class . '.php';\n    }\n}\n\n?>\n"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/SmartyBC.class.php",
    "content": "<?php\r\n/**\r\n * Project:     Smarty: the PHP compiling template engine\r\n * File:        SmartyBC.class.php\r\n * SVN:         $Id: $\r\n *\r\n * This library is free software; you can redistribute it and/or\r\n * modify it under the terms of the GNU Lesser General Public\r\n * License as published by the Free Software Foundation; either\r\n * version 2.1 of the License, or (at your option) any later version.\r\n *\r\n * This library is distributed in the hope that it will be useful,\r\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r\n * Lesser General Public License for more details.\r\n *\r\n * You should have received a copy of the GNU Lesser General Public\r\n * License along with this library; if not, write to the Free Software\r\n * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r\n *\r\n * For questions, help, comments, discussion, etc., please join the\r\n * Smarty mailing list. Send a blank e-mail to\r\n * smarty-discussion-subscribe@googlegroups.com\r\n *\r\n * @link http://www.smarty.net/\r\n * @copyright 2008 New Digital Group, Inc.\r\n * @author Monte Ohrt <monte at ohrt dot com>\r\n * @author Uwe Tews\r\n * @author Rodney Rehm\r\n * @package Smarty\r\n */\r\n/**\r\n * @ignore\r\n */\r\nrequire(dirname(__FILE__) . '/Smarty.class.php');\r\n\r\n/**\r\n * Smarty Backward Compatability Wrapper Class\r\n *\r\n * @package Smarty\r\n */\r\nclass SmartyBC extends Smarty {\r\n\r\n    /**\r\n     * Smarty 2 BC\r\n     * @var string\r\n     */\r\n    public $_version = self::SMARTY_VERSION;\r\n\r\n    /**\r\n     * Initialize new SmartyBC object\r\n     *\r\n     * @param array $options options to set during initialization, e.g. array( 'forceCompile' => false )\r\n     */\r\n    public function __construct(array $options=array())\r\n    {\r\n        parent::__construct($options);\r\n        // register {php} tag\r\n        $this->registerPlugin('block', 'php', 'smarty_php_tag');\r\n    }\r\n\r\n    /**\r\n     * wrapper for assign_by_ref\r\n     *\r\n     * @param string $tpl_var the template variable name\r\n     * @param mixed  &$value  the referenced value to assign\r\n     */\r\n    public function assign_by_ref($tpl_var, &$value)\r\n    {\r\n        $this->assignByRef($tpl_var, $value);\r\n    }\r\n\r\n    /**\r\n     * wrapper for append_by_ref\r\n     *\r\n     * @param string  $tpl_var the template variable name\r\n     * @param mixed   &$value  the referenced value to append\r\n     * @param boolean $merge   flag if array elements shall be merged\r\n     */\r\n    public function append_by_ref($tpl_var, &$value, $merge = false)\r\n    {\r\n        $this->appendByRef($tpl_var, $value, $merge);\r\n    }\r\n\r\n    /**\r\n     * clear the given assigned template variable.\r\n     *\r\n     * @param string $tpl_var the template variable to clear\r\n     */\r\n    public function clear_assign($tpl_var)\r\n    {\r\n        $this->clearAssign($tpl_var);\r\n    }\r\n\r\n    /**\r\n     * Registers custom function to be used in templates\r\n     *\r\n     * @param string $function      the name of the template function\r\n     * @param string $function_impl the name of the PHP function to register\r\n     * @param bool   $cacheable\r\n     * @param mixed  $cache_attrs\r\n     */\r\n    public function register_function($function, $function_impl, $cacheable=true, $cache_attrs=null)\r\n    {\r\n        $this->registerPlugin('function', $function, $function_impl, $cacheable, $cache_attrs);\r\n    }\r\n\r\n    /**\r\n     * Unregisters custom function\r\n     *\r\n     * @param string $function name of template function\r\n     */\r\n    public function unregister_function($function)\r\n    {\r\n        $this->unregisterPlugin('function', $function);\r\n    }\r\n\r\n    /**\r\n     * Registers object to be used in templates\r\n     *\r\n     * @param string  $object      name of template object\r\n     * @param object  $object_impl the referenced PHP object to register\r\n     * @param array   $allowed     list of allowed methods (empty = all)\r\n     * @param boolean $smarty_args smarty argument format, else traditional\r\n     * @param array   $block_functs list of methods that are block format\r\n     */\r\n    public function register_object($object, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array())\r\n    {\r\n        settype($allowed, 'array');\r\n        settype($smarty_args, 'boolean');\r\n        $this->registerObject($object, $object_impl, $allowed, $smarty_args, $block_methods);\r\n    }\r\n\r\n    /**\r\n     * Unregisters object\r\n     *\r\n     * @param string $object name of template object\r\n     */\r\n    public function unregister_object($object)\r\n    {\r\n        $this->unregisterObject($object);\r\n    }\r\n\r\n    /**\r\n     * Registers block function to be used in templates\r\n     *\r\n     * @param string $block      name of template block\r\n     * @param string $block_impl PHP function to register\r\n     * @param bool   $cacheable\r\n     * @param mixed  $cache_attrs\r\n     */\r\n    public function register_block($block, $block_impl, $cacheable=true, $cache_attrs=null)\r\n    {\r\n        $this->registerPlugin('block', $block, $block_impl, $cacheable, $cache_attrs);\r\n    }\r\n\r\n    /**\r\n     * Unregisters block function\r\n     *\r\n     * @param string $block name of template function\r\n     */\r\n    public function unregister_block($block)\r\n    {\r\n        $this->unregisterPlugin('block', $block);\r\n    }\r\n\r\n    /**\r\n     * Registers compiler function\r\n     *\r\n     * @param string $function      name of template function\r\n     * @param string $function_impl name of PHP function to register\r\n     * @param bool   $cacheable\r\n     */\r\n    public function register_compiler_function($function, $function_impl, $cacheable=true)\r\n    {\r\n        $this->registerPlugin('compiler', $function, $function_impl, $cacheable);\r\n    }\r\n\r\n    /**\r\n     * Unregisters compiler function\r\n     *\r\n     * @param string $function name of template function\r\n     */\r\n    public function unregister_compiler_function($function)\r\n    {\r\n        $this->unregisterPlugin('compiler', $function);\r\n    }\r\n\r\n    /**\r\n     * Registers modifier to be used in templates\r\n     *\r\n     * @param string $modifier name of template modifier\r\n     * @param string $modifier_impl name of PHP function to register\r\n     */\r\n    public function register_modifier($modifier, $modifier_impl)\r\n    {\r\n        $this->registerPlugin('modifier', $modifier, $modifier_impl);\r\n    }\r\n\r\n    /**\r\n     * Unregisters modifier\r\n     *\r\n     * @param string $modifier name of template modifier\r\n     */\r\n    public function unregister_modifier($modifier)\r\n    {\r\n        $this->unregisterPlugin('modifier', $modifier);\r\n    }\r\n\r\n    /**\r\n     * Registers a resource to fetch a template\r\n     *\r\n     * @param string $type      name of resource\r\n     * @param array  $functions array of functions to handle resource\r\n     */\r\n    public function register_resource($type, $functions)\r\n    {\r\n        $this->registerResource($type, $functions);\r\n    }\r\n\r\n    /**\r\n     * Unregisters a resource\r\n     *\r\n     * @param string $type name of resource\r\n     */\r\n    public function unregister_resource($type)\r\n    {\r\n        $this->unregisterResource($type);\r\n    }\r\n\r\n    /**\r\n     * Registers a prefilter function to apply\r\n     * to a template before compiling\r\n     *\r\n     * @param callable $function\r\n     */\r\n    public function register_prefilter($function)\r\n    {\r\n        $this->registerFilter('pre', $function);\r\n    }\r\n\r\n    /**\r\n     * Unregisters a prefilter function\r\n     *\r\n     * @param callable $function\r\n     */\r\n    public function unregister_prefilter($function)\r\n    {\r\n        $this->unregisterFilter('pre', $function);\r\n    }\r\n\r\n    /**\r\n     * Registers a postfilter function to apply\r\n     * to a compiled template after compilation\r\n     *\r\n     * @param callable $function\r\n     */\r\n    public function register_postfilter($function)\r\n    {\r\n        $this->registerFilter('post', $function);\r\n    }\r\n\r\n    /**\r\n     * Unregisters a postfilter function\r\n     *\r\n     * @param callable $function\r\n     */\r\n    public function unregister_postfilter($function)\r\n    {\r\n        $this->unregisterFilter('post', $function);\r\n    }\r\n\r\n    /**\r\n     * Registers an output filter function to apply\r\n     * to a template output\r\n     *\r\n     * @param callable $function\r\n     */\r\n    public function register_outputfilter($function)\r\n    {\r\n        $this->registerFilter('output', $function);\r\n    }\r\n\r\n    /**\r\n     * Unregisters an outputfilter function\r\n     *\r\n     * @param callable $function\r\n     */\r\n    public function unregister_outputfilter($function)\r\n    {\r\n        $this->unregisterFilter('output', $function);\r\n    }\r\n\r\n    /**\r\n     * load a filter of specified type and name\r\n     *\r\n     * @param string $type filter type\r\n     * @param string $name filter name\r\n     */\r\n    public function load_filter($type, $name)\r\n    {\r\n        $this->loadFilter($type, $name);\r\n    }\r\n\r\n    /**\r\n     * clear cached content for the given template and cache id\r\n     *\r\n     * @param string $tpl_file   name of template file\r\n     * @param string $cache_id   name of cache_id\r\n     * @param string $compile_id name of compile_id\r\n     * @param string $exp_time   expiration time\r\n     * @return boolean\r\n     */\r\n    public function clear_cache($tpl_file = null, $cache_id = null, $compile_id = null, $exp_time = null)\r\n    {\r\n        return $this->clearCache($tpl_file, $cache_id, $compile_id, $exp_time);\r\n    }\r\n\r\n    /**\r\n     * clear the entire contents of cache (all templates)\r\n     *\r\n     * @param string $exp_time expire time\r\n     * @return boolean\r\n     */\r\n    public function clear_all_cache($exp_time = null)\r\n    {\r\n        return $this->clearCache(null, null, null, $exp_time);\r\n    }\r\n\r\n    /**\r\n     * test to see if valid cache exists for this template\r\n     *\r\n     * @param string $tpl_file name of template file\r\n     * @param string $cache_id\r\n     * @param string $compile_id\r\n     * @return boolean\r\n     */\r\n    public function is_cached($tpl_file, $cache_id = null, $compile_id = null)\r\n    {\r\n        return $this->isCached($tpl_file, $cache_id, $compile_id);\r\n    }\r\n\r\n    /**\r\n     * clear all the assigned template variables.\r\n     */\r\n    public function clear_all_assign()\r\n    {\r\n        $this->clearAllAssign();\r\n    }\r\n\r\n    /**\r\n     * clears compiled version of specified template resource,\r\n     * or all compiled template files if one is not specified.\r\n     * This function is for advanced use only, not normally needed.\r\n     *\r\n     * @param string $tpl_file\r\n     * @param string $compile_id\r\n     * @param string $exp_time\r\n     * @return boolean results of {@link smarty_core_rm_auto()}\r\n     */\r\n    public function clear_compiled_tpl($tpl_file = null, $compile_id = null, $exp_time = null)\r\n    {\r\n        return $this->clearCompiledTemplate($tpl_file, $compile_id, $exp_time);\r\n    }\r\n\r\n    /**\r\n     * Checks whether requested template exists.\r\n     *\r\n     * @param string $tpl_file\r\n     * @return boolean\r\n     */\r\n    public function template_exists($tpl_file)\r\n    {\r\n        return $this->templateExists($tpl_file);\r\n    }\r\n\r\n    /**\r\n     * Returns an array containing template variables\r\n     *\r\n     * @param string $name\r\n     * @return array\r\n     */\r\n    public function get_template_vars($name=null)\r\n    {\r\n        return $this->getTemplateVars($name);\r\n    }\r\n\r\n    /**\r\n     * Returns an array containing config variables\r\n     *\r\n     * @param string $name\r\n     * @return array\r\n     */\r\n    public function get_config_vars($name=null)\r\n    {\r\n        return $this->getConfigVars($name);\r\n    }\r\n\r\n    /**\r\n     * load configuration values\r\n     *\r\n     * @param string $file\r\n     * @param string $section\r\n     * @param string $scope\r\n     */\r\n    public function config_load($file, $section = null, $scope = 'global')\r\n    {\r\n        $this->ConfigLoad($file, $section, $scope);\r\n    }\r\n\r\n    /**\r\n     * return a reference to a registered object\r\n     *\r\n     * @param string $name\r\n     * @return object\r\n     */\r\n    public function get_registered_object($name)\r\n    {\r\n        return $this->getRegisteredObject($name);\r\n    }\r\n\r\n    /**\r\n     * clear configuration values\r\n     *\r\n     * @param string $var\r\n     */\r\n    public function clear_config($var = null)\r\n    {\r\n        $this->clearConfig($var);\r\n    }\r\n\r\n    /**\r\n     * trigger Smarty error\r\n     *\r\n     * @param string $error_msg\r\n     * @param integer $error_type\r\n     */\r\n    public function trigger_error($error_msg, $error_type = E_USER_WARNING)\r\n    {\r\n        trigger_error(\"Smarty error: $error_msg\", $error_type);\r\n    }\r\n\r\n}\r\n\r\n/**\r\n * Smarty {php}{/php} block function\r\n *\r\n * @param array   $params   parameter list\r\n * @param string  $content  contents of the block\r\n * @param object  $template template object\r\n * @param boolean &$repeat  repeat flag\r\n * @return string content re-formatted\r\n */\r\nfunction smarty_php_tag($params, $content, $template, &$repeat)\r\n{\r\n    eval($content);\r\n    return '';\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/debug.tpl",
    "content": "{capture name='_smarty_debug' assign=debug_output}\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n<head>\n    <title>Smarty Debug Console</title>\n<style type=\"text/css\">\n{literal}\nbody, h1, h2, td, th, p {\n    font-family: sans-serif;\n    font-weight: normal;\n    font-size: 0.9em;\n    margin: 1px;\n    padding: 0;\n}\n\nh1 {\n    margin: 0;\n    text-align: left;\n    padding: 2px;\n    background-color: #f0c040;\n    color:  black;\n    font-weight: bold;\n    font-size: 1.2em;\n }\n\nh2 {\n    background-color: #9B410E;\n    color: white;\n    text-align: left;\n    font-weight: bold;\n    padding: 2px;\n    border-top: 1px solid black;\n}\n\nbody {\n    background: black; \n}\n\np, table, div {\n    background: #f0ead8;\n} \n\np {\n    margin: 0;\n    font-style: italic;\n    text-align: center;\n}\n\ntable {\n    width: 100%;\n}\n\nth, td {\n    font-family: monospace;\n    vertical-align: top;\n    text-align: left;\n    width: 50%;\n}\n\ntd {\n    color: green;\n}\n\n.odd {\n    background-color: #eeeeee;\n}\n\n.even {\n    background-color: #fafafa;\n}\n\n.exectime {\n    font-size: 0.8em;\n    font-style: italic;\n}\n\n#table_assigned_vars th {\n    color: blue;\n}\n\n#table_config_vars th {\n    color: maroon;\n}\n{/literal}\n</style>\n</head>\n<body>\n\n<h1>Smarty Debug Console  -  {if isset($template_name)}{$template_name|debug_print_var nofilter}{else}Total Time {$execution_time|string_format:\"%.5f\"}{/if}</h1>\n\n{if !empty($template_data)}\n<h2>included templates &amp; config files (load time in seconds)</h2>\n\n<div>\n{foreach $template_data as $template}\n  <font color=brown>{$template.name}</font>\n  <span class=\"exectime\">\n   (compile {$template['compile_time']|string_format:\"%.5f\"}) (render {$template['render_time']|string_format:\"%.5f\"}) (cache {$template['cache_time']|string_format:\"%.5f\"})\n  </span>\n  <br>\n{/foreach}\n</div>\n{/if}\n\n<h2>assigned template variables</h2>\n\n<table id=\"table_assigned_vars\">\n    {foreach $assigned_vars as $vars}\n       <tr class=\"{if $vars@iteration % 2 eq 0}odd{else}even{/if}\">   \n       <th>${$vars@key|escape:'html'}</th>\n       <td>{$vars|debug_print_var nofilter}</td></tr>\n    {/foreach}\n</table>\n\n<h2>assigned config file variables (outer template scope)</h2>\n\n<table id=\"table_config_vars\">\n    {foreach $config_vars as $vars}\n       <tr class=\"{if $vars@iteration % 2 eq 0}odd{else}even{/if}\">   \n       <th>{$vars@key|escape:'html'}</th>\n       <td>{$vars|debug_print_var nofilter}</td></tr>\n    {/foreach}\n\n</table>\n</body>\n</html>\n{/capture}\n<script type=\"text/javascript\">\n{$id = $template_name|default:''|md5}\n    _smarty_console = window.open(\"\",\"console{$id}\",\"width=680,height=600,resizable,scrollbars=yes\");\n    _smarty_console.document.write(\"{$debug_output|escape:'javascript' nofilter}\");\n    _smarty_console.document.close();\n</script>\n"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/block.textformat.php",
    "content": "<?php\n/**\n * Smarty plugin to format text blocks\n *\n * @package Smarty\n * @subpackage PluginsBlock\n */\n\n/**\n * Smarty {textformat}{/textformat} block plugin\n *\n * Type:     block function<br>\n * Name:     textformat<br>\n * Purpose:  format text a certain way with preset styles\n *           or custom wrap/indent settings<br>\n * Params:\n * <pre>\n * - style         - string (email)\n * - indent        - integer (0)\n * - wrap          - integer (80)\n * - wrap_char     - string (\"\\n\")\n * - indent_char   - string (\" \")\n * - wrap_boundary - boolean (true)\n * </pre>\n *\n * @link http://www.smarty.net/manual/en/language.function.textformat.php {textformat}\n *       (Smarty online manual)\n * @param array                    $params   parameters\n * @param string                   $content  contents of the block\n * @param Smarty_Internal_Template $template template object\n * @param boolean                  &$repeat  repeat flag\n * @return string content re-formatted\n * @author Monte Ohrt <monte at ohrt dot com>\n */\nfunction smarty_block_textformat($params, $content, $template, &$repeat)\n{\n    if (is_null($content)) {\n        return;\n    }\n\n    $style = null;\n    $indent = 0;\n    $indent_first = 0;\n    $indent_char = ' ';\n    $wrap = 80;\n    $wrap_char = \"\\n\";\n    $wrap_cut = false;\n    $assign = null;\n\n    foreach ($params as $_key => $_val) {\n        switch ($_key) {\n            case 'style':\n            case 'indent_char':\n            case 'wrap_char':\n            case 'assign':\n                $$_key = (string)$_val;\n                break;\n\n            case 'indent':\n            case 'indent_first':\n            case 'wrap':\n                $$_key = (int)$_val;\n                break;\n\n            case 'wrap_cut':\n                $$_key = (bool)$_val;\n                break;\n\n            default:\n                trigger_error(\"textformat: unknown attribute '$_key'\");\n        }\n    }\n\n    if ($style == 'email') {\n        $wrap = 72;\n    }\n    // split into paragraphs\n    $_paragraphs = preg_split('![\\r\\n]{2}!', $content);\n    $_output = '';\n\n\n    foreach ($_paragraphs as &$_paragraph) {\n        if (!$_paragraph) {\n            continue;\n        }\n        // convert mult. spaces & special chars to single space\n        $_paragraph = preg_replace(array('!\\s+!' . Smarty::$_UTF8_MODIFIER, '!(^\\s+)|(\\s+$)!' . Smarty::$_UTF8_MODIFIER), array(' ', ''), $_paragraph);\n        // indent first line\n        if ($indent_first > 0) {\n            $_paragraph = str_repeat($indent_char, $indent_first) . $_paragraph;\n        }\n        // wordwrap sentences\n        if (Smarty::$_MBSTRING) {\n            require_once(SMARTY_PLUGINS_DIR . 'shared.mb_wordwrap.php');\n            $_paragraph = smarty_mb_wordwrap($_paragraph, $wrap - $indent, $wrap_char, $wrap_cut);\n        } else {\n            $_paragraph = wordwrap($_paragraph, $wrap - $indent, $wrap_char, $wrap_cut);\n        }\n        // indent lines\n        if ($indent > 0) {\n            $_paragraph = preg_replace('!^!m', str_repeat($indent_char, $indent), $_paragraph);\n        }\n    }\n    $_output = implode($wrap_char . $wrap_char, $_paragraphs);\n    \n    if ($assign) {\n        $template->assign($assign, $_output);\n    } else {\n        return $_output;\n    }\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/function.counter.php",
    "content": "<?php\n/**\n * Smarty plugin\n * @package Smarty\n * @subpackage PluginsFunction\n */\n\n/**\n * Smarty {counter} function plugin\n *\n * Type:     function<br>\n * Name:     counter<br>\n * Purpose:  print out a counter value\n *\n * @author Monte Ohrt <monte at ohrt dot com>\n * @link http://www.smarty.net/manual/en/language.function.counter.php {counter}\n *       (Smarty online manual)\n * @param array                    $params   parameters\n * @param Smarty_Internal_Template $template template object\n * @return string|null\n */\nfunction smarty_function_counter($params, $template)\n{\n    static $counters = array();\n\n    $name = (isset($params['name'])) ? $params['name'] : 'default';\n    if (!isset($counters[$name])) {\n        $counters[$name] = array(\n            'start'=>1,\n            'skip'=>1,\n            'direction'=>'up',\n            'count'=>1\n            );\n    }\n    $counter =& $counters[$name];\n\n    if (isset($params['start'])) {\n        $counter['start'] = $counter['count'] = (int)$params['start'];\n    }\n\n    if (!empty($params['assign'])) {\n        $counter['assign'] = $params['assign'];\n    }\n\n    if (isset($counter['assign'])) {\n        $template->assign($counter['assign'], $counter['count']);\n    }\n    \n    if (isset($params['print'])) {\n        $print = (bool)$params['print'];\n    } else {\n        $print = empty($counter['assign']);\n    }\n\n    if ($print) {\n        $retval = $counter['count'];\n    } else {\n        $retval = null;\n    }\n\n    if (isset($params['skip'])) {\n        $counter['skip'] = $params['skip'];\n    }\n    \n    if (isset($params['direction'])) {\n        $counter['direction'] = $params['direction'];\n    }\n\n    if ($counter['direction'] == \"down\")\n        $counter['count'] -= $counter['skip'];\n    else\n        $counter['count'] += $counter['skip'];\n    \n    return $retval;\n    \n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/function.cycle.php",
    "content": "<?php\n/**\n * Smarty plugin\n *\n * @package Smarty\n * @subpackage PluginsFunction\n */\n\n/**\n * Smarty {cycle} function plugin\n *\n * Type:     function<br>\n * Name:     cycle<br>\n * Date:     May 3, 2002<br>\n * Purpose:  cycle through given values<br>\n * Params:\n * <pre>\n * - name      - name of cycle (optional)\n * - values    - comma separated list of values to cycle, or an array of values to cycle\n *               (this can be left out for subsequent calls)\n * - reset     - boolean - resets given var to true\n * - print     - boolean - print var or not. default is true\n * - advance   - boolean - whether or not to advance the cycle\n * - delimiter - the value delimiter, default is \",\"\n * - assign    - boolean, assigns to template var instead of printed.\n * </pre>\n * Examples:<br>\n * <pre>\n * {cycle values=\"#eeeeee,#d0d0d0d\"}\n * {cycle name=row values=\"one,two,three\" reset=true}\n * {cycle name=row}\n * </pre>\n *\n * @link http://www.smarty.net/manual/en/language.function.cycle.php {cycle}\n *       (Smarty online manual)\n * @author Monte Ohrt <monte at ohrt dot com>\n * @author credit to Mark Priatel <mpriatel@rogers.com>\n * @author credit to Gerard <gerard@interfold.com>\n * @author credit to Jason Sweat <jsweat_php@yahoo.com>\n * @version  1.3\n * @param array                    $params   parameters\n * @param Smarty_Internal_Template $template template object\n * @return string|null\n */\n\nfunction smarty_function_cycle($params, $template)\n{\n    static $cycle_vars;\n\n    $name = (empty($params['name'])) ? 'default' : $params['name'];\n    $print = (isset($params['print'])) ? (bool)$params['print'] : true;\n    $advance = (isset($params['advance'])) ? (bool)$params['advance'] : true;\n    $reset = (isset($params['reset'])) ? (bool)$params['reset'] : false;\n\n    if (!isset($params['values'])) {\n        if(!isset($cycle_vars[$name]['values'])) {\n            trigger_error(\"cycle: missing 'values' parameter\");\n            return;\n        }\n    } else {\n        if(isset($cycle_vars[$name]['values'])\n            && $cycle_vars[$name]['values'] != $params['values'] ) {\n            $cycle_vars[$name]['index'] = 0;\n        }\n        $cycle_vars[$name]['values'] = $params['values'];\n    }\n\n    if (isset($params['delimiter'])) {\n        $cycle_vars[$name]['delimiter'] = $params['delimiter'];\n    } elseif (!isset($cycle_vars[$name]['delimiter'])) {\n        $cycle_vars[$name]['delimiter'] = ',';\n    }\n\n    if(is_array($cycle_vars[$name]['values'])) {\n        $cycle_array = $cycle_vars[$name]['values'];\n    } else {\n        $cycle_array = explode($cycle_vars[$name]['delimiter'],$cycle_vars[$name]['values']);\n    }\n\n    if(!isset($cycle_vars[$name]['index']) || $reset ) {\n        $cycle_vars[$name]['index'] = 0;\n    }\n\n    if (isset($params['assign'])) {\n        $print = false;\n        $template->assign($params['assign'], $cycle_array[$cycle_vars[$name]['index']]);\n    }\n\n    if($print) {\n        $retval = $cycle_array[$cycle_vars[$name]['index']];\n    } else {\n        $retval = null;\n    }\n\n    if($advance) {\n        if ( $cycle_vars[$name]['index'] >= count($cycle_array) -1 ) {\n            $cycle_vars[$name]['index'] = 0;\n        } else {\n            $cycle_vars[$name]['index']++;\n        }\n    }\n\n    return $retval;\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/function.fetch.php",
    "content": "<?php\n/**\n * Smarty plugin\n *\n * @package Smarty\n * @subpackage PluginsFunction\n */\n\n/**\n * Smarty {fetch} plugin\n *\n * Type:     function<br>\n * Name:     fetch<br>\n * Purpose:  fetch file, web or ftp data and display results\n *\n * @link http://www.smarty.net/manual/en/language.function.fetch.php {fetch}\n *       (Smarty online manual)\n * @author Monte Ohrt <monte at ohrt dot com>\n * @param array                    $params   parameters\n * @param Smarty_Internal_Template $template template object\n * @return string|null if the assign parameter is passed, Smarty assigns the result to a template variable\n */\nfunction smarty_function_fetch($params, $template)\n{\n    if (empty($params['file'])) {\n        trigger_error(\"[plugin] fetch parameter 'file' cannot be empty\",E_USER_NOTICE);\n        return;\n    }\n    \n    // strip file protocol\n    if (stripos($params['file'], 'file://') === 0) {\n        $params['file'] = substr($params['file'], 7);\n    }\n    \n    $protocol = strpos($params['file'], '://');\n    if ($protocol !== false) {\n        $protocol = strtolower(substr($params['file'], 0, $protocol));\n    }\n    \n    if (isset($template->smarty->security_policy)) {\n        if ($protocol) {\n            // remote resource (or php stream, …)\n            if(!$template->smarty->security_policy->isTrustedUri($params['file'])) {\n                return;\n            }\n        } else {\n            // local file\n            if(!$template->smarty->security_policy->isTrustedResourceDir($params['file'])) {\n                return;\n            }\n        }\n    }\n\n    $content = '';\n    if ($protocol == 'http') {\n        // http fetch\n        if($uri_parts = parse_url($params['file'])) {\n            // set defaults\n            $host = $server_name = $uri_parts['host'];\n            $timeout = 30;\n            $accept = \"image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*\";\n            $agent = \"Smarty Template Engine \". Smarty::SMARTY_VERSION;\n            $referer = \"\";\n            $uri = !empty($uri_parts['path']) ? $uri_parts['path'] : '/';\n            $uri .= !empty($uri_parts['query']) ? '?' . $uri_parts['query'] : '';\n            $_is_proxy = false;\n            if(empty($uri_parts['port'])) {\n                $port = 80;\n            } else {\n                $port = $uri_parts['port'];\n            }\n            if(!empty($uri_parts['user'])) {\n                $user = $uri_parts['user'];\n            }\n            if(!empty($uri_parts['pass'])) {\n                $pass = $uri_parts['pass'];\n            }\n            // loop through parameters, setup headers\n            foreach($params as $param_key => $param_value) {\n                switch($param_key) {\n                    case \"file\":\n                    case \"assign\":\n                    case \"assign_headers\":\n                        break;\n                    case \"user\":\n                        if(!empty($param_value)) {\n                            $user = $param_value;\n                        }\n                        break;\n                    case \"pass\":\n                        if(!empty($param_value)) {\n                            $pass = $param_value;\n                        }\n                        break;\n                    case \"accept\":\n                        if(!empty($param_value)) {\n                            $accept = $param_value;\n                        }\n                        break;\n                    case \"header\":\n                        if(!empty($param_value)) {\n                            if(!preg_match('![\\w\\d-]+: .+!',$param_value)) {\n                                trigger_error(\"[plugin] invalid header format '\".$param_value.\"'\",E_USER_NOTICE);\n                                return;\n                            } else {\n                                $extra_headers[] = $param_value;\n                            }\n                        }\n                        break;\n                    case \"proxy_host\":\n                        if(!empty($param_value)) {\n                            $proxy_host = $param_value;\n                        }\n                        break;\n                    case \"proxy_port\":\n                        if(!preg_match('!\\D!', $param_value)) {\n                            $proxy_port = (int) $param_value;\n                        } else {\n                            trigger_error(\"[plugin] invalid value for attribute '\".$param_key.\"'\",E_USER_NOTICE);\n                            return;\n                        }\n                        break;\n                    case \"agent\":\n                        if(!empty($param_value)) {\n                            $agent = $param_value;\n                        }\n                        break;\n                    case \"referer\":\n                        if(!empty($param_value)) {\n                            $referer = $param_value;\n                        }\n                        break;\n                    case \"timeout\":\n                        if(!preg_match('!\\D!', $param_value)) {\n                            $timeout = (int) $param_value;\n                        } else {\n                            trigger_error(\"[plugin] invalid value for attribute '\".$param_key.\"'\",E_USER_NOTICE);\n                            return;\n                        }\n                        break;\n                    default:\n                        trigger_error(\"[plugin] unrecognized attribute '\".$param_key.\"'\",E_USER_NOTICE);\n                        return;\n                }\n            }\n            if(!empty($proxy_host) && !empty($proxy_port)) {\n                $_is_proxy = true;\n                $fp = fsockopen($proxy_host,$proxy_port,$errno,$errstr,$timeout);\n            } else {\n                $fp = fsockopen($server_name,$port,$errno,$errstr,$timeout);\n            }\n\n            if(!$fp) {\n                trigger_error(\"[plugin] unable to fetch: $errstr ($errno)\",E_USER_NOTICE);\n                return;\n            } else {\n                if($_is_proxy) {\n                    fputs($fp, 'GET ' . $params['file'] . \" HTTP/1.0\\r\\n\");\n                } else {\n                    fputs($fp, \"GET $uri HTTP/1.0\\r\\n\");\n                }\n                if(!empty($host)) {\n                    fputs($fp, \"Host: $host\\r\\n\");\n                }\n                if(!empty($accept)) {\n                    fputs($fp, \"Accept: $accept\\r\\n\");\n                }\n                if(!empty($agent)) {\n                    fputs($fp, \"User-Agent: $agent\\r\\n\");\n                }\n                if(!empty($referer)) {\n                    fputs($fp, \"Referer: $referer\\r\\n\");\n                }\n                if(isset($extra_headers) && is_array($extra_headers)) {\n                    foreach($extra_headers as $curr_header) {\n                        fputs($fp, $curr_header.\"\\r\\n\");\n                    }\n                }\n                if(!empty($user) && !empty($pass)) {\n                    fputs($fp, \"Authorization: BASIC \".base64_encode(\"$user:$pass\").\"\\r\\n\");\n                }\n\n                fputs($fp, \"\\r\\n\");\n                while(!feof($fp)) {\n                    $content .= fgets($fp,4096);\n                }\n                fclose($fp);\n                $csplit = preg_split(\"!\\r\\n\\r\\n!\",$content,2);\n\n                $content = $csplit[1];\n\n                if(!empty($params['assign_headers'])) {\n                    $template->assign($params['assign_headers'],preg_split(\"!\\r\\n!\",$csplit[0]));\n                }\n            }\n        } else {\n            trigger_error(\"[plugin fetch] unable to parse URL, check syntax\",E_USER_NOTICE);\n            return;\n        }\n    } else {\n        $content = @file_get_contents($params['file']);\n        if ($content === false) {\n            throw new SmartyException(\"{fetch} cannot read resource '\" . $params['file'] .\"'\");\n        }\n    }\n\n    if (!empty($params['assign'])) {\n        $template->assign($params['assign'], $content);\n    } else {\n        return $content;\n    }\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/function.html_checkboxes.php",
    "content": "<?php\n/**\n * Smarty plugin\n *\n * @package Smarty\n * @subpackage PluginsFunction\n */\n\n/**\n * Smarty {html_checkboxes} function plugin\n *\n * File:       function.html_checkboxes.php<br>\n * Type:       function<br>\n * Name:       html_checkboxes<br>\n * Date:       24.Feb.2003<br>\n * Purpose:    Prints out a list of checkbox input types<br>\n * Examples:\n * <pre>\n * {html_checkboxes values=$ids output=$names}\n * {html_checkboxes values=$ids name='box' separator='<br>' output=$names}\n * {html_checkboxes values=$ids checked=$checked separator='<br>' output=$names}\n * </pre>\n * Params:\n * <pre>\n * - name       (optional) - string default \"checkbox\"\n * - values     (required) - array\n * - options    (optional) - associative array\n * - checked    (optional) - array default not set\n * - separator  (optional) - ie <br> or &nbsp;\n * - output     (optional) - the output next to each checkbox\n * - assign     (optional) - assign the output as an array to this variable\n * - escape     (optional) - escape the content (not value), defaults to true\n * </pre>\n *\n * @link http://www.smarty.net/manual/en/language.function.html.checkboxes.php {html_checkboxes}\n *      (Smarty online manual)\n * @author     Christopher Kvarme <christopher.kvarme@flashjab.com>\n * @author credits to Monte Ohrt <monte at ohrt dot com>\n * @version    1.0\n * @param array $params parameters\n * @param object $template template object\n * @return string\n * @uses smarty_function_escape_special_chars()\n */\nfunction smarty_function_html_checkboxes($params, $template)\n{\n    require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');\n\n    $name = 'checkbox';\n    $values = null;\n    $options = null;\n    $selected = array();\n    $separator = '';\n    $escape = true;\n    $labels = true;\n    $label_ids = false;\n    $output = null;\n\n    $extra = '';\n\n    foreach($params as $_key => $_val) {\n        switch($_key) {\n            case 'name':\n            case 'separator':\n                $$_key = (string) $_val;\n                break;\n\n            case 'escape':\n            case 'labels':\n            case 'label_ids':\n                $$_key = (bool) $_val;\n                break;\n\n            case 'options':\n                $$_key = (array) $_val;\n                break;\n\n            case 'values':\n            case 'output':\n                $$_key = array_values((array) $_val);\n                break;\n\n            case 'checked':\n            case 'selected':\n                if (is_array($_val)) {\n                    $selected = array();\n                    foreach ($_val as $_sel) {\n                        if (is_object($_sel)) {\n                            if (method_exists($_sel, \"__toString\")) {\n                                $_sel = smarty_function_escape_special_chars((string) $_sel->__toString());\n                            } else {\n                                trigger_error(\"html_checkboxes: selected attribute contains an object of class '\". get_class($_sel) .\"' without __toString() method\", E_USER_NOTICE);\n                                continue;\n                            }\n                        } else {\n                            $_sel = smarty_function_escape_special_chars((string) $_sel);\n                        }\n                        $selected[$_sel] = true;\n                    }\n                } elseif (is_object($_val)) {\n                    if (method_exists($_val, \"__toString\")) {\n                        $selected = smarty_function_escape_special_chars((string) $_val->__toString());\n                    } else {\n                        trigger_error(\"html_checkboxes: selected attribute is an object of class '\". get_class($_val) .\"' without __toString() method\", E_USER_NOTICE);\n                    }\n                } else {\n                    $selected = smarty_function_escape_special_chars((string) $_val);\n                }\n                break;\n\n            case 'checkboxes':\n                trigger_error('html_checkboxes: the use of the \"checkboxes\" attribute is deprecated, use \"options\" instead', E_USER_WARNING);\n                $options = (array) $_val;\n                break;\n\n            case 'assign':\n                break;\n\n            case 'strict': break;\n\n            case 'disabled':\n            case 'readonly':\n                if (!empty($params['strict'])) {\n                    if (!is_scalar($_val)) {\n                        trigger_error(\"html_options: $_key attribute must be a scalar, only boolean true or string '$_key' will actually add the attribute\", E_USER_NOTICE);\n                    }\n\n                    if ($_val === true || $_val === $_key) {\n                        $extra .= ' ' . $_key . '=\"' . smarty_function_escape_special_chars($_key) . '\"';\n                    }\n\n                    break;\n                }\n                // omit break; to fall through!\n\n            default:\n                if(!is_array($_val)) {\n                    $extra .= ' '.$_key.'=\"'.smarty_function_escape_special_chars($_val).'\"';\n                } else {\n                    trigger_error(\"html_checkboxes: extra attribute '$_key' cannot be an array\", E_USER_NOTICE);\n                }\n                break;\n        }\n    }\n\n    if (!isset($options) && !isset($values))\n        return ''; /* raise error here? */\n\n    $_html_result = array();\n\n    if (isset($options)) {\n        foreach ($options as $_key=>$_val) {\n            $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids, $escape);\n        }\n    } else {\n        foreach ($values as $_i=>$_key) {\n            $_val = isset($output[$_i]) ? $output[$_i] : '';\n            $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids, $escape);\n        }\n    }\n\n    if(!empty($params['assign'])) {\n        $template->assign($params['assign'], $_html_result);\n    } else {\n        return implode(\"\\n\", $_html_result);\n    }\n\n}\n\nfunction smarty_function_html_checkboxes_output($name, $value, $output, $selected, $extra, $separator, $labels, $label_ids, $escape=true) {\n    $_output = '';\n    \n    if (is_object($value)) {\n        if (method_exists($value, \"__toString\")) {\n            $value = (string) $value->__toString();\n        } else {\n            trigger_error(\"html_options: value is an object of class '\". get_class($value) .\"' without __toString() method\", E_USER_NOTICE);\n            return '';\n        }\n    } else {\n        $value = (string) $value;\n    }\n    \n    if (is_object($output)) {\n        if (method_exists($output, \"__toString\")) {\n            $output = (string) $output->__toString();\n        } else {\n            trigger_error(\"html_options: output is an object of class '\". get_class($output) .\"' without __toString() method\", E_USER_NOTICE);\n            return '';\n        }\n    } else {\n        $output = (string) $output;\n    }\n    \n    if ($labels) {\n        if ($label_ids) {\n            $_id = smarty_function_escape_special_chars(preg_replace('![^\\w\\-\\.]!' . Smarty::$_UTF8_MODIFIER, '_', $name . '_' . $value));\n            $_output .= '<label for=\"' . $_id . '\">';\n        } else {\n            $_output .= '<label>';\n        } \n    }\n    \n    $name = smarty_function_escape_special_chars($name);\n    $value = smarty_function_escape_special_chars($value);\n    if ($escape) {\n        $output = smarty_function_escape_special_chars($output);\n    }\n    \n    $_output .= '<input type=\"checkbox\" name=\"' . $name . '[]\" value=\"' . $value . '\"';\n    \n    if ($labels && $label_ids) {\n        $_output .= ' id=\"' . $_id . '\"';\n    }\n    \n    if (is_array($selected)) {\n        if (isset($selected[$value])) {\n            $_output .= ' checked=\"checked\"';\n        }\n    } elseif ($value === $selected) {\n        $_output .= ' checked=\"checked\"';\n    }\n    \n    $_output .= $extra . ' />' . $output;\n    if ($labels) {\n        $_output .= '</label>';\n    }\n    \n    $_output .=  $separator;\n    return $_output;\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/function.html_image.php",
    "content": "<?php\n/**\n * Smarty plugin\n * \n * @package Smarty\n * @subpackage PluginsFunction\n */\n\n/**\n * Smarty {html_image} function plugin\n * \n * Type:     function<br>\n * Name:     html_image<br>\n * Date:     Feb 24, 2003<br>\n * Purpose:  format HTML tags for the image<br>\n * Examples: {html_image file=\"/images/masthead.gif\"}<br>\n * Output:   <img src=\"/images/masthead.gif\" width=400 height=23><br>\n * Params:\n * <pre>\n * - file        - (required) - file (and path) of image\n * - height      - (optional) - image height (default actual height)\n * - width       - (optional) - image width (default actual width)\n * - basedir     - (optional) - base directory for absolute paths, default is environment variable DOCUMENT_ROOT\n * - path_prefix - prefix for path output (optional, default empty)\n * </pre>\n * \n * @link http://www.smarty.net/manual/en/language.function.html.image.php {html_image}\n *      (Smarty online manual)\n * @author Monte Ohrt <monte at ohrt dot com> \n * @author credits to Duda <duda@big.hu> \n * @version 1.0\n * @param array                    $params   parameters\n * @param Smarty_Internal_Template $template template object\n * @return string \n * @uses smarty_function_escape_special_chars()\n */\nfunction smarty_function_html_image($params, $template)\n{\n    require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');\n \n    $alt = '';\n    $file = '';\n    $height = '';\n    $width = '';\n    $extra = '';\n    $prefix = '';\n    $suffix = '';\n    $path_prefix = '';\n    $basedir = isset($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['DOCUMENT_ROOT'] : '';\n    foreach($params as $_key => $_val) {\n        switch ($_key) {\n            case 'file':\n            case 'height':\n            case 'width':\n            case 'dpi':\n            case 'path_prefix':\n            case 'basedir':\n                $$_key = $_val;\n                break;\n\n            case 'alt':\n                if (!is_array($_val)) {\n                    $$_key = smarty_function_escape_special_chars($_val);\n                } else {\n                    throw new SmartyException (\"html_image: extra attribute '$_key' cannot be an array\", E_USER_NOTICE);\n                } \n                break;\n\n            case 'link':\n            case 'href':\n                $prefix = '<a href=\"' . $_val . '\">';\n                $suffix = '</a>';\n                break;\n\n            default:\n                if (!is_array($_val)) {\n                    $extra .= ' ' . $_key . '=\"' . smarty_function_escape_special_chars($_val) . '\"';\n                } else {\n                    throw new SmartyException (\"html_image: extra attribute '$_key' cannot be an array\", E_USER_NOTICE);\n                } \n                break;\n        } \n    } \n\n    if (empty($file)) {\n        trigger_error(\"html_image: missing 'file' parameter\", E_USER_NOTICE);\n        return;\n    } \n\n    if ($file[0] == '/') {\n        $_image_path = $basedir . $file;\n    } else {\n        $_image_path = $file;\n    }\n    \n    // strip file protocol\n    if (stripos($params['file'], 'file://') === 0) {\n        $params['file'] = substr($params['file'], 7);\n    }\n    \n    $protocol = strpos($params['file'], '://');\n    if ($protocol !== false) {\n        $protocol = strtolower(substr($params['file'], 0, $protocol));\n    }\n    \n    if (isset($template->smarty->security_policy)) {\n        if ($protocol) {\n            // remote resource (or php stream, …)\n            if(!$template->smarty->security_policy->isTrustedUri($params['file'])) {\n                return;\n            }\n        } else {\n            // local file\n            if(!$template->smarty->security_policy->isTrustedResourceDir($params['file'])) {\n                return;\n            }\n        }\n    }\n\n    if (!isset($params['width']) || !isset($params['height'])) {\n        // FIXME: (rodneyrehm) getimagesize() loads the complete file off a remote resource, use custom [jpg,png,gif]header reader!\n        if (!$_image_data = @getimagesize($_image_path)) {\n            if (!file_exists($_image_path)) {\n                trigger_error(\"html_image: unable to find '$_image_path'\", E_USER_NOTICE);\n                return;\n            } else if (!is_readable($_image_path)) {\n                trigger_error(\"html_image: unable to read '$_image_path'\", E_USER_NOTICE);\n                return;\n            } else {\n                trigger_error(\"html_image: '$_image_path' is not a valid image file\", E_USER_NOTICE);\n                return;\n            } \n        }\n\n        if (!isset($params['width'])) {\n            $width = $_image_data[0];\n        } \n        if (!isset($params['height'])) {\n            $height = $_image_data[1];\n        } \n    } \n\n    if (isset($params['dpi'])) {\n        if (strstr($_SERVER['HTTP_USER_AGENT'], 'Mac')) {\n            // FIXME: (rodneyrehm) wrong dpi assumption\n            // don't know who thought this up… even if it was true in 1998, it's definitely wrong in 2011.\n            $dpi_default = 72;\n        } else {\n            $dpi_default = 96;\n        } \n        $_resize = $dpi_default / $params['dpi'];\n        $width = round($width * $_resize);\n        $height = round($height * $_resize);\n    } \n\n    return $prefix . '<img src=\"' . $path_prefix . $file . '\" alt=\"' . $alt . '\" width=\"' . $width . '\" height=\"' . $height . '\"' . $extra . ' />' . $suffix;\n} \n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/function.html_options.php",
    "content": "<?php\n/**\n * Smarty plugin\n * \n * @package Smarty\n * @subpackage PluginsFunction\n */\n\n/**\n * Smarty {html_options} function plugin\n * \n * Type:     function<br>\n * Name:     html_options<br>\n * Purpose:  Prints the list of <option> tags generated from\n *           the passed parameters<br>\n * Params:\n * <pre>\n * - name       (optional) - string default \"select\"\n * - values     (required) - if no options supplied) - array\n * - options    (required) - if no values supplied) - associative array\n * - selected   (optional) - string default not set\n * - output     (required) - if not options supplied) - array\n * - id         (optional) - string default not set\n * - class      (optional) - string default not set\n * </pre>\n * \n * @link http://www.smarty.net/manual/en/language.function.html.options.php {html_image}\n *      (Smarty online manual)\n * @author Monte Ohrt <monte at ohrt dot com> \n * @author Ralf Strehle (minor optimization) <ralf dot strehle at yahoo dot de>\n * @param array                    $params   parameters\n * @param Smarty_Internal_Template $template template object\n * @return string \n * @uses smarty_function_escape_special_chars()\n */\nfunction smarty_function_html_options($params, $template)\n{\n    require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');\n\n    $name = null;\n    $values = null;\n    $options = null;\n    $selected = null;\n    $output = null;\n    $id = null;\n    $class = null;\n\n    $extra = '';\n\n    foreach ($params as $_key => $_val) {\n        switch ($_key) {\n            case 'name':\n            case 'class':\n            case 'id':\n                $$_key = (string) $_val;\n                break;\n\n            case 'options':\n                $options = (array) $_val;\n                break;\n\n            case 'values':\n            case 'output':\n                $$_key = array_values((array) $_val);\n                break;\n\n            case 'selected':\n                if (is_array($_val)) {\n                    $selected = array();\n                    foreach ($_val as $_sel) {\n                        if (is_object($_sel)) {\n                            if (method_exists($_sel, \"__toString\")) {\n                                $_sel = smarty_function_escape_special_chars((string) $_sel->__toString());\n                            } else {\n                                trigger_error(\"html_options: selected attribute contains an object of class '\". get_class($_sel) .\"' without __toString() method\", E_USER_NOTICE);\n                                continue;\n                            }\n                        } else {\n                            $_sel = smarty_function_escape_special_chars((string) $_sel);\n                        }\n                        $selected[$_sel] = true;\n                    }\n                } elseif (is_object($_val)) {\n                    if (method_exists($_val, \"__toString\")) {\n                        $selected = smarty_function_escape_special_chars((string) $_val->__toString());\n                    } else {\n                        trigger_error(\"html_options: selected attribute is an object of class '\". get_class($_val) .\"' without __toString() method\", E_USER_NOTICE);\n                    }\n                } else {\n                    $selected = smarty_function_escape_special_chars((string) $_val);\n                }\n                break;\n            \n            case 'strict': break;\n            \n            case 'disabled':\n            case 'readonly':\n                if (!empty($params['strict'])) {\n                    if (!is_scalar($_val)) {\n                        trigger_error(\"html_options: $_key attribute must be a scalar, only boolean true or string '$_key' will actually add the attribute\", E_USER_NOTICE);\n                    }\n                    \n                    if ($_val === true || $_val === $_key) {\n                        $extra .= ' ' . $_key . '=\"' . smarty_function_escape_special_chars($_key) . '\"';\n                    }\n                    \n                    break;\n                }\n                // omit break; to fall through!\n            \n            default:\n                if (!is_array($_val)) {\n                    $extra .= ' ' . $_key . '=\"' . smarty_function_escape_special_chars($_val) . '\"';\n                } else {\n                    trigger_error(\"html_options: extra attribute '$_key' cannot be an array\", E_USER_NOTICE);\n                } \n                break;\n        } \n    }\n\n    if (!isset($options) && !isset($values)) {\n        /* raise error here? */\n        return '';\n    }\n\n    $_html_result = '';\n    $_idx = 0;\n\n    if (isset($options)) {\n        foreach ($options as $_key => $_val) {\n            $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected, $id, $class, $_idx);\n        }\n    } else {\n        foreach ($values as $_i => $_key) {\n            $_val = isset($output[$_i]) ? $output[$_i] : '';\n            $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected, $id, $class, $_idx);\n        } \n    }\n\n    if (!empty($name)) {\n        $_html_class = !empty($class) ? ' class=\"'.$class.'\"' : '';\n        $_html_id = !empty($id) ? ' id=\"'.$id.'\"' : '';\n        $_html_result = '<select name=\"' . $name . '\"' . $_html_class . $_html_id . $extra . '>' . \"\\n\" . $_html_result . '</select>' . \"\\n\";\n    } \n\n    return $_html_result;\n}\n\nfunction smarty_function_html_options_optoutput($key, $value, $selected, $id, $class, &$idx)\n{\n    if (!is_array($value)) {\n        $_key = smarty_function_escape_special_chars($key);\n        $_html_result = '<option value=\"' . $_key . '\"';\n        if (is_array($selected)) {\n            if (isset($selected[$_key])) {\n                $_html_result .= ' selected=\"selected\"';\n            }\n        } elseif ($_key === $selected) {\n            $_html_result .= ' selected=\"selected\"';\n        }\n        $_html_class = !empty($class) ? ' class=\"'.$class.' option\"' : '';\n        $_html_id = !empty($id) ? ' id=\"'.$id.'-'.$idx.'\"' : '';\n        if (is_object($value)) {\n            if (method_exists($value, \"__toString\")) {\n                $value = smarty_function_escape_special_chars((string) $value->__toString());\n            } else {\n                trigger_error(\"html_options: value is an object of class '\". get_class($value) .\"' without __toString() method\", E_USER_NOTICE);\n                return '';\n            }\n        } else {\n            $value = smarty_function_escape_special_chars((string) $value);\n        }\n        $_html_result .= $_html_class . $_html_id . '>' . $value . '</option>' . \"\\n\";\n        $idx++;\n    } else {\n        $_idx = 0;\n        $_html_result = smarty_function_html_options_optgroup($key, $value, $selected, !empty($id) ? ($id.'-'.$idx) : null, $class, $_idx);\n        $idx++;\n    }\n    return $_html_result;\n} \n\nfunction smarty_function_html_options_optgroup($key, $values, $selected, $id, $class, &$idx)\n{\n    $optgroup_html = '<optgroup label=\"' . smarty_function_escape_special_chars($key) . '\">' . \"\\n\";\n    foreach ($values as $key => $value) {\n        $optgroup_html .= smarty_function_html_options_optoutput($key, $value, $selected, $id, $class, $idx);\n    } \n    $optgroup_html .= \"</optgroup>\\n\";\n    return $optgroup_html;\n} \n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/function.html_radios.php",
    "content": "<?php\n/**\n * Smarty plugin\n * \n * @package Smarty\n * @subpackage PluginsFunction\n */\n\n/**\n * Smarty {html_radios} function plugin\n * \n * File:       function.html_radios.php<br>\n * Type:       function<br>\n * Name:       html_radios<br>\n * Date:       24.Feb.2003<br>\n * Purpose:    Prints out a list of radio input types<br>\n * Params:\n * <pre>\n * - name       (optional) - string default \"radio\"\n * - values     (required) - array\n * - options    (required) - associative array\n * - checked    (optional) - array default not set\n * - separator  (optional) - ie <br> or &nbsp;\n * - output     (optional) - the output next to each radio button\n * - assign     (optional) - assign the output as an array to this variable\n * - escape     (optional) - escape the content (not value), defaults to true\n * </pre>\n * Examples:\n * <pre>\n * {html_radios values=$ids output=$names}\n * {html_radios values=$ids name='box' separator='<br>' output=$names}\n * {html_radios values=$ids checked=$checked separator='<br>' output=$names}\n * </pre>\n * \n * @link http://smarty.php.net/manual/en/language.function.html.radios.php {html_radios}\n *      (Smarty online manual)\n * @author Christopher Kvarme <christopher.kvarme@flashjab.com> \n * @author credits to Monte Ohrt <monte at ohrt dot com> \n * @version 1.0\n * @param array                    $params   parameters\n * @param Smarty_Internal_Template $template template object\n * @return string \n * @uses smarty_function_escape_special_chars()\n */\nfunction smarty_function_html_radios($params, $template)\n{\n    require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');\n\n    $name = 'radio';\n    $values = null;\n    $options = null;\n    $selected = null;\n    $separator = '';\n    $escape = true;\n    $labels = true;\n    $label_ids = false;\n    $output = null;\n    $extra = '';\n\n    foreach($params as $_key => $_val) {\n        switch ($_key) {\n            case 'name':\n            case 'separator':\n                $$_key = (string) $_val;\n                break;\n\n            case 'checked':\n            case 'selected':\n                if (is_array($_val)) {\n                    trigger_error('html_radios: the \"' . $_key . '\" attribute cannot be an array', E_USER_WARNING);\n                } elseif (is_object($_val)) {\n                    if (method_exists($_val, \"__toString\")) {\n                        $selected = smarty_function_escape_special_chars((string) $_val->__toString());\n                    } else {\n                        trigger_error(\"html_radios: selected attribute is an object of class '\". get_class($_val) .\"' without __toString() method\", E_USER_NOTICE);\n                    }\n                } else {\n                    $selected = (string) $_val;\n                } \n                break;\n\n            case 'escape':\n            case 'labels':\n            case 'label_ids':\n                $$_key = (bool) $_val;\n                break;\n\n            case 'options':\n                $$_key = (array) $_val;\n                break;\n\n            case 'values':\n            case 'output':\n                $$_key = array_values((array) $_val);\n                break;\n\n            case 'radios':\n                trigger_error('html_radios: the use of the \"radios\" attribute is deprecated, use \"options\" instead', E_USER_WARNING);\n                $options = (array) $_val;\n                break;\n\n            case 'assign':\n                break;\n\n            case 'strict': break;\n\n            case 'disabled':\n            case 'readonly':\n                if (!empty($params['strict'])) {\n                    if (!is_scalar($_val)) {\n                        trigger_error(\"html_options: $_key attribute must be a scalar, only boolean true or string '$_key' will actually add the attribute\", E_USER_NOTICE);\n                    }\n\n                    if ($_val === true || $_val === $_key) {\n                        $extra .= ' ' . $_key . '=\"' . smarty_function_escape_special_chars($_key) . '\"';\n                    }\n\n                    break;\n                }\n                // omit break; to fall through!\n\n            default:\n                if (!is_array($_val)) {\n                    $extra .= ' ' . $_key . '=\"' . smarty_function_escape_special_chars($_val) . '\"';\n                } else {\n                    trigger_error(\"html_radios: extra attribute '$_key' cannot be an array\", E_USER_NOTICE);\n                } \n                break;\n        } \n    } \n\n    if (!isset($options) && !isset($values)) {\n        /* raise error here? */\n        return '';\n    }\n\n    $_html_result = array();\n\n    if (isset($options)) {\n        foreach ($options as $_key => $_val) {\n            $_html_result[] = smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids, $escape);\n        }\n    } else {\n        foreach ($values as $_i => $_key) {\n            $_val = isset($output[$_i]) ? $output[$_i] : '';\n            $_html_result[] = smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids, $escape);\n        } \n    } \n\n    if (!empty($params['assign'])) {\n        $template->assign($params['assign'], $_html_result);\n    } else {\n        return implode(\"\\n\", $_html_result);\n    } \n} \n\nfunction smarty_function_html_radios_output($name, $value, $output, $selected, $extra, $separator, $labels, $label_ids, $escape)\n{\n    $_output = '';\n    \n    if (is_object($value)) {\n        if (method_exists($value, \"__toString\")) {\n            $value = (string) $value->__toString();\n        } else {\n            trigger_error(\"html_options: value is an object of class '\". get_class($value) .\"' without __toString() method\", E_USER_NOTICE);\n            return '';\n        }\n    } else {\n        $value = (string) $value;\n    }\n    \n    if (is_object($output)) {\n        if (method_exists($output, \"__toString\")) {\n            $output = (string) $output->__toString();\n        } else {\n            trigger_error(\"html_options: output is an object of class '\". get_class($output) .\"' without __toString() method\", E_USER_NOTICE);\n            return '';\n        }\n    } else {\n        $output = (string) $output;\n    }\n    \n    if ($labels) {\n        if ($label_ids) {\n            $_id = smarty_function_escape_special_chars(preg_replace('![^\\w\\-\\.]!' . Smarty::$_UTF8_MODIFIER, '_', $name . '_' . $value));\n            $_output .= '<label for=\"' . $_id . '\">';\n        } else {\n            $_output .= '<label>';\n        } \n    }\n    \n    $name = smarty_function_escape_special_chars($name);\n    $value = smarty_function_escape_special_chars($value);\n    if ($escape) {\n        $output = smarty_function_escape_special_chars($output);\n    }\n    \n    $_output .= '<input type=\"radio\" name=\"' . $name . '\" value=\"' . $value . '\"';\n\n    if ($labels && $label_ids) {\n        $_output .= ' id=\"' . $_id . '\"';\n    }\n\n    if ($value === $selected) {\n        $_output .= ' checked=\"checked\"';\n    }\n    \n    $_output .= $extra . ' />' . $output;\n    if ($labels) {\n        $_output .= '</label>';\n    }\n    \n    $_output .= $separator;\n    return $_output;\n} \n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/function.html_select_date.php",
    "content": "<?php\n/**\n * Smarty plugin\n * \n * @package Smarty\n * @subpackage PluginsFunction\n */\n\n/**\n * @ignore\n */\nrequire_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');\n/**\n * @ignore\n */\nrequire_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');\n\n/**\n * Smarty {html_select_date} plugin\n * \n * Type:     function<br>\n * Name:     html_select_date<br>\n * Purpose:  Prints the dropdowns for date selection.\n * \n * ChangeLog:\n * <pre>\n *            - 1.0 initial release\n *            - 1.1 added support for +/- N syntax for begin\n *              and end year values. (Monte)\n *            - 1.2 added support for yyyy-mm-dd syntax for\n *              time value. (Jan Rosier)\n *            - 1.3 added support for choosing format for\n *              month values (Gary Loescher)\n *            - 1.3.1 added support for choosing format for\n *              day values (Marcus Bointon)\n *            - 1.3.2 support negative timestamps, force year\n *              dropdown to include given date unless explicitly set (Monte)\n *            - 1.3.4 fix behaviour of 0000-00-00 00:00:00 dates to match that\n *              of 0000-00-00 dates (cybot, boots)\n *            - 2.0 complete rewrite for performance,  \n *              added attributes month_names, *_id\n * </pre>\n * \n * @link http://www.smarty.net/manual/en/language.function.html.select.date.php {html_select_date}\n *      (Smarty online manual)\n * @version 2.0\n * @author Andrei Zmievski \n * @author Monte Ohrt <monte at ohrt dot com> \n * @author Rodney Rehm\n * @param array                    $params   parameters\n * @param Smarty_Internal_Template $template template object\n * @return string \n */\nfunction smarty_function_html_select_date($params, $template)\n{\n    // generate timestamps used for month names only\n    static $_month_timestamps = null;\n    static $_current_year = null;\n    if ($_month_timestamps === null) {\n        $_current_year = date('Y');\n        $_month_timestamps = array();\n        for ($i = 1; $i <= 12; $i++) {\n            $_month_timestamps[$i] = mktime(0, 0, 0, $i, 1, 2000);\n        }\n    }\n\n    /* Default values. */\n    $prefix = \"Date_\";\n    $start_year = null;\n    $end_year = null;\n    $display_days = true;\n    $display_months = true;\n    $display_years = true;\n    $month_format = \"%B\";\n    /* Write months as numbers by default  GL */\n    $month_value_format = \"%m\";\n    $day_format = \"%02d\";\n    /* Write day values using this format MB */\n    $day_value_format = \"%d\";\n    $year_as_text = false;\n    /* Display years in reverse order? Ie. 2000,1999,.... */\n    $reverse_years = false;\n    /* Should the select boxes be part of an array when returned from PHP?\n       e.g. setting it to \"birthday\", would create \"birthday[Day]\",\n       \"birthday[Month]\" & \"birthday[Year]\". Can be combined with prefix */\n    $field_array = null;\n    /* <select size>'s of the different <select> tags.\n       If not set, uses default dropdown. */\n    $day_size = null;\n    $month_size = null;\n    $year_size = null;\n    /* Unparsed attributes common to *ALL* the <select>/<input> tags.\n       An example might be in the template: all_extra ='class =\"foo\"'. */\n    $all_extra = null;\n    /* Separate attributes for the tags. */\n    $day_extra = null;\n    $month_extra = null;\n    $year_extra = null;\n    /* Order in which to display the fields.\n       \"D\" -> day, \"M\" -> month, \"Y\" -> year. */\n    $field_order = 'MDY';\n    /* String printed between the different fields. */\n    $field_separator = \"\\n\";\n    $option_separator = \"\\n\";\n    $time = null;\n    // $all_empty = null;\n    // $day_empty = null;\n    // $month_empty = null;\n    // $year_empty = null;\n    $extra_attrs = '';\n    $all_id = null;\n    $day_id = null;\n    $month_id = null;\n    $year_id = null;\n\n    foreach ($params as $_key => $_value) {\n        switch ($_key) {\n            case 'time':\n                if (!is_array($_value) && $_value !== null) {\n                    $time = smarty_make_timestamp($_value);\n                }\n                break;\n                \n            case 'month_names':\n                if (is_array($_value) && count($_value) == 12) {\n                    $$_key = $_value;\n                } else {\n                    trigger_error(\"html_select_date: month_names must be an array of 12 strings\", E_USER_NOTICE);\n                }\n                break;\n                \n            case 'prefix':\n            case 'field_array':\n            case 'start_year':\n            case 'end_year':\n            case 'day_format':\n            case 'day_value_format':\n            case 'month_format':\n            case 'month_value_format':\n            case 'day_size':\n            case 'month_size':\n            case 'year_size':\n            case 'all_extra':\n            case 'day_extra':\n            case 'month_extra':\n            case 'year_extra':\n            case 'field_order':\n            case 'field_separator':\n            case 'option_separator':\n            case 'all_empty':\n            case 'month_empty':\n            case 'day_empty':\n            case 'year_empty':\n            case 'all_id':\n            case 'month_id':\n            case 'day_id':\n            case 'year_id':\n                $$_key = (string)$_value;\n                break;\n\n            case 'display_days':\n            case 'display_months':\n            case 'display_years':\n            case 'year_as_text':\n            case 'reverse_years':\n                $$_key = (bool)$_value;\n                break;\n\n            default:\n                if (!is_array($_value)) {\n                    $extra_attrs .= ' ' . $_key . '=\"' . smarty_function_escape_special_chars($_value) . '\"';\n                } else {\n                    trigger_error(\"html_select_date: extra attribute '$_key' cannot be an array\", E_USER_NOTICE);\n                } \n                break;\n        } \n    }\n    \n    // Note: date() is faster than strftime()\n    // Note: explode(date()) is faster than date() date() date()\n    if (isset($params['time']) && is_array($params['time'])) {\n        if (isset($params['time'][$prefix . 'Year'])) {\n            // $_REQUEST[$field_array] given\n            foreach (array('Y' => 'Year',  'm' => 'Month', 'd' => 'Day') as $_elementKey => $_elementName) {\n                $_variableName = '_' . strtolower($_elementName);\n                $$_variableName = isset($params['time'][$prefix . $_elementName])\n                    ? $params['time'][$prefix . $_elementName]\n                    : date($_elementKey);\n            }\n            $time = mktime(0, 0, 0, $_month, $_day, $_year);\n        } elseif (isset($params['time'][$field_array][$prefix . 'Year'])) {\n            // $_REQUEST given\n            foreach (array('Y' => 'Year',  'm' => 'Month', 'd' => 'Day') as $_elementKey => $_elementName) {\n                $_variableName = '_' . strtolower($_elementName);\n                $$_variableName = isset($params['time'][$field_array][$prefix . $_elementName])\n                    ? $params['time'][$field_array][$prefix . $_elementName]\n                    : date($_elementKey);\n            }\n            $time = mktime(0, 0, 0, $_month, $_day, $_year);\n        } else {\n            // no date found, use NOW\n            list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d'));\n        }\n    } elseif ($time === null) {\n        if (array_key_exists('time', $params)) {\n            $_year = $_month = $_day = $time = null;\n        } else {\n            list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d'));\n        }\n    } else {\n        list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d', $time));\n    }\n\n    // make syntax \"+N\" or \"-N\" work with $start_year and $end_year\n    // Note preg_match('!^(\\+|\\-)\\s*(\\d+)$!', $end_year, $match) is slower than trim+substr\n    foreach (array('start', 'end') as $key) {\n        $key .= '_year';\n        $t = $$key;\n        if ($t === null) {\n            $$key = (int)$_current_year;\n        } else if ($t[0] == '+') {\n            $$key = (int)($_current_year + trim(substr($t, 1)));\n        } else if ($t[0] == '-') {\n            $$key = (int)($_current_year - trim(substr($t, 1)));\n        } else {\n            $$key = (int)$$key;\n        }\n    }\n\n    // flip for ascending or descending\n    if (($start_year > $end_year && !$reverse_years) || ($start_year < $end_year && $reverse_years)) {\n        $t = $end_year;\n        $end_year = $start_year;\n        $start_year = $t;\n    }\n\n    // generate year <select> or <input>\n    if ($display_years) {\n        $_html_years = '';\n        $_extra = '';\n        $_name = $field_array ? ($field_array . '[' . $prefix . 'Year]') : ($prefix . 'Year');\n        if ($all_extra) {\n            $_extra .= ' ' . $all_extra;\n        } \n        if ($year_extra) {\n            $_extra .= ' ' . $year_extra;\n        }\n        \n        if ($year_as_text) {\n            $_html_years = '<input type=\"text\" name=\"' . $_name . '\" value=\"' . $_year . '\" size=\"4\" maxlength=\"4\"' . $_extra . $extra_attrs . ' />';\n        } else {\n            $_html_years = '<select name=\"' . $_name . '\"';\n            if ($year_id !== null || $all_id !== null) {\n                $_html_years .= ' id=\"' . smarty_function_escape_special_chars( \n                    $year_id !== null ? ( $year_id ? $year_id : $_name ) : ( $all_id ? ($all_id . $_name) : $_name ) \n                ) . '\"';\n            }\n            if ($year_size) {\n                $_html_years .= ' size=\"' . $year_size . '\"';\n            } \n            $_html_years .= $_extra . $extra_attrs . '>' . $option_separator;\n            \n            if (isset($year_empty) || isset($all_empty)) {\n                $_html_years .= '<option value=\"\">' . ( isset($year_empty) ? $year_empty : $all_empty ) . '</option>' . $option_separator;\n            }\n            \n            $op = $start_year > $end_year ? -1 : 1;\n            for ($i=$start_year; $op > 0 ? $i <= $end_year : $i >= $end_year; $i += $op) {\n                $_html_years .= '<option value=\"' . $i . '\"'\n                    . ($_year == $i ? ' selected=\"selected\"' : '')\n                    . '>' . $i . '</option>' . $option_separator;\n            }\n            \n            $_html_years .= '</select>';\n        }\n    }\n    \n    // generate month <select> or <input>\n    if ($display_months) {\n        $_html_month = '';\n        $_extra = '';\n        $_name = $field_array ? ($field_array . '[' . $prefix . 'Month]') : ($prefix . 'Month');\n        if ($all_extra) {\n            $_extra .= ' ' . $all_extra;\n        } \n        if ($month_extra) {\n            $_extra .= ' ' . $month_extra;\n        }\n        \n        $_html_months = '<select name=\"' . $_name . '\"';\n        if ($month_id !== null || $all_id !== null) {\n            $_html_months .= ' id=\"' . smarty_function_escape_special_chars( \n                $month_id !== null ? ( $month_id ? $month_id : $_name ) : ( $all_id ? ($all_id . $_name) : $_name ) \n            ) . '\"';\n        }\n        if ($month_size) {\n            $_html_months .= ' size=\"' . $month_size . '\"';\n        } \n        $_html_months .= $_extra . $extra_attrs . '>' . $option_separator;\n        \n        if (isset($month_empty) || isset($all_empty)) {\n            $_html_months .= '<option value=\"\">' . ( isset($month_empty) ? $month_empty : $all_empty ) . '</option>' . $option_separator;\n        }\n        \n        for ($i = 1; $i <= 12; $i++) {\n            $_val = sprintf('%02d', $i);\n            $_text = isset($month_names) ? smarty_function_escape_special_chars($month_names[$i]) : ($month_format == \"%m\" ? $_val : strftime($month_format, $_month_timestamps[$i]));\n            $_value = $month_value_format == \"%m\" ? $_val : strftime($month_value_format, $_month_timestamps[$i]);\n            $_html_months .= '<option value=\"' . $_value . '\"'\n                . ($_val == $_month ? ' selected=\"selected\"' : '')\n                . '>' . $_text . '</option>' . $option_separator;\n        }\n        \n        $_html_months .= '</select>';\n    }\n    \n    // generate day <select> or <input>\n    if ($display_days) {\n        $_html_day = '';\n        $_extra = '';\n        $_name = $field_array ? ($field_array . '[' . $prefix . 'Day]') : ($prefix . 'Day');\n        if ($all_extra) {\n            $_extra .= ' ' . $all_extra;\n        } \n        if ($day_extra) {\n            $_extra .= ' ' . $day_extra;\n        }\n        \n        $_html_days = '<select name=\"' . $_name . '\"';\n        if ($day_id !== null || $all_id !== null) {\n            $_html_days .= ' id=\"' . smarty_function_escape_special_chars( \n                $day_id !== null ? ( $day_id ? $day_id : $_name ) : ( $all_id ? ($all_id . $_name) : $_name ) \n            ) . '\"';\n        }\n        if ($day_size) {\n            $_html_days .= ' size=\"' . $day_size . '\"';\n        } \n        $_html_days .= $_extra . $extra_attrs . '>' . $option_separator;\n        \n        if (isset($day_empty) || isset($all_empty)) {\n            $_html_days .= '<option value=\"\">' . ( isset($day_empty) ? $day_empty : $all_empty ) . '</option>' . $option_separator;\n        }\n        \n        for ($i = 1; $i <= 31; $i++) {\n            $_val = sprintf('%02d', $i);\n            $_text = $day_format == '%02d' ? $_val : sprintf($day_format, $i);\n            $_value = $day_value_format ==  '%02d' ? $_val : sprintf($day_value_format, $i);\n            $_html_days .= '<option value=\"' . $_value . '\"'\n                . ($_val == $_day ? ' selected=\"selected\"' : '')\n                . '>' . $_text . '</option>' . $option_separator;\n        }\n        \n        $_html_days .= '</select>';\n    }\n\n    // order the fields for output\n    $_html = '';\n    for ($i=0; $i <= 2; $i++) {\n        switch ($field_order[$i]) {\n            case 'Y':\n            case 'y':\n                if (isset($_html_years)) {\n                    if ($_html) {\n                        $_html .= $field_separator;\n                    }\n                    $_html .= $_html_years;\n                }\n            break;\n            \n            case 'm':\n            case 'M':\n                if (isset($_html_months)) {\n                    if ($_html) {\n                        $_html .= $field_separator;\n                    }\n                    $_html .= $_html_months;\n                }\n            break;\n            \n            case 'd':\n            case 'D':\n                if (isset($_html_days)) {\n                    if ($_html) {\n                        $_html .= $field_separator;\n                    }\n                    $_html .= $_html_days;\n                }\n            break;\n        }\n    }\n    return $_html;\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/function.html_select_time.php",
    "content": "<?php\n/**\n * Smarty plugin\n *\n * @package Smarty\n * @subpackage PluginsFunction\n */\n\n/**\n * @ignore\n */\nrequire_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');\n/**\n * @ignore\n */\nrequire_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');\n\n/**\n * Smarty {html_select_time} function plugin\n *\n * Type:     function<br>\n * Name:     html_select_time<br>\n * Purpose:  Prints the dropdowns for time selection\n *\n * @link http://www.smarty.net/manual/en/language.function.html.select.time.php {html_select_time}\n *          (Smarty online manual)\n * @author Roberto Berto <roberto@berto.net>\n * @author Monte Ohrt <monte AT ohrt DOT com>\n * @param array                    $params   parameters\n * @param Smarty_Internal_Template $template template object\n * @return string\n * @uses smarty_make_timestamp()\n */\nfunction smarty_function_html_select_time($params, $template)\n{\n    $prefix = \"Time_\";\n    $field_array = null;\n    $field_separator = \"\\n\";\n    $option_separator = \"\\n\";\n    $time = null;\n\n    $display_hours = true;\n    $display_minutes = true;\n    $display_seconds = true;\n    $display_meridian = true;\n\n    $hour_format = '%02d';\n    $hour_value_format = '%02d';\n    $minute_format = '%02d';\n    $minute_value_format = '%02d';\n    $second_format = '%02d';\n    $second_value_format = '%02d';\n\n    $hour_size = null;\n    $minute_size = null;\n    $second_size = null;\n    $meridian_size = null;\n\n    $all_empty = null;\n    $hour_empty = null;\n    $minute_empty = null;\n    $second_empty = null;\n    $meridian_empty = null;\n\n    $all_id = null;\n    $hour_id = null;\n    $minute_id = null;\n    $second_id = null;\n    $meridian_id = null;\n\n    $use_24_hours = true;\n    $minute_interval = 1;\n    $second_interval = 1;\n\n    $extra_attrs = '';\n    $all_extra = null;\n    $hour_extra = null;\n    $minute_extra = null;\n    $second_extra = null;\n    $meridian_extra = null;\n\n    foreach ($params as $_key => $_value) {\n        switch ($_key) {\n            case 'time':\n                if (!is_array($_value) && $_value !== null) {\n                    $time = smarty_make_timestamp($_value);\n                }\n                break;\n\n            case 'prefix':\n            case 'field_array':\n\n            case 'field_separator':\n            case 'option_separator':\n\n            case 'all_extra':\n            case 'hour_extra':\n            case 'minute_extra':\n            case 'second_extra':\n            case 'meridian_extra':\n\n            case 'all_empty':\n            case 'hour_empty':\n            case 'minute_empty':\n            case 'second_empty':\n            case 'meridian_empty':\n\n            case 'all_id':\n            case 'hour_id':\n            case 'minute_id':\n            case 'second_id':\n            case 'meridian_id':\n\n            case 'hour_format':\n            case 'hour_value_format':\n            case 'minute_format':\n            case 'minute_value_format':\n            case 'second_format':\n            case 'second_value_format':\n                $$_key = (string)$_value;\n                break;\n\n            case 'display_hours':\n            case 'display_minutes':\n            case 'display_seconds':\n            case 'display_meridian':\n            case 'use_24_hours':\n                $$_key = (bool)$_value;\n                break;\n\n            case 'minute_interval':\n            case 'second_interval':\n\n            case 'hour_size':\n            case 'minute_size':\n            case 'second_size':\n            case 'meridian_size':\n                $$_key = (int)$_value;\n                break;\n\n            default:\n                if (!is_array($_value)) {\n                    $extra_attrs .= ' ' . $_key . '=\"' . smarty_function_escape_special_chars($_value) . '\"';\n                } else {\n                    trigger_error(\"html_select_date: extra attribute '$_key' cannot be an array\", E_USER_NOTICE);\n                }\n                break;\n        }\n    }\n\n    if (isset($params['time']) && is_array($params['time'])) {\n        if (isset($params['time'][$prefix . 'Hour'])) {\n            // $_REQUEST[$field_array] given\n            foreach (array('H' => 'Hour',  'i' => 'Minute', 's' => 'Second') as $_elementKey => $_elementName) {\n                $_variableName = '_' . strtolower($_elementName);\n                $$_variableName = isset($params['time'][$prefix . $_elementName])\n                    ? $params['time'][$prefix . $_elementName]\n                    : date($_elementKey);\n            }\n            $_meridian = isset($params['time'][$prefix . 'Meridian'])\n                ? (' ' . $params['time'][$prefix . 'Meridian'])\n                : '';\n            $time = strtotime( $_hour . ':' . $_minute . ':' . $_second . $_meridian );\n            list($_hour, $_minute, $_second) = $time = explode('-', date('H-i-s', $time));\n        } elseif (isset($params['time'][$field_array][$prefix . 'Hour'])) {\n            // $_REQUEST given\n            foreach (array('H' => 'Hour',  'i' => 'Minute', 's' => 'Second') as $_elementKey => $_elementName) {\n                $_variableName = '_' . strtolower($_elementName);\n                $$_variableName = isset($params['time'][$field_array][$prefix . $_elementName])\n                    ? $params['time'][$field_array][$prefix . $_elementName]\n                    : date($_elementKey);\n            }\n            $_meridian = isset($params['time'][$field_array][$prefix . 'Meridian'])\n                ? (' ' . $params['time'][$field_array][$prefix . 'Meridian'])\n                : '';\n            $time = strtotime( $_hour . ':' . $_minute . ':' . $_second . $_meridian );\n            list($_hour, $_minute, $_second) = $time = explode('-', date('H-i-s', $time));\n        } else {\n            // no date found, use NOW\n            list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d'));\n        }\n    } elseif ($time === null) {\n        if (array_key_exists('time', $params)) {\n            $_hour = $_minute = $_second = $time = null;\n        } else {\n            list($_hour, $_minute, $_second) = $time = explode('-', date('H-i-s'));\n        }\n    } else {\n        list($_hour, $_minute, $_second) = $time = explode('-', date('H-i-s', $time));\n    }\n\n    // generate hour <select>\n    if ($display_hours) {\n        $_html_hours = '';\n        $_extra = '';\n        $_name = $field_array ? ($field_array . '[' . $prefix . 'Hour]') : ($prefix . 'Hour');\n        if ($all_extra) {\n            $_extra .= ' ' . $all_extra;\n        }\n        if ($hour_extra) {\n            $_extra .= ' ' . $hour_extra;\n        }\n\n        $_html_hours = '<select name=\"' . $_name . '\"';\n        if ($hour_id !== null || $all_id !== null) {\n            $_html_hours .= ' id=\"' . smarty_function_escape_special_chars(\n                $hour_id !== null ? ( $hour_id ? $hour_id : $_name ) : ( $all_id ? ($all_id . $_name) : $_name )\n            ) . '\"';\n        }\n        if ($hour_size) {\n            $_html_hours .= ' size=\"' . $hour_size . '\"';\n        }\n        $_html_hours .= $_extra . $extra_attrs . '>' . $option_separator;\n\n        if (isset($hour_empty) || isset($all_empty)) {\n            $_html_hours .= '<option value=\"\">' . ( isset($hour_empty) ? $hour_empty : $all_empty ) . '</option>' . $option_separator;\n        }\n\n        $start = $use_24_hours ? 0 : 1;\n        $end = $use_24_hours ? 23 : 12;\n        for ($i=$start; $i <= $end; $i++) {\n            $_val = sprintf('%02d', $i);\n            $_text = $hour_format == '%02d' ? $_val : sprintf($hour_format, $i);\n            $_value = $hour_value_format == '%02d' ? $_val : sprintf($hour_value_format, $i);\n\n            if (!$use_24_hours) {\n                $_hour12 = $_hour == 0\n                    ? 12\n                    : ($_hour <= 12 ? $_hour : $_hour -12);\n            }\n\n            $selected = $_hour !== null ? ($use_24_hours ? $_hour == $_val : $_hour12 == $_val) : null;\n            $_html_hours .= '<option value=\"' . $_value . '\"'\n                . ($selected ? ' selected=\"selected\"' : '')\n                . '>' . $_text . '</option>' . $option_separator;\n        }\n\n        $_html_hours .= '</select>';\n    }\n\n    // generate minute <select>\n    if ($display_minutes) {\n        $_html_minutes = '';\n        $_extra = '';\n        $_name = $field_array ? ($field_array . '[' . $prefix . 'Minute]') : ($prefix . 'Minute');\n        if ($all_extra) {\n            $_extra .= ' ' . $all_extra;\n        }\n        if ($minute_extra) {\n            $_extra .= ' ' . $minute_extra;\n        }\n\n        $_html_minutes = '<select name=\"' . $_name . '\"';\n        if ($minute_id !== null || $all_id !== null) {\n            $_html_minutes .= ' id=\"' . smarty_function_escape_special_chars(\n                $minute_id !== null ? ( $minute_id ? $minute_id : $_name ) : ( $all_id ? ($all_id . $_name) : $_name )\n            ) . '\"';\n        }\n        if ($minute_size) {\n            $_html_minutes .= ' size=\"' . $minute_size . '\"';\n        }\n        $_html_minutes .= $_extra . $extra_attrs . '>' . $option_separator;\n\n        if (isset($minute_empty) || isset($all_empty)) {\n            $_html_minutes .= '<option value=\"\">' . ( isset($minute_empty) ? $minute_empty : $all_empty ) . '</option>' . $option_separator;\n        }\n\n        $selected = $_minute !== null ? ($_minute - $_minute % $minute_interval) : null;\n        for ($i=0; $i <= 59; $i += $minute_interval) {\n            $_val = sprintf('%02d', $i);\n            $_text = $minute_format == '%02d' ? $_val : sprintf($minute_format, $i);\n            $_value = $minute_value_format == '%02d' ? $_val : sprintf($minute_value_format, $i);\n            $_html_minutes .= '<option value=\"' . $_value . '\"'\n                . ($selected === $i ? ' selected=\"selected\"' : '')\n                . '>' . $_text . '</option>' . $option_separator;\n        }\n\n        $_html_minutes .= '</select>';\n    }\n\n    // generate second <select>\n    if ($display_seconds) {\n        $_html_seconds = '';\n        $_extra = '';\n        $_name = $field_array ? ($field_array . '[' . $prefix . 'Second]') : ($prefix . 'Second');\n        if ($all_extra) {\n            $_extra .= ' ' . $all_extra;\n        }\n        if ($second_extra) {\n            $_extra .= ' ' . $second_extra;\n        }\n\n        $_html_seconds = '<select name=\"' . $_name . '\"';\n        if ($second_id !== null || $all_id !== null) {\n            $_html_seconds .= ' id=\"' . smarty_function_escape_special_chars(\n                $second_id !== null ? ( $second_id ? $second_id : $_name ) : ( $all_id ? ($all_id . $_name) : $_name )\n            ) . '\"';\n        }\n        if ($second_size) {\n            $_html_seconds .= ' size=\"' . $second_size . '\"';\n        }\n        $_html_seconds .= $_extra . $extra_attrs . '>' . $option_separator;\n\n        if (isset($second_empty) || isset($all_empty)) {\n            $_html_seconds .= '<option value=\"\">' . ( isset($second_empty) ? $second_empty : $all_empty ) . '</option>' . $option_separator;\n        }\n\n        $selected = $_second !== null ? ($_second - $_second % $second_interval) : null;\n        for ($i=0; $i <= 59; $i += $second_interval) {\n            $_val = sprintf('%02d', $i);\n            $_text = $second_format == '%02d' ? $_val : sprintf($second_format, $i);\n            $_value = $second_value_format == '%02d' ? $_val : sprintf($second_value_format, $i);\n            $_html_seconds .= '<option value=\"' . $_value . '\"'\n                . ($selected === $i ? ' selected=\"selected\"' : '')\n                . '>' . $_text . '</option>' . $option_separator;\n        }\n\n        $_html_seconds .= '</select>';\n    }\n\n    // generate meridian <select>\n    if ($display_meridian && !$use_24_hours) {\n        $_html_meridian = '';\n        $_extra = '';\n        $_name = $field_array ? ($field_array . '[' . $prefix . 'Meridian]') : ($prefix . 'Meridian');\n        if ($all_extra) {\n            $_extra .= ' ' . $all_extra;\n        }\n        if ($meridian_extra) {\n            $_extra .= ' ' . $meridian_extra;\n        }\n\n        $_html_meridian = '<select name=\"' . $_name . '\"';\n        if ($meridian_id !== null || $all_id !== null) {\n            $_html_meridian .= ' id=\"' . smarty_function_escape_special_chars(\n                $meridian_id !== null ? ( $meridian_id ? $meridian_id : $_name ) : ( $all_id ? ($all_id . $_name) : $_name )\n            ) . '\"';\n        }\n        if ($meridian_size) {\n            $_html_meridian .= ' size=\"' . $meridian_size . '\"';\n        }\n        $_html_meridian .= $_extra . $extra_attrs . '>' . $option_separator;\n\n        if (isset($meridian_empty) || isset($all_empty)) {\n            $_html_meridian .= '<option value=\"\">' . ( isset($meridian_empty) ? $meridian_empty : $all_empty ) . '</option>' . $option_separator;\n        }\n\n        $_html_meridian .= '<option value=\"am\"'. ($_hour < 12 ? ' selected=\"selected\"' : '') .'>AM</option>' . $option_separator\n            . '<option value=\"pm\"'. ($_hour < 12 ? '' : ' selected=\"selected\"') .'>PM</option>' . $option_separator\n            . '</select>';\n    }\n\n    $_html = '';\n    foreach (array('_html_hours', '_html_minutes', '_html_seconds', '_html_meridian') as $k) {\n        if (isset($$k)) {\n            if ($_html) {\n                $_html .= $field_separator;\n            }\n            $_html .= $$k;\n        }\n    }\n\n    return $_html;\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/function.html_table.php",
    "content": "<?php\n/**\n * Smarty plugin\n *\n * @package Smarty\n * @subpackage PluginsFunction\n */\n\n/**\n * Smarty {html_table} function plugin\n *\n * Type:     function<br>\n * Name:     html_table<br>\n * Date:     Feb 17, 2003<br>\n * Purpose:  make an html table from an array of data<br>\n * Params:\n * <pre>\n * - loop       - array to loop through\n * - cols       - number of columns, comma separated list of column names\n *                or array of column names\n * - rows       - number of rows\n * - table_attr - table attributes\n * - th_attr    - table heading attributes (arrays are cycled)\n * - tr_attr    - table row attributes (arrays are cycled)\n * - td_attr    - table cell attributes (arrays are cycled)\n * - trailpad   - value to pad trailing cells with\n * - caption    - text for caption element\n * - vdir       - vertical direction (default: \"down\", means top-to-bottom)\n * - hdir       - horizontal direction (default: \"right\", means left-to-right)\n * - inner      - inner loop (default \"cols\": print $loop line by line,\n *                $loop will be printed column by column otherwise)\n * </pre>\n * Examples:\n * <pre>\n * {table loop=$data}\n * {table loop=$data cols=4 tr_attr='\"bgcolor=red\"'}\n * {table loop=$data cols=\"first,second,third\" tr_attr=$colors}\n * </pre>\n *\n * @author Monte Ohrt <monte at ohrt dot com>\n * @author credit to Messju Mohr <messju at lammfellpuschen dot de>\n * @author credit to boots <boots dot smarty at yahoo dot com>\n * @version 1.1\n * @link http://www.smarty.net/manual/en/language.function.html.table.php {html_table}\n *          (Smarty online manual)\n * @param array                    $params   parameters\n * @param Smarty_Internal_Template $template template object\n * @return string\n */\nfunction smarty_function_html_table($params, $template)\n{\n    $table_attr = 'border=\"1\"';\n    $tr_attr = '';\n    $th_attr = '';\n    $td_attr = '';\n    $cols = $cols_count = 3;\n    $rows = 3;\n    $trailpad = '&nbsp;';\n    $vdir = 'down';\n    $hdir = 'right';\n    $inner = 'cols';\n    $caption = '';\n    $loop = null;\n\n    if (!isset($params['loop'])) {\n        trigger_error(\"html_table: missing 'loop' parameter\",E_USER_WARNING);\n        return;\n    }\n\n    foreach ($params as $_key => $_value) {\n        switch ($_key) {\n            case 'loop':\n                $$_key = (array)$_value;\n                break;\n\n            case 'cols':\n                if (is_array($_value) && !empty($_value)) {\n                    $cols = $_value;\n                    $cols_count = count($_value);\n                } elseif (!is_numeric($_value) && is_string($_value) && !empty($_value)) {\n                    $cols = explode(',', $_value);\n                    $cols_count = count($cols);\n                } elseif (!empty($_value)) {\n                    $cols_count = (int)$_value;\n                } else {\n                    $cols_count = $cols;\n                }\n                break;\n\n            case 'rows':\n                $$_key = (int)$_value;\n                break;\n\n            case 'table_attr':\n            case 'trailpad':\n            case 'hdir':\n            case 'vdir':\n            case 'inner':\n            case 'caption':\n                $$_key = (string)$_value;\n                break;\n\n            case 'tr_attr':\n            case 'td_attr':\n            case 'th_attr':\n                $$_key = $_value;\n                break;\n        }\n    }\n\n    $loop_count = count($loop);\n    if (empty($params['rows'])) {\n        /* no rows specified */\n        $rows = ceil($loop_count / $cols_count);\n    } elseif (empty($params['cols'])) {\n        if (!empty($params['rows'])) {\n            /* no cols specified, but rows */\n            $cols_count = ceil($loop_count / $rows);\n        }\n    }\n\n    $output = \"<table $table_attr>\\n\";\n\n    if (!empty($caption)) {\n        $output .= '<caption>' . $caption . \"</caption>\\n\";\n    }\n\n    if (is_array($cols)) {\n        $cols = ($hdir == 'right') ? $cols : array_reverse($cols);\n        $output .= \"<thead><tr>\\n\";\n\n        for ($r = 0; $r < $cols_count; $r++) {\n            $output .= '<th' . smarty_function_html_table_cycle('th', $th_attr, $r) . '>';\n            $output .= $cols[$r];\n            $output .= \"</th>\\n\";\n        }\n        $output .= \"</tr></thead>\\n\";\n    }\n\n    $output .= \"<tbody>\\n\";\n    for ($r = 0; $r < $rows; $r++) {\n        $output .= \"<tr\" . smarty_function_html_table_cycle('tr', $tr_attr, $r) . \">\\n\";\n        $rx = ($vdir == 'down') ? $r * $cols_count : ($rows-1 - $r) * $cols_count;\n\n        for ($c = 0; $c < $cols_count; $c++) {\n            $x = ($hdir == 'right') ? $rx + $c : $rx + $cols_count-1 - $c;\n            if ($inner != 'cols') {\n                /* shuffle x to loop over rows*/\n                $x = floor($x / $cols_count) + ($x % $cols_count) * $rows;\n            }\n\n            if ($x < $loop_count) {\n                $output .= \"<td\" . smarty_function_html_table_cycle('td', $td_attr, $c) . \">\" . $loop[$x] . \"</td>\\n\";\n            } else {\n                $output .= \"<td\" . smarty_function_html_table_cycle('td', $td_attr, $c) . \">$trailpad</td>\\n\";\n            }\n        }\n        $output .= \"</tr>\\n\";\n    }\n    $output .= \"</tbody>\\n\";\n    $output .= \"</table>\\n\";\n\n    return $output;\n}\n\nfunction smarty_function_html_table_cycle($name, $var, $no)\n{\n    if (!is_array($var)) {\n        $ret = $var;\n    } else {\n        $ret = $var[$no % count($var)];\n    }\n\n    return ($ret) ? ' ' . $ret : '';\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/function.mailto.php",
    "content": "<?php\n/**\n * Smarty plugin\n *\n * @package Smarty\n * @subpackage PluginsFunction\n */\n\n/**\n * Smarty {mailto} function plugin\n *\n * Type:     function<br>\n * Name:     mailto<br>\n * Date:     May 21, 2002\n * Purpose:  automate mailto address link creation, and optionally encode them.<br>\n * Params:\n * <pre>\n * - address    - (required) - e-mail address\n * - text       - (optional) - text to display, default is address\n * - encode     - (optional) - can be one of:\n *                             * none : no encoding (default)\n *                             * javascript : encode with javascript\n *                             * javascript_charcode : encode with javascript charcode\n *                             * hex : encode with hexidecimal (no javascript)\n * - cc         - (optional) - address(es) to carbon copy\n * - bcc        - (optional) - address(es) to blind carbon copy\n * - subject    - (optional) - e-mail subject\n * - newsgroups - (optional) - newsgroup(s) to post to\n * - followupto - (optional) - address(es) to follow up to\n * - extra      - (optional) - extra tags for the href link\n * </pre>\n * Examples:\n * <pre>\n * {mailto address=\"me@domain.com\"}\n * {mailto address=\"me@domain.com\" encode=\"javascript\"}\n * {mailto address=\"me@domain.com\" encode=\"hex\"}\n * {mailto address=\"me@domain.com\" subject=\"Hello to you!\"}\n * {mailto address=\"me@domain.com\" cc=\"you@domain.com,they@domain.com\"}\n * {mailto address=\"me@domain.com\" extra='class=\"mailto\"'}\n * </pre>\n *\n * @link http://www.smarty.net/manual/en/language.function.mailto.php {mailto}\n *          (Smarty online manual)\n * @version 1.2\n * @author Monte Ohrt <monte at ohrt dot com>\n * @author credits to Jason Sweat (added cc, bcc and subject functionality)\n * @param array                    $params   parameters\n * @param Smarty_Internal_Template $template template object\n * @return string\n */\nfunction smarty_function_mailto($params, $template)\n{\n    static $_allowed_encoding = array('javascript' => true, 'javascript_charcode' => true, 'hex' => true, 'none' => true);\n    $extra = '';\n\n    if (empty($params['address'])) {\n        trigger_error(\"mailto: missing 'address' parameter\",E_USER_WARNING);\n        return;\n    } else {\n        $address = $params['address'];\n    }\n\n    $text = $address;\n    // netscape and mozilla do not decode %40 (@) in BCC field (bug?)\n    // so, don't encode it.\n    $search = array('%40', '%2C');\n    $replace = array('@', ',');\n    $mail_parms = array();\n    foreach ($params as $var => $value) {\n        switch ($var) {\n            case 'cc':\n            case 'bcc':\n            case 'followupto':\n                if (!empty($value))\n                    $mail_parms[] = $var . '=' . str_replace($search, $replace, rawurlencode($value));\n                break;\n\n            case 'subject':\n            case 'newsgroups':\n                $mail_parms[] = $var . '=' . rawurlencode($value);\n                break;\n\n            case 'extra':\n            case 'text':\n                $$var = $value;\n\n            default:\n        }\n    }\n\n    if ($mail_parms) {\n        $address .= '?' . join('&', $mail_parms);\n    }\n    \n    $encode = (empty($params['encode'])) ? 'none' : $params['encode'];\n    if (!isset($_allowed_encoding[$encode])) {\n        trigger_error(\"mailto: 'encode' parameter must be none, javascript, javascript_charcode or hex\", E_USER_WARNING);\n        return;\n    }\n    // FIXME: (rodneyrehm) document.write() excues me what? 1998 has passed!\n    if ($encode == 'javascript') {\n        $string = 'document.write(\\'<a href=\"mailto:' . $address . '\" ' . $extra . '>' . $text . '</a>\\');';\n\n        $js_encode = '';\n        for ($x = 0, $_length = strlen($string); $x < $_length; $x++) {\n            $js_encode .= '%' . bin2hex($string[$x]);\n        }\n\n        return '<script type=\"text/javascript\">eval(unescape(\\'' . $js_encode . '\\'))</script>';\n    } elseif ($encode == 'javascript_charcode') {\n        $string = '<a href=\"mailto:' . $address . '\" ' . $extra . '>' . $text . '</a>';\n\n        for($x = 0, $y = strlen($string); $x < $y; $x++) {\n            $ord[] = ord($string[$x]);\n        }\n\n        $_ret = \"<script type=\\\"text/javascript\\\" language=\\\"javascript\\\">\\n\"\n            . \"{document.write(String.fromCharCode(\"\n            . implode(',', $ord)\n            . \"))\"\n            . \"}\\n\"\n            . \"</script>\\n\";\n\n        return $_ret;\n    } elseif ($encode == 'hex') {\n        preg_match('!^(.*)(\\?.*)$!', $address, $match);\n        if (!empty($match[2])) {\n            trigger_error(\"mailto: hex encoding does not work with extra attributes. Try javascript.\",E_USER_WARNING);\n            return;\n        }\n        $address_encode = '';\n        for ($x = 0, $_length = strlen($address); $x < $_length; $x++) {\n            if (preg_match('!\\w!' . Smarty::$_UTF8_MODIFIER, $address[$x])) {\n                $address_encode .= '%' . bin2hex($address[$x]);\n            } else {\n                $address_encode .= $address[$x];\n            }\n        }\n        $text_encode = '';\n        for ($x = 0, $_length = strlen($text); $x < $_length; $x++) {\n            $text_encode .= '&#x' . bin2hex($text[$x]) . ';';\n        }\n\n        $mailto = \"&#109;&#97;&#105;&#108;&#116;&#111;&#58;\";\n        return '<a href=\"' . $mailto . $address_encode . '\" ' . $extra . '>' . $text_encode . '</a>';\n    } else {\n        // no encoding\n        return '<a href=\"mailto:' . $address . '\" ' . $extra . '>' . $text . '</a>';\n    }\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/function.math.php",
    "content": "<?php\n/**\n * Smarty plugin\n *\n * This plugin is only for Smarty2 BC\n * @package Smarty\n * @subpackage PluginsFunction\n */\n\n/**\n * Smarty {math} function plugin\n *\n * Type:     function<br>\n * Name:     math<br>\n * Purpose:  handle math computations in template\n *\n * @link http://www.smarty.net/manual/en/language.function.math.php {math}\n *          (Smarty online manual)\n * @author   Monte Ohrt <monte at ohrt dot com>\n * @param array                    $params   parameters\n * @param Smarty_Internal_Template $template template object\n * @return string|null\n */\nfunction smarty_function_math($params, $template)\n{\n    static $_allowed_funcs = array(\n        'int' => true, 'abs' => true, 'ceil' => true, 'cos' => true, 'exp' => true, 'floor' => true,\n        'log' => true, 'log10' => true, 'max' => true, 'min' => true, 'pi' => true, 'pow' => true,\n        'rand' => true, 'round' => true, 'sin' => true, 'sqrt' => true, 'srand' => true ,'tan' => true\n    );\n    // be sure equation parameter is present\n    if (empty($params['equation'])) {\n        trigger_error(\"math: missing equation parameter\",E_USER_WARNING);\n        return;\n    }\n\n    $equation = $params['equation'];\n\n    // make sure parenthesis are balanced\n    if (substr_count($equation,\"(\") != substr_count($equation,\")\")) {\n        trigger_error(\"math: unbalanced parenthesis\",E_USER_WARNING);\n        return;\n    }\n\n    // match all vars in equation, make sure all are passed\n    preg_match_all(\"!(?:0x[a-fA-F0-9]+)|([a-zA-Z][a-zA-Z0-9_]*)!\",$equation, $match);\n\n    foreach($match[1] as $curr_var) {\n        if ($curr_var && !isset($params[$curr_var]) && !isset($_allowed_funcs[$curr_var])) {\n            trigger_error(\"math: function call $curr_var not allowed\",E_USER_WARNING);\n            return;\n        }\n    }\n\n    foreach($params as $key => $val) {\n        if ($key != \"equation\" && $key != \"format\" && $key != \"assign\") {\n            // make sure value is not empty\n            if (strlen($val)==0) {\n                trigger_error(\"math: parameter $key is empty\",E_USER_WARNING);\n                return;\n            }\n            if (!is_numeric($val)) {\n                trigger_error(\"math: parameter $key: is not numeric\",E_USER_WARNING);\n                return;\n            }\n            $equation = preg_replace(\"/\\b$key\\b/\", \" \\$params['$key'] \", $equation);\n        }\n    }\n    $smarty_math_result = null;\n    eval(\"\\$smarty_math_result = \".$equation.\";\");\n\n    if (empty($params['format'])) {\n        if (empty($params['assign'])) {\n            return $smarty_math_result;\n        } else {\n            $template->assign($params['assign'],$smarty_math_result);\n        }\n    } else {\n        if (empty($params['assign'])){\n            printf($params['format'],$smarty_math_result);\n        } else {\n            $template->assign($params['assign'],sprintf($params['format'],$smarty_math_result));\n        }\n    }\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifier.capitalize.php",
    "content": "<?php\n/**\n * Smarty plugin\n * \n * @package Smarty\n * @subpackage PluginsModifier\n */\n\n/**\n * Smarty capitalize modifier plugin\n * \n * Type:     modifier<br>\n * Name:     capitalize<br>\n * Purpose:  capitalize words in the string\n *\n * {@internal {$string|capitalize:true:true} is the fastest option for MBString enabled systems }}\n *\n * @param string  $string    string to capitalize\n * @param boolean $uc_digits also capitalize \"x123\" to \"X123\"\n * @param boolean $lc_rest   capitalize first letters, lowercase all following letters \"aAa\" to \"Aaa\"\n * @return string capitalized string\n * @author Monte Ohrt <monte at ohrt dot com> \n * @author Rodney Rehm\n */\nfunction smarty_modifier_capitalize($string, $uc_digits = false, $lc_rest = false)\n{\n    if (Smarty::$_MBSTRING) {\n        if ($lc_rest) {\n            // uppercase (including hyphenated words)\n            $upper_string = mb_convert_case( $string, MB_CASE_TITLE, Smarty::$_CHARSET );\n        } else {\n            // uppercase word breaks\n            $upper_string = preg_replace(\"!(^|[^\\p{L}'])([\\p{Ll}])!eS\" . Smarty::$_UTF8_MODIFIER, \"stripslashes('\\\\1').mb_convert_case(stripslashes('\\\\2'),MB_CASE_UPPER, '\" . addslashes(Smarty::$_CHARSET) . \"')\", $string);\n        }\n        // check uc_digits case\n        if (!$uc_digits) {\n            if (preg_match_all(\"!\\b([\\p{L}]*[\\p{N}]+[\\p{L}]*)\\b!\" . Smarty::$_UTF8_MODIFIER, $string, $matches, PREG_OFFSET_CAPTURE)) {\n                foreach($matches[1] as $match) {\n                    $upper_string = substr_replace($upper_string, mb_strtolower($match[0], Smarty::$_CHARSET), $match[1], strlen($match[0]));\n                }\n            } \n        }\n        $upper_string = preg_replace(\"!((^|\\s)['\\\"])(\\w)!e\" . Smarty::$_UTF8_MODIFIER, \"stripslashes('\\\\1').mb_convert_case(stripslashes('\\\\3'),MB_CASE_UPPER, '\" . addslashes(Smarty::$_CHARSET) . \"')\", $upper_string);\n        return $upper_string;\n    }\n    \n    // lowercase first\n    if ($lc_rest) {\n        $string = strtolower($string);\n    }\n    // uppercase (including hyphenated words)\n    $upper_string = preg_replace(\"!(^|[^\\p{L}'])([\\p{Ll}])!eS\" . Smarty::$_UTF8_MODIFIER, \"stripslashes('\\\\1').ucfirst(stripslashes('\\\\2'))\", $string); \n    // check uc_digits case\n    if (!$uc_digits) {\n        if (preg_match_all(\"!\\b([\\p{L}]*[\\p{N}]+[\\p{L}]*)\\b!\" . Smarty::$_UTF8_MODIFIER, $string, $matches, PREG_OFFSET_CAPTURE)) {\n            foreach($matches[1] as $match) {\n                $upper_string = substr_replace($upper_string, strtolower($match[0]), $match[1], strlen($match[0]));\n            }\n        } \n    }\n    $upper_string = preg_replace(\"!((^|\\s)['\\\"])(\\w)!e\" . Smarty::$_UTF8_MODIFIER, \"stripslashes('\\\\1').strtoupper(stripslashes('\\\\3'))\", $upper_string);\n    return $upper_string;\n} \n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifier.date_format.php",
    "content": "<?php\n/**\n * Smarty plugin\n * \n * @package Smarty\n * @subpackage PluginsModifier\n */\n\n/**\n * Smarty date_format modifier plugin\n * \n * Type:     modifier<br>\n * Name:     date_format<br>\n * Purpose:  format datestamps via strftime<br>\n * Input:<br>\n *          - string: input date string\n *          - format: strftime format for output\n *          - default_date: default date if $string is empty\n * \n * @link http://www.smarty.net/manual/en/language.modifier.date.format.php date_format (Smarty online manual)\n * @author Monte Ohrt <monte at ohrt dot com> \n * @param string $string       input date string\n * @param string $format       strftime format for output\n * @param string $default_date default date if $string is empty\n * @param string $formatter    either 'strftime' or 'auto'\n * @return string |void\n * @uses smarty_make_timestamp()\n */\nfunction smarty_modifier_date_format($string, $format=null, $default_date='', $formatter='auto')\n{\n    if ($format === null) {\n        $format = Smarty::$_DATE_FORMAT;\n    }\n    /**\n    * Include the {@link shared.make_timestamp.php} plugin\n    */\n    require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');\n    if ($string != '' && $string != '0000-00-00' && $string != '0000-00-00 00:00:00') {\n        $timestamp = smarty_make_timestamp($string);\n    } elseif ($default_date != '') {\n        $timestamp = smarty_make_timestamp($default_date);\n    } else {\n        return;\n    } \n    if($formatter=='strftime'||($formatter=='auto'&&strpos($format,'%')!==false)) {\n        if (DS == '\\\\') {\n            $_win_from = array('%D', '%h', '%n', '%r', '%R', '%t', '%T');\n            $_win_to = array('%m/%d/%y', '%b', \"\\n\", '%I:%M:%S %p', '%H:%M', \"\\t\", '%H:%M:%S');\n            if (strpos($format, '%e') !== false) {\n                $_win_from[] = '%e';\n                $_win_to[] = sprintf('%\\' 2d', date('j', $timestamp));\n            } \n            if (strpos($format, '%l') !== false) {\n                $_win_from[] = '%l';\n                $_win_to[] = sprintf('%\\' 2d', date('h', $timestamp));\n            } \n            $format = str_replace($_win_from, $_win_to, $format);\n        } \n        return strftime($format, $timestamp);\n    } else {\n        return date($format, $timestamp);\n    }\n} \n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifier.debug_print_var.php",
    "content": "<?php\n/**\n * Smarty plugin\n * \n * @package Smarty\n * @subpackage Debug\n */\n\n/**\n * Smarty debug_print_var modifier plugin\n * \n * Type:     modifier<br>\n * Name:     debug_print_var<br>\n * Purpose:  formats variable contents for display in the console\n *\n * @author Monte Ohrt <monte at ohrt dot com> \n * @param array|object $var     variable to be formatted\n * @param integer      $depth   maximum recursion depth if $var is an array\n * @param integer      $length  maximum string length if $var is a string\n * @return string \n */\nfunction smarty_modifier_debug_print_var ($var, $depth = 0, $length = 40)\n{\n    $_replace = array(\"\\n\" => '<i>\\n</i>',\n        \"\\r\" => '<i>\\r</i>',\n        \"\\t\" => '<i>\\t</i>'\n        );\n\n    switch (gettype($var)) {\n        case 'array' :\n            $results = '<b>Array (' . count($var) . ')</b>';\n            foreach ($var as $curr_key => $curr_val) {\n                $results .= '<br>' . str_repeat('&nbsp;', $depth * 2)\n                 . '<b>' . strtr($curr_key, $_replace) . '</b> =&gt; '\n                 . smarty_modifier_debug_print_var($curr_val, ++$depth, $length);\n                $depth--;\n            } \n            break;\n            \n        case 'object' :\n            $object_vars = get_object_vars($var);\n            $results = '<b>' . get_class($var) . ' Object (' . count($object_vars) . ')</b>';\n            foreach ($object_vars as $curr_key => $curr_val) {\n                $results .= '<br>' . str_repeat('&nbsp;', $depth * 2)\n                 . '<b> -&gt;' . strtr($curr_key, $_replace) . '</b> = '\n                 . smarty_modifier_debug_print_var($curr_val, ++$depth, $length);\n                $depth--;\n            } \n            break;\n            \n        case 'boolean' :\n        case 'NULL' :\n        case 'resource' :\n            if (true === $var) {\n                $results = 'true';\n            } elseif (false === $var) {\n                $results = 'false';\n            } elseif (null === $var) {\n                $results = 'null';\n            } else {\n                $results = htmlspecialchars((string) $var);\n            } \n            $results = '<i>' . $results . '</i>';\n            break;\n            \n        case 'integer' :\n        case 'float' :\n            $results = htmlspecialchars((string) $var);\n            break;\n            \n        case 'string' :\n            $results = strtr($var, $_replace);\n            if (Smarty::$_MBSTRING) {\n                if (mb_strlen($var, Smarty::$_CHARSET) > $length) {\n                    $results = mb_substr($var, 0, $length - 3, Smarty::$_CHARSET) . '...';\n                }\n            } else {\n                if (isset($var[$length])) {\n                    $results = substr($var, 0, $length - 3) . '...';\n                }\n            }\n\n            $results = htmlspecialchars('\"' . $results . '\"');\n            break;\n            \n        case 'unknown type' :\n        default :\n            $results = strtr((string) $var, $_replace);\n            if (Smarty::$_MBSTRING) {\n                if (mb_strlen($results, Smarty::$_CHARSET) > $length) {\n                    $results = mb_substr($results, 0, $length - 3, Smarty::$_CHARSET) . '...';\n                }\n            } else {\n                if (strlen($results) > $length) {\n                    $results = substr($results, 0, $length - 3) . '...';\n                }\n            }\n             \n            $results = htmlspecialchars($results);\n    } \n\n    return $results;\n} \n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifier.escape.php",
    "content": "<?php\n/**\n * Smarty plugin\n *\n * @package Smarty\n * @subpackage PluginsModifier\n */\n\n/**\n * Smarty escape modifier plugin\n *\n * Type:     modifier<br>\n * Name:     escape<br>\n * Purpose:  escape string for output\n *\n * @link http://www.smarty.net/manual/en/language.modifier.count.characters.php count_characters (Smarty online manual)\n * @author Monte Ohrt <monte at ohrt dot com>\n * @param string  $string        input string\n * @param string  $esc_type      escape type\n * @param string  $char_set      character set, used for htmlspecialchars() or htmlentities()\n * @param boolean $double_encode encode already encoded entitites again, used for htmlspecialchars() or htmlentities()\n * @return string escaped input string\n */\nfunction smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $double_encode = true)\n{\n    static $_double_encode = null;\n    if ($_double_encode === null) {\n        $_double_encode = version_compare(PHP_VERSION, '5.2.3', '>=');\n    }\n    \n    if (!$char_set) {\n        $char_set = Smarty::$_CHARSET;\n    }\n\n    switch ($esc_type) {\n        case 'html':\n            if ($_double_encode) {\n                // php >=5.3.2 - go native\n                return htmlspecialchars($string, ENT_QUOTES, $char_set, $double_encode);\n            } else {\n                if ($double_encode) {\n                    // php <5.2.3 - only handle double encoding\n                    return htmlspecialchars($string, ENT_QUOTES, $char_set);\n                } else {\n                    // php <5.2.3 - prevent double encoding\n                    $string = preg_replace('!&(#?\\w+);!', '%%%SMARTY_START%%%\\\\1%%%SMARTY_END%%%', $string);\n                    $string = htmlspecialchars($string, ENT_QUOTES, $char_set);\n                    $string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);\n                    return $string;\n                }\n            }\n\n        case 'htmlall':\n            if (Smarty::$_MBSTRING) {\n                // mb_convert_encoding ignores htmlspecialchars()\n                if ($_double_encode) {\n                    // php >=5.3.2 - go native\n                    $string = htmlspecialchars($string, ENT_QUOTES, $char_set, $double_encode);\n                } else {\n                    if ($double_encode) {\n                        // php <5.2.3 - only handle double encoding\n                        $string = htmlspecialchars($string, ENT_QUOTES, $char_set);\n                    } else {\n                        // php <5.2.3 - prevent double encoding\n                        $string = preg_replace('!&(#?\\w+);!', '%%%SMARTY_START%%%\\\\1%%%SMARTY_END%%%', $string);\n                        $string = htmlspecialchars($string, ENT_QUOTES, $char_set);\n                        $string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);\n                        return $string;\n                    }\n                }\n                \n                // htmlentities() won't convert everything, so use mb_convert_encoding\n                return mb_convert_encoding($string, 'HTML-ENTITIES', $char_set);\n            }\n\n            // no MBString fallback\n            if ($_double_encode) {\n                return htmlentities($string, ENT_QUOTES, $char_set, $double_encode);\n            } else {\n                if ($double_encode) {\n                    return htmlentities($string, ENT_QUOTES, $char_set);\n                } else {\n                    $string = preg_replace('!&(#?\\w+);!', '%%%SMARTY_START%%%\\\\1%%%SMARTY_END%%%', $string);\n                    $string = htmlentities($string, ENT_QUOTES, $char_set);\n                    $string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);\n                    return $string;\n                }\n            }\n\n        case 'url':\n            return rawurlencode($string);\n\n        case 'urlpathinfo':\n            return str_replace('%2F', '/', rawurlencode($string));\n\n        case 'quotes':\n            // escape unescaped single quotes\n            return preg_replace(\"%(?<!\\\\\\\\)'%\", \"\\\\'\", $string);\n\n        case 'hex':\n            // escape every byte into hex\n            // Note that the UTF-8 encoded character ä will be represented as %c3%a4\n            $return = '';\n            $_length = strlen($string);\n            for ($x = 0; $x < $_length; $x++) {\n                $return .= '%' . bin2hex($string[$x]);\n            }\n            return $return;\n\n        case 'hexentity':\n            $return = '';\n            if (Smarty::$_MBSTRING) {\n                require_once(SMARTY_PLUGINS_DIR . 'shared.mb_unicode.php');\n                $return = '';\n                foreach (smarty_mb_to_unicode($string, Smarty::$_CHARSET) as $unicode) {\n                    $return .= '&#x' . strtoupper(dechex($unicode)) . ';';\n                }\n                return $return;\n            }\n            // no MBString fallback\n            $_length = strlen($string);\n            for ($x = 0; $x < $_length; $x++) {\n                $return .= '&#x' . bin2hex($string[$x]) . ';';\n            }\n            return $return;\n\n        case 'decentity':\n            $return = '';\n            if (Smarty::$_MBSTRING) {\n                require_once(SMARTY_PLUGINS_DIR . 'shared.mb_unicode.php');\n                $return = '';\n                foreach (smarty_mb_to_unicode($string, Smarty::$_CHARSET) as $unicode) {\n                    $return .= '&#' . $unicode . ';';\n                }\n                return $return;\n            }\n            // no MBString fallback\n            $_length = strlen($string);\n            for ($x = 0; $x < $_length; $x++) {\n                $return .= '&#' . ord($string[$x]) . ';';\n            }\n            return $return;\n\n        case 'javascript':\n            // escape quotes and backslashes, newlines, etc.\n            return strtr($string, array('\\\\' => '\\\\\\\\', \"'\" => \"\\\\'\", '\"' => '\\\\\"', \"\\r\" => '\\\\r', \"\\n\" => '\\\\n', '</' => '<\\/'));\n\n        case 'mail':\n            if (Smarty::$_MBSTRING) {\n                require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php');\n                return smarty_mb_str_replace(array('@', '.'), array(' [AT] ', ' [DOT] '), $string);\n            }\n            // no MBString fallback\n            return str_replace(array('@', '.'), array(' [AT] ', ' [DOT] '), $string);\n\n        case 'nonstd':\n            // escape non-standard chars, such as ms document quotes\n            $return = '';\n            if (Smarty::$_MBSTRING) {\n                require_once(SMARTY_PLUGINS_DIR . 'shared.mb_unicode.php');\n                foreach (smarty_mb_to_unicode($string, Smarty::$_CHARSET) as $unicode) {\n                    if ($unicode >= 126) {\n                        $return .= '&#' . $unicode . ';';\n                    } else {\n                        $return .= chr($unicode);\n                    }\n                }\n                return $return;\n            }\n\n            $_length = strlen($string);\n            for ($_i = 0; $_i < $_length; $_i++) {\n                $_ord = ord(substr($string, $_i, 1));\n                // non-standard char, escape it\n                if ($_ord >= 126) {\n                    $return .= '&#' . $_ord . ';';\n                } else {\n                    $return .= substr($string, $_i, 1);\n                }\n            }\n            return $return;\n\n        default:\n            return $string;\n    }\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifier.regex_replace.php",
    "content": "<?php\n/**\n * Smarty plugin\n *\n * @package Smarty\n * @subpackage PluginsModifier\n */\n\n/**\n * Smarty regex_replace modifier plugin\n *\n * Type:     modifier<br>\n * Name:     regex_replace<br>\n * Purpose:  regular expression search/replace\n *\n * @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php\n *          regex_replace (Smarty online manual)\n * @author Monte Ohrt <monte at ohrt dot com>\n * @param string       $string   input string\n * @param string|array $search   regular expression(s) to search for\n * @param string|array $replace  string(s) that should be replaced\n * @return string\n */\nfunction smarty_modifier_regex_replace($string, $search, $replace)\n{\n    if(is_array($search)) {\n        foreach($search as $idx => $s) {\n            $search[$idx] = _smarty_regex_replace_check($s);\n        }\n    } else {\n        $search = _smarty_regex_replace_check($search);\n    }\n    return preg_replace($search, $replace, $string);\n}\n\n/**\n * @param  string $search string(s) that should be replaced\n * @return string\n * @ignore\n */\nfunction _smarty_regex_replace_check($search)\n{\n    // null-byte injection detection\n    // anything behind the first null-byte is ignored\n    if (($pos = strpos($search,\"\\0\")) !== false) {\n        $search = substr($search,0,$pos);\n    }\n    // remove eval-modifier from $search\n    if (preg_match('!([a-zA-Z\\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) {\n        $search = substr($search, 0, -strlen($match[1])) . preg_replace('![e\\s]+!', '', $match[1]);\n    }\n    return $search;\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifier.replace.php",
    "content": "<?php\n/**\n * Smarty plugin\n * @package Smarty\n * @subpackage PluginsModifier\n */\n\n/**\n * Smarty replace modifier plugin\n * \n * Type:     modifier<br>\n * Name:     replace<br>\n * Purpose:  simple search/replace\n * \n * @link http://smarty.php.net/manual/en/language.modifier.replace.php replace (Smarty online manual)\n * @author Monte Ohrt <monte at ohrt dot com> \n * @author Uwe Tews \n * @param string $string  input string\n * @param string $search  text to search for\n * @param string $replace replacement text\n * @return string \n */\nfunction smarty_modifier_replace($string, $search, $replace)\n{\n    if (Smarty::$_MBSTRING) {\n        require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php');\n        return smarty_mb_str_replace($search, $replace, $string);\n    }\n    \n    return str_replace($search, $replace, $string);\n} \n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifier.spacify.php",
    "content": "<?php\n/**\n * Smarty plugin\n * @package Smarty\n * @subpackage PluginsModifier\n */\n\n/**\n * Smarty spacify modifier plugin\n * \n * Type:     modifier<br>\n * Name:     spacify<br>\n * Purpose:  add spaces between characters in a string\n * \n * @link http://smarty.php.net/manual/en/language.modifier.spacify.php spacify (Smarty online manual)\n * @author Monte Ohrt <monte at ohrt dot com> \n * @param string $string       input string\n * @param string $spacify_char string to insert between characters.\n * @return string\n */\nfunction smarty_modifier_spacify($string, $spacify_char = ' ')\n{\n    // well… what about charsets besides latin and UTF-8?\n    return implode($spacify_char, preg_split('//' . Smarty::$_UTF8_MODIFIER, $string, -1, PREG_SPLIT_NO_EMPTY));\n} \n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifier.truncate.php",
    "content": "<?php\n/**\n * Smarty plugin\n *\n * @package Smarty\n * @subpackage PluginsModifier\n */\n \n/**\n * Smarty truncate modifier plugin\n * \n * Type:     modifier<br>\n * Name:     truncate<br>\n * Purpose:  Truncate a string to a certain length if necessary,\n *               optionally splitting in the middle of a word, and\n *               appending the $etc string or inserting $etc into the middle.\n * \n * @link http://smarty.php.net/manual/en/language.modifier.truncate.php truncate (Smarty online manual)\n * @author Monte Ohrt <monte at ohrt dot com> \n * @param string  $string      input string\n * @param integer $length      length of truncated text\n * @param string  $etc         end string\n * @param boolean $break_words truncate at word boundary\n * @param boolean $middle      truncate in the middle of text\n * @return string truncated string\n */\nfunction smarty_modifier_truncate($string, $length = 80, $etc = '...', $break_words = false, $middle = false) {\n    if ($length == 0)\n        return '';\n\n    if (Smarty::$_MBSTRING) {\n        if (mb_strlen($string, Smarty::$_CHARSET) > $length) {\n            $length -= min($length, mb_strlen($etc, Smarty::$_CHARSET));\n            if (!$break_words && !$middle) {\n                $string = preg_replace('/\\s+?(\\S+)?$/' . Smarty::$_UTF8_MODIFIER, '', mb_substr($string, 0, $length + 1, Smarty::$_CHARSET));\n            } \n            if (!$middle) {\n                return mb_substr($string, 0, $length, Smarty::$_CHARSET) . $etc;\n            }\n            return mb_substr($string, 0, $length / 2, Smarty::$_CHARSET) . $etc . mb_substr($string, - $length / 2, $length, Smarty::$_CHARSET);\n        }\n        return $string;\n    }\n    \n    // no MBString fallback\n    if (isset($string[$length])) {\n        $length -= min($length, strlen($etc));\n        if (!$break_words && !$middle) {\n            $string = preg_replace('/\\s+?(\\S+)?$/', '', substr($string, 0, $length + 1));\n        } \n        if (!$middle) {\n            return substr($string, 0, $length) . $etc;\n        }\n        return substr($string, 0, $length / 2) . $etc . substr($string, - $length / 2);\n    }\n    return $string;\n} \n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifiercompiler.cat.php",
    "content": "<?php\r\n/**\r\n * Smarty plugin\r\n *\r\n * @package Smarty\r\n * @subpackage PluginsModifierCompiler\r\n */\r\n\r\n/**\r\n * Smarty cat modifier plugin\r\n *\r\n * Type:     modifier<br>\r\n * Name:     cat<br>\r\n * Date:     Feb 24, 2003<br>\r\n * Purpose:  catenate a value to a variable<br>\r\n * Input:    string to catenate<br>\r\n * Example:  {$var|cat:\"foo\"}\r\n *\r\n * @link http://smarty.php.net/manual/en/language.modifier.cat.php cat\r\n *          (Smarty online manual)\r\n * @author   Uwe Tews\r\n * @param array $params parameters\r\n * @return string with compiled code\r\n */\r\nfunction smarty_modifiercompiler_cat($params, $compiler)\r\n{\r\n    return '('.implode(').(', $params).')';\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifiercompiler.count_characters.php",
    "content": "<?php\r\n/**\r\n * Smarty plugin\r\n *\r\n * @package Smarty\r\n * @subpackage PluginsModifierCompiler\r\n */\r\n\r\n/**\r\n * Smarty count_characters modifier plugin\r\n *\r\n * Type:     modifier<br>\r\n * Name:     count_characteres<br>\r\n * Purpose:  count the number of characters in a text\r\n *\r\n * @link http://www.smarty.net/manual/en/language.modifier.count.characters.php count_characters (Smarty online manual)\r\n * @author Uwe Tews\r\n * @param array $params parameters\r\n * @return string with compiled code\r\n */\r\nfunction smarty_modifiercompiler_count_characters($params, $compiler)\r\n{\r\n    if (!isset($params[1]) || $params[1] != 'true') {\r\n        return 'preg_match_all(\\'/[^\\s]/' . Smarty::$_UTF8_MODIFIER . '\\',' . $params[0] . ', $tmp)';\r\n    }\r\n    if (Smarty::$_MBSTRING) {\r\n        return 'mb_strlen(' . $params[0] . ', \\'' . addslashes(Smarty::$_CHARSET) . '\\')';\r\n    }\r\n    // no MBString fallback\r\n    return 'strlen(' . $params[0] . ')';\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifiercompiler.count_paragraphs.php",
    "content": "<?php\r\n/**\r\n * Smarty plugin\r\n *\r\n * @package Smarty\r\n * @subpackage PluginsModifierCompiler\r\n */\r\n\r\n/**\r\n * Smarty count_paragraphs modifier plugin\r\n *\r\n * Type:     modifier<br>\r\n * Name:     count_paragraphs<br>\r\n * Purpose:  count the number of paragraphs in a text\r\n *\r\n * @link http://www.smarty.net/manual/en/language.modifier.count.paragraphs.php\r\n *          count_paragraphs (Smarty online manual)\r\n * @author Uwe Tews\r\n * @param array $params parameters\r\n * @return string with compiled code\r\n */\r\nfunction smarty_modifiercompiler_count_paragraphs($params, $compiler)\r\n{\r\n    // count \\r or \\n characters\r\n    return '(preg_match_all(\\'#[\\r\\n]+#\\', ' . $params[0] . ', $tmp)+1)';\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifiercompiler.count_sentences.php",
    "content": "<?php\r\n/**\r\n * Smarty plugin\r\n *\r\n * @package Smarty\r\n * @subpackage PluginsModifierCompiler\r\n */\r\n\r\n/**\r\n * Smarty count_sentences modifier plugin\r\n *\r\n * Type:     modifier<br>\r\n * Name:     count_sentences\r\n * Purpose:  count the number of sentences in a text\r\n *\r\n * @link http://www.smarty.net/manual/en/language.modifier.count.paragraphs.php\r\n *          count_sentences (Smarty online manual)\r\n * @author Uwe Tews\r\n * @param array $params parameters\r\n * @return string with compiled code\r\n */\r\nfunction smarty_modifiercompiler_count_sentences($params, $compiler)\r\n{\r\n    // find periods, question marks, exclamation marks with a word before but not after.\r\n    return 'preg_match_all(\"#\\w[\\.\\?\\!](\\W|$)#S' . Smarty::$_UTF8_MODIFIER . '\", ' . $params[0] . ', $tmp)';\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifiercompiler.count_words.php",
    "content": "<?php\r\n/**\r\n * Smarty plugin\r\n *\r\n * @package Smarty\r\n * @subpackage PluginsModifierCompiler\r\n */\r\n\r\n/**\r\n * Smarty count_words modifier plugin\r\n *\r\n * Type:     modifier<br>\r\n * Name:     count_words<br>\r\n * Purpose:  count the number of words in a text\r\n *\r\n * @link http://www.smarty.net/manual/en/language.modifier.count.words.php count_words (Smarty online manual)\r\n * @author Uwe Tews\r\n * @param array $params parameters\r\n * @return string with compiled code\r\n*/\r\nfunction smarty_modifiercompiler_count_words($params, $compiler)\r\n{\r\n    if (Smarty::$_MBSTRING) {\r\n        // return 'preg_match_all(\\'#[\\w\\pL]+#' . Smarty::$_UTF8_MODIFIER . '\\', ' . $params[0] . ', $tmp)';\r\n        // expression taken from http://de.php.net/manual/en/function.str-word-count.php#85592\r\n        return 'preg_match_all(\\'/\\p{L}[\\p{L}\\p{Mn}\\p{Pd}\\\\\\'\\x{2019}]*/' . Smarty::$_UTF8_MODIFIER . '\\', ' . $params[0] . ', $tmp)';\r\n    }\r\n    // no MBString fallback\r\n    return 'str_word_count(' . $params[0] . ')';\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifiercompiler.default.php",
    "content": "<?php\r\n/**\r\n * Smarty plugin\r\n *\r\n * @package Smarty\r\n * @subpackage PluginsModifierCompiler\r\n */\r\n\r\n/**\r\n * Smarty default modifier plugin\r\n *\r\n * Type:     modifier<br>\r\n * Name:     default<br>\r\n * Purpose:  designate default value for empty variables\r\n *\r\n * @link http://www.smarty.net/manual/en/language.modifier.default.php default (Smarty online manual)\r\n * @author Uwe Tews\r\n * @param array $params parameters\r\n * @return string with compiled code\r\n */\r\nfunction smarty_modifiercompiler_default ($params, $compiler)\r\n{\r\n    $output = $params[0];\r\n    if (!isset($params[1])) {\r\n        $params[1] = \"''\";\r\n    }\r\n    \r\n    array_shift($params);\r\n    foreach ($params as $param) {\r\n        $output = '(($tmp = @' . $output . ')===null||$tmp===\\'\\' ? ' . $param . ' : $tmp)';\r\n    }\r\n    return $output;\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifiercompiler.escape.php",
    "content": "<?php\r\n/**\r\n * Smarty plugin\r\n *\r\n * @package Smarty\r\n * @subpackage PluginsModifierCompiler\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nrequire_once( SMARTY_PLUGINS_DIR .'shared.literal_compiler_param.php' );\r\n\r\n/**\r\n * Smarty escape modifier plugin\r\n *\r\n * Type:     modifier<br>\r\n * Name:     escape<br>\r\n * Purpose:  escape string for output\r\n *\r\n * @link http://www.smarty.net/docsv2/en/language.modifier.escape count_characters (Smarty online manual)\r\n * @author Rodney Rehm\r\n * @param array $params parameters\r\n * @return string with compiled code\r\n */\r\nfunction smarty_modifiercompiler_escape($params, $compiler)\r\n{\r\n    static $_double_encode = null;\r\n    if ($_double_encode === null) {\r\n        $_double_encode = version_compare(PHP_VERSION, '5.2.3', '>=');\r\n    }\r\n    \r\n    try {\r\n        $esc_type = smarty_literal_compiler_param($params, 1, 'html');\r\n        $char_set = smarty_literal_compiler_param($params, 2, Smarty::$_CHARSET);\r\n        $double_encode = smarty_literal_compiler_param($params, 3, true);\r\n\r\n        if (!$char_set) {\r\n            $char_set = Smarty::$_CHARSET;\r\n        }\r\n\r\n        switch ($esc_type) {\r\n            case 'html':\r\n                if ($_double_encode) {\r\n                    return 'htmlspecialchars('\r\n                        . $params[0] .', ENT_QUOTES, '\r\n                        . var_export($char_set, true) . ', '\r\n                        . var_export($double_encode, true) . ')';\r\n                } else if ($double_encode) {\r\n                    return 'htmlspecialchars('\r\n                        . $params[0] .', ENT_QUOTES, '\r\n                        . var_export($char_set, true) . ')';\r\n                } else {\r\n                    // fall back to modifier.escape.php\r\n                }\r\n\r\n            case 'htmlall':\r\n                if (Smarty::$_MBSTRING) {\r\n                    if ($_double_encode) {\r\n                        // php >=5.2.3 - go native\r\n                        return 'mb_convert_encoding(htmlspecialchars('\r\n                            . $params[0] .', ENT_QUOTES, '\r\n                            . var_export($char_set, true) . ', '\r\n                            . var_export($double_encode, true)\r\n                            . '), \"HTML-ENTITIES\", '\r\n                            . var_export($char_set, true) . ')';\r\n                    } else if ($double_encode) {\r\n                        // php <5.2.3 - only handle double encoding\r\n                        return 'mb_convert_encoding(htmlspecialchars('\r\n                            . $params[0] .', ENT_QUOTES, '\r\n                            . var_export($char_set, true)\r\n                            . '), \"HTML-ENTITIES\", '\r\n                            . var_export($char_set, true) . ')';\r\n                    } else {\r\n                        // fall back to modifier.escape.php\r\n                    }\r\n                }\r\n\r\n                // no MBString fallback\r\n                if ($_double_encode) {\r\n                    // php >=5.2.3 - go native\r\n                    return 'htmlentities('\r\n                        . $params[0] .', ENT_QUOTES, '\r\n                        . var_export($char_set, true) . ', '\r\n                        . var_export($double_encode, true) . ')';\r\n                } else if ($double_encode) {\r\n                    // php <5.2.3 - only handle double encoding\r\n                    return 'htmlentities('\r\n                        . $params[0] .', ENT_QUOTES, '\r\n                        . var_export($char_set, true) . ')';\r\n                } else {\r\n                    // fall back to modifier.escape.php\r\n                }\r\n\r\n            case 'url':\r\n                return 'rawurlencode(' . $params[0] . ')';\r\n\r\n            case 'urlpathinfo':\r\n                return 'str_replace(\"%2F\", \"/\", rawurlencode(' . $params[0] . '))';\r\n\r\n            case 'quotes':\r\n                // escape unescaped single quotes\r\n                return 'preg_replace(\"%(?<!\\\\\\\\\\\\\\\\)\\'%\", \"\\\\\\'\",' . $params[0] . ')';\r\n\r\n            case 'javascript':\r\n                // escape quotes and backslashes, newlines, etc.\r\n                return 'strtr(' . $params[0] . ', array(\"\\\\\\\\\" => \"\\\\\\\\\\\\\\\\\", \"\\'\" => \"\\\\\\\\\\'\", \"\\\"\" => \"\\\\\\\\\\\"\", \"\\\\r\" => \"\\\\\\\\r\", \"\\\\n\" => \"\\\\\\n\", \"</\" => \"<\\/\" ))';\r\n\r\n        }\r\n    } catch(SmartyException $e) {\r\n        // pass through to regular plugin fallback\r\n    }\r\n\r\n    // could not optimize |escape call, so fallback to regular plugin\r\n    if ($compiler->tag_nocache | $compiler->nocache) {\r\n        $compiler->template->required_plugins['nocache']['escape']['modifier']['file'] = SMARTY_PLUGINS_DIR .'modifier.escape.php';\r\n        $compiler->template->required_plugins['nocache']['escape']['modifier']['function'] = 'smarty_modifier_escape';\r\n    } else {\r\n        $compiler->template->required_plugins['compiled']['escape']['modifier']['file'] = SMARTY_PLUGINS_DIR .'modifier.escape.php';\r\n        $compiler->template->required_plugins['compiled']['escape']['modifier']['function'] = 'smarty_modifier_escape';\r\n    }\r\n    return 'smarty_modifier_escape(' . join( ', ', $params ) . ')';\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifiercompiler.from_charset.php",
    "content": "<?php\r\n/**\r\n * Smarty plugin\r\n *\r\n * @package Smarty\r\n * @subpackage PluginsModifierCompiler\r\n */\r\n\r\n/**\r\n * Smarty from_charset modifier plugin\r\n *\r\n * Type:     modifier<br>\r\n * Name:     from_charset<br>\r\n * Purpose:  convert character encoding from $charset to internal encoding\r\n *\r\n * @author Rodney Rehm\r\n * @param array $params parameters\r\n * @return string with compiled code\r\n */\r\nfunction smarty_modifiercompiler_from_charset($params, $compiler)\r\n{\r\n    if (!Smarty::$_MBSTRING) {\r\n        // FIXME: (rodneyrehm) shouldn't this throw an error?\r\n        return $params[0];\r\n    }\r\n\r\n    if (!isset($params[1])) {\r\n        $params[1] = '\"ISO-8859-1\"';\r\n    }\r\n\r\n    return 'mb_convert_encoding(' . $params[0] . ', \"' . addslashes(Smarty::$_CHARSET) . '\", ' . $params[1] . ')';\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifiercompiler.indent.php",
    "content": "<?php\r\n/**\r\n * Smarty plugin\r\n * @package Smarty\r\n * @subpackage PluginsModifierCompiler\r\n */\r\n\r\n/**\r\n * Smarty indent modifier plugin\r\n *\r\n * Type:     modifier<br>\r\n * Name:     indent<br>\r\n * Purpose:  indent lines of text\r\n *\r\n * @link http://www.smarty.net/manual/en/language.modifier.indent.php indent (Smarty online manual)\r\n * @author Uwe Tews\r\n * @param array $params parameters\r\n * @return string with compiled code\r\n */\r\n\r\nfunction smarty_modifiercompiler_indent($params, $compiler)\r\n{\r\n    if (!isset($params[1])) {\r\n        $params[1] = 4;\r\n    }\r\n    if (!isset($params[2])) {\r\n        $params[2] = \"' '\";\r\n    }\r\n    return 'preg_replace(\\'!^!m\\',str_repeat(' . $params[2] . ',' . $params[1] . '),' . $params[0] . ')';\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifiercompiler.lower.php",
    "content": "<?php\r\n/**\r\n * Smarty plugin\r\n * @package Smarty\r\n * @subpackage PluginsModifierCompiler\r\n */\r\n\r\n/**\r\n * Smarty lower modifier plugin\r\n *\r\n * Type:     modifier<br>\r\n * Name:     lower<br>\r\n * Purpose:  convert string to lowercase\r\n *\r\n * @link http://www.smarty.net/manual/en/language.modifier.lower.php lower (Smarty online manual)\r\n * @author Monte Ohrt <monte at ohrt dot com>\r\n * @author Uwe Tews\r\n * @param array $params parameters\r\n * @return string with compiled code\r\n */\r\n\r\nfunction smarty_modifiercompiler_lower($params, $compiler)\r\n{\r\n    if (Smarty::$_MBSTRING) {\r\n        return 'mb_strtolower(' . $params[0] . ', \\'' . addslashes(Smarty::$_CHARSET) . '\\')' ;\r\n    }\r\n    // no MBString fallback\r\n    return 'strtolower(' . $params[0] . ')';\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifiercompiler.noprint.php",
    "content": "<?php\r\n/**\r\n * Smarty plugin\r\n *\r\n * @package Smarty\r\n * @subpackage PluginsModifierCompiler\r\n */\r\n\r\n/**\r\n * Smarty noprint modifier plugin\r\n *\r\n * Type:     modifier<br>\r\n * Name:     noprint<br>\r\n * Purpose:  return an empty string\r\n *\r\n * @author   Uwe Tews\r\n * @param array $params parameters\r\n * @return string with compiled code\r\n */\r\nfunction smarty_modifiercompiler_noprint($params, $compiler)\r\n{\r\n    return \"''\";\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifiercompiler.string_format.php",
    "content": "<?php\r\n/**\r\n * Smarty plugin\r\n *\r\n * @package Smarty\r\n * @subpackage PluginsModifierCompiler\r\n */\r\n\r\n/**\r\n * Smarty string_format modifier plugin\r\n *\r\n * Type:     modifier<br>\r\n * Name:     string_format<br>\r\n * Purpose:  format strings via sprintf\r\n *\r\n * @link http://www.smarty.net/manual/en/language.modifier.string.format.php string_format (Smarty online manual)\r\n * @author Uwe Tews\r\n * @param array $params parameters\r\n * @return string with compiled code\r\n */\r\nfunction smarty_modifiercompiler_string_format($params, $compiler)\r\n{\r\n    return 'sprintf(' . $params[1] . ',' . $params[0] . ')';\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifiercompiler.strip.php",
    "content": "<?php\r\n/**\r\n * Smarty plugin\r\n *\r\n * @package Smarty\r\n * @subpackage PluginsModifierCompiler\r\n */\r\n\r\n/**\r\n * Smarty strip modifier plugin\r\n *\r\n * Type:     modifier<br>\r\n * Name:     strip<br>\r\n * Purpose:  Replace all repeated spaces, newlines, tabs\r\n *              with a single space or supplied replacement string.<br>\r\n * Example:  {$var|strip} {$var|strip:\"&nbsp;\"}<br>\r\n * Date:     September 25th, 2002\r\n *\r\n * @link http://www.smarty.net/manual/en/language.modifier.strip.php strip (Smarty online manual)\r\n * @author Uwe Tews\r\n * @param array $params parameters\r\n * @return string with compiled code\r\n */\r\n\r\nfunction smarty_modifiercompiler_strip($params, $compiler)\r\n{\r\n    if (!isset($params[1])) {\r\n        $params[1] = \"' '\";\r\n    }\r\n    return \"preg_replace('!\\s+!\" . Smarty::$_UTF8_MODIFIER . \"', {$params[1]},{$params[0]})\";\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifiercompiler.strip_tags.php",
    "content": "<?php\r\n/**\r\n * Smarty plugin\r\n *\r\n * @package Smarty\r\n * @subpackage PluginsModifierCompiler\r\n */\r\n\r\n/**\r\n * Smarty strip_tags modifier plugin\r\n *\r\n * Type:     modifier<br>\r\n * Name:     strip_tags<br>\r\n * Purpose:  strip html tags from text\r\n *\r\n * @link http://www.smarty.net/manual/en/language.modifier.strip.tags.php strip_tags (Smarty online manual)\r\n * @author Uwe Tews\r\n * @param array $params parameters\r\n * @return string with compiled code\r\n */\r\nfunction smarty_modifiercompiler_strip_tags($params, $compiler)\r\n{\r\n   if (!isset($params[1])) {\r\n        $params[1] = true;\r\n    }\r\n    if ($params[1] === true) {\r\n        return \"preg_replace('!<[^>]*?>!', ' ', {$params[0]})\";\r\n    } else {\r\n        return 'strip_tags(' . $params[0] . ')';\r\n    }\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifiercompiler.to_charset.php",
    "content": "<?php\r\n/**\r\n * Smarty plugin\r\n *\r\n * @package Smarty\r\n * @subpackage PluginsModifierCompiler\r\n */\r\n\r\n/**\r\n * Smarty to_charset modifier plugin\r\n *\r\n * Type:     modifier<br>\r\n * Name:     to_charset<br>\r\n * Purpose:  convert character encoding from internal encoding to $charset\r\n *\r\n * @author Rodney Rehm\r\n * @param array $params parameters\r\n * @return string with compiled code\r\n */\r\nfunction smarty_modifiercompiler_to_charset($params, $compiler)\r\n{\r\n    if (!Smarty::$_MBSTRING) {\r\n        // FIXME: (rodneyrehm) shouldn't this throw an error?\r\n        return $params[0];\r\n    }\r\n\r\n    if (!isset($params[1])) {\r\n        $params[1] = '\"ISO-8859-1\"';\r\n    }\r\n\r\n    return 'mb_convert_encoding(' . $params[0] . ', ' . $params[1] . ', \"' . addslashes(Smarty::$_CHARSET) . '\")';\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifiercompiler.unescape.php",
    "content": "<?php\r\n/**\r\n * Smarty plugin\r\n *\r\n * @package Smarty\r\n * @subpackage PluginsModifierCompiler\r\n */\r\n\r\n/**\r\n * Smarty unescape modifier plugin\r\n *\r\n * Type:     modifier<br>\r\n * Name:     unescape<br>\r\n * Purpose:  unescape html entities\r\n *\r\n * @author Rodney Rehm\r\n * @param array $params parameters\r\n * @return string with compiled code\r\n */\r\nfunction smarty_modifiercompiler_unescape($params, $compiler)\r\n{\r\n    if (!isset($params[1])) {\r\n        $params[1] = 'html';\r\n    }\r\n    if (!isset($params[2])) {\r\n        $params[2] = '\\'' . addslashes(Smarty::$_CHARSET) . '\\'';\r\n    } else {\r\n        $params[2] = \"'\" . $params[2] . \"'\";\r\n    }\r\n\r\n    switch (trim($params[1], '\"\\'')) {\r\n        case 'entity':\r\n        case 'htmlall':\r\n            if (Smarty::$_MBSTRING) {\r\n                return 'mb_convert_encoding(' . $params[0] . ', ' . $params[2] . ', \\'HTML-ENTITIES\\')';\r\n            }\r\n\r\n            return 'html_entity_decode(' . $params[0] . ', ENT_NOQUOTES, ' . $params[2] . ')';\r\n\r\n        case 'html':\r\n            return 'htmlspecialchars_decode(' . $params[0] . ', ENT_QUOTES)';\r\n\r\n        case 'url':\r\n            return 'rawurldecode(' . $params[0] . ')';\r\n\r\n        default:\r\n            return $params[0];\r\n    }\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifiercompiler.upper.php",
    "content": "<?php\r\n/**\r\n * Smarty plugin\r\n *\r\n * @package Smarty\r\n * @subpackage PluginsModifierCompiler\r\n */\r\n\r\n/**\r\n * Smarty upper modifier plugin\r\n * \r\n * Type:     modifier<br>\r\n * Name:     lower<br>\r\n * Purpose:  convert string to uppercase\r\n * \r\n * @link http://smarty.php.net/manual/en/language.modifier.upper.php lower (Smarty online manual)\r\n * @author Uwe Tews \r\n * @param array $params parameters\r\n * @return string with compiled code\r\n */\r\nfunction smarty_modifiercompiler_upper($params, $compiler)\r\n{\r\n    if (Smarty::$_MBSTRING) {\r\n        return 'mb_strtoupper(' . $params[0] . ', \\'' . addslashes(Smarty::$_CHARSET) . '\\')' ;\r\n    }\r\n    // no MBString fallback\r\n    return 'strtoupper(' . $params[0] . ')';\r\n} \r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/modifiercompiler.wordwrap.php",
    "content": "<?php\r\n/**\r\n * Smarty plugin\r\n *\r\n * @package Smarty\r\n * @subpackage PluginsModifierCompiler\r\n */\r\n\r\n/**\r\n * Smarty wordwrap modifier plugin\r\n * \r\n * Type:     modifier<br>\r\n * Name:     wordwrap<br>\r\n * Purpose:  wrap a string of text at a given length\r\n * \r\n * @link http://smarty.php.net/manual/en/language.modifier.wordwrap.php wordwrap (Smarty online manual)\r\n * @author Uwe Tews \r\n * @param array $params parameters\r\n * @return string with compiled code\r\n */\r\nfunction smarty_modifiercompiler_wordwrap($params, $compiler)\r\n{\r\n    if (!isset($params[1])) {\r\n        $params[1] = 80;\r\n    } \r\n    if (!isset($params[2])) {\r\n        $params[2] = '\"\\n\"';\r\n    } \r\n    if (!isset($params[3])) {\r\n        $params[3] = 'false';\r\n    } \r\n    $function = 'wordwrap';\r\n    if (Smarty::$_MBSTRING) {\r\n        if ($compiler->tag_nocache | $compiler->nocache) {\r\n            $compiler->template->required_plugins['nocache']['wordwrap']['modifier']['file'] = SMARTY_PLUGINS_DIR .'shared.mb_wordwrap.php';\r\n            $compiler->template->required_plugins['nocache']['wordwrap']['modifier']['function'] = 'smarty_mb_wordwrap';\r\n        } else {\r\n            $compiler->template->required_plugins['compiled']['wordwrap']['modifier']['file'] = SMARTY_PLUGINS_DIR .'shared.mb_wordwrap.php';\r\n            $compiler->template->required_plugins['compiled']['wordwrap']['modifier']['function'] = 'smarty_mb_wordwrap';\r\n        }\r\n        $function = 'smarty_mb_wordwrap';\r\n    }\r\n    return $function . '(' . $params[0] . ',' . $params[1] . ',' . $params[2] . ',' . $params[3] . ')';\r\n} \r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/outputfilter.trimwhitespace.php",
    "content": "<?php\n/**\n * Smarty plugin\n *\n * @package Smarty\n * @subpackage PluginsFilter\n */\n\n/**\n * Smarty trimwhitespace outputfilter plugin\n *\n * Trim unnecessary whitespace from HTML markup.\n *\n * @author   Rodney Rehm\n * @param string                   $source input string\n * @param Smarty_Internal_Template $smarty Smarty object\n * @return string filtered output\n * @todo substr_replace() is not overloaded by mbstring.func_overload - so this function might fail!\n */\nfunction smarty_outputfilter_trimwhitespace($source, Smarty_Internal_Template $smarty)\n{\n    $store = array();\n    $_store = 0;\n    $_offset = 0;\n\n    // Unify Line-Breaks to \\n\n    $source = preg_replace(\"/\\015\\012|\\015|\\012/\", \"\\n\", $source);\n\n    // capture Internet Explorer Conditional Comments\n    if (preg_match_all('#<!--\\[[^\\]]+\\]>.*?<!\\[[^\\]]+\\]-->#is', $source, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) {\n        foreach ($matches as $match) {\n            $store[] = $match[0][0];\n            $_length = strlen($match[0][0]);\n            $replace = '@!@SMARTY:' . $_store . ':SMARTY@!@';\n            $source = substr_replace($source, $replace, $match[0][1] - $_offset, $_length);\n\n            $_offset += $_length - strlen($replace);\n            $_store++;\n        }\n    }\n\n    // Strip all HTML-Comments\n    // yes, even the ones in <script> - see http://stackoverflow.com/a/808850/515124\n    $source = preg_replace( '#<!--.*?-->#ms', '', $source );\n\n    // capture html elements not to be messed with\n    $_offset = 0;\n    if (preg_match_all('#<(script|pre|textarea)[^>]*>.*?</\\\\1>#is', $source, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) {\n        foreach ($matches as $match) {\n            $store[] = $match[0][0];\n            $_length = strlen($match[0][0]);\n            $replace = '@!@SMARTY:' . $_store . ':SMARTY@!@';\n            $source = substr_replace($source, $replace, $match[0][1] - $_offset, $_length);\n\n            $_offset += $_length - strlen($replace);\n            $_store++;\n        }\n    }\n\n    $expressions = array(\n        // replace multiple spaces between tags by a single space\n        // can't remove them entirely, becaue that might break poorly implemented CSS display:inline-block elements\n        '#(:SMARTY@!@|>)\\s+(?=@!@SMARTY:|<)#s' => '\\1 \\2',\n        // remove spaces between attributes (but not in attribute values!)\n        '#(([a-z0-9]\\s*=\\s*([\"\\'])[^\\3]*?\\3)|<[a-z0-9_]+)\\s+([a-z/>])#is' => '\\1 \\4',\n        // note: for some very weird reason trim() seems to remove spaces inside attributes.\n        // maybe a \\0 byte or something is interfering?\n        '#^\\s+<#Ss' => '<',\n        '#>\\s+$#Ss' => '>',\n    );\n\n    $source = preg_replace( array_keys($expressions), array_values($expressions), $source );\n    // note: for some very weird reason trim() seems to remove spaces inside attributes.\n    // maybe a \\0 byte or something is interfering?\n    // $source = trim( $source );\n\n    // capture html elements not to be messed with\n    $_offset = 0;\n    if (preg_match_all('#@!@SMARTY:([0-9]+):SMARTY@!@#is', $source, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) {\n        foreach ($matches as $match) {\n            $store[] = $match[0][0];\n            $_length = strlen($match[0][0]);\n            $replace = array_shift($store);\n            $source = substr_replace($source, $replace, $match[0][1] + $_offset, $_length);\n\n            $_offset += strlen($replace) - $_length;\n            $_store++;\n        }\n    }\n\n    return $source;\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/shared.escape_special_chars.php",
    "content": "<?php\n/**\n * Smarty shared plugin\n *\n * @package Smarty\n * @subpackage PluginsShared\n */\n\nif (version_compare(PHP_VERSION, '5.2.3', '>=')) {\n    /**\n     * escape_special_chars common function\n     *\n     * Function: smarty_function_escape_special_chars<br>\n     * Purpose:  used by other smarty functions to escape\n     *           special chars except for already escaped ones\n     *\n     * @author   Monte Ohrt <monte at ohrt dot com>\n     * @param string $string text that should by escaped\n     * @return string\n     */\n    function smarty_function_escape_special_chars($string)\n    {\n        if (!is_array($string)) {\n            $string = htmlspecialchars($string, ENT_COMPAT, Smarty::$_CHARSET, false);\n        }\n        return $string;\n    }  \n} else {         \n    /**\n     * escape_special_chars common function\n     *\n     * Function: smarty_function_escape_special_chars<br>\n     * Purpose:  used by other smarty functions to escape\n     *           special chars except for already escaped ones\n     *\n     * @author   Monte Ohrt <monte at ohrt dot com>\n     * @param string $string text that should by escaped\n     * @return string\n     */\n    function smarty_function_escape_special_chars($string)\n    {\n        if (!is_array($string)) {\n            $string = preg_replace('!&(#?\\w+);!', '%%%SMARTY_START%%%\\\\1%%%SMARTY_END%%%', $string);\n            $string = htmlspecialchars($string);\n            $string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string); \n        }\n        return $string;\n    }                                                                                                             \n} \n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/shared.literal_compiler_param.php",
    "content": "<?php\n/**\n * Smarty plugin\n *\n * @package Smarty\n * @subpackage PluginsShared\n */\n\n/**\n * evaluate compiler parameter\n *\n * @param array   $params  parameter array as given to the compiler function\n * @param integer $index   array index of the parameter to convert\n * @param mixed   $default value to be returned if the parameter is not present\n * @return mixed evaluated value of parameter or $default\n * @throws SmartyException if parameter is not a literal (but an expression, variable, …)\n * @author Rodney Rehm\n */\nfunction smarty_literal_compiler_param($params, $index, $default=null)\n{\n    // not set, go default\n    if (!isset($params[$index])) {\n        return $default;\n    }\n    // test if param is a literal\n    if (!preg_match('/^([\\'\"]?)[a-zA-Z0-9]+(\\\\1)$/', $params[$index])) {\n        throw new SmartyException('$param[' . $index . '] is not a literal and is thus not evaluatable at compile time');\n    }\n\n    $t = null;\n    eval(\"\\$t = \" . $params[$index] . \";\");\n    return $t;\n}\n"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/shared.make_timestamp.php",
    "content": "<?php\n/**\n * Smarty shared plugin\n *\n * @package Smarty\n * @subpackage PluginsShared\n */\n\n/**\n * Function: smarty_make_timestamp<br>\n * Purpose:  used by other smarty functions to make a timestamp from a string.\n *\n * @author   Monte Ohrt <monte at ohrt dot com>\n * @param DateTime|int|string $string  date object, timestamp or string that can be converted using strtotime()\n * @return int\n */\nfunction smarty_make_timestamp($string)\n{\n    if (empty($string)) {\n        // use \"now\":\n        return time();\n    } elseif ($string instanceof DateTime) {\n        return $string->getTimestamp();\n    } elseif (strlen($string) == 14 && ctype_digit($string)) {\n        // it is mysql timestamp format of YYYYMMDDHHMMSS?\n        return mktime(substr($string, 8, 2),substr($string, 10, 2),substr($string, 12, 2),\n                       substr($string, 4, 2),substr($string, 6, 2),substr($string, 0, 4));\n    } elseif (is_numeric($string)) {\n        // it is a numeric string, we handle it as timestamp\n        return (int) $string;\n    } else {\n        // strtotime should handle it\n        $time = strtotime($string);\n        if ($time == -1 || $time === false) {\n            // strtotime() was not able to parse $string, use \"now\":\n            return time();\n        }\n        return $time;\n    }\n}\n\n?>\n"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/shared.mb_str_replace.php",
    "content": "<?php\n/**\n * Smarty shared plugin\n *\n * @package Smarty\n * @subpackage PluginsShared\n */\nif (!function_exists('smarty_mb_str_replace')) {\n\n    /**\n     * Multibyte string replace\n     *\n     * @param string $search  the string to be searched\n     * @param string $replace the replacement string\n     * @param string $subject the source string\n     * @param int    &$count  number of matches found\n     * @return string replaced string\n     * @author Rodney Rehm\n     */\n    function smarty_mb_str_replace($search, $replace, $subject, &$count=0)\n    {\n        if (!is_array($search) && is_array($replace)) {\n            return false;\n        }\n        if (is_array($subject)) {\n            // call mb_replace for each single string in $subject\n            foreach ($subject as &$string) {\n                $string = &smarty_mb_str_replace($search, $replace, $string, $c);\n                $count += $c;\n            }\n        } elseif (is_array($search)) {\n            if (!is_array($replace)) {\n                foreach ($search as &$string) {\n                    $subject = smarty_mb_str_replace($string, $replace, $subject, $c);\n                    $count += $c;\n                }\n            } else {\n                $n = max(count($search), count($replace));\n                while ($n--) {\n                    $subject = smarty_mb_str_replace(current($search), current($replace), $subject, $c);\n                    $count += $c;\n                    next($search);\n                    next($replace);\n                }\n            }\n        } else {\n            $parts = mb_split(preg_quote($search), $subject);\n            $count = count($parts) - 1;\n            $subject = implode($replace, $parts);\n        }\n        return $subject;\n    }\n\n}\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/shared.mb_unicode.php",
    "content": "<?php\n/**\n * Smarty shared plugin\n *\n * @package Smarty\n * @subpackage PluginsShared\n */\n\n/**\n * convert characters to their decimal unicode equivalents\n *\n * @link http://www.ibm.com/developerworks/library/os-php-unicode/index.html#listing3 for inspiration\n * @param string $string   characters to calculate unicode of\n * @param string $encoding encoding of $string, if null mb_internal_encoding() is used\n * @return array sequence of unicodes\n * @author Rodney Rehm\n */\nfunction smarty_mb_to_unicode($string, $encoding=null) {\n    if ($encoding) {\n        $expanded = mb_convert_encoding($string, \"UTF-32BE\", $encoding);\n    } else {\n        $expanded = mb_convert_encoding($string, \"UTF-32BE\");\n    }\n    return unpack(\"N*\", $expanded);\n}\n\n/**\n * convert unicodes to the character of given encoding\n *\n * @link http://www.ibm.com/developerworks/library/os-php-unicode/index.html#listing3 for inspiration\n * @param integer|array $unicode  single unicode or list of unicodes to convert\n * @param string        $encoding encoding of returned string, if null mb_internal_encoding() is used\n * @return string unicode as character sequence in given $encoding\n * @author Rodney Rehm\n */\nfunction smarty_mb_from_unicode($unicode, $encoding=null) {\n    $t = '';\n    if (!$encoding) {\n        $encoding = mb_internal_encoding();\n    }\n    foreach((array) $unicode as $utf32be) {\n        $character = pack(\"N*\", $utf32be);\n        $t .= mb_convert_encoding($character, $encoding, \"UTF-32BE\");\n    }\n    return $t;\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/shared.mb_wordwrap.php",
    "content": "<?php\n/**\n * Smarty shared plugin\n *\n * @package Smarty\n * @subpackage PluginsShared\n */\n\nif(!function_exists('smarty_mb_wordwrap')) {\n\n    /**\n     * Wrap a string to a given number of characters\n     *\n     * @link http://php.net/manual/en/function.wordwrap.php for similarity\n     * @param string  $str   the string to wrap\n     * @param int     $width the width of the output\n     * @param string  $break the character used to break the line\n     * @param boolean $cut   ignored parameter, just for the sake of\n     * @return string wrapped string\n     * @author Rodney Rehm\n     */\n    function smarty_mb_wordwrap($str, $width=75, $break=\"\\n\", $cut=false)\n    {\n        // break words into tokens using white space as a delimiter\n        $tokens = preg_split('!(\\s)!S' . Smarty::$_UTF8_MODIFIER, $str, -1, PREG_SPLIT_NO_EMPTY + PREG_SPLIT_DELIM_CAPTURE);\n        $length = 0;\n        $t = '';\n        $_previous = false;\n\n        foreach ($tokens as $_token) {\n            $token_length = mb_strlen($_token, Smarty::$_CHARSET);\n            $_tokens = array($_token);\n            if ($token_length > $width) {\n                // remove last space\n                $t = mb_substr($t, 0, -1, Smarty::$_CHARSET);\n                $_previous = false;\n                $length = 0;\n\n                if ($cut) {\n                    $_tokens = preg_split('!(.{' . $width . '})!S' . Smarty::$_UTF8_MODIFIER, $_token, -1, PREG_SPLIT_NO_EMPTY + PREG_SPLIT_DELIM_CAPTURE);\n                    // broken words go on a new line\n                    $t .= $break;\n                }\n            }\n\n            foreach ($_tokens as $token) {\n                $_space = !!preg_match('!^\\s$!S' . Smarty::$_UTF8_MODIFIER, $token);\n                $token_length = mb_strlen($token, Smarty::$_CHARSET);\n                $length += $token_length;\n\n                if ($length > $width) {\n                    // remove space before inserted break\n                    if ($_previous && $token_length < $width) {\n                        $t = mb_substr($t, 0, -1, Smarty::$_CHARSET);\n                    }\n\n                    // add the break before the token\n                    $t .= $break;\n                    $length = $token_length;\n\n                    // skip space after inserting a break\n                    if ($_space) {\n                        $length = 0;\n                        continue;\n                    }\n                } else if ($token == \"\\n\") {\n                    // hard break must reset counters\n                    $_previous = 0;\n                    $length = 0;\n                } else {\n                    // remember if we had a space or not\n                    $_previous = $_space;\n                }\n                // add the token\n                $t .= $token;\n            }\n        }\n\n        return $t;\n    }\n\n}\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/plugins/variablefilter.htmlspecialchars.php",
    "content": "<?php\n/**\n * Smarty plugin\n *\n * @package Smarty\n * @subpackage PluginsFilter\n */\n\n/**\n * Smarty htmlspecialchars variablefilter plugin\n *\n * @param string                   $source input string\n * @param Smarty_Internal_Template $smarty Smarty object\n * @return string filtered output\n */\nfunction smarty_variablefilter_htmlspecialchars($source, $smarty)\n{\n    return htmlspecialchars($source, ENT_QUOTES, Smarty::$_CHARSET);\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_cacheresource.php",
    "content": "<?php\n/**\n* Smarty Internal Plugin\n*\n* @package Smarty\n* @subpackage Cacher\n*/\n\n/**\n* Cache Handler API\n*\n* @package Smarty\n* @subpackage Cacher\n* @author Rodney Rehm\n*/\nabstract class Smarty_CacheResource {\n    /**\n    * cache for Smarty_CacheResource instances\n    * @var array\n    */\n    public static $resources = array();\n\n    /**\n    * resource types provided by the core\n    * @var array\n    */\n    protected static $sysplugins = array(\n        'file' => true,\n    );\n\n    /**\n    * populate Cached Object with meta data from Resource\n    *\n    * @param Smarty_Template_Cached $cached cached object\n    * @param Smarty_Internal_Template $_template template object\n    * @return void\n    */\n    public abstract function populate(Smarty_Template_Cached $cached, Smarty_Internal_Template $_template);\n\n    /**\n    * populate Cached Object with timestamp and exists from Resource\n    *\n    * @param Smarty_Template_Cached $source cached object\n    * @return void\n    */\n    public abstract function populateTimestamp(Smarty_Template_Cached $cached);\n\n    /**\n    * Read the cached template and process header\n    *\n    * @param Smarty_Internal_Template $_template template object\n    * @param Smarty_Template_Cached $cached cached object\n    * @return booelan true or false if the cached content does not exist\n    */\n    public abstract function process(Smarty_Internal_Template $_template, Smarty_Template_Cached $cached=null);\n\n    /**\n    * Write the rendered template output to cache\n    *\n    * @param Smarty_Internal_Template $_template template object\n    * @param string $content content to cache\n    * @return boolean success\n    */\n    public abstract function writeCachedContent(Smarty_Internal_Template $_template, $content);\n\n    /**\n    * Return cached content\n    *\n    * @param Smarty_Internal_Template $_template template object\n    * @param string $content content of cache\n    */\n    public function getCachedContent(Smarty_Internal_Template $_template)\n    {\n        if ($_template->cached->handler->process($_template)) {\n            ob_start();\n            $_template->properties['unifunc']($_template);\n            return ob_get_clean();\n        }\n        return null;\n    }\n\n    /**\n    * Empty cache\n    *\n    * @param Smarty $smarty Smarty object\n    * @param integer $exp_time expiration time (number of seconds, not timestamp)\n    * @return integer number of cache files deleted\n    */\n    public abstract function clearAll(Smarty $smarty, $exp_time=null);\n\n    /**\n    * Empty cache for a specific template\n    *\n    * @param Smarty $smarty Smarty object\n    * @param string $resource_name template name\n    * @param string $cache_id cache id\n    * @param string $compile_id compile id\n    * @param integer $exp_time expiration time (number of seconds, not timestamp)\n    * @return integer number of cache files deleted\n    */\n    public abstract function clear(Smarty $smarty, $resource_name, $cache_id, $compile_id, $exp_time);\n\n\n    public function locked(Smarty $smarty, Smarty_Template_Cached $cached)\n    {\n        // theoretically locking_timeout should be checked against time_limit (max_execution_time)\n        $start = microtime(true);\n        $hadLock = null;\n        while ($this->hasLock($smarty, $cached)) {\n            $hadLock = true;\n            if (microtime(true) - $start > $smarty->locking_timeout) {\n                // abort waiting for lock release\n                return false;\n            }\n            sleep(1);\n        }\n        return $hadLock;\n    }\n\n    public function hasLock(Smarty $smarty, Smarty_Template_Cached $cached)\n    {\n        // check if lock exists\n        return false;\n    }\n\n    public function acquireLock(Smarty $smarty, Smarty_Template_Cached $cached)\n    {\n        // create lock\n        return true;\n    }\n\n    public function releaseLock(Smarty $smarty, Smarty_Template_Cached $cached)\n    {\n        // release lock\n        return true;\n    }\n\n\n    /**\n    * Load Cache Resource Handler\n    *\n    * @param Smarty $smarty Smarty object\n    * @param string $type name of the cache resource\n    * @return Smarty_CacheResource Cache Resource Handler\n    */\n    public static function load(Smarty $smarty, $type = null)\n    {\n        if (!isset($type)) {\n            $type = $smarty->caching_type;\n        }\n\n        // try smarty's cache\n        if (isset($smarty->_cacheresource_handlers[$type])) {\n            return $smarty->_cacheresource_handlers[$type];\n        }\n        \n        // try registered resource\n        if (isset($smarty->registered_cache_resources[$type])) {\n            // do not cache these instances as they may vary from instance to instance\n            return $smarty->_cacheresource_handlers[$type] = $smarty->registered_cache_resources[$type];\n        }\n        // try sysplugins dir\n        if (isset(self::$sysplugins[$type])) {\n            if (!isset(self::$resources[$type])) {\n                $cache_resource_class = 'Smarty_Internal_CacheResource_' . ucfirst($type);\n                self::$resources[$type] = new $cache_resource_class();\n            }\n            return $smarty->_cacheresource_handlers[$type] = self::$resources[$type];\n        }\n        // try plugins dir\n        $cache_resource_class = 'Smarty_CacheResource_' . ucfirst($type);\n        if ($smarty->loadPlugin($cache_resource_class)) {\n            if (!isset(self::$resources[$type])) {\n                self::$resources[$type] = new $cache_resource_class();\n            }\n            return $smarty->_cacheresource_handlers[$type] = self::$resources[$type];\n        }\n        // give up\n        throw new SmartyException(\"Unable to load cache resource '{$type}'\");\n    }\n\n    /**\n    * Invalid Loaded Cache Files\n    *\n    * @param Smarty $smarty Smarty object\n    */\n    public static function invalidLoadedCache(Smarty $smarty)\n    {\n        foreach ($smarty->template_objects as $tpl) {\n            if (isset($tpl->cached)) {\n                $tpl->cached->valid = false;\n                $tpl->cached->processed = false;\n            }\n        }\n    }\n}\n\n/**\n* Smarty Resource Data Object\n*\n* Cache Data Container for Template Files\n*\n* @package Smarty\n* @subpackage TemplateResources\n* @author Rodney Rehm\n*/\nclass Smarty_Template_Cached {\n    /**\n    * Source Filepath\n    * @var string\n    */\n    public $filepath = false;\n\n    /**\n    * Source Content\n    * @var string\n    */\n    public $content = null;\n\n    /**\n    * Source Timestamp\n    * @var integer\n    */\n    public $timestamp = false;\n\n    /**\n    * Source Existance\n    * @var boolean\n    */\n    public $exists = false;\n\n    /**\n    * Cache Is Valid\n    * @var boolean\n    */\n    public $valid = false;\n\n    /**\n    * Cache was processed\n    * @var boolean\n    */\n    public $processed = false;\n\n    /**\n    * CacheResource Handler\n    * @var Smarty_CacheResource\n    */\n    public $handler = null;\n\n    /**\n    * Template Compile Id (Smarty_Internal_Template::$compile_id)\n    * @var string\n    */\n    public $compile_id = null;\n\n    /**\n    * Template Cache Id (Smarty_Internal_Template::$cache_id)\n    * @var string\n    */\n    public $cache_id = null;\n\n    /**\n    * Id for cache locking\n    * @var string\n    */\n    public $lock_id = null;\n\n    /**\n    * flag that cache is locked by this instance\n    * @var bool\n    */\n    public $is_locked = false;\n\n    /**\n    * Source Object\n    * @var Smarty_Template_Source\n    */\n    public $source = null;\n\n    /**\n    * create Cached Object container\n    *\n    * @param Smarty_Internal_Template $_template template object\n    */\n    public function __construct(Smarty_Internal_Template $_template)\n    {\n        $this->compile_id = $_template->compile_id;\n        $this->cache_id = $_template->cache_id;\n        $this->source = $_template->source;\n        $_template->cached = $this;\n        $smarty = $_template->smarty;\n\n        //\n        // load resource handler\n        //\n        $this->handler = $handler = Smarty_CacheResource::load($smarty); // Note: prone to circular references\n\n        //\n        //    check if cache is valid\n        //\n        if (!($_template->caching == Smarty::CACHING_LIFETIME_CURRENT || $_template->caching == Smarty::CACHING_LIFETIME_SAVED) || $_template->source->recompiled) {\n            $handler->populate($this, $_template);\n            return;\n        }\n        while (true) {\n            while (true) {\n                $handler->populate($this, $_template);\n                if ($this->timestamp === false || $smarty->force_compile || $smarty->force_cache) {\n                    $this->valid = false;\n                } else {\n                    $this->valid = true;\n                }\n                if ($this->valid && $_template->caching == Smarty::CACHING_LIFETIME_CURRENT && $_template->cache_lifetime >= 0 && time() > ($this->timestamp + $_template->cache_lifetime)) {\n                    // lifetime expired\n                    $this->valid = false;\n                }\n                if ($this->valid || !$_template->smarty->cache_locking) {\n                    break;\n                }\n                if (!$this->handler->locked($_template->smarty, $this)) {\n                    $this->handler->acquireLock($_template->smarty, $this);\n                    break 2;\n                }\n            }\n            if ($this->valid) {\n                if (!$_template->smarty->cache_locking || $this->handler->locked($_template->smarty, $this) === null) {\n                    // load cache file for the following checks\n                    if ($smarty->debugging) {\n                        Smarty_Internal_Debug::start_cache($_template);\n                    }\n                    if($handler->process($_template, $this) === false) {\n                        $this->valid = false;\n                    } else {\n                        $this->processed = true;\n                    }\n                    if ($smarty->debugging) {\n                        Smarty_Internal_Debug::end_cache($_template);\n                    }\n                } else {\n                    continue;\n                }\n            } else {\n                return;\n            }\n            if ($this->valid && $_template->caching === Smarty::CACHING_LIFETIME_SAVED && $_template->properties['cache_lifetime'] >= 0 && (time() > ($_template->cached->timestamp + $_template->properties['cache_lifetime']))) {\n                $this->valid = false;\n            }\n            if (!$this->valid && $_template->smarty->cache_locking) {\n                $this->handler->acquireLock($_template->smarty, $this);\n                return;\n            } else {\n                return;\n            }\n        }\n    }\n\n    /**\n    * Write this cache object to handler\n    *\n    * @param Smarty_Internal_Template $_template template object\n    * @param string $content content to cache\n    * @return boolean success\n    */\n    public function write(Smarty_Internal_Template $_template, $content)\n    {\n        if (!$_template->source->recompiled) {\n            if ($this->handler->writeCachedContent($_template, $content)) {\n                $this->timestamp = time();\n                $this->exists = true;\n                $this->valid = true;\n                if ($_template->smarty->cache_locking) {\n                    $this->handler->releaseLock($_template->smarty, $this);\n                }\n                return true;\n            }\n        }\n        return false;\n    }\n\n}\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_cacheresource_custom.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin\n *\n * @package Smarty\n * @subpackage Cacher\n */\n\n/**\n * Cache Handler API\n *\n * @package Smarty\n * @subpackage Cacher\n * @author Rodney Rehm\n */\nabstract class Smarty_CacheResource_Custom extends Smarty_CacheResource {\n\n    /**\n     * fetch cached content and its modification time from data source\n     *\n     * @param string $id         unique cache content identifier\n     * @param string $name       template name\n     * @param string $cache_id   cache id\n     * @param string $compile_id compile id\n     * @param string $content    cached content\n     * @param integer $mtime cache modification timestamp (epoch)\n     * @return void\n     */\n    protected abstract function fetch($id, $name, $cache_id, $compile_id, &$content, &$mtime);\n\n    /**\n     * Fetch cached content's modification timestamp from data source\n     *\n     * {@internal implementing this method is optional.\n     *  Only implement it if modification times can be accessed faster than loading the complete cached content.}}\n     *\n     * @param string $id         unique cache content identifier\n     * @param string $name       template name\n     * @param string $cache_id   cache id\n     * @param string $compile_id compile id\n     * @return integer|boolean timestamp (epoch) the template was modified, or false if not found\n     */\n    protected function fetchTimestamp($id, $name, $cache_id, $compile_id)\n    {\n        return null;\n    }\n\n    /**\n     * Save content to cache\n     *\n     * @param string       $id         unique cache content identifier\n     * @param string       $name       template name\n     * @param string       $cache_id   cache id\n     * @param string       $compile_id compile id\n     * @param integer|null $exp_time   seconds till expiration or null\n     * @param string $content content to cache\n     * @return boolean success\n     */\n    protected abstract function save($id, $name, $cache_id, $compile_id, $exp_time, $content);\n\n    /**\n     * Delete content from cache\n     *\n     * @param string       $name       template name\n     * @param string       $cache_id   cache id\n     * @param string       $compile_id compile id\n     * @param integer|null $exp_time   seconds till expiration time in seconds or null\n     * @return integer number of deleted caches\n     */\n    protected abstract function delete($name, $cache_id, $compile_id, $exp_time);\n\n    /**\n     * populate Cached Object with meta data from Resource\n     *\n     * @param Smarty_Template_Cached   $cached    cached object\n     * @param Smarty_Internal_Template $_template template object\n     * @return void\n     */\n    public function populate(Smarty_Template_Cached $cached, Smarty_Internal_Template $_template)\n    {\n        $_cache_id = isset($cached->cache_id) ? preg_replace('![^\\w\\|]+!', '_', $cached->cache_id) : null;\n        $_compile_id = isset($cached->compile_id) ? preg_replace('![^\\w\\|]+!', '_', $cached->compile_id) : null;\n\n        $cached->filepath = sha1($cached->source->filepath . $_cache_id . $_compile_id);\n        $this->populateTimestamp($cached);\n    }\n\n    /**\n     * populate Cached Object with timestamp and exists from Resource\n     *\n     * @param Smarty_Template_Cached $source cached object\n     * @return void\n     */\n    public function populateTimestamp(Smarty_Template_Cached $cached)\n    {\n        $mtime = $this->fetchTimestamp($cached->filepath, $cached->source->name, $cached->cache_id, $cached->compile_id);\n        if ($mtime !== null) {\n            $cached->timestamp = $mtime;\n            $cached->exists = !!$cached->timestamp;\n            return;\n        }\n        $timestamp = null;\n        $this->fetch($cached->filepath, $cached->source->name, $cached->cache_id, $cached->compile_id, $cached->content, $timestamp);\n        $cached->timestamp = isset($timestamp) ? $timestamp : false;\n        $cached->exists = !!$cached->timestamp;\n    }\n\n    /**\n     * Read the cached template and process the header\n     *\n     * @param Smarty_Internal_Template $_template template object\n     * @param Smarty_Template_Cached $cached cached object\n     * @return booelan true or false if the cached content does not exist\n     */\n    public function process(Smarty_Internal_Template $_template, Smarty_Template_Cached $cached=null)\n    {\n        if (!$cached) {\n            $cached = $_template->cached;\n        }\n        $content = $cached->content ? $cached->content : null;\n        $timestamp = $cached->timestamp ? $cached->timestamp : null;\n        if ($content === null || !$timestamp) {\n            $this->fetch(\n                $_template->cached->filepath,\n                $_template->source->name,\n                $_template->cache_id,\n                $_template->compile_id,\n                $content,\n                $timestamp\n            );\n        }\n        if (isset($content)) {\n            $_smarty_tpl = $_template;\n            eval(\"?>\" . $content);\n            return true;\n        }\n        return false;\n    }\n\n    /**\n     * Write the rendered template output to cache\n     *\n     * @param Smarty_Internal_Template $_template template object\n     * @param string                   $content   content to cache\n     * @return boolean success\n     */\n    public function writeCachedContent(Smarty_Internal_Template $_template, $content)\n    {\n        return $this->save(\n            $_template->cached->filepath,\n            $_template->source->name,\n            $_template->cache_id,\n            $_template->compile_id,\n            $_template->properties['cache_lifetime'],\n            $content\n        );\n    }\n\n    /**\n     * Empty cache\n     *\n     * @param Smarty  $smarty   Smarty object\n     * @param integer $exp_time expiration time (number of seconds, not timestamp)\n     * @return integer number of cache files deleted\n     */\n    public function clearAll(Smarty $smarty, $exp_time=null)\n    {\n        $this->cache = array();\n        return $this->delete(null, null, null, $exp_time);\n    }\n\n    /**\n     * Empty cache for a specific template\n     *\n     * @param Smarty  $smarty        Smarty object\n     * @param string  $resource_name template name\n     * @param string  $cache_id      cache id\n     * @param string  $compile_id    compile id\n     * @param integer $exp_time      expiration time (number of seconds, not timestamp)\n     * @return integer number of cache files deleted\n     */\n    public function clear(Smarty $smarty, $resource_name, $cache_id, $compile_id, $exp_time)\n    {\n        $this->cache = array();\n        return $this->delete($resource_name, $cache_id, $compile_id, $exp_time);\n    }\n\n    /**\n     * Check is cache is locked for this template\n     *\n     * @param Smarty $smarty Smarty object\n     * @param Smarty_Template_Cached $cached cached object\n     * @return booelan true or false if cache is locked\n     */\n    public function hasLock(Smarty $smarty, Smarty_Template_Cached $cached)\n    {\n        $id = $cached->filepath;\n        $name = $cached->source->name . '.lock';\n\n        $mtime = $this->fetchTimestamp($id, $name, null, null);\n        if ($mtime === null) {\n            $this->fetch($id, $name, null, null, $content, $mtime);\n        }\n\n        return $mtime && time() - $mtime < $smarty->locking_timeout;\n    }\n\n    /**\n     * Lock cache for this template\n     *\n     * @param Smarty $smarty Smarty object\n     * @param Smarty_Template_Cached $cached cached object\n     */\n    public function acquireLock(Smarty $smarty, Smarty_Template_Cached $cached)\n    {\n        $cached->is_locked = true;\n\n        $id = $cached->filepath;\n        $name = $cached->source->name . '.lock';\n        $this->save($id, $name, null, null, $smarty->locking_timeout, '');\n    }\n\n    /**\n     * Unlock cache for this template\n     *\n     * @param Smarty $smarty Smarty object\n     * @param Smarty_Template_Cached $cached cached object\n     */\n    public function releaseLock(Smarty $smarty, Smarty_Template_Cached $cached)\n    {\n        $cached->is_locked = false;\n\n        $name = $cached->source->name . '.lock';\n        $this->delete($name, null, null, null);\n    }\n}\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_cacheresource_keyvaluestore.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin\n *\n * @package Smarty\n * @subpackage Cacher\n */\n\n/**\n * Smarty Cache Handler Base for Key/Value Storage Implementations\n *\n * This class implements the functionality required to use simple key/value stores\n * for hierarchical cache groups. key/value stores like memcache or APC do not support\n * wildcards in keys, therefore a cache group cannot be cleared like \"a|*\" - which\n * is no problem to filesystem and RDBMS implementations.\n *\n * This implementation is based on the concept of invalidation. While one specific cache\n * can be identified and cleared, any range of caches cannot be identified. For this reason\n * each level of the cache group hierarchy can have its own value in the store. These values\n * are nothing but microtimes, telling us when a particular cache group was cleared for the\n * last time. These keys are evaluated for every cache read to determine if the cache has\n * been invalidated since it was created and should hence be treated as inexistent.\n *\n * Although deep hierarchies are possible, they are not recommended. Try to keep your\n * cache groups as shallow as possible. Anything up 3-5 parents should be ok. So\n * »a|b|c« is a good depth where »a|b|c|d|e|f|g|h|i|j|k« isn't. Try to join correlating\n * cache groups: if your cache groups look somewhat like »a|b|$page|$items|$whatever«\n * consider using »a|b|c|$page-$items-$whatever« instead.\n *\n * @package Smarty\n * @subpackage Cacher\n * @author Rodney Rehm\n */\nabstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource {\n\n    /**\n     * cache for contents\n     * @var array\n     */\n    protected $contents = array();\n    /**\n     * cache for timestamps\n     * @var array\n     */\n    protected $timestamps = array();\n\n    /**\n     * populate Cached Object with meta data from Resource\n     *\n     * @param Smarty_Template_Cached   $cached    cached object\n     * @param Smarty_Internal_Template $_template template object\n     * @return void\n     */\n    public function populate(Smarty_Template_Cached $cached, Smarty_Internal_Template $_template)\n    {\n        $cached->filepath = $_template->source->uid\n                . '#' . $this->sanitize($cached->source->name)\n                . '#' . $this->sanitize($cached->cache_id)\n                . '#' . $this->sanitize($cached->compile_id);\n\n        $this->populateTimestamp($cached);\n    }\n\n    /**\n     * populate Cached Object with timestamp and exists from Resource\n     *\n     * @param Smarty_Template_Cached $cached cached object\n     * @return void\n     */\n    public function populateTimestamp(Smarty_Template_Cached $cached)\n    {\n        if (!$this->fetch($cached->filepath, $cached->source->name, $cached->cache_id, $cached->compile_id, $content, $timestamp, $cached->source->uid)) {\n            return;\n        }\n        $cached->content = $content;\n        $cached->timestamp = (int) $timestamp;\n        $cached->exists = $cached->timestamp;\n    }\n\n    /**\n     * Read the cached template and process the header\n     *\n     * @param Smarty_Internal_Template $_template template object\n     * @param Smarty_Template_Cached $cached cached object\n     * @return booelan true or false if the cached content does not exist\n     */\n    public function process(Smarty_Internal_Template $_template, Smarty_Template_Cached $cached=null)\n    {\n        if (!$cached) {\n            $cached = $_template->cached;\n        }\n        $content = $cached->content ? $cached->content : null;\n        $timestamp = $cached->timestamp ? $cached->timestamp : null;\n        if ($content === null || !$timestamp) {\n            if (!$this->fetch($_template->cached->filepath, $_template->source->name, $_template->cache_id, $_template->compile_id, $content, $timestamp, $_template->source->uid)) {\n                return false;\n            }\n        }\n        if (isset($content)) {\n            $_smarty_tpl = $_template;\n            eval(\"?>\" . $content);\n            return true;\n        }\n        return false;\n    }\n\n    /**\n     * Write the rendered template output to cache\n     *\n     * @param Smarty_Internal_Template $_template template object\n     * @param string $content content to cache\n     * @return boolean success\n     */\n    public function writeCachedContent(Smarty_Internal_Template $_template, $content)\n    {\n        $this->addMetaTimestamp($content);\n        return $this->write(array($_template->cached->filepath => $content), $_template->properties['cache_lifetime']);\n    }\n\n    /**\n     * Empty cache\n     *\n     * {@internal the $exp_time argument is ignored altogether }}\n     *\n     * @param Smarty  $smarty   Smarty object\n     * @param integer $exp_time expiration time [being ignored]\n     * @return integer number of cache files deleted [always -1]\n     * @uses purge() to clear the whole store\n     * @uses invalidate() to mark everything outdated if purge() is inapplicable\n     */\n    public function clearAll(Smarty $smarty, $exp_time=null)\n    {\n        if (!$this->purge()) {\n            $this->invalidate(null);\n        }\n        return -1;\n    }\n\n    /**\n     * Empty cache for a specific template\n     *\n     * {@internal the $exp_time argument is ignored altogether}}\n     *\n     * @param Smarty  $smarty        Smarty object\n     * @param string  $resource_name template name\n     * @param string  $cache_id      cache id\n     * @param string  $compile_id    compile id\n     * @param integer $exp_time      expiration time [being ignored]\n     * @return integer number of cache files deleted [always -1]\n     * @uses buildCachedFilepath() to generate the CacheID\n     * @uses invalidate() to mark CacheIDs parent chain as outdated\n     * @uses delete() to remove CacheID from cache\n     */\n    public function clear(Smarty $smarty, $resource_name, $cache_id, $compile_id, $exp_time)\n    {\n        $uid = $this->getTemplateUid($smarty, $resource_name, $cache_id, $compile_id);\n        $cid = $uid . '#' . $this->sanitize($resource_name) . '#' . $this->sanitize($cache_id) . '#' . $this->sanitize($compile_id);\n        $this->delete(array($cid));\n        $this->invalidate($cid, $resource_name, $cache_id, $compile_id, $uid);\n        return -1;\n    }\n    /**\n     * Get template's unique ID\n     *\n     * @param Smarty $smarty        Smarty object\n     * @param string $resource_name template name\n     * @param string $cache_id      cache id\n     * @param string $compile_id    compile id\n     * @return string filepath of cache file\n     */\n    protected function getTemplateUid(Smarty $smarty, $resource_name, $cache_id, $compile_id)\n    {\n        $uid = '';\n        if (isset($resource_name)) {\n            $tpl = new $smarty->template_class($resource_name, $smarty);\n            if ($tpl->source->exists) {\n                $uid = $tpl->source->uid;\n            }\n            \n            // remove from template cache\n            if ($smarty->allow_ambiguous_resources) {\n                $_templateId = $tpl->source->unique_resource . $tpl->cache_id . $tpl->compile_id;\n            } else {\n                $_templateId = $smarty->joined_template_dir . '#' . $resource_name . $tpl->cache_id . $tpl->compile_id;\n            }\n            if (isset($_templateId[150])) {\n                $_templateId = sha1($_templateId);\n            }\n            unset($smarty->template_objects[$_templateId]);\n        }\n        return $uid;\n    }\n\n    /**\n     * Sanitize CacheID components\n     *\n     * @param string $string CacheID component to sanitize\n     * @return string sanitized CacheID component\n     */\n    protected function sanitize($string)\n    {\n        // some poeple smoke bad weed\n        $string = trim($string, '|');\n        if (!$string) {\n            return null;\n        }\n        return preg_replace('#[^\\w\\|]+#S', '_', $string);\n    }\n\n    /**\n     * Fetch and prepare a cache object.\n     *\n     * @param string  $cid           CacheID to fetch\n     * @param string  $resource_name template name\n     * @param string  $cache_id      cache id\n     * @param string  $compile_id    compile id\n     * @param string  $content       cached content\n     * @param integer &$timestamp    cached timestamp (epoch)\n     * @param string  $resource_uid  resource's uid\n     * @return boolean success\n     */\n    protected function fetch($cid, $resource_name = null, $cache_id = null, $compile_id = null, &$content = null, &$timestamp = null, $resource_uid = null)\n    {\n        $t = $this->read(array($cid));\n        $content = !empty($t[$cid]) ? $t[$cid] : null;\n        $timestamp = null;\n\n        if ($content && ($timestamp = $this->getMetaTimestamp($content))) {\n            $invalidated = $this->getLatestInvalidationTimestamp($cid, $resource_name, $cache_id, $compile_id, $resource_uid);\n            if ($invalidated > $timestamp) {\n                $timestamp = null;\n                $content = null;\n            }\n        }\n\n        return !!$content;\n    }\n\n    /**\n     * Add current microtime to the beginning of $cache_content\n     *\n     * {@internal the header uses 8 Bytes, the first 4 Bytes are the seconds, the second 4 Bytes are the microseconds}}\n     *\n     * @param string &$content the content to be cached\n     */\n    protected function addMetaTimestamp(&$content)\n    {\n        $mt = explode(\" \", microtime());\n        $ts = pack(\"NN\", $mt[1], (int) ($mt[0] * 100000000));\n        $content = $ts . $content;\n    }\n\n    /**\n     * Extract the timestamp the $content was cached\n     *\n     * @param string &$content the cached content\n     * @return float the microtime the content was cached\n     */\n    protected function getMetaTimestamp(&$content)\n    {\n        $s = unpack(\"N\", substr($content, 0, 4));\n        $m = unpack(\"N\", substr($content, 4, 4));\n        $content = substr($content, 8);\n        return $s[1] + ($m[1] / 100000000);\n    }\n\n    /**\n     * Invalidate CacheID\n     *\n     * @param string $cid           CacheID\n     * @param string $resource_name template name\n     * @param string $cache_id      cache id\n     * @param string $compile_id    compile id\n     * @param string $resource_uid  source's uid\n     * @return void\n     */\n    protected function invalidate($cid = null, $resource_name = null, $cache_id = null, $compile_id = null, $resource_uid = null)\n    {\n        $now = microtime(true);\n        $key = null;\n        // invalidate everything\n        if (!$resource_name && !$cache_id && !$compile_id) {\n            $key = 'IVK#ALL';\n        }\n        // invalidate all caches by template\n        else if ($resource_name && !$cache_id && !$compile_id) {\n            $key = 'IVK#TEMPLATE#' . $resource_uid . '#' . $this->sanitize($resource_name);\n        }\n        // invalidate all caches by cache group\n        else if (!$resource_name && $cache_id && !$compile_id) {\n            $key = 'IVK#CACHE#' . $this->sanitize($cache_id);\n        }\n        // invalidate all caches by compile id\n        else if (!$resource_name && !$cache_id && $compile_id) {\n            $key = 'IVK#COMPILE#' . $this->sanitize($compile_id);\n        }\n        // invalidate by combination\n        else {\n            $key = 'IVK#CID#' . $cid;\n        }\n        $this->write(array($key => $now));\n    }\n\n    /**\n     * Determine the latest timestamp known to the invalidation chain\n     *\n     * @param string $cid           CacheID to determine latest invalidation timestamp of\n     * @param string $resource_name template name\n     * @param string $cache_id      cache id\n     * @param string $compile_id    compile id\n     * @param string $resource_uid  source's filepath\n     * @return float the microtime the CacheID was invalidated\n     */\n    protected function getLatestInvalidationTimestamp($cid, $resource_name = null, $cache_id = null, $compile_id = null, $resource_uid = null)\n    {\n        // abort if there is no CacheID\n        if (false && !$cid) {\n            return 0;\n        }\n        // abort if there are no InvalidationKeys to check\n        if (!($_cid = $this->listInvalidationKeys($cid, $resource_name, $cache_id, $compile_id, $resource_uid))) {\n            return 0;\n        }\n        \n        // there are no InValidationKeys\n        if (!($values = $this->read($_cid))) {\n            return 0;\n        }\n        // make sure we're dealing with floats\n        $values = array_map('floatval', $values);\n        return max($values);\n    }\n\n    /**\n     * Translate a CacheID into the list of applicable InvalidationKeys.\n     *\n     * Splits \"some|chain|into|an|array\" into array( '#clearAll#', 'some', 'some|chain', 'some|chain|into', ... )\n     *\n     * @param string $cid           CacheID to translate\n     * @param string $resource_name template name\n     * @param string $cache_id      cache id\n     * @param string $compile_id    compile id\n     * @param string $resource_uid  source's filepath\n     * @return array list of InvalidationKeys\n     * @uses $invalidationKeyPrefix to prepend to each InvalidationKey\n     */\n    protected function listInvalidationKeys($cid, $resource_name = null, $cache_id = null, $compile_id = null, $resource_uid = null)\n    {\n        $t = array('IVK#ALL');\n        $_name = $_compile = '#';\n        if ($resource_name) {\n            $_name .= $resource_uid . '#' . $this->sanitize($resource_name);\n            $t[] = 'IVK#TEMPLATE' . $_name;\n        }\n        if ($compile_id) {\n            $_compile .= $this->sanitize($compile_id);\n            $t[] = 'IVK#COMPILE' . $_compile;\n        }\n        $_name .= '#';\n        // some poeple smoke bad weed\n        $cid = trim($cache_id, '|');\n        if (!$cid) {\n            return $t;\n        }\n        $i = 0;\n        while (true) {\n            // determine next delimiter position\n            $i = strpos($cid, '|', $i);\n            // add complete CacheID if there are no more delimiters\n            if ($i === false) {\n                $t[] = 'IVK#CACHE#' . $cid;\n                $t[] = 'IVK#CID' . $_name . $cid . $_compile;\n                $t[] = 'IVK#CID' . $_name . $_compile;\n                break;\n            }\n            $part = substr($cid, 0, $i);\n            // add slice to list\n            $t[] = 'IVK#CACHE#' . $part;\n            $t[] = 'IVK#CID' . $_name . $part . $_compile;\n            // skip past delimiter position\n            $i++;\n        }\n        return $t;\n    }\n\n    /**\n     * Check is cache is locked for this template\n     *\n     * @param Smarty $smarty Smarty object\n     * @param Smarty_Template_Cached $cached cached object\n     * @return booelan true or false if cache is locked\n     */\n    public function hasLock(Smarty $smarty, Smarty_Template_Cached $cached)\n    {\n        $key = 'LOCK#' . $cached->filepath;\n        $data = $this->read(array($key));\n        return $data && time() - $data[$key] < $smarty->locking_timeout;\n    }\n\n    /**\n     * Lock cache for this template\n     *\n     * @param Smarty $smarty Smarty object\n     * @param Smarty_Template_Cached $cached cached object\n     */\n    public function acquireLock(Smarty $smarty, Smarty_Template_Cached $cached)\n    {\n        $cached->is_locked = true;\n        $key = 'LOCK#' . $cached->filepath;\n        $this->write(array($key => time()), $smarty->locking_timeout);\n    }\n\n    /**\n     * Unlock cache for this template\n     *\n     * @param Smarty $smarty Smarty object\n     * @param Smarty_Template_Cached $cached cached object\n     */\n    public function releaseLock(Smarty $smarty, Smarty_Template_Cached $cached)\n    {\n        $cached->is_locked = false;\n        $key = 'LOCK#' . $cached->filepath;\n        $this->delete(array($key));\n    }\n\n    /**\n     * Read values for a set of keys from cache\n     *\n     * @param array $keys list of keys to fetch\n     * @return array list of values with the given keys used as indexes\n     */\n    protected abstract function read(array $keys);\n\n    /**\n     * Save values for a set of keys to cache\n     *\n     * @param array $keys   list of values to save\n     * @param int   $expire expiration time\n     * @return boolean true on success, false on failure\n     */\n    protected abstract function write(array $keys, $expire=null);\n\n    /**\n     * Remove values from cache\n     *\n     * @param array $keys list of keys to delete\n     * @return boolean true on success, false on failure\n     */\n    protected abstract function delete(array $keys);\n\n    /**\n     * Remove *all* values from cache\n     *\n     * @return boolean true on success, false on failure\n     */\n    protected function purge()\n    {\n        return false;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_config_source.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin\n *\n * @package Smarty\n * @subpackage TemplateResources\n */\n\n/**\n * Smarty Resource Data Object\n *\n * Meta Data Container for Config Files\n *\n * @package Smarty\n * @subpackage TemplateResources\n * @author Rodney Rehm\n *\n * @property string $content\n * @property int    $timestamp\n * @property bool   $exists\n */\nclass Smarty_Config_Source extends Smarty_Template_Source {\n\n    /**\n     * create Config Object container\n     *\n     * @param Smarty_Resource $handler          Resource Handler this source object communicates with\n     * @param Smarty          $smarty           Smarty instance this source object belongs to\n     * @param string          $resource         full config_resource\n     * @param string          $type             type of resource\n     * @param string          $name             resource name\n     * @param string          $unique_resource  unqiue resource name\n     */\n    public function __construct(Smarty_Resource $handler, Smarty $smarty, $resource, $type, $name, $unique_resource)\n    {\n        $this->handler = $handler; // Note: prone to circular references\n\n        // Note: these may be ->config_compiler_class etc in the future\n        //$this->config_compiler_class = $handler->config_compiler_class;\n        //$this->config_lexer_class = $handler->config_lexer_class;\n        //$this->config_parser_class = $handler->config_parser_class;\n\n        $this->smarty = $smarty;\n        $this->resource = $resource;\n        $this->type = $type;\n        $this->name = $name;\n        $this->unique_resource = $unique_resource;\n    }\n\n    /**\n     * <<magic>> Generic setter.\n     *\n     * @param string $property_name valid: content, timestamp, exists\n     * @param mixed  $value         newly assigned value (not check for correct type)\n     * @throws SmartyException when the given property name is not valid\n     */\n    public function __set($property_name, $value)\n    {\n        switch ($property_name) {\n            case 'content':\n            case 'timestamp':\n            case 'exists':\n                $this->$property_name = $value;\n                break;\n\n            default:\n                throw new SmartyException(\"invalid config property '$property_name'.\");\n        }\n    }\n\n    /**\n     * <<magic>> Generic getter.\n     *\n     * @param string $property_name valid: content, timestamp, exists\n     * @throws SmartyException when the given property name is not valid\n     */\n    public function __get($property_name)\n    {\n        switch ($property_name) {\n            case 'timestamp':\n            case 'exists':\n                $this->handler->populateTimestamp($this);\n                return $this->$property_name;\n\n            case 'content':\n                return $this->content = $this->handler->getContent($this);\n\n            default:\n                throw new SmartyException(\"config property '$property_name' does not exist.\");\n        }\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_cacheresource_file.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin CacheResource File\n *\n * @package Smarty\n * @subpackage Cacher\n * @author Uwe Tews\n * @author Rodney Rehm\n */\n\n/**\n * This class does contain all necessary methods for the HTML cache on file system\n *\n * Implements the file system as resource for the HTML cache Version ussing nocache inserts.\n *\n * @package Smarty\n * @subpackage Cacher\n */\nclass Smarty_Internal_CacheResource_File extends Smarty_CacheResource {\n\n    /**\n     * populate Cached Object with meta data from Resource\n     *\n     * @param Smarty_Template_Cached   $cached    cached object\n     * @param Smarty_Internal_Template $_template template object\n     * @return void\n     */\n    public function populate(Smarty_Template_Cached $cached, Smarty_Internal_Template $_template)\n    {\n        $_source_file_path = str_replace(':', '.', $_template->source->filepath);\n        $_cache_id = isset($_template->cache_id) ? preg_replace('![^\\w\\|]+!', '_', $_template->cache_id) : null;\n        $_compile_id = isset($_template->compile_id) ? preg_replace('![^\\w\\|]+!', '_', $_template->compile_id) : null;\n        $_filepath = $_template->source->uid;\n        // if use_sub_dirs, break file into directories\n        if ($_template->smarty->use_sub_dirs) {\n            $_filepath = substr($_filepath, 0, 2) . DS\n                . substr($_filepath, 2, 2) . DS\n                . substr($_filepath, 4, 2) . DS\n                . $_filepath;\n        }\n        $_compile_dir_sep = $_template->smarty->use_sub_dirs ? DS : '^';\n        if (isset($_cache_id)) {\n            $_cache_id = str_replace('|', $_compile_dir_sep, $_cache_id) . $_compile_dir_sep;\n        } else {\n            $_cache_id = '';\n        }\n        if (isset($_compile_id)) {\n            $_compile_id = $_compile_id . $_compile_dir_sep;\n        } else {\n            $_compile_id = '';\n        }\n        $_cache_dir = $_template->smarty->getCacheDir();\n        if ($_template->smarty->cache_locking) {\n            // create locking file name\n            // relative file name?\n            if (!preg_match('/^([\\/\\\\\\\\]|[a-zA-Z]:[\\/\\\\\\\\])/', $_cache_dir)) {\n                $_lock_dir = rtrim(getcwd(), '/\\\\') . DS . $_cache_dir;\n            } else {\n                $_lock_dir = $_cache_dir;\n            }\n            $cached->lock_id = $_lock_dir.sha1($_cache_id.$_compile_id.$_template->source->uid).'.lock';\n        }\n        $cached->filepath = $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_source_file_path) . '.php';\n        $cached->timestamp = @filemtime($cached->filepath);\n        $cached->exists = !!$cached->timestamp;\n    }\n\n    /**\n     * populate Cached Object with timestamp and exists from Resource\n     *\n     * @param Smarty_Template_Cached $cached cached object\n     * @return void\n     */\n    public function populateTimestamp(Smarty_Template_Cached $cached)\n    {\n        $cached->timestamp = @filemtime($cached->filepath);\n        $cached->exists = !!$cached->timestamp;\n    }\n\n    /**\n     * Read the cached template and process its header\n     *\n     * @param Smarty_Internal_Template $_template template object\n     * @param Smarty_Template_Cached $cached cached object\n     * @return booelan true or false if the cached content does not exist\n     */\n    public function process(Smarty_Internal_Template $_template, Smarty_Template_Cached $cached=null)\n    {\n        $_smarty_tpl = $_template;\n        return @include $_template->cached->filepath;\n    }\n\n    /**\n     * Write the rendered template output to cache\n     *\n     * @param Smarty_Internal_Template $_template template object\n     * @param string                   $content   content to cache\n     * @return boolean success\n     */\n    public function writeCachedContent(Smarty_Internal_Template $_template, $content)\n    {\n        if (Smarty_Internal_Write_File::writeFile($_template->cached->filepath, $content, $_template->smarty) === true) {\n            $_template->cached->timestamp = @filemtime($_template->cached->filepath);\n            $_template->cached->exists = !!$_template->cached->timestamp;\n            if ($_template->cached->exists) {\n                return true;\n            }\n        }\n        return false;\n    }\n\n    /**\n     * Empty cache\n     *\n     * @param Smarty_Internal_Template $_template template object\n     * @param integer                  $exp_time  expiration time (number of seconds, not timestamp)\n     * @return integer number of cache files deleted\n     */\n    public function clearAll(Smarty $smarty, $exp_time = null)\n    {\n        return $this->clear($smarty, null, null, null, $exp_time);\n    }\n\n    /**\n     * Empty cache for a specific template\n     *\n     * @param Smarty  $_template     template object\n     * @param string  $resource_name template name\n     * @param string  $cache_id      cache id\n     * @param string  $compile_id    compile id\n     * @param integer $exp_time      expiration time (number of seconds, not timestamp)\n     * @return integer number of cache files deleted\n    */\n    public function clear(Smarty $smarty, $resource_name, $cache_id, $compile_id, $exp_time)\n    {\n        $_cache_id = isset($cache_id) ? preg_replace('![^\\w\\|]+!', '_', $cache_id) : null;\n        $_compile_id = isset($compile_id) ? preg_replace('![^\\w\\|]+!', '_', $compile_id) : null;\n        $_dir_sep = $smarty->use_sub_dirs ? '/' : '^';\n        $_compile_id_offset = $smarty->use_sub_dirs ? 3 : 0;\n        $_dir = $smarty->getCacheDir();\n        $_dir_length = strlen($_dir);\n        if (isset($_cache_id)) {\n            $_cache_id_parts = explode('|', $_cache_id);\n            $_cache_id_parts_count = count($_cache_id_parts);\n            if ($smarty->use_sub_dirs) {\n                foreach ($_cache_id_parts as $id_part) {\n                    $_dir .= $id_part . DS;\n                }\n            }\n        }\n        if (isset($resource_name)) {\n            $_save_stat = $smarty->caching;\n            $smarty->caching = true;\n            $tpl = new $smarty->template_class($resource_name, $smarty);\n            $smarty->caching = $_save_stat;\n\n            // remove from template cache\n            $tpl->source; // have the template registered before unset()\n            if ($smarty->allow_ambiguous_resources) {\n                $_templateId = $tpl->source->unique_resource . $tpl->cache_id . $tpl->compile_id;\n            } else {\n                $_templateId = $smarty->joined_template_dir . '#' . $resource_name . $tpl->cache_id . $tpl->compile_id;\n            }\n            if (isset($_templateId[150])) {\n                $_templateId = sha1($_templateId);\n            }\n            unset($smarty->template_objects[$_templateId]);\n\n            if ($tpl->source->exists) {\n                $_resourcename_parts = basename(str_replace('^', '/', $tpl->cached->filepath));\n            } else {\n                return 0;\n            }\n        }\n        $_count = 0;\n        $_time = time();\n        if (file_exists($_dir)) {\n            $_cacheDirs = new RecursiveDirectoryIterator($_dir);\n            $_cache = new RecursiveIteratorIterator($_cacheDirs, RecursiveIteratorIterator::CHILD_FIRST);\n            foreach ($_cache as $_file) {\n                if (substr(basename($_file->getPathname()),0,1) == '.' || strpos($_file, '.svn') !== false) continue;\n                // directory ?\n                if ($_file->isDir()) {\n                    if (!$_cache->isDot()) {\n                        // delete folder if empty\n                        @rmdir($_file->getPathname());\n                    }\n                } else {\n                    $_parts = explode($_dir_sep, str_replace('\\\\', '/', substr((string)$_file, $_dir_length)));\n                    $_parts_count = count($_parts);\n                    // check name\n                    if (isset($resource_name)) {\n                        if ($_parts[$_parts_count-1] != $_resourcename_parts) {\n                            continue;\n                        }\n                    }\n                    // check compile id\n                    if (isset($_compile_id) && (!isset($_parts[$_parts_count-2 - $_compile_id_offset]) || $_parts[$_parts_count-2 - $_compile_id_offset] != $_compile_id)) {\n                        continue;\n                    }\n                    // check cache id\n                    if (isset($_cache_id)) {\n                        // count of cache id parts\n                        $_parts_count = (isset($_compile_id)) ? $_parts_count - 2 - $_compile_id_offset : $_parts_count - 1 - $_compile_id_offset;\n                        if ($_parts_count < $_cache_id_parts_count) {\n                            continue;\n                        }\n                        for ($i = 0; $i < $_cache_id_parts_count; $i++) {\n                            if ($_parts[$i] != $_cache_id_parts[$i]) continue 2;\n                        }\n                    }\n                    // expired ?\n                    if (isset($exp_time) && $_time - @filemtime($_file) < $exp_time) {\n                        continue;\n                    }\n                    $_count += @unlink((string) $_file) ? 1 : 0;\n                }\n            }\n        }\n        return $_count;\n    }\n\n    /**\n     * Check is cache is locked for this template\n     *\n     * @param Smarty $smarty Smarty object\n     * @param Smarty_Template_Cached $cached cached object\n     * @return booelan true or false if cache is locked\n     */\n    public function hasLock(Smarty $smarty, Smarty_Template_Cached $cached)\n    {\n        if (version_compare(PHP_VERSION, '5.3.0', '>=')) {\n            clearstatcache(true, $cached->lock_id);\n        } else {\n            clearstatcache();\n        }\n        $t = @filemtime($cached->lock_id);\n        return $t && (time() - $t < $smarty->locking_timeout);\n    }\n\n    /**\n     * Lock cache for this template\n     *\n     * @param Smarty $smarty Smarty object\n     * @param Smarty_Template_Cached $cached cached object\n     */\n    public function acquireLock(Smarty $smarty, Smarty_Template_Cached $cached)\n    {\n        $cached->is_locked = true;\n        touch($cached->lock_id);\n    }\n\n    /**\n     * Unlock cache for this template\n     *\n     * @param Smarty $smarty Smarty object\n     * @param Smarty_Template_Cached $cached cached object\n     */\n    public function releaseLock(Smarty $smarty, Smarty_Template_Cached $cached)\n    {\n        $cached->is_locked = false;\n        @unlink($cached->lock_id);\n    }\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_append.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Compile Append\n *\n * Compiles the {append} tag\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile Append Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Append extends Smarty_Internal_Compile_Assign {\n\n    /**\n     * Compiles code for the {append} tag\n     *\n     * @param array $args array with attributes from parser\n     * @param object $compiler compiler object\n     * @param array $parameter array with compilation parameter\n     * @return string compiled code\n     */\n    public function compile($args, $compiler, $parameter)\n    {\n        // the following must be assigned at runtime because it will be overwritten in parent class\n        $this->required_attributes = array('var', 'value');\n        $this->shorttag_order = array('var', 'value');\n        $this->optional_attributes = array('scope', 'index');\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n        // map to compile assign attributes\n        if (isset($_attr['index'])) {\n            $_params['smarty_internal_index'] = '[' . $_attr['index'] . ']';\n            unset($_attr['index']);\n        } else {\n            $_params['smarty_internal_index'] = '[]';\n        }\n        $_new_attr = array();\n        foreach ($_attr as $key => $value) {\n            $_new_attr[] = array($key => $value);\n        }\n        // call compile assign\n        return parent::compile($_new_attr, $compiler, $_params);\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_assign.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Compile Assign\n *\n * Compiles the {assign} tag\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile Assign Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Assign extends Smarty_Internal_CompileBase {\n\n    /**\n     * Compiles code for the {assign} tag\n     *\n     * @param array  $args      array with attributes from parser\n     * @param object $compiler  compiler object\n     * @param array  $parameter array with compilation parameter\n     * @return string compiled code\n     */\n    public function compile($args, $compiler, $parameter)\n    {\n        // the following must be assigned at runtime because it will be overwritten in Smarty_Internal_Compile_Append\n        $this->required_attributes = array('var', 'value');\n        $this->shorttag_order = array('var', 'value');\n        $this->optional_attributes = array('scope');\n        $_nocache = 'null';\n        $_scope = Smarty::SCOPE_LOCAL;\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n        // nocache ?\n        if ($compiler->tag_nocache || $compiler->nocache) {\n            $_nocache = 'true';\n            // create nocache var to make it know for further compiling\n            if (isset($compiler->template->tpl_vars[trim($_attr['var'], \"'\")])) {\n                $compiler->template->tpl_vars[trim($_attr['var'], \"'\")]->nocache = true;\n            } else {\n                $compiler->template->tpl_vars[trim($_attr['var'], \"'\")] = new Smarty_variable(null, true);\n            }\n        }\n        // scope setup\n        if (isset($_attr['scope'])) {\n            $_attr['scope'] = trim($_attr['scope'], \"'\\\"\");\n            if ($_attr['scope'] == 'parent') {\n                $_scope = Smarty::SCOPE_PARENT;\n            } elseif ($_attr['scope'] == 'root') {\n                $_scope = Smarty::SCOPE_ROOT;\n            } elseif ($_attr['scope'] == 'global') {\n                $_scope = Smarty::SCOPE_GLOBAL;\n            } else {\n                $compiler->trigger_template_error('illegal value for \"scope\" attribute', $compiler->lex->taglineno);\n            }\n        }\n        // compiled output\n        if (isset($parameter['smarty_internal_index'])) {\n            $output = \"<?php \\$_smarty_tpl->createLocalArrayVariable($_attr[var], $_nocache, $_scope);\\n\\$_smarty_tpl->tpl_vars[$_attr[var]]->value$parameter[smarty_internal_index] = $_attr[value];\";\n        } else {\n            // implement Smarty2's behaviour of variables assigned by reference\n            if ($compiler->template->smarty instanceof SmartyBC) {\n                $output = \"<?php if (isset(\\$_smarty_tpl->tpl_vars[$_attr[var]])) {\\$_smarty_tpl->tpl_vars[$_attr[var]] = clone \\$_smarty_tpl->tpl_vars[$_attr[var]];\";\n                $output .= \"\\n\\$_smarty_tpl->tpl_vars[$_attr[var]]->value = $_attr[value]; \\$_smarty_tpl->tpl_vars[$_attr[var]]->nocache = $_nocache; \\$_smarty_tpl->tpl_vars[$_attr[var]]->scope = $_scope;\";\n                $output .= \"\\n} else \\$_smarty_tpl->tpl_vars[$_attr[var]] = new Smarty_variable($_attr[value], $_nocache, $_scope);\";\n            } else {\n                $output = \"<?php \\$_smarty_tpl->tpl_vars[$_attr[var]] = new Smarty_variable($_attr[value], $_nocache, $_scope);\";\n            }\n        }\n        if ($_scope == Smarty::SCOPE_PARENT) {\n            $output .= \"\\nif (\\$_smarty_tpl->parent != null) \\$_smarty_tpl->parent->tpl_vars[$_attr[var]] = clone \\$_smarty_tpl->tpl_vars[$_attr[var]];\";\n        } elseif ($_scope == Smarty::SCOPE_ROOT || $_scope == Smarty::SCOPE_GLOBAL) {\n            $output .= \"\\n\\$_ptr = \\$_smarty_tpl->parent; while (\\$_ptr != null) {\\$_ptr->tpl_vars[$_attr[var]] = clone \\$_smarty_tpl->tpl_vars[$_attr[var]]; \\$_ptr = \\$_ptr->parent; }\";\n        }\n        if ( $_scope == Smarty::SCOPE_GLOBAL) {\n            $output .= \"\\nSmarty::\\$global_tpl_vars[$_attr[var]] = clone \\$_smarty_tpl->tpl_vars[$_attr[var]];\";\n        }\n        $output .= '?>';\n        return $output;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_block.php",
    "content": "<?php\n\n/**\n * Smarty Internal Plugin Compile Block\n *\n * Compiles the {block}{/block} tags\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile Block Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase {\n\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $required_attributes = array('name');\n\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $shorttag_order = array('name', 'hide');\n\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $optional_attributes = array('hide');\n\n    /**\n     * Compiles code for the {block} tag\n     *\n     * @param array  $args     array with attributes from parser\n     * @param object $compiler compiler object\n     * @return boolean true\n     */\n    public function compile($args, $compiler) {\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n        $save = array($_attr, $compiler->parser->current_buffer, $compiler->nocache, $compiler->smarty->merge_compiled_includes, $compiler->merged_templates, $compiler->smarty->merged_templates_func, $compiler->template->properties, $compiler->template->has_nocache_code);\n        $this->openTag($compiler, 'block', $save);\n        if ($_attr['nocache'] == true) {\n            $compiler->nocache = true;\n        }\n        // set flag for {block} tag\n        $compiler->inheritance = true;\n        // must merge includes\n        $compiler->smarty->merge_compiled_includes = true;\n\n        $compiler->parser->current_buffer = new _smarty_template_buffer($compiler->parser);\n        $compiler->has_code = false;\n        return true;\n    }\n\n    /**\n     * Save or replace child block source by block name during parsing\n     *\n     * @param string $block_content     block source content\n     * @param string $block_tag         opening block tag\n     * @param object $template          template object\n     * @param string $filepath          filepath of template source\n     */\n    public static function saveBlockData($block_content, $block_tag, $template, $filepath) {\n        $_rdl = preg_quote($template->smarty->right_delimiter);\n        $_ldl = preg_quote($template->smarty->left_delimiter);\n        if (!$template->smarty->auto_literal) {\n            $al = '\\s*';\n        } else {\n            $al = '';\n        }\n        if (0 == preg_match(\"!({$_ldl}{$al}block\\s+)(name=)?(\\w+|'.*'|\\\".*\\\")(\\s*?)?((append|prepend|nocache)?(\\s*)?(hide)?)?(\\s*{$_rdl})!\", $block_tag, $_match)) {\n            $error_text = 'Syntax Error in template \"' . $template->source->filepath . '\"   \"' . htmlspecialchars($block_tag) . '\" illegal options';\n            throw new SmartyCompilerException($error_text);\n        } else {\n            $_name = trim($_match[3], '\\'\"');\n            if ($_match[8] != 'hide' || isset($template->block_data[$_name])) {        // replace {$smarty.block.child}\n                // get nested block tags\n                if (0 != preg_match_all(\"!({$_ldl}{$al}block\\s+)(name=)?(\\w+|'.*'|\\\".*\\\")([\\s\\S]*?)(hide)?(\\s*{$_rdl})([\\s\\S]*?)(.*)?({$_ldl}{$al}/block\\s*{$_rdl})!\", $block_content, $_match2)) {\n                    foreach ($_match2[3] as $key => $name) {\n                        // get it's replacement\n                        $_name2 = trim($name, '\\'\"');\n                        if ($_match2[5][$key] != 'hide' || isset($template->block_data[$_name2])) {\n                            if (isset($template->block_data[$_name2])) {\n                                $replacement = $template->block_data[$_name2]['source'];\n                            } else {\n                                $replacement = '';\n                            }\n                            // replace {$smarty.block.child} tag\n                            if (preg_match(\"!{$_ldl}{$al}\\\\\\$smarty\\.block\\.child\\s*{$_rdl}!\",$_match2[7][$key])) {\n                                 $replacement =  preg_replace(\"!({$_ldl}{$al}\\\\\\$smarty\\.block\\.child\\s*{$_rdl})!\", $replacement, $_match2[7][$key]);\n                                 $block_content = preg_replace(\"!(({$_ldl}{$al}block)(.*)?{$name}(.*)?({$_rdl}[\\s\\S]*?{$_ldl}{$al}/block\\s*{$_rdl}))!\", $replacement, $block_content);\n                           }\n                             if (preg_match(\"!{$_ldl}{$al}\\\\\\$smarty\\.block\\.child\\s*{$_rdl}!\",$_match2[8][$key])) {\n                                 $replacement =  preg_replace(\"!{$_ldl}{$al}\\\\\\$smarty\\.block\\.child\\s*{$_rdl}!\", $replacement, $_match2[8][$key]);\n                                 $block_content = preg_replace(\"!(({$_ldl}{$al}block)(.*)?{$name}(.*)?({$_rdl})(.*)?({$_ldl}{$al}/block\\s*{$_rdl}))!\", $replacement, $block_content);\n                             }\n                        } else {\n                            // remove hidden blocks\n                            $block_content = preg_replace(\"!(({$_ldl}{$al}block)(.*)?{$name}(.*)?({$_rdl}[\\s\\S]*?{$_ldl}{$al}/block\\s*{$_rdl}))!\", '', $block_content);\n                        }\n                    }\n                }\n                // do we have not nested {$smart.block.child}\n                if (0 != preg_match(\"!({$_ldl}{$al}\\\\\\$smarty\\.block\\.child\\s*{$_rdl})!\", $block_content, $_match2)) {\n                    // get child replacement for this block\n                    if (isset($template->block_data[$_name])) {\n                        $replacement = $template->block_data[$_name]['source'];\n                        unset($template->block_data[$_name]);\n                    } else {\n                        $replacement = '';\n                    }\n                    $block_content = preg_replace(\"!({$_ldl}{$al}\\\\\\$smarty\\.block\\.child\\s*{$_rdl})!\", $replacement, $block_content);\n                }\n                if (isset($template->block_data[$_name])) {\n                    if (strpos($template->block_data[$_name]['source'], '%%%%SMARTY_PARENT%%%%') !== false) {\n                        $template->block_data[$_name]['source'] =\n                                str_replace('%%%%SMARTY_PARENT%%%%', $block_content, $template->block_data[$_name]['source']);\n                    } elseif ($template->block_data[$_name]['mode'] == 'prepend') {\n                        $template->block_data[$_name]['source'] .= $block_content;\n                    } elseif ($template->block_data[$_name]['mode'] == 'append') {\n                        $template->block_data[$_name]['source'] = $block_content . $template->block_data[$_name]['source'];\n                    }\n                } else {\n                    $template->block_data[$_name]['source'] = $block_content;\n                    $template->block_data[$_name]['file'] = $filepath;\n                }\n                if ($_match[6] == 'append') {\n                    $template->block_data[$_name]['mode'] = 'append';\n                } elseif ($_match[6] == 'prepend') {\n                    $template->block_data[$_name]['mode'] = 'prepend';\n                } else {\n                    $template->block_data[$_name]['mode'] = 'replace';\n                }\n            }\n        }\n    }\n\n    /**\n     * Compile saved child block source\n     *\n     * @param object $compiler  compiler object\n     * @param string $_name     optional name of child block\n     * @return string   compiled code of schild block\n     */\n    public static function compileChildBlock($compiler, $_name = null) {\n        $_output = '';\n        // if called by {$smarty.block.child} we must search the name of enclosing {block}\n        if ($_name == null) {\n            $stack_count = count($compiler->_tag_stack);\n            while (--$stack_count >= 0) {\n                if ($compiler->_tag_stack[$stack_count][0] == 'block') {\n                    $_name = trim($compiler->_tag_stack[$stack_count][1][0]['name'], \"'\\\"\");\n                    break;\n                }\n            }\n            // flag that child is already compile by {$smarty.block.child} inclusion\n            $compiler->template->block_data[$_name]['compiled'] = true;\n        }\n        if ($_name == null) {\n            $compiler->trigger_template_error('{$smarty.block.child} used out of context', $compiler->lex->taglineno);\n        }\n        // undefined child?\n        if (!isset($compiler->template->block_data[$_name]['source'])) {\n            return '';\n        }\n        $_tpl = new Smarty_Internal_template('string:' . $compiler->template->block_data[$_name]['source'], $compiler->smarty, $compiler->template, $compiler->template->cache_id,\n                        $compiler->template->compile_id = null, $compiler->template->caching, $compiler->template->cache_lifetime);\n        $_tpl->variable_filters = $compiler->template->variable_filters;\n        $_tpl->properties['nocache_hash'] = $compiler->template->properties['nocache_hash'];\n        $_tpl->source->filepath = $compiler->template->block_data[$_name]['file'];\n        $_tpl->allow_relative_path = true;\n        if ($compiler->nocache) {\n            $_tpl->compiler->forceNocache = 2;\n        } else {\n            $_tpl->compiler->forceNocache = 1;\n        }\n        $_tpl->compiler->suppressHeader = true;\n        $_tpl->compiler->suppressTemplatePropertyHeader = true;\n        $_tpl->compiler->suppressMergedTemplates = true;\n        if (strpos($compiler->template->block_data[$_name]['source'], '%%%%SMARTY_PARENT%%%%') !== false) {\n            $_output = str_replace('%%%%SMARTY_PARENT%%%%', $compiler->parser->current_buffer->to_smarty_php(), $_tpl->compiler->compileTemplate($_tpl));\n        } elseif ($compiler->template->block_data[$_name]['mode'] == 'prepend') {\n            $_output = $_tpl->compiler->compileTemplate($_tpl) . $compiler->parser->current_buffer->to_smarty_php();\n        } elseif ($compiler->template->block_data[$_name]['mode'] == 'append') {\n            $_output = $compiler->parser->current_buffer->to_smarty_php() . $_tpl->compiler->compileTemplate($_tpl);\n        } elseif (!empty($compiler->template->block_data[$_name])) {\n            $_output = $_tpl->compiler->compileTemplate($_tpl);\n        }\n        $compiler->template->properties['file_dependency'] = array_merge($compiler->template->properties['file_dependency'], $_tpl->properties['file_dependency']);\n        $compiler->template->properties['function'] = array_merge($compiler->template->properties['function'], $_tpl->properties['function']);\n        $compiler->merged_templates = array_merge($compiler->merged_templates, $_tpl->compiler->merged_templates);\n        $compiler->template->variable_filters = $_tpl->variable_filters;\n        if ($_tpl->has_nocache_code) {\n            $compiler->template->has_nocache_code = true;\n        }\n        foreach ($_tpl->required_plugins as $key => $tmp1) {\n            if ($compiler->nocache && $compiler->template->caching) {\n                $code = 'nocache';\n            } else {\n                $code = $key;\n            }\n            foreach ($tmp1 as $name => $tmp) {\n                foreach ($tmp as $type => $data) {\n                    $compiler->template->required_plugins[$code][$name][$type] = $data;\n                }\n            }\n        }\n        unset($_tpl);\n        return $_output;\n    }\n\n}\n\n/**\n * Smarty Internal Plugin Compile BlockClose Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Blockclose extends Smarty_Internal_CompileBase {\n\n    /**\n     * Compiles code for the {/block} tag\n     *\n     * @param array  $args     array with attributes from parser\n     * @param object $compiler compiler object\n     * @return string compiled code\n     */\n    public function compile($args, $compiler) {\n        $compiler->has_code = true;\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n        $saved_data = $this->closeTag($compiler, array('block'));\n        $_name = trim($saved_data[0]['name'], \"\\\"'\");\n        if (isset($compiler->template->block_data[$_name]) && !isset($compiler->template->block_data[$_name]['compiled'])) {\n            // restore to status before {block} tag as new subtemplate code of parent {block} is not needed\n            // TODO: Below code was disabled in 3.1.8 because of problems with {include} in nested {block} tags in child templates\n            //       combined with append/prepend or $smarty.block.parent\n            //       For later versions it should be checked under which conditions it could run for optimisation\n            //\n            //$compiler->merged_templates = $saved_data[4];\n            //$compiler->smarty->merged_templates_func = $saved_data[5];\n            //$compiler->template->properties = $saved_data[6];\n            //$compiler->template->has_nocache_code = $saved_data[7];\n            $_output = Smarty_Internal_Compile_Block::compileChildBlock($compiler, $_name);\n        } else {\n            if (isset($saved_data[0]['hide']) && !isset($compiler->template->block_data[$_name]['source'])) {\n                $_output = '';\n            } else {\n                $_output = $compiler->parser->current_buffer->to_smarty_php();\n            }\n            unset($compiler->template->block_data[$_name]['compiled']);\n        }\n        // reset flags\n        $compiler->parser->current_buffer = $saved_data[1];\n        $compiler->nocache = $saved_data[2];\n        $compiler->smarty->merge_compiled_includes = $saved_data[3];\n        // reset flag for {block} tag\n        $compiler->inheritance = false;\n        // $_output content has already nocache code processed\n        $compiler->suppressNocacheProcessing = true;\n        return $_output;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_break.php",
    "content": "<?php\r\n/**\r\n * Smarty Internal Plugin Compile Break\r\n *\r\n * Compiles the {break} tag\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n * @author Uwe Tews\r\n */\r\n/**\r\n * Smarty Internal Plugin Compile Break Class\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n */\r\nclass Smarty_Internal_Compile_Break extends Smarty_Internal_CompileBase {\r\n\r\n    /**\r\n     * Attribute definition: Overwrites base class.\r\n     *\r\n     * @var array\r\n     * @see Smarty_Internal_CompileBase\r\n     */\r\n    public $optional_attributes = array('levels');\r\n    /**\r\n     * Attribute definition: Overwrites base class.\r\n     *\r\n     * @var array\r\n     * @see Smarty_Internal_CompileBase\r\n     */\r\n    public $shorttag_order = array('levels');\r\n\r\n    /**\r\n     * Compiles code for the {break} tag\r\n     *\r\n     * @param array  $args array with attributes from parser\r\n     * @param object $compiler   compiler object\r\n     * @param array  $parameter  array with compilation parameter\r\n     * @return string compiled code\r\n     */\r\n    public function compile($args, $compiler, $parameter)\r\n    {\r\n        static $_is_loopy = array('for' => true, 'foreach' => true, 'while' => true, 'section' => true);\r\n        // check and get attributes\r\n        $_attr = $this->getAttributes($compiler, $args);\r\n\r\n        if ($_attr['nocache'] === true) {\r\n            $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);\r\n        }\r\n\r\n        if (isset($_attr['levels'])) {\r\n            if (!is_numeric($_attr['levels'])) {\r\n                $compiler->trigger_template_error('level attribute must be a numeric constant', $compiler->lex->taglineno);\r\n            }\r\n            $_levels = $_attr['levels'];\r\n        } else {\r\n            $_levels = 1;\r\n        }\r\n        $level_count = $_levels;\r\n        $stack_count = count($compiler->_tag_stack) - 1;\r\n        while ($level_count > 0 && $stack_count >= 0) {\r\n            if (isset($_is_loopy[$compiler->_tag_stack[$stack_count][0]])) {\r\n                $level_count--;\r\n            }\r\n            $stack_count--;\r\n        }\r\n        if ($level_count != 0) {\r\n            $compiler->trigger_template_error(\"cannot break {$_levels} level(s)\", $compiler->lex->taglineno);\r\n        }\r\n        $compiler->has_code = true;\r\n        return \"<?php break {$_levels}?>\";\r\n    }\r\n\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_call.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Compile Function_Call\n *\n * Compiles the calls of user defined tags defined by {function}\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile Function_Call Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Call extends Smarty_Internal_CompileBase {\n\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $required_attributes = array('name');\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $shorttag_order = array('name');\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $optional_attributes = array('_any');\n\n    /**\n     * Compiles the calls of user defined tags defined by {function}\n     *\n     * @param array  $args      array with attributes from parser\n     * @param object $compiler  compiler object\n     * @param array  $parameter array with compilation parameter\n     * @return string compiled code\n     */\n    public function compile($args, $compiler)\n    {\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n        // save possible attributes\n        if (isset($_attr['assign'])) {\n            // output will be stored in a smarty variable instead of beind displayed\n            $_assign = $_attr['assign'];\n        }\n        $_name = $_attr['name'];\n        if ($compiler->compiles_template_function) {\n            $compiler->called_functions[] = trim($_name, \"'\\\"\");\n        }\n        unset($_attr['name'], $_attr['assign'], $_attr['nocache']);\n        // set flag (compiled code of {function} must be included in cache file\n        if ($compiler->nocache || $compiler->tag_nocache) {\n            $_nocache = 'true';\n        } else {\n            $_nocache = 'false';\n        }\n        $_paramsArray = array();\n        foreach ($_attr as $_key => $_value) {\n            if (is_int($_key)) {\n                $_paramsArray[] = \"$_key=>$_value\";\n            } else {\n                $_paramsArray[] = \"'$_key'=>$_value\";\n            }\n        }\n        if (isset($compiler->template->properties['function'][$_name]['parameter'])) {\n            foreach ($compiler->template->properties['function'][$_name]['parameter'] as $_key => $_value) {\n                if (!isset($_attr[$_key])) {\n                    if (is_int($_key)) {\n                        $_paramsArray[] = \"$_key=>$_value\";\n                    } else {\n                        $_paramsArray[] = \"'$_key'=>$_value\";\n                    }\n                }\n            }\n        } elseif (isset($compiler->smarty->template_functions[$_name]['parameter'])) {\n            foreach ($compiler->smarty->template_functions[$_name]['parameter'] as $_key => $_value) {\n                if (!isset($_attr[$_key])) {\n                    if (is_int($_key)) {\n                        $_paramsArray[] = \"$_key=>$_value\";\n                    } else {\n                        $_paramsArray[] = \"'$_key'=>$_value\";\n                    }\n                }\n            }\n        }\n        //varibale name?\n        if (!(strpos($_name, '$') === false)) {\n            $call_cache = $_name;\n            $call_function = '$tmp = \"smarty_template_function_\".' . $_name . '; $tmp';\n        } else {\n            $_name = trim($_name, \"'\\\"\");\n            $call_cache = \"'{$_name}'\";\n            $call_function = 'smarty_template_function_' . $_name;\n        }\n\n        $_params = 'array(' . implode(\",\", $_paramsArray) . ')';\n        $_hash = str_replace('-', '_', $compiler->template->properties['nocache_hash']);\n        // was there an assign attribute\n        if (isset($_assign)) {\n            if ($compiler->template->caching) {\n                $_output = \"<?php ob_start(); Smarty_Internal_Function_Call_Handler::call ({$call_cache},\\$_smarty_tpl,{$_params},'{$_hash}',{$_nocache}); \\$_smarty_tpl->assign({$_assign}, ob_get_clean());?>\\n\";\n            } else {\n                $_output = \"<?php ob_start(); {$call_function}(\\$_smarty_tpl,{$_params}); \\$_smarty_tpl->assign({$_assign}, ob_get_clean());?>\\n\";\n            }\n        } else {\n            if ($compiler->template->caching) {\n                $_output = \"<?php Smarty_Internal_Function_Call_Handler::call ({$call_cache},\\$_smarty_tpl,{$_params},'{$_hash}',{$_nocache});?>\\n\";\n            } else {\n                $_output = \"<?php {$call_function}(\\$_smarty_tpl,{$_params});?>\\n\";\n            }\n        }\n        return $_output;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_capture.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Compile Capture\n *\n * Compiles the {capture} tag\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile Capture Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Capture extends Smarty_Internal_CompileBase {\n\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $shorttag_order = array('name');\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $optional_attributes = array('name', 'assign', 'append');\n\n    /**\n     * Compiles code for the {capture} tag\n     *\n     * @param array  $args     array with attributes from parser\n     * @param object $compiler compiler object\n     * @return string compiled code\n     */\n    public function compile($args, $compiler)\n    {\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n\n        $buffer = isset($_attr['name']) ? $_attr['name'] : \"'default'\";\n        $assign = isset($_attr['assign']) ? $_attr['assign'] : 'null';\n        $append = isset($_attr['append']) ? $_attr['append'] : 'null';\n\n        $compiler->_capture_stack[0][] = array($buffer, $assign, $append, $compiler->nocache);\n        // maybe nocache because of nocache variables\n        $compiler->nocache = $compiler->nocache | $compiler->tag_nocache;\n        $_output = \"<?php \\$_smarty_tpl->_capture_stack[0][] = array($buffer, $assign, $append); ob_start(); ?>\";\n\n        return $_output;\n    }\n\n}\n\n/**\n * Smarty Internal Plugin Compile Captureclose Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_CaptureClose extends Smarty_Internal_CompileBase {\n\n    /**\n     * Compiles code for the {/capture} tag\n     *\n     * @param array  $args     array with attributes from parser\n     * @param object $compiler compiler object\n     * @return string compiled code\n     */\n    public function compile($args, $compiler)\n    {\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n        // must endblock be nocache?\n        if ($compiler->nocache) {\n            $compiler->tag_nocache = true;\n        }\n\n        list($buffer, $assign, $append, $compiler->nocache) = array_pop($compiler->_capture_stack[0]);\n\n        $_output = \"<?php list(\\$_capture_buffer, \\$_capture_assign, \\$_capture_append) = array_pop(\\$_smarty_tpl->_capture_stack[0]);\\n\";\n        $_output .= \"if (!empty(\\$_capture_buffer)) {\\n\";\n        $_output .= \" if (isset(\\$_capture_assign)) \\$_smarty_tpl->assign(\\$_capture_assign, ob_get_contents());\\n\";\n        $_output .= \" if (isset( \\$_capture_append)) \\$_smarty_tpl->append( \\$_capture_append, ob_get_contents());\\n\";\n        $_output .= \" Smarty::\\$_smarty_vars['capture'][\\$_capture_buffer]=ob_get_clean();\\n\";\n        $_output .= \"} else \\$_smarty_tpl->capture_error();?>\";\n        return $_output;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_config_load.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Compile Config Load\n *\n * Compiles the {config load} tag\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile Config Load Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Config_Load extends Smarty_Internal_CompileBase {\n\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $required_attributes = array('file');\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $shorttag_order = array('file','section');\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $optional_attributes = array('section', 'scope');\n\n    /**\n     * Compiles code for the {config_load} tag\n     *\n     * @param array  $args     array with attributes from parser\n     * @param object $compiler compiler object\n     * @return string compiled code\n     */\n    public function compile($args, $compiler)\n    {\n        static $_is_legal_scope = array('local' => true,'parent' => true,'root' => true,'global' => true);\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n\n        if ($_attr['nocache'] === true) {\n            $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);\n        }\n\n\n        // save posible attributes\n        $conf_file = $_attr['file'];\n        if (isset($_attr['section'])) {\n            $section = $_attr['section'];\n        } else {\n            $section = 'null';\n        }\n        $scope = 'local';\n        // scope setup\n        if (isset($_attr['scope'])) {\n            $_attr['scope'] = trim($_attr['scope'], \"'\\\"\");\n            if (isset($_is_legal_scope[$_attr['scope']])) {\n                $scope = $_attr['scope'];\n           } else {\n                $compiler->trigger_template_error('illegal value for \"scope\" attribute', $compiler->lex->taglineno);\n           }\n        }\n        // create config object\n        $_output = \"<?php  \\$_config = new Smarty_Internal_Config($conf_file, \\$_smarty_tpl->smarty, \\$_smarty_tpl);\";\n        $_output .= \"\\$_config->loadConfigVars($section, '$scope'); ?>\";\n        return $_output;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_continue.php",
    "content": "<?php\r\n/**\r\n * Smarty Internal Plugin Compile Continue\r\n *\r\n * Compiles the {continue} tag\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n * @author Uwe Tews\r\n */\r\n\r\n/**\r\n * Smarty Internal Plugin Compile Continue Class\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n */\r\nclass Smarty_Internal_Compile_Continue extends Smarty_Internal_CompileBase {\r\n\r\n    /**\r\n     * Attribute definition: Overwrites base class.\r\n     *\r\n     * @var array\r\n     * @see Smarty_Internal_CompileBase\r\n     */\r\n    public $optional_attributes = array('levels');\r\n    /**\r\n     * Attribute definition: Overwrites base class.\r\n     *\r\n     * @var array\r\n     * @see Smarty_Internal_CompileBase\r\n     */\r\n    public $shorttag_order = array('levels');\r\n\r\n    /**\r\n     * Compiles code for the {continue} tag\r\n     *\r\n     * @param array  $args      array with attributes from parser\r\n     * @param object $compiler  compiler object\r\n     * @param array  $parameter array with compilation parameter\r\n     * @return string compiled code\r\n     */\r\n    public function compile($args, $compiler, $parameter)\r\n    {\r\n        static $_is_loopy = array('for' => true, 'foreach' => true, 'while' => true, 'section' => true);\r\n        // check and get attributes\r\n        $_attr = $this->getAttributes($compiler, $args);\r\n\r\n        if ($_attr['nocache'] === true) {\r\n            $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);\r\n        }\r\n\r\n        if (isset($_attr['levels'])) {\r\n            if (!is_numeric($_attr['levels'])) {\r\n                $compiler->trigger_template_error('level attribute must be a numeric constant', $compiler->lex->taglineno);\r\n            }\r\n            $_levels = $_attr['levels'];\r\n        } else {\r\n            $_levels = 1;\r\n        }\r\n        $level_count = $_levels;\r\n        $stack_count = count($compiler->_tag_stack) - 1;\r\n        while ($level_count > 0 && $stack_count >= 0) {\r\n            if (isset($_is_loopy[$compiler->_tag_stack[$stack_count][0]])) {\r\n                $level_count--;\r\n            }\r\n            $stack_count--;\r\n        }\r\n        if ($level_count != 0) {\r\n            $compiler->trigger_template_error(\"cannot continue {$_levels} level(s)\", $compiler->lex->taglineno);\r\n        }\r\n        $compiler->has_code = true;\r\n        return \"<?php continue {$_levels}?>\";\r\n    }\r\n\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_debug.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Compile Debug\n *\n * Compiles the {debug} tag.\n * It opens a window the the Smarty Debugging Console.\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile Debug Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Debug extends Smarty_Internal_CompileBase {\n\n    /**\n     * Compiles code for the {debug} tag\n     *\n     * @param array  $args     array with attributes from parser\n     * @param object $compiler compiler object\n     * @return string compiled code\n     */\n    public function compile($args, $compiler)\n    {\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n\n        // compile always as nocache\n        $compiler->tag_nocache = true;\n\n        // display debug template\n        $_output = \"<?php \\$_smarty_tpl->smarty->loadPlugin('Smarty_Internal_Debug'); Smarty_Internal_Debug::display_debug(\\$_smarty_tpl); ?>\";\n        return $_output;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_eval.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Compile Eval\n *\n * Compiles the {eval} tag.\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile Eval Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Eval extends Smarty_Internal_CompileBase {\n\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $required_attributes = array('var');\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $optional_attributes = array('assign');\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $shorttag_order = array('var','assign');\n\n    /**\n     * Compiles code for the {eval} tag\n     *\n     * @param array  $args     array with attributes from parser\n     * @param object $compiler compiler object\n     * @return string compiled code\n     */\n    public function compile($args, $compiler)\n    {\n        $this->required_attributes = array('var');\n        $this->optional_attributes = array('assign');\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n        if (isset($_attr['assign'])) {\n              // output will be stored in a smarty variable instead of beind displayed\n            $_assign = $_attr['assign'];\n        }\n\n        // create template object\n        $_output = \"\\$_template = new {$compiler->smarty->template_class}('eval:'.\".$_attr['var'].\", \\$_smarty_tpl->smarty, \\$_smarty_tpl);\";\n        //was there an assign attribute?\n        if (isset($_assign)) {\n            $_output .= \"\\$_smarty_tpl->assign($_assign,\\$_template->fetch());\";\n        } else {\n            $_output .= \"echo \\$_template->fetch();\";\n        }\n        return \"<?php $_output ?>\";\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_extends.php",
    "content": "<?php\n\n/**\n* Smarty Internal Plugin Compile extend\n*\n* Compiles the {extends} tag\n*\n* @package Smarty\n* @subpackage Compiler\n* @author Uwe Tews\n*/\n\n/**\n* Smarty Internal Plugin Compile extend Class\n*\n* @package Smarty\n* @subpackage Compiler\n*/\nclass Smarty_Internal_Compile_Extends extends Smarty_Internal_CompileBase {\n\n    /**\n    * Attribute definition: Overwrites base class.\n    *\n    * @var array\n    * @see Smarty_Internal_CompileBase\n    */\n    public $required_attributes = array('file');\n    /**\n    * Attribute definition: Overwrites base class.\n    *\n    * @var array\n    * @see Smarty_Internal_CompileBase\n    */\n    public $shorttag_order = array('file');\n    /**\n    * mbstring.overload flag\n    *\n    * @var int\n    */\n    public $mbstring_overload = 0;\n\n    /**\n    * Compiles code for the {extends} tag\n    *\n    * @param array  $args     array with attributes from parser\n    * @param object $compiler compiler object\n    * @return string compiled code\n    */\n    public function compile($args, $compiler)\n    {\n        static $_is_stringy = array('string' => true, 'eval' => true);\n        $this->_rdl = preg_quote($compiler->smarty->right_delimiter);\n        $this->_ldl = preg_quote($compiler->smarty->left_delimiter);\n        if (!$compiler->smarty->auto_literal) {\n            $al = '\\s*';\n        } else {\n            $al = '';\n        }\n        $filepath = $compiler->template->source->filepath;\n        $this->mbstring_overload = ini_get('mbstring.func_overload') & 2;\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n        if ($_attr['nocache'] === true) {\n            $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);\n        }\n\n        $_smarty_tpl = $compiler->template;\n        $include_file = null;\n        if (strpos($_attr['file'], '$_tmp') !== false) {\n            $compiler->trigger_template_error('illegal value for file attribute', $compiler->lex->taglineno);\n        }\n        eval('$include_file = ' . $_attr['file'] . ';');\n        // create template object\n        $_template = new $compiler->smarty->template_class($include_file, $compiler->smarty, $compiler->template);\n        // save file dependency\n        if (isset($_is_stringy[$_template->source->type])) {\n            $template_sha1 = sha1($include_file);\n        } else {\n            $template_sha1 = sha1($_template->source->filepath);\n        }\n        if (isset($compiler->template->properties['file_dependency'][$template_sha1])) {\n            $compiler->trigger_template_error(\"illegal recursive call of \\\"{$include_file}\\\"\", $compiler->lex->line - 1);\n        }\n        $compiler->template->properties['file_dependency'][$template_sha1] = array($_template->source->filepath, $_template->source->timestamp, $_template->source->type);\n        $_content = ($this->mbstring_overload ? mb_substr($compiler->lex->data, $compiler->lex->counter - 1, 20000000, 'latin1') : substr($compiler->lex->data, $compiler->lex->counter - 1));\n        if (preg_match_all(\"!({$this->_ldl}{$al}block\\s(.+?)\\s*{$this->_rdl})!\", $_content, $s) !=\n        preg_match_all(\"!({$this->_ldl}{$al}/block\\s*{$this->_rdl})!\", $_content, $c)) {\n            $compiler->trigger_template_error('unmatched {block} {/block} pairs');\n        }\n        preg_match_all(\"!{$this->_ldl}{$al}block\\s(.+?)\\s*{$this->_rdl}|{$this->_ldl}{$al}/block\\s*{$this->_rdl}|{$this->_ldl}\\*([\\S\\s]*?)\\*{$this->_rdl}!\", $_content, $_result, PREG_OFFSET_CAPTURE);\n        $_result_count = count($_result[0]);\n        $_start = 0;\n        while ($_start+1 < $_result_count) {\n            $_end = 0;\n            $_level = 1;\n            if (($this->mbstring_overload ? mb_substr($_result[0][$_start][0],0,mb_strlen($compiler->smarty->left_delimiter,'latin1')+1, 'latin1') : substr($_result[0][$_start][0],0,strlen($compiler->smarty->left_delimiter)+1)) == $compiler->smarty->left_delimiter.'*') {\n                $_start++;\n                continue;\n            }\n            while ($_level != 0) {\n                $_end++;\n                if (($this->mbstring_overload ? mb_substr($_result[0][$_start + $_end][0],0,mb_strlen($compiler->smarty->left_delimiter,'latin1')+1, 'latin1') : substr($_result[0][$_start + $_end][0],0,strlen($compiler->smarty->left_delimiter)+1)) == $compiler->smarty->left_delimiter.'*') {\n                    continue;\n                }\n                if (!strpos($_result[0][$_start + $_end][0], '/')) {\n                    $_level++;\n                } else {\n                    $_level--;\n                }\n            }\n            $_block_content = str_replace($compiler->smarty->left_delimiter . '$smarty.block.parent' . $compiler->smarty->right_delimiter, '%%%%SMARTY_PARENT%%%%',\n            ($this->mbstring_overload ? mb_substr($_content, $_result[0][$_start][1] + mb_strlen($_result[0][$_start][0], 'latin1'), $_result[0][$_start + $_end][1] - $_result[0][$_start][1] - + mb_strlen($_result[0][$_start][0], 'latin1'), 'latin1') : substr($_content, $_result[0][$_start][1] + strlen($_result[0][$_start][0]), $_result[0][$_start + $_end][1] - $_result[0][$_start][1] - + strlen($_result[0][$_start][0]))));\n            Smarty_Internal_Compile_Block::saveBlockData($_block_content, $_result[0][$_start][0], $compiler->template, $filepath);\n            $_start = $_start + $_end + 1;\n        }\n        if ($_template->source->type == 'extends') {\n            $_template->block_data = $compiler->template->block_data;\n        }\n        $compiler->template->source->content = $_template->source->content;\n        if ($_template->source->type == 'extends') {\n            $compiler->template->block_data = $_template->block_data;\n            foreach ($_template->source->components as $key => $component) {\n                $compiler->template->properties['file_dependency'][$key] = array($component->filepath, $component->timestamp, $component->type);\n            }\n        }\n        $compiler->template->source->filepath = $_template->source->filepath;\n        $compiler->abort_and_recompile = true;\n        return '';\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_for.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Compile For\n *\n * Compiles the {for} {forelse} {/for} tags\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile For Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_For extends Smarty_Internal_CompileBase {\n\n    /**\n     * Compiles code for the {for} tag\n     *\n     * Smarty 3 does implement two different sytaxes:\n     *\n     * - {for $var in $array}\n     * For looping over arrays or iterators\n     *\n     * - {for $x=0; $x<$y; $x++}\n     * For general loops\n     *\n     * The parser is gereration different sets of attribute by which this compiler can\n     * determin which syntax is used.\n     *\n     * @param array  $args      array with attributes from parser\n     * @param object $compiler  compiler object\n     * @param array  $parameter array with compilation parameter\n     * @return string compiled code\n     */\n    public function compile($args, $compiler, $parameter)\n    {\n        if ($parameter == 0) {\n            $this->required_attributes = array('start', 'to');\n            $this->optional_attributes = array('max', 'step');\n        } else {\n            $this->required_attributes = array('start', 'ifexp', 'var', 'step');\n            $this->optional_attributes = array();\n        }\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n\n        $output = \"<?php \";\n        if ($parameter == 1) {\n            foreach ($_attr['start'] as $_statement) {\n                $output .= \" \\$_smarty_tpl->tpl_vars[$_statement[var]] = new Smarty_Variable;\";\n                $output .= \" \\$_smarty_tpl->tpl_vars[$_statement[var]]->value = $_statement[value];\\n\";\n            }\n            $output .= \"  if ($_attr[ifexp]){ for (\\$_foo=true;$_attr[ifexp]; \\$_smarty_tpl->tpl_vars[$_attr[var]]->value$_attr[step]){\\n\";\n        } else {\n            $_statement = $_attr['start'];\n            $output .= \"\\$_smarty_tpl->tpl_vars[$_statement[var]] = new Smarty_Variable;\";\n            if (isset($_attr['step'])) {\n                $output .= \"\\$_smarty_tpl->tpl_vars[$_statement[var]]->step = $_attr[step];\";\n            } else {\n                $output .= \"\\$_smarty_tpl->tpl_vars[$_statement[var]]->step = 1;\";\n            }\n            if (isset($_attr['max'])) {\n                $output .= \"\\$_smarty_tpl->tpl_vars[$_statement[var]]->total = (int)min(ceil((\\$_smarty_tpl->tpl_vars[$_statement[var]]->step > 0 ? $_attr[to]+1 - ($_statement[value]) : $_statement[value]-($_attr[to])+1)/abs(\\$_smarty_tpl->tpl_vars[$_statement[var]]->step)),$_attr[max]);\\n\";\n            } else {\n                $output .= \"\\$_smarty_tpl->tpl_vars[$_statement[var]]->total = (int)ceil((\\$_smarty_tpl->tpl_vars[$_statement[var]]->step > 0 ? $_attr[to]+1 - ($_statement[value]) : $_statement[value]-($_attr[to])+1)/abs(\\$_smarty_tpl->tpl_vars[$_statement[var]]->step));\\n\";\n            }\n            $output .= \"if (\\$_smarty_tpl->tpl_vars[$_statement[var]]->total > 0){\\n\";\n            $output .= \"for (\\$_smarty_tpl->tpl_vars[$_statement[var]]->value = $_statement[value], \\$_smarty_tpl->tpl_vars[$_statement[var]]->iteration = 1;\\$_smarty_tpl->tpl_vars[$_statement[var]]->iteration <= \\$_smarty_tpl->tpl_vars[$_statement[var]]->total;\\$_smarty_tpl->tpl_vars[$_statement[var]]->value += \\$_smarty_tpl->tpl_vars[$_statement[var]]->step, \\$_smarty_tpl->tpl_vars[$_statement[var]]->iteration++){\\n\";\n            $output .= \"\\$_smarty_tpl->tpl_vars[$_statement[var]]->first = \\$_smarty_tpl->tpl_vars[$_statement[var]]->iteration == 1;\";\n            $output .= \"\\$_smarty_tpl->tpl_vars[$_statement[var]]->last = \\$_smarty_tpl->tpl_vars[$_statement[var]]->iteration == \\$_smarty_tpl->tpl_vars[$_statement[var]]->total;\";\n        }\n        $output .= \"?>\";\n\n        $this->openTag($compiler, 'for', array('for', $compiler->nocache));\n        // maybe nocache because of nocache variables\n        $compiler->nocache = $compiler->nocache | $compiler->tag_nocache;\n        // return compiled code\n        return $output;\n    }\n\n}\n\n/**\n * Smarty Internal Plugin Compile Forelse Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Forelse extends Smarty_Internal_CompileBase {\n\n    /**\n     * Compiles code for the {forelse} tag\n     *\n     * @param array  $args      array with attributes from parser\n     * @param object $compiler  compiler object\n     * @param array  $parameter array with compilation parameter\n     * @return string compiled code\n     */\n    public function compile($args, $compiler, $parameter)\n    {\n        // check and get attributes\n        $_attr  = $this->getAttributes($compiler, $args);\n\n        list($openTag, $nocache) = $this->closeTag($compiler, array('for'));\n        $this->openTag($compiler, 'forelse', array('forelse', $nocache));\n        return \"<?php }} else { ?>\";\n    }\n\n}\n\n/**\n * Smarty Internal Plugin Compile Forclose Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Forclose extends Smarty_Internal_CompileBase {\n\n    /**\n     * Compiles code for the {/for} tag\n     *\n     * @param array  $args      array with attributes from parser\n     * @param object $compiler  compiler object\n     * @param array  $parameter array with compilation parameter\n     * @return string compiled code\n     */\n    public function compile($args, $compiler, $parameter)\n    {\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n        // must endblock be nocache?\n        if ($compiler->nocache) {\n            $compiler->tag_nocache = true;\n        }\n\n        list($openTag, $compiler->nocache) = $this->closeTag($compiler, array('for', 'forelse'));\n\n        if ($openTag == 'forelse') {\n            return \"<?php }  ?>\";\n        } else {\n            return \"<?php }} ?>\";\n        }\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_foreach.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Compile Foreach\n *\n * Compiles the {foreach} {foreachelse} {/foreach} tags\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile Foreach Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Foreach extends Smarty_Internal_CompileBase {\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $required_attributes = array('from', 'item');\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $optional_attributes = array('name', 'key');\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $shorttag_order = array('from','item','key','name');\n\n    /**\n     * Compiles code for the {foreach} tag\n     *\n     * @param array  $args      array with attributes from parser\n     * @param object $compiler  compiler object\n     * @param array  $parameter array with compilation parameter\n     * @return string compiled code\n     */\n    public function compile($args, $compiler, $parameter)\n    {\n        $tpl = $compiler->template;\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n\n        $from = $_attr['from'];\n        $item = $_attr['item'];\n        if (!strncmp(\"\\$_smarty_tpl->tpl_vars[$item]\", $from, strlen($item) + 24)) {\n            $compiler->trigger_template_error(\"item variable {$item} may not be the same variable as at 'from'\", $compiler->lex->taglineno);\n        }\n\n        if (isset($_attr['key'])) {\n            $key = $_attr['key'];\n        } else {\n            $key = null;\n        }\n\n        $this->openTag($compiler, 'foreach', array('foreach', $compiler->nocache, $item, $key));\n        // maybe nocache because of nocache variables\n        $compiler->nocache = $compiler->nocache | $compiler->tag_nocache;\n\n        if (isset($_attr['name'])) {\n            $name = $_attr['name'];\n            $has_name = true;\n            $SmartyVarName = '$smarty.foreach.' . trim($name, '\\'\"') . '.';\n        } else {\n            $name = null;\n            $has_name = false;\n        }\n        $ItemVarName = '$' . trim($item, '\\'\"') . '@';\n        // evaluates which Smarty variables and properties have to be computed\n        if ($has_name) {\n            $usesSmartyFirst = strpos($tpl->source->content, $SmartyVarName . 'first') !== false;\n            $usesSmartyLast = strpos($tpl->source->content, $SmartyVarName . 'last') !== false;\n            $usesSmartyIndex = strpos($tpl->source->content, $SmartyVarName . 'index') !== false;\n            $usesSmartyIteration = strpos($tpl->source->content, $SmartyVarName . 'iteration') !== false;\n            $usesSmartyShow = strpos($tpl->source->content, $SmartyVarName . 'show') !== false;\n            $usesSmartyTotal = strpos($tpl->source->content, $SmartyVarName . 'total') !== false;\n        } else {\n            $usesSmartyFirst = false;\n            $usesSmartyLast = false;\n            $usesSmartyTotal = false;\n            $usesSmartyShow = false;\n        }\n\n        $usesPropFirst = $usesSmartyFirst || strpos($tpl->source->content, $ItemVarName . 'first') !== false;\n        $usesPropLast = $usesSmartyLast || strpos($tpl->source->content, $ItemVarName . 'last') !== false;\n        $usesPropIndex = $usesPropFirst || strpos($tpl->source->content, $ItemVarName . 'index') !== false;\n        $usesPropIteration = $usesPropLast || strpos($tpl->source->content, $ItemVarName . 'iteration') !== false;\n        $usesPropShow = strpos($tpl->source->content, $ItemVarName . 'show') !== false;\n        $usesPropTotal = $usesSmartyTotal || $usesSmartyShow || $usesPropShow || $usesPropLast || strpos($tpl->source->content, $ItemVarName . 'total') !== false;\n        // generate output code\n        $output = \"<?php \";\n        $output .= \" \\$_smarty_tpl->tpl_vars[$item] = new Smarty_Variable; \\$_smarty_tpl->tpl_vars[$item]->_loop = false;\\n\";\n        if ($key != null) {\n            $output .= \" \\$_smarty_tpl->tpl_vars[$key] = new Smarty_Variable;\\n\";\n        }\n        $output .= \" \\$_from = $from; if (!is_array(\\$_from) && !is_object(\\$_from)) { settype(\\$_from, 'array');}\\n\";\n        if ($usesPropTotal) {\n            $output .= \" \\$_smarty_tpl->tpl_vars[$item]->total= \\$_smarty_tpl->_count(\\$_from);\\n\";\n        }\n        if ($usesPropIteration) {\n            $output .= \" \\$_smarty_tpl->tpl_vars[$item]->iteration=0;\\n\";\n        }\n        if ($usesPropIndex) {\n            $output .= \" \\$_smarty_tpl->tpl_vars[$item]->index=-1;\\n\";\n        }\n        if ($usesPropShow) {\n            $output .= \" \\$_smarty_tpl->tpl_vars[$item]->show = (\\$_smarty_tpl->tpl_vars[$item]->total > 0);\\n\";\n        }\n        if ($has_name) {\n            if ($usesSmartyTotal) {\n                $output .= \" \\$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['total'] = \\$_smarty_tpl->tpl_vars[$item]->total;\\n\";\n            }\n            if ($usesSmartyIteration) {\n                $output .= \" \\$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['iteration']=0;\\n\";\n            }\n            if ($usesSmartyIndex) {\n                $output .= \" \\$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['index']=-1;\\n\";\n            }\n            if ($usesSmartyShow) {\n                $output .= \" \\$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['show']=(\\$_smarty_tpl->tpl_vars[$item]->total > 0);\\n\";\n            }\n        }\n        $output .= \"foreach (\\$_from as \\$_smarty_tpl->tpl_vars[$item]->key => \\$_smarty_tpl->tpl_vars[$item]->value){\\n\\$_smarty_tpl->tpl_vars[$item]->_loop = true;\\n\";\n        if ($key != null) {\n            $output .= \" \\$_smarty_tpl->tpl_vars[$key]->value = \\$_smarty_tpl->tpl_vars[$item]->key;\\n\";\n        }\n        if ($usesPropIteration) {\n            $output .= \" \\$_smarty_tpl->tpl_vars[$item]->iteration++;\\n\";\n        }\n        if ($usesPropIndex) {\n            $output .= \" \\$_smarty_tpl->tpl_vars[$item]->index++;\\n\";\n        }\n        if ($usesPropFirst) {\n            $output .= \" \\$_smarty_tpl->tpl_vars[$item]->first = \\$_smarty_tpl->tpl_vars[$item]->index === 0;\\n\";\n        }\n        if ($usesPropLast) {\n            $output .= \" \\$_smarty_tpl->tpl_vars[$item]->last = \\$_smarty_tpl->tpl_vars[$item]->iteration === \\$_smarty_tpl->tpl_vars[$item]->total;\\n\";\n        }\n        if ($has_name) {\n            if ($usesSmartyFirst) {\n                $output .= \" \\$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['first'] = \\$_smarty_tpl->tpl_vars[$item]->first;\\n\";\n            }\n            if ($usesSmartyIteration) {\n                $output .= \" \\$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['iteration']++;\\n\";\n            }\n            if ($usesSmartyIndex) {\n                $output .= \" \\$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['index']++;\\n\";\n            }\n            if ($usesSmartyLast) {\n                $output .= \" \\$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['last'] = \\$_smarty_tpl->tpl_vars[$item]->last;\\n\";\n            }\n        }\n        $output .= \"?>\";\n\n        return $output;\n    }\n}\n\n/**\n * Smarty Internal Plugin Compile Foreachelse Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Foreachelse extends Smarty_Internal_CompileBase {\n\n    /**\n     * Compiles code for the {foreachelse} tag\n     *\n     * @param array  $args array with attributes from parser\n     * @param object $compiler compiler object\n     * @param array  $parameter array with compilation parameter\n     * @return string compiled code\n     */\n    public function compile($args, $compiler, $parameter)\n    {\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n\n        list($openTag, $nocache, $item, $key) = $this->closeTag($compiler, array('foreach'));\n        $this->openTag($compiler, 'foreachelse', array('foreachelse', $nocache, $item, $key));\n\n        return \"<?php }\\nif (!\\$_smarty_tpl->tpl_vars[$item]->_loop) {\\n?>\";\n    }\n\n}\n\n/**\n * Smarty Internal Plugin Compile Foreachclose Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Foreachclose extends Smarty_Internal_CompileBase {\n\n    /**\n     * Compiles code for the {/foreach} tag\n     *\n     * @param array  $args      array with attributes from parser\n     * @param object $compiler  compiler object\n     * @param array  $parameter array with compilation parameter\n     * @return string compiled code\n     */\n    public function compile($args, $compiler, $parameter)\n    {\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n        // must endblock be nocache?\n        if ($compiler->nocache) {\n            $compiler->tag_nocache = true;\n        }\n\n        list($openTag, $compiler->nocache, $item, $key) = $this->closeTag($compiler, array('foreach', 'foreachelse'));\n\n        return \"<?php } ?>\";\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_function.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Compile Function\n *\n * Compiles the {function} {/function} tags\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile Function Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Function extends Smarty_Internal_CompileBase {\n\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $required_attributes = array('name');\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $shorttag_order = array('name');\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $optional_attributes = array('_any');\n\n    /**\n     * Compiles code for the {function} tag\n     *\n     * @param array $args array with attributes from parser\n     * @param object $compiler compiler object\n     * @param array $parameter array with compilation parameter\n     * @return boolean true\n     */\n    public function compile($args, $compiler, $parameter)\n    {\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n\n        if ($_attr['nocache'] === true) {\n            $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);\n        }\n        unset($_attr['nocache']);\n        $save = array($_attr, $compiler->parser->current_buffer,\n            $compiler->template->has_nocache_code, $compiler->template->required_plugins);\n        $this->openTag($compiler, 'function', $save);\n        $_name = trim($_attr['name'], \"'\\\"\");\n        unset($_attr['name']);\n        // set flag that we are compiling a template function\n        $compiler->compiles_template_function = true;\n        $compiler->template->properties['function'][$_name]['parameter'] = array();\n        $_smarty_tpl = $compiler->template;\n        foreach ($_attr as $_key => $_data) {\n            eval ('$tmp='.$_data.';');\n            $compiler->template->properties['function'][$_name]['parameter'][$_key] = $tmp;\n        }\n        $compiler->smarty->template_functions[$_name]['parameter'] = $compiler->template->properties['function'][$_name]['parameter'];\n        if ($compiler->template->caching) {\n            $output = '';\n        } else {\n            $output = \"<?php if (!function_exists('smarty_template_function_{$_name}')) {\n    function smarty_template_function_{$_name}(\\$_smarty_tpl,\\$params) {\n    \\$saved_tpl_vars = \\$_smarty_tpl->tpl_vars;\n    foreach (\\$_smarty_tpl->smarty->template_functions['{$_name}']['parameter'] as \\$key => \\$value) {\\$_smarty_tpl->tpl_vars[\\$key] = new Smarty_variable(\\$value);};\n    foreach (\\$params as \\$key => \\$value) {\\$_smarty_tpl->tpl_vars[\\$key] = new Smarty_variable(\\$value);}?>\";\n        }\n        // Init temporay context\n        $compiler->template->required_plugins = array('compiled' => array(), 'nocache' => array());\n        $compiler->parser->current_buffer = new _smarty_template_buffer($compiler->parser);\n        $compiler->parser->current_buffer->append_subtree(new _smarty_tag($compiler->parser, $output));\n        $compiler->template->has_nocache_code = false;\n        $compiler->has_code = false;\n        $compiler->template->properties['function'][$_name]['compiled'] = '';\n        return true;\n    }\n\n}\n\n/**\n * Smarty Internal Plugin Compile Functionclose Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase {\n\n    /**\n     * Compiles code for the {/function} tag\n     *\n     * @param array $args array with attributes from parser\n     * @param object $compiler compiler object\n     * @param array $parameter array with compilation parameter\n     * @return boolean true\n     */\n    public function compile($args, $compiler, $parameter)\n    {\n        $_attr = $this->getAttributes($compiler, $args);\n        $saved_data = $this->closeTag($compiler, array('function'));\n        $_name = trim($saved_data[0]['name'], \"'\\\"\");\n        // build plugin include code\n        $plugins_string = '';\n        if (!empty($compiler->template->required_plugins['compiled'])) {\n            $plugins_string = '<?php ';\n            foreach($compiler->template->required_plugins['compiled'] as $tmp) {\n                foreach($tmp as $data) {\n                    $plugins_string .= \"if (!is_callable('{$data['function']}')) include '{$data['file']}';\\n\";\n                }\n            }\n            $plugins_string .= '?>';\n        }\n        if (!empty($compiler->template->required_plugins['nocache'])) {\n            $plugins_string .= \"<?php echo '/*%%SmartyNocache:{$compiler->template->properties['nocache_hash']}%%*/<?php \";\n            foreach($compiler->template->required_plugins['nocache'] as $tmp) {\n                foreach($tmp as $data) {\n                    $plugins_string .= \"if (!is_callable(\\'{$data['function']}\\')) include \\'{$data['file']}\\';\\n\";\n                }\n            }\n            $plugins_string .= \"?>/*/%%SmartyNocache:{$compiler->template->properties['nocache_hash']}%%*/';?>\\n\";\n        }\n         // remove last line break from function definition\n         $last = count($compiler->parser->current_buffer->subtrees) - 1;\n         if ($compiler->parser->current_buffer->subtrees[$last] instanceof _smarty_linebreak) {\n             unset($compiler->parser->current_buffer->subtrees[$last]);\n         }\n        // if caching save template function for possible nocache call\n        if ($compiler->template->caching) {\n            $compiler->template->properties['function'][$_name]['compiled'] .= $plugins_string\n             . $compiler->parser->current_buffer->to_smarty_php();\n            $compiler->template->properties['function'][$_name]['nocache_hash'] = $compiler->template->properties['nocache_hash'];\n            $compiler->template->properties['function'][$_name]['has_nocache_code'] = $compiler->template->has_nocache_code;\n            $compiler->template->properties['function'][$_name]['called_functions'] = $compiler->called_functions;\n            $compiler->called_functions = array();\n            $compiler->smarty->template_functions[$_name] = $compiler->template->properties['function'][$_name];\n            $compiler->has_code = false;\n            $output = true;\n        } else {\n            $output = $plugins_string . $compiler->parser->current_buffer->to_smarty_php() . \"<?php \\$_smarty_tpl->tpl_vars = \\$saved_tpl_vars;\nforeach (Smarty::\\$global_tpl_vars as \\$key => \\$value) if(!isset(\\$_smarty_tpl->tpl_vars[\\$key])) \\$_smarty_tpl->tpl_vars[\\$key] = \\$value;}}?>\\n\";\n        }\n        // reset flag that we are compiling a template function\n        $compiler->compiles_template_function = false;\n        // restore old compiler status\n        $compiler->parser->current_buffer = $saved_data[1];\n        $compiler->template->has_nocache_code = $compiler->template->has_nocache_code | $saved_data[2];\n        $compiler->template->required_plugins = $saved_data[3];\n        return $output;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_if.php",
    "content": "<?php\n/**\n* Smarty Internal Plugin Compile If\n*\n* Compiles the {if} {else} {elseif} {/if} tags\n*\n* @package Smarty\n* @subpackage Compiler\n* @author Uwe Tews\n*/\n\n/**\n* Smarty Internal Plugin Compile If Class\n*\n* @package Smarty\n* @subpackage Compiler\n*/\nclass Smarty_Internal_Compile_If extends Smarty_Internal_CompileBase {\n\n    /**\n    * Compiles code for the {if} tag\n    *\n    * @param array  $args       array with attributes from parser\n    * @param object $compiler   compiler object\n    * @param array  $parameter  array with compilation parameter\n    * @return string compiled code\n    */\n    public function compile($args, $compiler, $parameter)\n    {\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n        $this->openTag($compiler, 'if', array(1, $compiler->nocache));\n        // must whole block be nocache ?\n        $compiler->nocache = $compiler->nocache | $compiler->tag_nocache;\n\n        if (!array_key_exists(\"if condition\",$parameter)) {\n            $compiler->trigger_template_error(\"missing if condition\", $compiler->lex->taglineno);\n        }\n\n        if (is_array($parameter['if condition'])) {\n            if ($compiler->nocache) {\n                $_nocache = ',true';\n                // create nocache var to make it know for further compiling\n                if (is_array($parameter['if condition']['var'])) {\n                    $compiler->template->tpl_vars[trim($parameter['if condition']['var']['var'], \"'\")] = new Smarty_variable(null, true);\n                } else {\n                    $compiler->template->tpl_vars[trim($parameter['if condition']['var'], \"'\")] = new Smarty_variable(null, true);\n                }\n            } else {\n                $_nocache = '';\n            }\n            if (is_array($parameter['if condition']['var'])) {\n                $_output = \"<?php if (!isset(\\$_smarty_tpl->tpl_vars[\".$parameter['if condition']['var']['var'].\"]) || !is_array(\\$_smarty_tpl->tpl_vars[\".$parameter['if condition']['var']['var'].\"]->value)) \\$_smarty_tpl->createLocalArrayVariable(\".$parameter['if condition']['var']['var'].\"$_nocache);\\n\";\n                $_output .= \"if (\\$_smarty_tpl->tpl_vars[\".$parameter['if condition']['var']['var'].\"]->value\".$parameter['if condition']['var']['smarty_internal_index'].\" = \".$parameter['if condition']['value'].\"){?>\";\n            } else {\n                $_output = \"<?php if (!isset(\\$_smarty_tpl->tpl_vars[\".$parameter['if condition']['var'].\"])) \\$_smarty_tpl->tpl_vars[\".$parameter['if condition']['var'].\"] = new Smarty_Variable(null{$_nocache});\";\n                $_output .= \"if (\\$_smarty_tpl->tpl_vars[\".$parameter['if condition']['var'].\"]->value = \".$parameter['if condition']['value'].\"){?>\";\n            }\n            return $_output;\n        } else {\n            return \"<?php if ({$parameter['if condition']}){?>\";\n        }\n    }\n\n}\n\n/**\n* Smarty Internal Plugin Compile Else Class\n*\n* @package Smarty\n* @subpackage Compiler\n*/\nclass Smarty_Internal_Compile_Else extends Smarty_Internal_CompileBase {\n\n    /**\n    * Compiles code for the {else} tag\n    *\n    * @param array  $args       array with attributes from parser\n    * @param object $compiler   compiler object\n    * @param array  $parameter  array with compilation parameter\n    * @return string compiled code\n    */\n    public function compile($args, $compiler, $parameter)\n    {\n        list($nesting, $compiler->tag_nocache) = $this->closeTag($compiler, array('if', 'elseif'));\n        $this->openTag($compiler, 'else', array($nesting, $compiler->tag_nocache));\n\n        return \"<?php }else{ ?>\";\n    }\n\n}\n\n/**\n* Smarty Internal Plugin Compile ElseIf Class\n*\n* @package Smarty\n* @subpackage Compiler\n*/\nclass Smarty_Internal_Compile_Elseif extends Smarty_Internal_CompileBase {\n\n    /**\n    * Compiles code for the {elseif} tag\n    *\n    * @param array  $args       array with attributes from parser\n    * @param object $compiler   compiler object\n    * @param array  $parameter  array with compilation parameter\n    * @return string compiled code\n    */\n    public function compile($args, $compiler, $parameter)\n    {\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n\n        list($nesting, $compiler->tag_nocache) = $this->closeTag($compiler, array('if', 'elseif'));\n\n        if (!array_key_exists(\"if condition\",$parameter)) {\n            $compiler->trigger_template_error(\"missing elseif condition\", $compiler->lex->taglineno);\n        }\n\n        if (is_array($parameter['if condition'])) {\n            $condition_by_assign = true;\n            if ($compiler->nocache) {\n                $_nocache = ',true';\n                // create nocache var to make it know for further compiling\n                if (is_array($parameter['if condition']['var'])) {\n                    $compiler->template->tpl_vars[trim($parameter['if condition']['var']['var'], \"'\")] = new Smarty_variable(null, true);\n                } else {\n                    $compiler->template->tpl_vars[trim($parameter['if condition']['var'], \"'\")] = new Smarty_variable(null, true);\n                }\n            } else {\n                $_nocache = '';\n            }\n        } else {\n            $condition_by_assign = false;\n        }\n\n        if (empty($compiler->prefix_code)) {\n            if ($condition_by_assign) {\n                $this->openTag($compiler, 'elseif', array($nesting + 1, $compiler->tag_nocache));\n                if (is_array($parameter['if condition']['var'])) {\n                    $_output = \"<?php }else{ if (!isset(\\$_smarty_tpl->tpl_vars[\" . $parameter['if condition']['var']['var'] . \"]) || !is_array(\\$_smarty_tpl->tpl_vars[\" . $parameter['if condition']['var']['var'] . \"]->value)) \\$_smarty_tpl->createLocalArrayVariable(\" . $parameter['if condition']['var']['var'] . \"$_nocache);\\n\";\n                    $_output .= \"if (\\$_smarty_tpl->tpl_vars[\" . $parameter['if condition']['var']['var'] . \"]->value\" . $parameter['if condition']['var']['smarty_internal_index'] . \" = \" . $parameter['if condition']['value'] . \"){?>\";\n                } else {\n                    $_output = \"<?php  }else{ if (!isset(\\$_smarty_tpl->tpl_vars[\" . $parameter['if condition']['var'] . \"])) \\$_smarty_tpl->tpl_vars[\" . $parameter['if condition']['var'] . \"] = new Smarty_Variable(null{$_nocache});\";\n                    $_output .= \"if (\\$_smarty_tpl->tpl_vars[\" . $parameter['if condition']['var'] . \"]->value = \" . $parameter['if condition']['value'] . \"){?>\";\n                }\n                return $_output;\n            } else {\n                $this->openTag($compiler, 'elseif', array($nesting, $compiler->tag_nocache));\n                return \"<?php }elseif({$parameter['if condition']}){?>\";\n            }\n        } else {\n            $tmp = '';\n            foreach ($compiler->prefix_code as $code)\n            $tmp .= $code;\n            $compiler->prefix_code = array();\n            $this->openTag($compiler, 'elseif', array($nesting + 1, $compiler->tag_nocache));\n            if ($condition_by_assign) {\n                if (is_array($parameter['if condition']['var'])) {\n                    $_output = \"<?php }else{?>{$tmp}<?php  if (!isset(\\$_smarty_tpl->tpl_vars[\" . $parameter['if condition']['var']['var'] . \"]) || !is_array(\\$_smarty_tpl->tpl_vars[\" . $parameter['if condition']['var']['var'] . \"]->value)) \\$_smarty_tpl->createLocalArrayVariable(\" . $parameter['if condition']['var']['var'] . \"$_nocache);\\n\";\n                    $_output .= \"if (\\$_smarty_tpl->tpl_vars[\" . $parameter['if condition']['var']['var'] . \"]->value\" . $parameter['if condition']['var']['smarty_internal_index'] . \" = \" . $parameter['if condition']['value'] . \"){?>\";\n                } else {\n                    $_output = \"<?php }else{?>{$tmp}<?php if (!isset(\\$_smarty_tpl->tpl_vars[\" . $parameter['if condition']['var'] . \"])) \\$_smarty_tpl->tpl_vars[\" . $parameter['if condition']['var'] . \"] = new Smarty_Variable(null{$_nocache});\";\n                    $_output .= \"if (\\$_smarty_tpl->tpl_vars[\" . $parameter['if condition']['var'] . \"]->value = \" . $parameter['if condition']['value'] . \"){?>\";\n                }\n                return $_output;\n            } else {\n                return \"<?php }else{?>{$tmp}<?php if ({$parameter['if condition']}){?>\";\n            }\n        }\n    }\n\n}\n\n/**\n* Smarty Internal Plugin Compile Ifclose Class\n*\n* @package Smarty\n* @subpackage Compiler\n*/\nclass Smarty_Internal_Compile_Ifclose extends Smarty_Internal_CompileBase {\n\n    /**\n    * Compiles code for the {/if} tag\n    *\n    * @param array  $args       array with attributes from parser\n    * @param object $compiler   compiler object\n    * @param array  $parameter  array with compilation parameter\n    * @return string compiled code\n    */\n    public function compile($args, $compiler, $parameter)\n    {\n        // must endblock be nocache?\n        if ($compiler->nocache) {\n            $compiler->tag_nocache = true;\n        }\n        list($nesting, $compiler->nocache) = $this->closeTag($compiler, array('if', 'else', 'elseif'));\n        $tmp = '';\n        for ($i = 0; $i < $nesting; $i++) {\n            $tmp .= '}';\n        }\n        return \"<?php {$tmp}?>\";\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_include.php",
    "content": "<?php\n/**\n* Smarty Internal Plugin Compile Include\n*\n* Compiles the {include} tag\n*\n* @package Smarty\n* @subpackage Compiler\n* @author Uwe Tews\n*/\n\n/**\n* Smarty Internal Plugin Compile Include Class\n*\n* @package Smarty\n* @subpackage Compiler\n*/\nclass Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase {\n\n    /**\n    * caching mode to create nocache code but no cache file\n    */\n    const CACHING_NOCACHE_CODE = 9999;\n    /**\n    * Attribute definition: Overwrites base class.\n    *\n    * @var array\n    * @see Smarty_Internal_CompileBase\n    */\n    public $required_attributes = array('file');\n    /**\n    * Attribute definition: Overwrites base class.\n    *\n    * @var array\n    * @see Smarty_Internal_CompileBase\n    */\n    public $shorttag_order = array('file');\n    /**\n    * Attribute definition: Overwrites base class.\n    *\n    * @var array\n    * @see Smarty_Internal_CompileBase\n    */\n    public $option_flags = array('nocache', 'inline', 'caching');\n    /**\n    * Attribute definition: Overwrites base class.\n    *\n    * @var array\n    * @see Smarty_Internal_CompileBase\n    */\n    public $optional_attributes = array('_any');\n\n    /**\n    * Compiles code for the {include} tag\n    *\n     * @param array $args array with attributes from parser\n     * @param object $compiler compiler object\n     * @param array $parameter array with compilation parameter\n     * @return string compiled code\n     */\n    public function compile($args, $compiler, $parameter)\n    {\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n        // save posible attributes\n        $include_file = $_attr['file'];\n\n        if (isset($_attr['assign'])) {\n            // output will be stored in a smarty variable instead of beind displayed\n            $_assign = $_attr['assign'];\n        }\n\n        $_parent_scope = Smarty::SCOPE_LOCAL;\n        if (isset($_attr['scope'])) {\n            $_attr['scope'] = trim($_attr['scope'], \"'\\\"\");\n            if ($_attr['scope'] == 'parent') {\n                $_parent_scope = Smarty::SCOPE_PARENT;\n            } elseif ($_attr['scope'] == 'root') {\n                $_parent_scope = Smarty::SCOPE_ROOT;\n            } elseif ($_attr['scope'] == 'global') {\n                $_parent_scope = Smarty::SCOPE_GLOBAL;\n            }\n        }\n        $_caching = 'null';\n        if ($compiler->nocache || $compiler->tag_nocache) {\n            $_caching = Smarty::CACHING_OFF;\n        }\n        // default for included templates\n        if ($compiler->template->caching && !$compiler->nocache && !$compiler->tag_nocache) {\n            $_caching = self::CACHING_NOCACHE_CODE;\n        }\n        /*\n        * if the {include} tag provides individual parameter for caching\n        * it will not be included into the common cache file and treated like\n        * a nocache section\n        */\n        if (isset($_attr['cache_lifetime'])) {\n            $_cache_lifetime = $_attr['cache_lifetime'];\n            $compiler->tag_nocache = true;\n            $_caching = Smarty::CACHING_LIFETIME_CURRENT;\n        } else {\n            $_cache_lifetime = 'null';\n        }\n        if (isset($_attr['cache_id'])) {\n            $_cache_id = $_attr['cache_id'];\n            $compiler->tag_nocache = true;\n            $_caching = Smarty::CACHING_LIFETIME_CURRENT;\n        } else {\n            $_cache_id = '$_smarty_tpl->cache_id';\n        }\n        if (isset($_attr['compile_id'])) {\n            $_compile_id = $_attr['compile_id'];\n        } else {\n            $_compile_id = '$_smarty_tpl->compile_id';\n        }\n        if ($_attr['caching'] === true) {\n            $_caching = Smarty::CACHING_LIFETIME_CURRENT;\n        }\n        if ($_attr['nocache'] === true) {\n            $compiler->tag_nocache = true;\n            $_caching = Smarty::CACHING_OFF;\n        }\n\n        $has_compiled_template = false;\n        if (($compiler->smarty->merge_compiled_includes || $_attr['inline'] === true) && !$compiler->template->source->recompiled\n            && !($compiler->template->caching && ($compiler->tag_nocache || $compiler->nocache)) && $_caching != Smarty::CACHING_LIFETIME_CURRENT) {\n            // check if compiled code can be merged (contains no variable part)\n            if (!$compiler->has_variable_string && (substr_count($include_file, '\"') == 2 or substr_count($include_file, \"'\") == 2)\n               and substr_count($include_file, '(') == 0 and substr_count($include_file, '$_smarty_tpl->') == 0) {\n                $tpl_name = null;\n                eval(\"\\$tpl_name = $include_file;\");\n                if (!isset($compiler->smarty->merged_templates_func[$tpl_name]) || $compiler->inheritance) {\n                    $tpl = new $compiler->smarty->template_class ($tpl_name, $compiler->smarty, $compiler->template, $compiler->template->cache_id, $compiler->template->compile_id);\n                    // save unique function name\n                    $compiler->smarty->merged_templates_func[$tpl_name]['func'] = $tpl->properties['unifunc'] = 'content_'. str_replace('.', '_', uniqid('', true));\n                    // use current nocache hash for inlined code\n                    $compiler->smarty->merged_templates_func[$tpl_name]['nocache_hash'] = $tpl->properties['nocache_hash'] = $compiler->template->properties['nocache_hash'];\n                    if ($compiler->template->caching) {\n                        // needs code for cached page but no cache file\n                        $tpl->caching = self::CACHING_NOCACHE_CODE;\n                    }\n                    // make sure whole chain gest compiled\n                    $tpl->mustCompile = true;\n                    if (!($tpl->source->uncompiled) && $tpl->source->exists) {\n                        // get compiled code\n                        $compiled_code = $tpl->compiler->compileTemplate($tpl);\n                        // release compiler object to free memory\n                        unset($tpl->compiler);\n                        // merge compiled code for {function} tags\n                        $compiler->template->properties['function'] = array_merge($compiler->template->properties['function'], $tpl->properties['function']);\n                        // merge filedependency\n                        $tpl->properties['file_dependency'][$tpl->source->uid] = array($tpl->source->filepath, $tpl->source->timestamp,$tpl->source->type);\n                        $compiler->template->properties['file_dependency'] = array_merge($compiler->template->properties['file_dependency'], $tpl->properties['file_dependency']);\n                        // remove header code\n                        $compiled_code = preg_replace(\"/(<\\?php \\/\\*%%SmartyHeaderCode:{$tpl->properties['nocache_hash']}%%\\*\\/(.+?)\\/\\*\\/%%SmartyHeaderCode%%\\*\\/\\?>\\n)/s\", '', $compiled_code);\n                        if ($tpl->has_nocache_code) {\n                            // replace nocache_hash\n                            $compiled_code = str_replace(\"{$tpl->properties['nocache_hash']}\", $compiler->template->properties['nocache_hash'], $compiled_code);\n                            $compiler->template->has_nocache_code = true;\n                        }\n                        $compiler->merged_templates[$tpl->properties['unifunc']] = $compiled_code;\n                        $has_compiled_template = true;\n                    }\n                } else {\n                    $has_compiled_template = true;\n                }\n            }\n        }\n        // delete {include} standard attributes\n        unset($_attr['file'], $_attr['assign'], $_attr['cache_id'], $_attr['compile_id'], $_attr['cache_lifetime'], $_attr['nocache'], $_attr['caching'], $_attr['scope'], $_attr['inline']);\n        // remaining attributes must be assigned as smarty variable\n        if (!empty($_attr)) {\n            if ($_parent_scope == Smarty::SCOPE_LOCAL) {\n                // create variables\n                foreach ($_attr as $key => $value) {\n                    $_pairs[] = \"'$key'=>$value\";\n                }\n                $_vars = 'array('.join(',',$_pairs).')';\n                $_has_vars = true;\n            } else {\n                $compiler->trigger_template_error('variable passing not allowed in parent/global scope', $compiler->lex->taglineno);\n            }\n        } else {\n            $_vars = 'array()';\n            $_has_vars = false;\n        }\n        if ($has_compiled_template) {\n            $_hash = $compiler->smarty->merged_templates_func[$tpl_name]['nocache_hash'];\n            $_output = \"<?php /*  Call merged included template \\\"\" . $tpl_name . \"\\\" */\\n\";\n            $_output .= \"\\$_tpl_stack[] = \\$_smarty_tpl;\\n\";\n            $_output .= \" \\$_smarty_tpl = \\$_smarty_tpl->setupInlineSubTemplate($include_file, $_cache_id, $_compile_id, $_caching, $_cache_lifetime, $_vars, $_parent_scope, '$_hash');\\n\";\n            if (isset($_assign)) {\n                $_output .= 'ob_start(); ';\n            }\n            $_output .= $compiler->smarty->merged_templates_func[$tpl_name]['func']. \"(\\$_smarty_tpl);\\n\";\n            $_output .= \"\\$_smarty_tpl = array_pop(\\$_tpl_stack); \";\n            if (isset($_assign)) {\n                $_output .= \" \\$_smarty_tpl->tpl_vars[$_assign] = new Smarty_variable(ob_get_clean());\";\n            }\n            $_output .= \"/*  End of included template \\\"\" . $tpl_name . \"\\\" */?>\";\n            return $_output;\n        }\n\n        // was there an assign attribute\n        if (isset($_assign)) {\n            $_output = \"<?php \\$_smarty_tpl->tpl_vars[$_assign] = new Smarty_variable(\\$_smarty_tpl->getSubTemplate ($include_file, $_cache_id, $_compile_id, $_caching, $_cache_lifetime, $_vars, $_parent_scope));?>\\n\";;\n        } else {\n            $_output = \"<?php echo \\$_smarty_tpl->getSubTemplate ($include_file, $_cache_id, $_compile_id, $_caching, $_cache_lifetime, $_vars, $_parent_scope);?>\\n\";\n        }\n        return $_output;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_include_php.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Compile Include PHP\n *\n * Compiles the {include_php} tag\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile Insert Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Include_Php extends Smarty_Internal_CompileBase {\n\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $required_attributes = array('file');\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $shorttag_order = array('file');\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $optional_attributes = array('once', 'assign');\n\n    /**\n     * Compiles code for the {include_php} tag\n     *\n     * @param array  $args     array with attributes from parser\n     * @param object $compiler compiler object\n     * @return string compiled code\n     */\n    public function compile($args, $compiler)\n    {\n        if (!($compiler->smarty instanceof SmartyBC)) {\n            throw new SmartyException(\"{include_php} is deprecated, use SmartyBC class to enable\");\n        }\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n\n        $_output = '<?php ';\n\n        $_smarty_tpl = $compiler->template;\n        $_filepath = false;\n        eval('$_file = ' . $_attr['file'] . ';');\n        if (!isset($compiler->smarty->security_policy) && file_exists($_file)) {\n            $_filepath = $_file;\n        } else {\n            if (isset($compiler->smarty->security_policy)) {\n                $_dir = $compiler->smarty->security_policy->trusted_dir;\n            } else {\n                $_dir = $compiler->smarty->trusted_dir;\n            }\n            if (!empty($_dir)) {\n                foreach((array)$_dir as $_script_dir) {\n                    $_script_dir = rtrim($_script_dir, '/\\\\') . DS;\n                    if (file_exists($_script_dir . $_file)) {\n                        $_filepath = $_script_dir .  $_file;\n                        break;\n                    }\n                }\n            }\n        }\n        if ($_filepath == false) {\n            $compiler->trigger_template_error(\"{include_php} file '{$_file}' is not readable\", $compiler->lex->taglineno);\n        }\n\n        if (isset($compiler->smarty->security_policy)) {\n            $compiler->smarty->security_policy->isTrustedPHPDir($_filepath);\n        }\n\n        if (isset($_attr['assign'])) {\n            // output will be stored in a smarty variable instead of being displayed\n            $_assign = $_attr['assign'];\n        }\n        $_once = '_once';\n        if (isset($_attr['once'])) {\n            if ($_attr['once'] == 'false') {\n                $_once = '';\n            }\n        }\n\n        if (isset($_assign)) {\n            return \"<?php ob_start(); include{$_once} ('{$_filepath}'); \\$_smarty_tpl->assign({$_assign},ob_get_contents()); ob_end_clean();?>\";\n        } else {\n            return \"<?php include{$_once} ('{$_filepath}');?>\\n\";\n        }\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_insert.php",
    "content": "<?php\n\n/**\n * Smarty Internal Plugin Compile Insert\n *\n * Compiles the {insert} tag\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile Insert Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase {\n\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $required_attributes = array('name');\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $shorttag_order = array('name');\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $optional_attributes = array('_any');\n\n    /**\n     * Compiles code for the {insert} tag\n     *\n     * @param array  $args     array with attributes from parser\n     * @param object $compiler compiler object\n     * @return string compiled code\n     */\n    public function compile($args, $compiler)\n    {\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n        // never compile as nocache code\n        $compiler->suppressNocacheProcessing = true;\n        $compiler->tag_nocache = true;\n        $_smarty_tpl = $compiler->template;\n        $_name = null;\n        $_script = null;\n\n        $_output = '<?php ';\n        // save posible attributes\n        eval('$_name = ' . $_attr['name'] . ';');\n        if (isset($_attr['assign'])) {\n            // output will be stored in a smarty variable instead of being displayed\n            $_assign = $_attr['assign'];\n            // create variable to make shure that the compiler knows about its nocache status\n            $compiler->template->tpl_vars[trim($_attr['assign'], \"'\")] = new Smarty_Variable(null, true);\n        }\n        if (isset($_attr['script'])) {\n            // script which must be included\n            $_function = \"smarty_insert_{$_name}\";\n            $_smarty_tpl = $compiler->template;\n            $_filepath = false;\n            eval('$_script = ' . $_attr['script'] . ';');\n            if (!isset($compiler->smarty->security_policy) && file_exists($_script)) {\n                $_filepath = $_script;\n            } else {\n                if (isset($compiler->smarty->security_policy)) {\n                    $_dir = $compiler->smarty->security_policy->trusted_dir;\n                } else {\n                    $_dir = $compiler->smarty->trusted_dir;\n                }\n                if (!empty($_dir)) {\n                    foreach((array)$_dir as $_script_dir) {\n                        $_script_dir = rtrim($_script_dir, '/\\\\') . DS;\n                        if (file_exists($_script_dir . $_script)) {\n                            $_filepath = $_script_dir . $_script;\n                            break;\n                        }\n                    }\n                }\n            }\n            if ($_filepath == false) {\n                $compiler->trigger_template_error(\"{insert} missing script file '{$_script}'\", $compiler->lex->taglineno);\n            }\n            // code for script file loading\n            $_output .= \"require_once '{$_filepath}' ;\";\n            require_once $_filepath;\n            if (!is_callable($_function)) {\n                $compiler->trigger_template_error(\" {insert} function '{$_function}' is not callable in script file '{$_script}'\", $compiler->lex->taglineno);\n            }\n        } else {\n            $_filepath = 'null';\n            $_function = \"insert_{$_name}\";\n            // function in PHP script ?\n            if (!is_callable($_function)) {\n                // try plugin\n                if (!$_function = $compiler->getPlugin($_name, 'insert')) {\n                    $compiler->trigger_template_error(\"{insert} no function or plugin found for '{$_name}'\", $compiler->lex->taglineno);\n                }\n            }\n        }\n        // delete {insert} standard attributes\n        unset($_attr['name'], $_attr['assign'], $_attr['script'], $_attr['nocache']);\n        // convert attributes into parameter array string\n        $_paramsArray = array();\n        foreach ($_attr as $_key => $_value) {\n            $_paramsArray[] = \"'$_key' => $_value\";\n        }\n        $_params = 'array(' . implode(\", \", $_paramsArray) . ')';\n        // call insert\n        if (isset($_assign)) {\n            if ($_smarty_tpl->caching) {\n                $_output .= \"echo Smarty_Internal_Nocache_Insert::compile ('{$_function}',{$_params}, \\$_smarty_tpl, '{$_filepath}',{$_assign});?>\";\n            } else {\n                $_output .= \"\\$_smarty_tpl->assign({$_assign} , {$_function} ({$_params},\\$_smarty_tpl), true);?>\";\n            }\n        } else {\n            $compiler->has_output = true;\n            if ($_smarty_tpl->caching) {\n                $_output .= \"echo Smarty_Internal_Nocache_Insert::compile ('{$_function}',{$_params}, \\$_smarty_tpl, '{$_filepath}');?>\";\n            } else {\n                $_output .= \"echo {$_function}({$_params},\\$_smarty_tpl);?>\";\n            }\n        }\n        return $_output;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_ldelim.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Compile Ldelim\n *\n * Compiles the {ldelim} tag\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile Ldelim Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Ldelim extends Smarty_Internal_CompileBase {\n\n    /**\n     * Compiles code for the {ldelim} tag\n     *\n     * This tag does output the left delimiter\n     * @param array  $args     array with attributes from parser\n     * @param object $compiler compiler object\n     * @return string compiled code\n     */\n    public function compile($args, $compiler)\n    {\n        $_attr = $this->getAttributes($compiler, $args);\n        if ($_attr['nocache'] === true) {\n            $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);\n        }\n        // this tag does not return compiled code\n        $compiler->has_code = true;\n        return $compiler->smarty->left_delimiter;\n    }\n\n}\n\n?>\n"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_nocache.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Compile Nocache\n *\n * Compiles the {nocache} {/nocache} tags.\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile Nocache Classv\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Nocache extends Smarty_Internal_CompileBase {\n\n    /**\n     * Compiles code for the {nocache} tag\n     *\n     * This tag does not generate compiled output. It only sets a compiler flag.\n     *\n     * @param array  $args     array with attributes from parser\n     * @param object $compiler compiler object\n     * @return bool\n     */\n    public function compile($args, $compiler)\n    {\n        $_attr = $this->getAttributes($compiler, $args);\n        if ($_attr['nocache'] === true) {\n            $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);\n        }\n        // enter nocache mode\n        $compiler->nocache = true;\n        // this tag does not return compiled code\n        $compiler->has_code = false;\n        return true;\n    }\n\n}\n\n/**\n * Smarty Internal Plugin Compile Nocacheclose Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Nocacheclose extends Smarty_Internal_CompileBase {\n\n    /**\n     * Compiles code for the {/nocache} tag\n     *\n     * This tag does not generate compiled output. It only sets a compiler flag.\n     *\n     * @param array  $args     array with attributes from parser\n     * @param object $compiler compiler object\n     * @return bool\n     */\n    public function compile($args, $compiler)\n    {\n        $_attr = $this->getAttributes($compiler, $args);\n        // leave nocache mode\n        $compiler->nocache = false;\n        // this tag does not return compiled code\n        $compiler->has_code = false;\n        return true;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_private_block_plugin.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Compile Block Plugin\n *\n * Compiles code for the execution of block plugin\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile Block Plugin Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Private_Block_Plugin extends Smarty_Internal_CompileBase {\n\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $optional_attributes = array('_any');\n\n    /**\n     * Compiles code for the execution of block plugin\n     *\n     * @param array  $args      array with attributes from parser\n     * @param object $compiler  compiler object\n     * @param array  $parameter array with compilation parameter\n     * @param string $tag       name of block plugin\n     * @param string $function  PHP function name\n     * @return string compiled code\n     */\n    public function compile($args, $compiler, $parameter, $tag, $function)\n    {\n        if (!isset($tag[5]) || substr($tag, -5) != 'close') {\n            // opening tag of block plugin\n            // check and get attributes\n            $_attr = $this->getAttributes($compiler, $args);\n            if ($_attr['nocache'] === true) {\n                $compiler->tag_nocache = true;\n            }\n               unset($_attr['nocache']);\n            // convert attributes into parameter array string\n            $_paramsArray = array();\n            foreach ($_attr as $_key => $_value) {\n                if (is_int($_key)) {\n                    $_paramsArray[] = \"$_key=>$_value\";\n                } else {\n                    $_paramsArray[] = \"'$_key'=>$_value\";\n                }\n            }\n            $_params = 'array(' . implode(\",\", $_paramsArray) . ')';\n\n            $this->openTag($compiler, $tag, array($_params, $compiler->nocache));\n            // maybe nocache because of nocache variables or nocache plugin\n            $compiler->nocache = $compiler->nocache | $compiler->tag_nocache;\n            // compile code\n            $output = \"<?php \\$_smarty_tpl->smarty->_tag_stack[] = array('{$tag}', {$_params}); \\$_block_repeat=true; echo {$function}({$_params}, null, \\$_smarty_tpl, \\$_block_repeat);while (\\$_block_repeat) { ob_start();?>\";\n        } else {\n            // must endblock be nocache?\n            if ($compiler->nocache) {\n                $compiler->tag_nocache = true;\n            }\n            // closing tag of block plugin, restore nocache\n            list($_params, $compiler->nocache) = $this->closeTag($compiler, substr($tag, 0, -5));\n            // This tag does create output\n            $compiler->has_output = true;\n            // compile code\n            if (!isset($parameter['modifier_list'])) {\n                $mod_pre = $mod_post ='';\n            } else {\n                $mod_pre = ' ob_start(); ';\n                $mod_post = 'echo '.$compiler->compileTag('private_modifier',array(),array('modifierlist'=>$parameter['modifier_list'],'value'=>'ob_get_clean()')).';';\n            }\n            $output = \"<?php \\$_block_content = ob_get_clean(); \\$_block_repeat=false;\".$mod_pre.\" echo {$function}({$_params}, \\$_block_content, \\$_smarty_tpl, \\$_block_repeat); \".$mod_post.\" } array_pop(\\$_smarty_tpl->smarty->_tag_stack);?>\";\n        }\n        return $output . \"\\n\";\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_private_function_plugin.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Compile Function Plugin\n *\n * Compiles code for the execution of function plugin\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile Function Plugin Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Private_Function_Plugin extends Smarty_Internal_CompileBase {\n\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $required_attributes = array();\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $optional_attributes = array('_any');\n\n    /**\n     * Compiles code for the execution of function plugin\n     *\n     * @param array $args array with attributes from parser\n     * @param object $compiler compiler object\n     * @param array $parameter array with compilation parameter\n     * @param string $tag name of function plugin\n     * @param string $function PHP function name\n     * @return string compiled code\n     */\n    public function compile($args, $compiler, $parameter, $tag, $function)\n    {\n        // This tag does create output\n        $compiler->has_output = true;\n\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n        if ($_attr['nocache'] === true) {\n            $compiler->tag_nocache = true;\n        }\n        unset($_attr['nocache']);\n        // convert attributes into parameter array string\n        $_paramsArray = array();\n        foreach ($_attr as $_key => $_value) {\n            if (is_int($_key)) {\n                $_paramsArray[] = \"$_key=>$_value\";\n            } else {\n                $_paramsArray[] = \"'$_key'=>$_value\";\n            }\n        }\n        $_params = 'array(' . implode(\",\", $_paramsArray) . ')';\n        // compile code\n        $output = \"<?php echo {$function}({$_params},\\$_smarty_tpl);?>\\n\";\n        return $output;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_private_modifier.php",
    "content": "<?php\r\n\r\n/**\r\n * Smarty Internal Plugin Compile Modifier\r\n *\r\n * Compiles code for modifier execution\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n * @author Uwe Tews\r\n */\r\n\r\n/**\r\n * Smarty Internal Plugin Compile Modifier Class\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n */\r\nclass Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBase {\r\n\r\n    /**\r\n     * Compiles code for modifier execution\r\n     *\r\n     * @param array  $args      array with attributes from parser\r\n     * @param object $compiler  compiler object\r\n     * @param array  $parameter array with compilation parameter\r\n     * @return string compiled code\r\n     */\r\n    public function compile($args, $compiler, $parameter) {\r\n        // check and get attributes\r\n        $_attr = $this->getAttributes($compiler, $args);\r\n        $output = $parameter['value'];\r\n        // loop over list of modifiers\r\n        foreach ($parameter['modifierlist'] as $single_modifier) {\r\n            $modifier = $single_modifier[0];\r\n            $single_modifier[0] = $output;\r\n            $params = implode(',', $single_modifier);\r\n            // check if we know already the type of modifier\r\n            if (isset($compiler->known_modifier_type[$modifier])) {\r\n                $modifier_types = array($compiler->known_modifier_type[$modifier]);\r\n            } else {\r\n                $modifier_types = array(1, 2, 3, 4, 5, 6);\r\n            }\r\n            foreach ($modifier_types as $type) {\r\n                switch ($type) {\r\n                    case 1:\r\n                        // registered modifier\r\n                        if (isset($compiler->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][$modifier])) {\r\n                            $function = $compiler->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][$modifier][0];\r\n                            if (!is_array($function)) {\r\n                                $output = \"{$function}({$params})\";\r\n                            } else {\r\n                                if (is_object($function[0])) {\r\n                                    $output = '$_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][\\'' . $modifier . '\\'][0][0]->' . $function[1] . '(' . $params . ')';\r\n                                } else {\r\n                                    $output = $function[0] . '::' . $function[1] . '(' . $params . ')';\r\n                                }\r\n                            }\r\n                            $compiler->known_modifier_type[$modifier] = $type;\r\n                            break 2;\r\n                        }\r\n                        break;\r\n                    case 2:\r\n                        // registered modifier compiler\r\n                        if (isset($compiler->smarty->registered_plugins[Smarty::PLUGIN_MODIFIERCOMPILER][$modifier][0])) {\r\n                            $output = call_user_func($compiler->smarty->registered_plugins[Smarty::PLUGIN_MODIFIERCOMPILER][$modifier][0], $single_modifier, $compiler->smarty);\r\n                            $compiler->known_modifier_type[$modifier] = $type;\r\n                            break 2;\r\n                        }\r\n                        break;\r\n                    case 3:\r\n                        // modifiercompiler plugin\r\n                        if ($compiler->smarty->loadPlugin('smarty_modifiercompiler_' . $modifier)) {\r\n                            // check if modifier allowed\r\n                            if (!is_object($compiler->smarty->security_policy) || $compiler->smarty->security_policy->isTrustedModifier($modifier, $compiler)) {\r\n                                $plugin = 'smarty_modifiercompiler_' . $modifier;\r\n                                $output = $plugin($single_modifier, $compiler);\r\n                            }\r\n                            $compiler->known_modifier_type[$modifier] = $type;\r\n                            break 2;\r\n                        }\r\n                        break;\r\n                    case 4:\r\n                        // modifier plugin\r\n                        if ($function = $compiler->getPlugin($modifier, Smarty::PLUGIN_MODIFIER)) {\r\n                            // check if modifier allowed\r\n                            if (!is_object($compiler->smarty->security_policy) || $compiler->smarty->security_policy->isTrustedModifier($modifier, $compiler)) {\r\n                                $output = \"{$function}({$params})\";\r\n                            }\r\n                            $compiler->known_modifier_type[$modifier] = $type;\r\n                            break 2;\r\n                        }\r\n                        break;\r\n                    case 5:\r\n                        // PHP function\r\n                        if (is_callable($modifier)) {\r\n                            // check if modifier allowed\r\n                            if (!is_object($compiler->smarty->security_policy) || $compiler->smarty->security_policy->isTrustedPhpModifier($modifier, $compiler)) {\r\n                                $output = \"{$modifier}({$params})\";\r\n                            }\r\n                            $compiler->known_modifier_type[$modifier] = $type;\r\n                            break 2;\r\n                        }\r\n                        break;\r\n                    case 6:\r\n                        // default plugin handler\r\n                        if (isset($compiler->default_handler_plugins[Smarty::PLUGIN_MODIFIER][$modifier]) || (is_callable($compiler->smarty->default_plugin_handler_func) && $compiler->getPluginFromDefaultHandler($modifier, Smarty::PLUGIN_MODIFIER))) {\r\n                            $function = $compiler->default_handler_plugins[Smarty::PLUGIN_MODIFIER][$modifier][0];\r\n                            // check if modifier allowed\r\n                            if (!is_object($compiler->smarty->security_policy) || $compiler->smarty->security_policy->isTrustedModifier($modifier, $compiler)) {\r\n                                if (!is_array($function)) {\r\n                                    $output = \"{$function}({$params})\";\r\n                                } else {\r\n                                    if (is_object($function[0])) {\r\n                                        $output = '$_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][\\'' . $modifier . '\\'][0][0]->' . $function[1] . '(' . $params . ')';\r\n                                    } else {\r\n                                        $output = $function[0] . '::' . $function[1] . '(' . $params . ')';\r\n                                    }\r\n                                }\r\n                            }\r\n                            if (isset($compiler->template->required_plugins['nocache'][$modifier][Smarty::PLUGIN_MODIFIER]['file']) || isset($compiler->template->required_plugins['compiled'][$modifier][Smarty::PLUGIN_MODIFIER]['file'])) {\r\n                                // was a plugin\r\n                                $compiler->known_modifier_type[$modifier] = 4;\r\n                            } else {\r\n                                $compiler->known_modifier_type[$modifier] = $type;\r\n                            }\r\n                            break 2;\r\n                        }\r\n                }\r\n            }\r\n            if (!isset($compiler->known_modifier_type[$modifier])) {\r\n                $compiler->trigger_template_error(\"unknown modifier \\\"\" . $modifier . \"\\\"\", $compiler->lex->taglineno);\r\n            }\r\n        }\r\n        return $output;\r\n    }\r\n\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_private_object_block_function.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Compile Object Block Function\n *\n * Compiles code for registered objects as block function\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile Object Block Function Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Private_Object_Block_Function extends Smarty_Internal_CompileBase {\n\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $optional_attributes = array('_any');\n\n    /**\n     * Compiles code for the execution of block plugin\n     *\n     * @param array  $args      array with attributes from parser\n     * @param object $compiler  compiler object\n     * @param array  $parameter array with compilation parameter\n     * @param string $tag       name of block object\n     * @param string $method    name of method to call\n     * @return string compiled code\n     */\n    public function compile($args, $compiler, $parameter, $tag, $method)\n    {\n        if (!isset($tag[5]) || substr($tag, -5) != 'close') {\n            // opening tag of block plugin\n            // check and get attributes\n            $_attr = $this->getAttributes($compiler, $args);\n            if ($_attr['nocache'] === true) {\n                $compiler->tag_nocache = true;\n            }\n            unset($_attr['nocache']);\n            // convert attributes into parameter array string\n            $_paramsArray = array();\n            foreach ($_attr as $_key => $_value) {\n                if (is_int($_key)) {\n                    $_paramsArray[] = \"$_key=>$_value\";\n                } else {\n                    $_paramsArray[] = \"'$_key'=>$_value\";\n                }\n            }\n            $_params = 'array(' . implode(\",\", $_paramsArray) . ')';\n\n            $this->openTag($compiler, $tag . '->' . $method, array($_params, $compiler->nocache));\n            // maybe nocache because of nocache variables or nocache plugin\n            $compiler->nocache = $compiler->nocache | $compiler->tag_nocache;\n            // compile code\n            $output = \"<?php \\$_smarty_tpl->smarty->_tag_stack[] = array('{$tag}->{$method}', {$_params}); \\$_block_repeat=true; echo \\$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$method}({$_params}, null, \\$_smarty_tpl, \\$_block_repeat);while (\\$_block_repeat) { ob_start();?>\";\n        } else {\n            $base_tag = substr($tag, 0, -5);\n            // must endblock be nocache?\n            if ($compiler->nocache) {\n                $compiler->tag_nocache = true;\n            }\n            // closing tag of block plugin, restore nocache\n            list($_params, $compiler->nocache) = $this->closeTag($compiler, $base_tag . '->' . $method);\n            // This tag does create output\n            $compiler->has_output = true;\n            // compile code\n            if (!isset($parameter['modifier_list'])) {\n                $mod_pre = $mod_post = '';\n            } else {\n                $mod_pre = ' ob_start(); ';\n                $mod_post = 'echo ' . $compiler->compileTag('private_modifier', array(), array('modifierlist' => $parameter['modifier_list'], 'value' => 'ob_get_clean()')) . ';';\n            }\n            $output = \"<?php \\$_block_content = ob_get_contents(); ob_end_clean(); \\$_block_repeat=false;\" . $mod_pre . \" echo \\$_smarty_tpl->smarty->registered_objects['{$base_tag}'][0]->{$method}({$_params}, \\$_block_content, \\$_smarty_tpl, \\$_block_repeat); \" . $mod_post . \"  } array_pop(\\$_smarty_tpl->smarty->_tag_stack);?>\";\n        }\n        return $output . \"\\n\";\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_private_object_function.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Compile Object Funtion\n *\n * Compiles code for registered objects as function\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile Object Function Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Private_Object_Function extends Smarty_Internal_CompileBase {\n\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $optional_attributes = array('_any');\n\n    /**\n     * Compiles code for the execution of function plugin\n     *\n     * @param array  $args      array with attributes from parser\n     * @param object $compiler  compiler object\n     * @param array  $parameter array with compilation parameter\n     * @param string $tag       name of function\n     * @param string $method    name of method to call\n     * @return string compiled code\n     */\n    public function compile($args, $compiler, $parameter, $tag, $method)\n    {\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n        if ($_attr['nocache'] === true) {\n            $compiler->tag_nocache = true;\n        }\n        unset($_attr['nocache']);\n        $_assign = null;\n        if (isset($_attr['assign'])) {\n            $_assign = $_attr['assign'];\n            unset($_attr['assign']);\n        }\n        // convert attributes into parameter array string\n        if ($compiler->smarty->registered_objects[$tag][2]) {\n            $_paramsArray = array();\n            foreach ($_attr as $_key => $_value) {\n                if (is_int($_key)) {\n                    $_paramsArray[] = \"$_key=>$_value\";\n                } else {\n                    $_paramsArray[] = \"'$_key'=>$_value\";\n                }\n            }\n            $_params = 'array(' . implode(\",\", $_paramsArray) . ')';\n            $return = \"\\$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$method}({$_params},\\$_smarty_tpl)\";\n        } else {\n            $_params = implode(\",\", $_attr);\n            $return = \"\\$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$method}({$_params})\";\n        }\n        if (empty($_assign)) {\n            // This tag does create output\n            $compiler->has_output = true;\n            $output = \"<?php echo {$return};?>\\n\";\n        } else {\n            $output = \"<?php \\$_smarty_tpl->assign({$_assign},{$return});?>\\n\";\n        }\n        return $output;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_private_print_expression.php",
    "content": "<?php\n/**\n* Smarty Internal Plugin Compile Print Expression\n*\n* Compiles any tag which will output an expression or variable\n*\n* @package Smarty\n* @subpackage Compiler\n* @author Uwe Tews\n*/\n\n/**\n* Smarty Internal Plugin Compile Print Expression Class\n*\n* @package Smarty\n* @subpackage Compiler\n*/\nclass Smarty_Internal_Compile_Private_Print_Expression extends Smarty_Internal_CompileBase {\n\n    /**\n    * Attribute definition: Overwrites base class.\n    *\n    * @var array\n    * @see Smarty_Internal_CompileBase\n    */\n    public $optional_attributes = array('assign');\n    /**\n    * Attribute definition: Overwrites base class.\n    *\n    * @var array\n    * @see Smarty_Internal_CompileBase\n    */\n    public $option_flags = array('nocache', 'nofilter');\n\n    /**\n    * Compiles code for gererting output from any expression\n    *\n    * @param array  $args      array with attributes from parser\n    * @param object $compiler  compiler object\n    * @param array  $parameter array with compilation parameter\n    * @return string compiled code\n    */\n    public function compile($args, $compiler, $parameter)\n    {\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n        // nocache option\n        if ($_attr['nocache'] === true) {\n            $compiler->tag_nocache = true;\n        }\n        // filter handling\n        if ($_attr['nofilter'] === true) {\n            $_filter = 'false';\n        } else {\n            $_filter = 'true';\n        }\n        if (isset($_attr['assign'])) {\n            // assign output to variable\n            $output = \"<?php \\$_smarty_tpl->assign({$_attr['assign']},{$parameter['value']});?>\";\n        } else {\n            // display value\n            $output = $parameter['value'];\n            // tag modifier\n            if (!empty($parameter['modifierlist'])) {\n                $output = $compiler->compileTag('private_modifier', array(), array('modifierlist' => $parameter['modifierlist'], 'value' => $output));\n            }\n            if (!$_attr['nofilter']) {\n                // default modifier\n                if (!empty($compiler->smarty->default_modifiers)) {\n                    if (empty($compiler->default_modifier_list)) {\n                        $modifierlist = array();\n                        foreach ($compiler->smarty->default_modifiers as $key => $single_default_modifier) {\n                            preg_match_all('/(\\'[^\\'\\\\\\\\]*(?:\\\\\\\\.[^\\'\\\\\\\\]*)*\\'|\"[^\"\\\\\\\\]*(?:\\\\\\\\.[^\"\\\\\\\\]*)*\"|:|[^:]+)/', $single_default_modifier, $mod_array);\n                            for ($i = 0, $count = count($mod_array[0]);$i < $count;$i++) {\n                                if ($mod_array[0][$i] != ':') {\n                                    $modifierlist[$key][] = $mod_array[0][$i];\n                                }\n                            }\n                        }\n                        $compiler->default_modifier_list  = $modifierlist;\n                    }\n                    $output = $compiler->compileTag('private_modifier', array(), array('modifierlist' => $compiler->default_modifier_list, 'value' => $output));\n                }\n                // autoescape html\n                if ($compiler->template->smarty->escape_html) {\n                    $output = \"htmlspecialchars({$output}, ENT_QUOTES, '\" . addslashes(Smarty::$_CHARSET) . \"')\";\n                }\n                // loop over registerd filters\n                if (!empty($compiler->template->smarty->registered_filters[Smarty::FILTER_VARIABLE])) {\n                    foreach ($compiler->template->smarty->registered_filters[Smarty::FILTER_VARIABLE] as $key => $function) {\n                        if (!is_array($function)) {\n                            $output = \"{$function}({$output},\\$_smarty_tpl)\";\n                        } else if (is_object($function[0])) {\n                            $output = \"\\$_smarty_tpl->smarty->registered_filters[Smarty::FILTER_VARIABLE][{$key}][0]->{$function[1]}({$output},\\$_smarty_tpl)\";\n                        } else {\n                            $output = \"{$function[0]}::{$function[1]}({$output},\\$_smarty_tpl)\";\n                        }\n                    }\n                }\n                // auto loaded filters\n                if (isset($compiler->smarty->autoload_filters[Smarty::FILTER_VARIABLE])) {\n                    foreach ((array)$compiler->template->smarty->autoload_filters[Smarty::FILTER_VARIABLE] as $name) {\n                        $result = $this->compile_output_filter($compiler, $name, $output);\n                        if ($result !== false) {\n                            $output = $result;\n                        } else {\n                            // not found, throw exception\n                            throw new SmartyException(\"Unable to load filter '{$name}'\");\n                        }\n                    }\n                }\n                if (isset($compiler->template->variable_filters)) {\n                    foreach ($compiler->template->variable_filters as $filter) {\n                        if (count($filter) == 1 && ($result = $this->compile_output_filter($compiler, $filter[0], $output)) !== false) {\n                            $output = $result;\n                        } else {\n                            $output = $compiler->compileTag('private_modifier', array(), array('modifierlist' => array($filter), 'value' => $output));\n                        }\n                    }\n                }\n            }\n\n            $compiler->has_output = true;\n            $output = \"<?php echo {$output};?>\";\n        }\n        return $output;\n    }\n\n    /**\n    * @param object $compiler compiler object\n    * @param string $name     name of variable filter\n    * @param type   $output   embedded output\n    * @return string\n    */\n    private function compile_output_filter($compiler, $name, $output)\n    {\n        $plugin_name = \"smarty_variablefilter_{$name}\";\n        $path = $compiler->smarty->loadPlugin($plugin_name, false);\n        if ($path) {\n            if ($compiler->template->caching) {\n                $compiler->template->required_plugins['nocache'][$name][Smarty::FILTER_VARIABLE]['file'] = $path;\n                $compiler->template->required_plugins['nocache'][$name][Smarty::FILTER_VARIABLE]['function'] = $plugin_name;\n            } else {\n                $compiler->template->required_plugins['compiled'][$name][Smarty::FILTER_VARIABLE]['file'] = $path;\n                $compiler->template->required_plugins['compiled'][$name][Smarty::FILTER_VARIABLE]['function'] = $plugin_name;\n            }\n        } else {\n            // not found\n            return false;\n        }\n        return \"{$plugin_name}({$output},\\$_smarty_tpl)\";\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_private_registered_block.php",
    "content": "<?php\r\n/**\r\n * Smarty Internal Plugin Compile Registered Block\r\n *\r\n * Compiles code for the execution of a registered block function\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n * @author Uwe Tews\r\n */\r\n\r\n/**\r\n * Smarty Internal Plugin Compile Registered Block Class\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n */\r\nclass Smarty_Internal_Compile_Private_Registered_Block extends Smarty_Internal_CompileBase {\r\n\r\n    /**\r\n     * Attribute definition: Overwrites base class.\r\n     *\r\n     * @var array\r\n     * @see Smarty_Internal_CompileBase\r\n     */\r\n    public $optional_attributes = array('_any');\r\n\r\n    /**\r\n     * Compiles code for the execution of a block function\r\n     *\r\n     * @param array  $args      array with attributes from parser\r\n     * @param object $compiler  compiler object\r\n     * @param array  $parameter array with compilation parameter\r\n     * @param string $tag       name of block function\r\n     * @return string compiled code\r\n     */\r\n    public function compile($args, $compiler, $parameter, $tag)\r\n    {\r\n        if (!isset($tag[5]) || substr($tag,-5) != 'close') {\r\n            // opening tag of block plugin\r\n            // check and get attributes\r\n            $_attr = $this->getAttributes($compiler, $args);\r\n            if ($_attr['nocache']) {\r\n                $compiler->tag_nocache = true;\r\n            }\r\n               unset($_attr['nocache']);\r\n               if (isset($compiler->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$tag])) {\r\n                   $tag_info = $compiler->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$tag];\r\n               } else {\r\n                   $tag_info = $compiler->default_handler_plugins[Smarty::PLUGIN_BLOCK][$tag];\r\n               }\r\n            // convert attributes into parameter array string\r\n            $_paramsArray = array();\r\n            foreach ($_attr as $_key => $_value) {\r\n                if (is_int($_key)) {\r\n                    $_paramsArray[] = \"$_key=>$_value\";\r\n                } elseif ($compiler->template->caching && in_array($_key,$tag_info[2])) {\r\n                    $_value = str_replace(\"'\",\"^#^\",$_value);\r\n                    $_paramsArray[] = \"'$_key'=>^#^.var_export($_value,true).^#^\";\r\n                } else {\r\n                    $_paramsArray[] = \"'$_key'=>$_value\";\r\n                }\r\n            }\r\n            $_params = 'array(' . implode(\",\", $_paramsArray) . ')';\r\n\r\n            $this->openTag($compiler, $tag, array($_params, $compiler->nocache));\r\n            // maybe nocache because of nocache variables or nocache plugin\r\n            $compiler->nocache = !$tag_info[1] | $compiler->nocache | $compiler->tag_nocache;\r\n            $function = $tag_info[0];\r\n            // compile code\r\n            if (!is_array($function)) {\r\n                $output = \"<?php \\$_smarty_tpl->smarty->_tag_stack[] = array('{$tag}', {$_params}); \\$_block_repeat=true; echo {$function}({$_params}, null, \\$_smarty_tpl, \\$_block_repeat);while (\\$_block_repeat) { ob_start();?>\";\r\n            } else if (is_object($function[0])) {\r\n                $output = \"<?php \\$_smarty_tpl->smarty->_tag_stack[] = array('{$tag}', {$_params}); \\$_block_repeat=true; echo \\$_smarty_tpl->smarty->registered_plugins['block']['{$tag}'][0][0]->{$function[1]}({$_params}, null, \\$_smarty_tpl, \\$_block_repeat);while (\\$_block_repeat) { ob_start();?>\";\r\n            } else {\r\n                $output = \"<?php \\$_smarty_tpl->smarty->_tag_stack[] = array('{$tag}', {$_params}); \\$_block_repeat=true; echo {$function[0]}::{$function[1]}({$_params}, null, \\$_smarty_tpl, \\$_block_repeat);while (\\$_block_repeat) { ob_start();?>\";\r\n            }\r\n        } else {\r\n            // must endblock be nocache?\r\n            if ($compiler->nocache) {\r\n                $compiler->tag_nocache = true;\r\n            }\r\n            $base_tag = substr($tag, 0, -5);\r\n            // closing tag of block plugin, restore nocache\r\n            list($_params, $compiler->nocache) = $this->closeTag($compiler, $base_tag);\r\n            // This tag does create output\r\n            $compiler->has_output = true;\r\n               if (isset($compiler->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$base_tag])) {\r\n                   $function = $compiler->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$base_tag][0];\r\n               } else {\r\n                   $function = $compiler->default_handler_plugins[Smarty::PLUGIN_BLOCK][$base_tag][0];\r\n               }\r\n            // compile code\r\n            if (!isset($parameter['modifier_list'])) {\r\n                $mod_pre = $mod_post ='';\r\n            } else {\r\n                $mod_pre = ' ob_start(); ';\r\n                $mod_post = 'echo '.$compiler->compileTag('private_modifier',array(),array('modifierlist'=>$parameter['modifier_list'],'value'=>'ob_get_clean()')).';';\r\n            }\r\n            if (!is_array($function)) {\r\n                $output = \"<?php \\$_block_content = ob_get_clean(); \\$_block_repeat=false;\".$mod_pre.\" echo {$function}({$_params}, \\$_block_content, \\$_smarty_tpl, \\$_block_repeat);\".$mod_post.\" } array_pop(\\$_smarty_tpl->smarty->_tag_stack);?>\";\r\n            } else if (is_object($function[0])) {\r\n                $output = \"<?php \\$_block_content = ob_get_clean(); \\$_block_repeat=false;\".$mod_pre.\" echo \\$_smarty_tpl->smarty->registered_plugins['block']['{$base_tag}'][0][0]->{$function[1]}({$_params}, \\$_block_content, \\$_smarty_tpl, \\$_block_repeat); \".$mod_post.\"} array_pop(\\$_smarty_tpl->smarty->_tag_stack);?>\";\r\n            } else {\r\n                $output = \"<?php \\$_block_content = ob_get_clean(); \\$_block_repeat=false;\".$mod_pre.\" echo {$function[0]}::{$function[1]}({$_params}, \\$_block_content, \\$_smarty_tpl, \\$_block_repeat); \".$mod_post.\"} array_pop(\\$_smarty_tpl->smarty->_tag_stack);?>\";\r\n            }\r\n        }\r\n        return $output . \"\\n\";\r\n    }\r\n\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_private_registered_function.php",
    "content": "<?php\r\n/**\r\n * Smarty Internal Plugin Compile Registered Function\r\n *\r\n * Compiles code for the execution of a registered function\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n * @author Uwe Tews\r\n */\r\n\r\n/**\r\n * Smarty Internal Plugin Compile Registered Function Class\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n */\r\nclass Smarty_Internal_Compile_Private_Registered_Function extends Smarty_Internal_CompileBase {\r\n\r\n    /**\r\n     * Attribute definition: Overwrites base class.\r\n     *\r\n     * @var array\r\n     * @see Smarty_Internal_CompileBase\r\n     */\r\n    public $optional_attributes = array('_any');\r\n\r\n    /**\r\n     * Compiles code for the execution of a registered function\r\n     *\r\n     * @param array  $args      array with attributes from parser\r\n     * @param object $compiler  compiler object\r\n     * @param array  $parameter array with compilation parameter\r\n     * @param string $tag       name of function\r\n     * @return string compiled code\r\n     */\r\n    public function compile($args, $compiler, $parameter, $tag)\r\n    {\r\n        // This tag does create output\r\n        $compiler->has_output = true;\r\n        // check and get attributes\r\n        $_attr = $this->getAttributes($compiler, $args);\r\n        if ($_attr['nocache']) {\r\n            $compiler->tag_nocache = true;\r\n        }\r\n        unset($_attr['nocache']);\r\n               if (isset($compiler->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION][$tag])) {\r\n                   $tag_info = $compiler->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION][$tag];\r\n               } else {\r\n                   $tag_info = $compiler->default_handler_plugins[Smarty::PLUGIN_FUNCTION][$tag];\r\n               }\r\n        // not cachable?\r\n        $compiler->tag_nocache =  $compiler->tag_nocache || !$tag_info[1];\r\n        // convert attributes into parameter array string\r\n        $_paramsArray = array();\r\n        foreach ($_attr as $_key => $_value) {\r\n            if (is_int($_key)) {\r\n                $_paramsArray[] = \"$_key=>$_value\";\r\n            } elseif ($compiler->template->caching && in_array($_key,$tag_info[2])) {\r\n                $_value = str_replace(\"'\",\"^#^\",$_value);\r\n                $_paramsArray[] = \"'$_key'=>^#^.var_export($_value,true).^#^\";\r\n            } else {\r\n                $_paramsArray[] = \"'$_key'=>$_value\";\r\n            }\r\n        }\r\n        $_params = 'array(' . implode(\",\", $_paramsArray) . ')';\r\n        $function = $tag_info[0];\r\n        // compile code\r\n        if (!is_array($function)) {\r\n            $output = \"<?php echo {$function}({$_params},\\$_smarty_tpl);?>\\n\";\r\n        } else if (is_object($function[0])) {\r\n            $output = \"<?php echo \\$_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['{$tag}'][0][0]->{$function[1]}({$_params},\\$_smarty_tpl);?>\\n\";\r\n        } else {\r\n            $output = \"<?php echo {$function[0]}::{$function[1]}({$_params},\\$_smarty_tpl);?>\\n\";\r\n        }\r\n        return $output;\r\n    }\r\n\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_private_special_variable.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Compile Special Smarty Variable\n *\n * Compiles the special $smarty variables\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile special Smarty Variable Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_CompileBase {\n\n    /**\n     * Compiles code for the speical $smarty variables\n     *\n     * @param array  $args     array with attributes from parser\n     * @param object $compiler compiler object\n     * @return string compiled code\n     */\n    public function compile($args, $compiler, $parameter)\n    {\n        $_index = preg_split(\"/\\]\\[/\",substr($parameter, 1, strlen($parameter)-2));\n        $compiled_ref = ' ';\n        $variable = trim($_index[0], \"'\");\n        switch ($variable) {\n            case 'foreach':\n                return \"\\$_smarty_tpl->getVariable('smarty')->value$parameter\";\n            case 'section':\n                return \"\\$_smarty_tpl->getVariable('smarty')->value$parameter\";\n            case 'capture':\n                return \"Smarty::\\$_smarty_vars$parameter\";\n            case 'now':\n                return 'time()';\n            case 'cookies':\n                if (isset($compiler->smarty->security_policy) && !$compiler->smarty->security_policy->allow_super_globals) {\n                    $compiler->trigger_template_error(\"(secure mode) super globals not permitted\");\n                    break;\n                }\n                $compiled_ref = '$_COOKIE';\n                break;\n\n            case 'get':\n            case 'post':\n            case 'env':\n            case 'server':\n            case 'session':\n            case 'request':\n                if (isset($compiler->smarty->security_policy) && !$compiler->smarty->security_policy->allow_super_globals) {\n                    $compiler->trigger_template_error(\"(secure mode) super globals not permitted\");\n                    break;\n                }\n                $compiled_ref = '$_'.strtoupper($variable);\n                break;\n\n            case 'template':\n                return 'basename($_smarty_tpl->source->filepath)';\n\n            case 'template_object':\n                return '$_smarty_tpl';\n\n            case 'current_dir':\n                return 'dirname($_smarty_tpl->source->filepath)';\n\n            case 'version':\n                $_version = Smarty::SMARTY_VERSION;\n                return \"'$_version'\";\n\n            case 'const':\n                if (isset($compiler->smarty->security_policy) && !$compiler->smarty->security_policy->allow_constants) {\n                    $compiler->trigger_template_error(\"(secure mode) constants not permitted\");\n                    break;\n                }\n                return \"@constant({$_index[1]})\";\n\n            case 'config':\n                if (isset($_index[2])) {\n                    return \"(is_array(\\$tmp = \\$_smarty_tpl->getConfigVariable($_index[1])) ? \\$tmp[$_index[2]] : null)\";\n                } else {\n                    return \"\\$_smarty_tpl->getConfigVariable($_index[1])\";\n                }\n            case 'ldelim':\n                $_ldelim = $compiler->smarty->left_delimiter;\n                return \"'$_ldelim'\";\n\n            case 'rdelim':\n                $_rdelim = $compiler->smarty->right_delimiter;\n                return \"'$_rdelim'\";\n\n            default:\n                $compiler->trigger_template_error('$smarty.' . trim($_index[0], \"'\") . ' is invalid');\n                break;\n        }\n        if (isset($_index[1])) {\n            array_shift($_index);\n            foreach ($_index as $_ind) {\n                $compiled_ref = $compiled_ref . \"[$_ind]\";\n            }\n        }\n        return $compiled_ref;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_rdelim.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Compile Rdelim\n *\n * Compiles the {rdelim} tag\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile Rdelim Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Rdelim extends Smarty_Internal_CompileBase {\n\n    /**\n     * Compiles code for the {rdelim} tag\n     *\n     * This tag does output the right delimiter.\n     *\n     * @param array  $args     array with attributes from parser\n     * @param object $compiler compiler object\n     * @return string compiled code\n     */\n    public function compile($args, $compiler)\n    {\n        $_attr = $this->getAttributes($compiler, $args);\n        if ($_attr['nocache'] === true) {\n            $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);\n        }\n        // this tag does not return compiled code\n        $compiler->has_code = true;\n        return $compiler->smarty->right_delimiter;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_section.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Compile Section\n *\n * Compiles the {section} {sectionelse} {/section} tags\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile Section Class\n * \n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Section extends Smarty_Internal_CompileBase {\n\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $required_attributes = array('name', 'loop');\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $shorttag_order = array('name', 'loop');\n    /**\n     * Attribute definition: Overwrites base class.\n     *\n     * @var array\n     * @see Smarty_Internal_CompileBase\n     */\n    public $optional_attributes = array('start', 'step', 'max', 'show');\n\n    /**\n     * Compiles code for the {section} tag\n     *\n     * @param array  $args     array with attributes from parser\n     * @param object $compiler compiler object\n     * @return string compiled code\n     */\n    public function compile($args, $compiler)\n    {\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n\n        $this->openTag($compiler, 'section', array('section', $compiler->nocache));\n        // maybe nocache because of nocache variables\n        $compiler->nocache = $compiler->nocache | $compiler->tag_nocache;\n\n        $output = \"<?php \";\n\n        $section_name = $_attr['name'];\n\n        $output .= \"if (isset(\\$_smarty_tpl->tpl_vars['smarty']->value['section'][$section_name])) unset(\\$_smarty_tpl->tpl_vars['smarty']->value['section'][$section_name]);\\n\";\n        $section_props = \"\\$_smarty_tpl->tpl_vars['smarty']->value['section'][$section_name]\";\n\n        foreach ($_attr as $attr_name => $attr_value) {\n            switch ($attr_name) {\n                case 'loop':\n                    $output .= \"{$section_props}['loop'] = is_array(\\$_loop=$attr_value) ? count(\\$_loop) : max(0, (int)\\$_loop); unset(\\$_loop);\\n\";\n                    break;\n\n                case 'show':\n                    if (is_bool($attr_value))\n                        $show_attr_value = $attr_value ? 'true' : 'false';\n                    else\n                        $show_attr_value = \"(bool)$attr_value\";\n                    $output .= \"{$section_props}['show'] = $show_attr_value;\\n\";\n                    break;\n\n                case 'name':\n                    $output .= \"{$section_props}['$attr_name'] = $attr_value;\\n\";\n                    break;\n\n                case 'max':\n                case 'start':\n                    $output .= \"{$section_props}['$attr_name'] = (int)$attr_value;\\n\";\n                    break;\n\n                case 'step':\n                    $output .= \"{$section_props}['$attr_name'] = ((int)$attr_value) == 0 ? 1 : (int)$attr_value;\\n\";\n                    break;\n            }\n        }\n\n        if (!isset($_attr['show']))\n            $output .= \"{$section_props}['show'] = true;\\n\";\n\n        if (!isset($_attr['loop']))\n            $output .= \"{$section_props}['loop'] = 1;\\n\";\n\n        if (!isset($_attr['max']))\n            $output .= \"{$section_props}['max'] = {$section_props}['loop'];\\n\";\n        else\n            $output .= \"if ({$section_props}['max'] < 0)\\n\" . \"    {$section_props}['max'] = {$section_props}['loop'];\\n\";\n\n        if (!isset($_attr['step']))\n            $output .= \"{$section_props}['step'] = 1;\\n\";\n\n        if (!isset($_attr['start']))\n            $output .= \"{$section_props}['start'] = {$section_props}['step'] > 0 ? 0 : {$section_props}['loop']-1;\\n\";\n        else {\n            $output .= \"if ({$section_props}['start'] < 0)\\n\" . \"    {$section_props}['start'] = max({$section_props}['step'] > 0 ? 0 : -1, {$section_props}['loop'] + {$section_props}['start']);\\n\" . \"else\\n\" . \"    {$section_props}['start'] = min({$section_props}['start'], {$section_props}['step'] > 0 ? {$section_props}['loop'] : {$section_props}['loop']-1);\\n\";\n        }\n\n        $output .= \"if ({$section_props}['show']) {\\n\";\n        if (!isset($_attr['start']) && !isset($_attr['step']) && !isset($_attr['max'])) {\n            $output .= \"    {$section_props}['total'] = {$section_props}['loop'];\\n\";\n        } else {\n            $output .= \"    {$section_props}['total'] = min(ceil(({$section_props}['step'] > 0 ? {$section_props}['loop'] - {$section_props}['start'] : {$section_props}['start']+1)/abs({$section_props}['step'])), {$section_props}['max']);\\n\";\n        }\n        $output .= \"    if ({$section_props}['total'] == 0)\\n\" . \"        {$section_props}['show'] = false;\\n\" . \"} else\\n\" . \"    {$section_props}['total'] = 0;\\n\";\n\n        $output .= \"if ({$section_props}['show']):\\n\";\n        $output .= \"\n            for ({$section_props}['index'] = {$section_props}['start'], {$section_props}['iteration'] = 1;\n                 {$section_props}['iteration'] <= {$section_props}['total'];\n                 {$section_props}['index'] += {$section_props}['step'], {$section_props}['iteration']++):\\n\";\n        $output .= \"{$section_props}['rownum'] = {$section_props}['iteration'];\\n\";\n        $output .= \"{$section_props}['index_prev'] = {$section_props}['index'] - {$section_props}['step'];\\n\";\n        $output .= \"{$section_props}['index_next'] = {$section_props}['index'] + {$section_props}['step'];\\n\";\n        $output .= \"{$section_props}['first']      = ({$section_props}['iteration'] == 1);\\n\";\n        $output .= \"{$section_props}['last']       = ({$section_props}['iteration'] == {$section_props}['total']);\\n\";\n\n        $output .= \"?>\";\n        return $output;\n    }\n\n}\n\n/**\n * Smarty Internal Plugin Compile Sectionelse Class\n * \n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Sectionelse extends Smarty_Internal_CompileBase {\n\n    /**\n     * Compiles code for the {sectionelse} tag\n     *\n     * @param array  $args     array with attributes from parser\n     * @param object $compiler compiler object\n     * @return string compiled code\n     */\n    public function compile($args, $compiler)\n    {\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n\n        list($openTag, $nocache) = $this->closeTag($compiler, array('section'));\n        $this->openTag($compiler, 'sectionelse', array('sectionelse', $nocache));\n\n        return \"<?php endfor; else: ?>\";\n    }\n\n}\n\n/**\n * Smarty Internal Plugin Compile Sectionclose Class\n * \n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Sectionclose extends Smarty_Internal_CompileBase {\n\n    /**\n     * Compiles code for the {/section} tag\n     *\n     * @param array  $args     array with attributes from parser\n     * @param object $compiler compiler object\n     * @return string compiled code\n     */\n    public function compile($args, $compiler)\n    {\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n\n        // must endblock be nocache?\n        if ($compiler->nocache) {\n            $compiler->tag_nocache = true;\n        }\n\n        list($openTag, $compiler->nocache) = $this->closeTag($compiler, array('section', 'sectionelse'));\n\n        if ($openTag == 'sectionelse') {\n            return \"<?php endif; ?>\";\n        } else {\n            return \"<?php endfor; endif; ?>\";\n        }\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_setfilter.php",
    "content": "<?php\r\n/**\r\n * Smarty Internal Plugin Compile Setfilter\r\n *\r\n * Compiles code for setfilter tag\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n * @author Uwe Tews\r\n */\r\n\r\n/**\r\n * Smarty Internal Plugin Compile Setfilter Class\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n */\r\nclass Smarty_Internal_Compile_Setfilter extends Smarty_Internal_CompileBase {\r\n\r\n    /**\r\n     * Compiles code for setfilter tag\r\n     *\r\n     * @param array  $args      array with attributes from parser\r\n     * @param object $compiler  compiler object\r\n     * @param array  $parameter array with compilation parameter\r\n     * @return string compiled code\r\n     */\r\n    public function compile($args, $compiler, $parameter)\r\n    {\r\n        $compiler->variable_filter_stack[] = $compiler->template->variable_filters;\r\n        $compiler->template->variable_filters = $parameter['modifier_list'];\r\n        // this tag does not return compiled code\r\n        $compiler->has_code = false;\r\n        return true;\r\n    }\r\n\r\n}\r\n\r\n/**\r\n * Smarty Internal Plugin Compile Setfilterclose Class\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n */\r\nclass Smarty_Internal_Compile_Setfilterclose extends Smarty_Internal_CompileBase {\r\n\r\n    /**\r\n     * Compiles code for the {/setfilter} tag\r\n     *\r\n     * This tag does not generate compiled output. It resets variable filter.\r\n     *\r\n     * @param array  $args     array with attributes from parser\r\n     * @param object $compiler compiler object\r\n     * @return string compiled code\r\n     */\r\n    public function compile($args, $compiler)\r\n    {\r\n        $_attr = $this->getAttributes($compiler, $args);\r\n        // reset variable filter to previous state\r\n        if (count($compiler->variable_filter_stack)) {\r\n            $compiler->template->variable_filters = array_pop($compiler->variable_filter_stack);\r\n        } else {\r\n            $compiler->template->variable_filters = array();\r\n        }\r\n        // this tag does not return compiled code\r\n        $compiler->has_code = false;\r\n        return true;\r\n    }\r\n\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compile_while.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Compile While\n *\n * Compiles the {while} tag\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Compile While Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_While extends Smarty_Internal_CompileBase {\n\n    /**\n     * Compiles code for the {while} tag\n     *\n     * @param array  $args      array with attributes from parser\n     * @param object $compiler  compiler object\n     * @param array  $parameter array with compilation parameter\n     * @return string compiled code\n     */\n    public function compile($args, $compiler, $parameter)\n    {\n        // check and get attributes\n        $_attr = $this->getAttributes($compiler, $args);\n        $this->openTag($compiler, 'while', $compiler->nocache);\n\n        if (!array_key_exists(\"if condition\",$parameter)) {\n            $compiler->trigger_template_error(\"missing while condition\", $compiler->lex->taglineno);\n        }\n\n        // maybe nocache because of nocache variables\n        $compiler->nocache = $compiler->nocache | $compiler->tag_nocache;\n        if (is_array($parameter['if condition'])) {\n            if ($compiler->nocache) {\n                $_nocache = ',true';\n                // create nocache var to make it know for further compiling\n                if (is_array($parameter['if condition']['var'])) {\n                    $compiler->template->tpl_vars[trim($parameter['if condition']['var']['var'], \"'\")] = new Smarty_variable(null, true);\n                } else {\n                    $compiler->template->tpl_vars[trim($parameter['if condition']['var'], \"'\")] = new Smarty_variable(null, true);\n                }\n            } else {\n                $_nocache = '';\n            }\n            if (is_array($parameter['if condition']['var'])) {\n                $_output = \"<?php if (!isset(\\$_smarty_tpl->tpl_vars[\" . $parameter['if condition']['var']['var'] . \"]) || !is_array(\\$_smarty_tpl->tpl_vars[\" . $parameter['if condition']['var']['var'] . \"]->value)) \\$_smarty_tpl->createLocalArrayVariable(\" . $parameter['if condition']['var']['var'] . \"$_nocache);\\n\";\n                $_output .= \"while (\\$_smarty_tpl->tpl_vars[\" . $parameter['if condition']['var']['var'] . \"]->value\" . $parameter['if condition']['var']['smarty_internal_index'] . \" = \" . $parameter['if condition']['value'] . \"){?>\";\n            } else {\n                $_output = \"<?php if (!isset(\\$_smarty_tpl->tpl_vars[\" . $parameter['if condition']['var'] . \"])) \\$_smarty_tpl->tpl_vars[\" . $parameter['if condition']['var'] . \"] = new Smarty_Variable(null{$_nocache});\";\n                $_output .= \"while (\\$_smarty_tpl->tpl_vars[\" . $parameter['if condition']['var'] . \"]->value = \" . $parameter['if condition']['value'] . \"){?>\";\n            }\n            return $_output;\n        } else {\n            return \"<?php while ({$parameter['if condition']}){?>\";\n        }\n    }\n\n}\n\n/**\n * Smarty Internal Plugin Compile Whileclose Class\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_Compile_Whileclose extends Smarty_Internal_CompileBase {\n\n    /**\n     * Compiles code for the {/while} tag\n     *\n     * @param array  $args     array with attributes from parser\n     * @param object $compiler compiler object\n     * @return string compiled code\n     */\n    public function compile($args, $compiler)\n    {\n        // must endblock be nocache?\n        if ($compiler->nocache) {\n            $compiler->tag_nocache = true;\n        }\n        $compiler->nocache = $this->closeTag($compiler, array('while'));\n        return \"<?php }?>\";\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_compilebase.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin CompileBase\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * This class does extend all internal compile plugins\n *\n * @package Smarty\n * @subpackage Compiler\n */\nabstract class Smarty_Internal_CompileBase {\n\n    /**\n     * Array of names of required attribute required by tag\n     *\n     * @var array\n     */\n    public $required_attributes = array();\n    /**\n     * Array of names of optional attribute required by tag\n     * use array('_any') if there is no restriction of attributes names\n     *\n     * @var array\n     */\n    public $optional_attributes = array();\n    /**\n     * Shorttag attribute order defined by its names\n     *\n     * @var array\n     */\n    public $shorttag_order = array();\n    /**\n     * Array of names of valid option flags\n     *\n     * @var array\n     */\n    public $option_flags = array('nocache');\n\n    /**\n     * This function checks if the attributes passed are valid\n     *\n     * The attributes passed for the tag to compile are checked against the list of required and\n     * optional attributes. Required attributes must be present. Optional attributes are check against\n     * the corresponding list. The keyword '_any' specifies that any attribute will be accepted\n     * as valid\n     *\n     * @param object $compiler   compiler object\n     * @param array  $attributes attributes applied to the tag\n     * @return array of mapped attributes for further processing\n     */\n    public function getAttributes($compiler, $attributes)\n    {\n        $_indexed_attr = array();\n        // loop over attributes\n        foreach ($attributes as $key => $mixed) {\n            // shorthand ?\n            if (!is_array($mixed)) {\n                // option flag ?\n                if (in_array(trim($mixed, '\\'\"'), $this->option_flags)) {\n                    $_indexed_attr[trim($mixed, '\\'\"')] = true;\n                    // shorthand attribute ?\n                } else if (isset($this->shorttag_order[$key])) {\n                    $_indexed_attr[$this->shorttag_order[$key]] = $mixed;\n                } else {\n                    // too many shorthands\n                    $compiler->trigger_template_error('too many shorthand attributes', $compiler->lex->taglineno);\n                }\n                // named attribute\n            } else {\n                $kv = each($mixed);\n                // option flag?\n                if (in_array($kv['key'], $this->option_flags)) {\n                    if (is_bool($kv['value'])) {\n                        $_indexed_attr[$kv['key']] = $kv['value'];\n                    } else if (is_string($kv['value']) && in_array(trim($kv['value'], '\\'\"'), array('true', 'false'))) {\n                        if (trim($kv['value']) == 'true') {\n                            $_indexed_attr[$kv['key']] = true;\n                        } else {\n                            $_indexed_attr[$kv['key']] = false;\n                        }\n                    } else if (is_numeric($kv['value']) && in_array($kv['value'], array(0, 1))) {\n                        if ($kv['value'] == 1) {\n                            $_indexed_attr[$kv['key']] = true;\n                        } else {\n                            $_indexed_attr[$kv['key']] = false;\n                        }\n                    } else {\n                        $compiler->trigger_template_error(\"illegal value of option flag \\\"{$kv['key']}\\\"\", $compiler->lex->taglineno);\n                    }\n                    // must be named attribute\n                } else {\n                    reset($mixed);\n                    $_indexed_attr[key($mixed)] = $mixed[key($mixed)];\n                }\n            }\n        }\n        // check if all required attributes present\n        foreach ($this->required_attributes as $attr) {\n            if (!array_key_exists($attr, $_indexed_attr)) {\n                $compiler->trigger_template_error(\"missing \\\"\" . $attr . \"\\\" attribute\", $compiler->lex->taglineno);\n            }\n        }\n        // check for unallowed attributes\n        if ($this->optional_attributes != array('_any')) {\n            $tmp_array = array_merge($this->required_attributes, $this->optional_attributes, $this->option_flags);\n            foreach ($_indexed_attr as $key => $dummy) {\n                if (!in_array($key, $tmp_array) && $key !== 0) {\n                    $compiler->trigger_template_error(\"unexpected \\\"\" . $key . \"\\\" attribute\", $compiler->lex->taglineno);\n                }\n            }\n        }\n        // default 'false' for all option flags not set\n        foreach ($this->option_flags as $flag) {\n            if (!isset($_indexed_attr[$flag])) {\n                $_indexed_attr[$flag] = false;\n            }\n        }\n\n        return $_indexed_attr;\n    }\n\n    /**\n     * Push opening tag name on stack\n     *\n     * Optionally additional data can be saved on stack\n     *\n     * @param object    $compiler   compiler object\n     * @param string    $openTag    the opening tag's name\n     * @param mixed     $data       optional data saved\n     */\n    public function openTag($compiler, $openTag, $data = null)\n    {\n        array_push($compiler->_tag_stack, array($openTag, $data));\n    }\n\n    /**\n     * Pop closing tag\n     *\n     * Raise an error if this stack-top doesn't match with expected opening tags\n     *\n     * @param object       $compiler    compiler object\n     * @param array|string $expectedTag the expected opening tag names\n     * @return mixed any type the opening tag's name or saved data\n     */\n    public function closeTag($compiler, $expectedTag)\n    {\n        if (count($compiler->_tag_stack) > 0) {\n            // get stacked info\n            list($_openTag, $_data) = array_pop($compiler->_tag_stack);\n            // open tag must match with the expected ones\n            if (in_array($_openTag, (array) $expectedTag)) {\n                if (is_null($_data)) {\n                    // return opening tag\n                    return $_openTag;\n                } else {\n                    // return restored data\n                    return $_data;\n                }\n            }\n            // wrong nesting of tags\n            $compiler->trigger_template_error(\"unclosed {\" . $_openTag . \"} tag\");\n            return;\n        }\n        // wrong nesting of tags\n        $compiler->trigger_template_error(\"unexpected closing tag\", $compiler->lex->taglineno);\n        return;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_config.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Config\n *\n * @package Smarty\n * @subpackage Config\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Config\n *\n * Main class for config variables\n *\n * @package Smarty\n * @subpackage Config\n *\n * @property Smarty_Config_Source   $source\n * @property Smarty_Config_Compiled $compiled\n * @ignore\n */\nclass Smarty_Internal_Config {\n\n    /**\n     * Samrty instance\n     *\n     * @var Smarty object\n     */\n    public $smarty = null;\n    /**\n     * Object of config var storage\n     *\n     * @var object\n     */\n    public $data = null;\n    /**\n     * Config resource\n     * @var string\n     */\n    public $config_resource = null;\n    /**\n     * Compiled config file\n     *\n     * @var string\n     */\n    public $compiled_config = null;\n    /**\n     * filepath of compiled config file\n     *\n     * @var string\n     */\n    public $compiled_filepath = null;\n    /**\n     * Filemtime of compiled config Filemtime\n     *\n     * @var int\n     */\n    public $compiled_timestamp = null;\n    /**\n     * flag if compiled config file is invalid and must be (re)compiled\n     * @var bool\n     */\n    public $mustCompile = null;\n    /**\n     * Config file compiler object\n     *\n     * @var Smarty_Internal_Config_File_Compiler object\n     */\n    public $compiler_object = null;\n\n    /**\n     * Constructor of config file object\n     *\n     * @param string $config_resource config file resource name\n     * @param Smarty $smarty Smarty instance\n     * @param object $data object for config vars storage\n     */\n    public function __construct($config_resource, $smarty, $data = null)\n    {\n        $this->data = $data;\n        $this->smarty = $smarty;\n        $this->config_resource = $config_resource;\n    }\n\n    /**\n     * Returns the compiled  filepath\n     *\n     * @return string the compiled filepath\n     */\n    public function getCompiledFilepath()\n    {\n        return $this->compiled_filepath === null ?\n                ($this->compiled_filepath = $this->buildCompiledFilepath()) :\n                $this->compiled_filepath;\n    }\n\n    /**\n     * Get file path.\n     *\n     * @return string\n     */\n    public function buildCompiledFilepath()\n    {\n        $_compile_id = isset($this->smarty->compile_id) ? preg_replace('![^\\w\\|]+!', '_', $this->smarty->compile_id) : null;\n        $_flag = (int) $this->smarty->config_read_hidden + (int) $this->smarty->config_booleanize * 2\n                + (int) $this->smarty->config_overwrite * 4;\n        $_filepath = sha1($this->source->name . $_flag);\n        // if use_sub_dirs, break file into directories\n        if ($this->smarty->use_sub_dirs) {\n            $_filepath = substr($_filepath, 0, 2) . DS\n                    . substr($_filepath, 2, 2) . DS\n                    . substr($_filepath, 4, 2) . DS\n                    . $_filepath;\n        }\n        $_compile_dir_sep = $this->smarty->use_sub_dirs ? DS : '^';\n        if (isset($_compile_id)) {\n            $_filepath = $_compile_id . $_compile_dir_sep . $_filepath;\n        }\n        $_compile_dir = $this->smarty->getCompileDir();\n        return $_compile_dir . $_filepath . '.' . basename($this->source->name) . '.config' . '.php';\n    }\n\n    /**\n     * Returns the timpestamp of the compiled file\n     *\n     * @return integer the file timestamp\n     */\n    public function getCompiledTimestamp()\n    {\n        return $this->compiled_timestamp === null\n            ? ($this->compiled_timestamp = (file_exists($this->getCompiledFilepath())) ? filemtime($this->getCompiledFilepath()) : false)\n            : $this->compiled_timestamp;\n    }\n\n    /**\n     * Returns if the current config file must be compiled\n     *\n     * It does compare the timestamps of config source and the compiled config and checks the force compile configuration\n     *\n     * @return boolean true if the file must be compiled\n     */\n    public function mustCompile()\n    {\n        return $this->mustCompile === null ?\n            $this->mustCompile = ($this->smarty->force_compile || $this->getCompiledTimestamp () === false || $this->smarty->compile_check && $this->getCompiledTimestamp () < $this->source->timestamp):\n            $this->mustCompile;\n    }\n\n    /**\n     * Returns the compiled config file\n     *\n     * It checks if the config file must be compiled or just read the compiled version\n     *\n     * @return string the compiled config file\n     */\n    public function getCompiledConfig()\n    {\n        if ($this->compiled_config === null) {\n            // see if template needs compiling.\n            if ($this->mustCompile()) {\n                $this->compileConfigSource();\n            } else {\n                $this->compiled_config = file_get_contents($this->getCompiledFilepath());\n            }\n        }\n        return $this->compiled_config;\n    }\n\n    /**\n     * Compiles the config files\n     *\n     * @throws Exception\n     */\n    public function compileConfigSource()\n    {\n        // compile template\n        if (!is_object($this->compiler_object)) {\n            // load compiler\n            $this->compiler_object = new Smarty_Internal_Config_File_Compiler($this->smarty);\n        }\n        // compile locking\n        if ($this->smarty->compile_locking) {\n            if ($saved_timestamp = $this->getCompiledTimestamp()) {\n                touch($this->getCompiledFilepath());\n            }\n        }\n        // call compiler\n        try {\n            $this->compiler_object->compileSource($this);\n        } catch (Exception $e) {\n            // restore old timestamp in case of error\n            if ($this->smarty->compile_locking && $saved_timestamp) {\n                touch($this->getCompiledFilepath(), $saved_timestamp);\n            }\n            throw $e;\n        }\n        // compiling succeded\n        // write compiled template\n        Smarty_Internal_Write_File::writeFile($this->getCompiledFilepath(), $this->getCompiledConfig(), $this->smarty);\n    }\n\n    /**\n     * load config variables\n     *\n     * @param mixed $sections array of section names, single section or null\n     * @param object $scope global,parent or local\n     */\n    public function loadConfigVars($sections = null, $scope = 'local')\n    {\n        if ($this->data instanceof Smarty_Internal_Template) {\n            $this->data->properties['file_dependency'][sha1($this->source->filepath)] = array($this->source->filepath, $this->source->timestamp, 'file');\n        }\n        if ($this->mustCompile()) {\n            $this->compileConfigSource();\n        }\n        // pointer to scope\n        if ($scope == 'local') {\n            $scope_ptr = $this->data;\n        } elseif ($scope == 'parent') {\n            if (isset($this->data->parent)) {\n                $scope_ptr = $this->data->parent;\n            } else {\n                $scope_ptr = $this->data;\n            }\n        } elseif ($scope == 'root' || $scope == 'global') {\n            $scope_ptr = $this->data;\n            while (isset($scope_ptr->parent)) {\n                $scope_ptr = $scope_ptr->parent;\n            }\n        }\n        $_config_vars = array();\n        include($this->getCompiledFilepath());\n        // copy global config vars\n        foreach ($_config_vars['vars'] as $variable => $value) {\n            if ($this->smarty->config_overwrite || !isset($scope_ptr->config_vars[$variable])) {\n                $scope_ptr->config_vars[$variable] = $value;\n            } else {\n                $scope_ptr->config_vars[$variable] = array_merge((array) $scope_ptr->config_vars[$variable], (array) $value);\n            }\n        }\n        // scan sections\n        if (!empty($sections)) {\n            foreach ((array) $sections as $this_section) {\n                if (isset($_config_vars['sections'][$this_section])) {\n                    foreach ($_config_vars['sections'][$this_section]['vars'] as $variable => $value) {\n                        if ($this->smarty->config_overwrite || !isset($scope_ptr->config_vars[$variable])) {\n                            $scope_ptr->config_vars[$variable] = $value;\n                        } else {\n                            $scope_ptr->config_vars[$variable] = array_merge((array) $scope_ptr->config_vars[$variable], (array) $value);\n                        }\n                    }\n                }\n            }\n        }\n    }\n\n    /**\n     * set Smarty property in template context\n     *\n     * @param string $property_name property name\n     * @param mixed  $value         value\n     * @throws SmartyException if $property_name is not valid\n     */\n    public function __set($property_name, $value)\n    {\n        switch ($property_name) {\n            case 'source':\n            case 'compiled':\n                $this->$property_name = $value;\n                return;\n        }\n\n        throw new SmartyException(\"invalid config property '$property_name'.\");\n    }\n\n    /**\n     * get Smarty property in template context\n     *\n     * @param string $property_name property name\n     * @throws SmartyException if $property_name is not valid\n     */\n    public function __get($property_name)\n    {\n        switch ($property_name) {\n            case 'source':\n                if (empty($this->config_resource)) {\n                    throw new SmartyException(\"Unable to parse resource name \\\"{$this->config_resource}\\\"\");\n                }\n                $this->source = Smarty_Resource::config($this);\n                return $this->source;\n\n            case 'compiled':\n                $this->compiled = $this->source->getCompiled($this);\n                return $this->compiled;\n        }\n\n        throw new SmartyException(\"config attribute '$property_name' does not exist.\");\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_config_file_compiler.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Config File Compiler\n *\n * This is the config file compiler class. It calls the lexer and parser to\n * perform the compiling.\n *\n * @package Smarty\n * @subpackage Config\n * @author Uwe Tews\n */\n\n/**\n * Main config file compiler class\n *\n * @package Smarty\n * @subpackage Config\n */\nclass Smarty_Internal_Config_File_Compiler {\n\n    /**\n     * Lexer object\n     *\n     * @var object\n     */\n    public $lex;\n\n    /**\n     * Parser object\n     *\n     * @var object\n     */\n    public $parser;\n\n    /**\n     * Smarty object\n     *\n     * @var Smarty object\n     */\n    public $smarty;\n\n    /**\n     * Smarty object\n     *\n     * @var Smarty_Internal_Config object\n     */\n    public $config;\n\n    /**\n     * Compiled config data sections and variables\n     *\n     * @var array\n     */\n    public $config_data = array();\n\n    /**\n     * Initialize compiler\n     *\n     * @param Smarty $smarty base instance\n     */\n    public function __construct($smarty)\n    {\n        $this->smarty = $smarty;\n        $this->config_data['sections'] = array();\n        $this->config_data['vars'] = array();\n    }\n\n    /**\n     * Method to compile a Smarty template.\n     *\n     * @param  Smarty_Internal_Config $config config object\n     * @return bool true if compiling succeeded, false if it failed\n     */\n    public function compileSource(Smarty_Internal_Config $config)\n    {\n        /* here is where the compiling takes place. Smarty\n          tags in the templates are replaces with PHP code,\n          then written to compiled files. */\n        $this->config = $config;\n        // get config file source\n        $_content = $config->source->content . \"\\n\";\n        // on empty template just return\n        if ($_content == '') {\n            return true;\n        }\n        // init the lexer/parser to compile the config file\n        $lex = new Smarty_Internal_Configfilelexer($_content, $this->smarty);\n        $parser = new Smarty_Internal_Configfileparser($lex, $this);\n        if ($this->smarty->_parserdebug) $parser->PrintTrace();\n        // get tokens from lexer and parse them\n        while ($lex->yylex()) {\n            if ($this->smarty->_parserdebug) echo \"<br>Parsing  {$parser->yyTokenName[$lex->token]} Token {$lex->value} Line {$lex->line} \\n\";\n            $parser->doParse($lex->token, $lex->value);\n        }\n        // finish parsing process\n        $parser->doParse(0, 0);\n        $config->compiled_config = '<?php $_config_vars = ' . var_export($this->config_data, true) . '; ?>';\n    }\n\n    /**\n     * display compiler error messages without dying\n     *\n     * If parameter $args is empty it is a parser detected syntax error.\n     * In this case the parser is called to obtain information about exspected tokens.\n     *\n     * If parameter $args contains a string this is used as error message\n     *\n     * @param string $args individual error message or null\n     */\n    public function trigger_config_file_error($args = null)\n    {\n        $this->lex = Smarty_Internal_Configfilelexer::instance();\n        $this->parser = Smarty_Internal_Configfileparser::instance();\n        // get template source line which has error\n        $line = $this->lex->line;\n        if (isset($args)) {\n            // $line--;\n        }\n        $match = preg_split(\"/\\n/\", $this->lex->data);\n        $error_text = \"Syntax error in config file '{$this->config->source->filepath}' on line {$line} '{$match[$line-1]}' \";\n        if (isset($args)) {\n            // individual error message\n            $error_text .= $args;\n        } else {\n            // exspected token from parser\n            foreach ($this->parser->yy_get_expected_tokens($this->parser->yymajor) as $token) {\n                $exp_token = $this->parser->yyTokenName[$token];\n                if (isset($this->lex->smarty_token_names[$exp_token])) {\n                    // token type from lexer\n                    $expect[] = '\"' . $this->lex->smarty_token_names[$exp_token] . '\"';\n                } else {\n                    // otherwise internal token name\n                    $expect[] = $this->parser->yyTokenName[$token];\n                }\n            }\n            // output parser error message\n            $error_text .= ' - Unexpected \"' . $this->lex->value . '\", expected one of: ' . implode(' , ', $expect);\n        }\n        throw new SmartyCompilerException($error_text);\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_configfilelexer.php",
    "content": "<?php\n/**\n* Smarty Internal Plugin Configfilelexer\n*\n* This is the lexer to break the config file source into tokens\n* @package Smarty\n* @subpackage Config\n* @author Uwe Tews\n*/\n/**\n* Smarty Internal Plugin Configfilelexer\n*/\nclass Smarty_Internal_Configfilelexer\n{\n\n    public $data;\n    public $counter;\n    public $token;\n    public $value;\n    public $node;\n    public $line;\n    private $state = 1;\n    public $smarty_token_names = array (\t\t// Text for parser error messages\n   \t\t\t\t);\n\n\n    function __construct($data, $smarty)\n    {\n        // set instance object\n        self::instance($this);\n        $this->data = $data . \"\\n\"; //now all lines are \\n-terminated\n        $this->counter = 0;\n        $this->line = 1;\n        $this->smarty = $smarty;\n        $this->mbstring_overload = ini_get('mbstring.func_overload') & 2;\n    }\n    public static function &instance($new_instance = null)\n    {\n        static $instance = null;\n        if (isset($new_instance) && is_object($new_instance))\n            $instance = $new_instance;\n        return $instance;\n    }\n\n\n\n    private $_yy_state = 1;\n    private $_yy_stack = array();\n\n    function yylex()\n    {\n        return $this->{'yylex' . $this->_yy_state}();\n    }\n\n    function yypushstate($state)\n    {\n        array_push($this->_yy_stack, $this->_yy_state);\n        $this->_yy_state = $state;\n    }\n\n    function yypopstate()\n    {\n        $this->_yy_state = array_pop($this->_yy_stack);\n    }\n\n    function yybegin($state)\n    {\n        $this->_yy_state = $state;\n    }\n\n\n\n\n    function yylex1()\n    {\n        $tokenMap = array (\n              1 => 0,\n              2 => 0,\n              3 => 0,\n              4 => 0,\n              5 => 0,\n              6 => 0,\n              7 => 0,\n              8 => 0,\n            );\n        if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {\n            return false; // end of input\n        }\n        $yy_global_pattern = \"/\\G(#|;)|\\G(\\\\[)|\\G(\\\\])|\\G(=)|\\G([ \\t\\r]+)|\\G(\\n)|\\G([0-9]*[a-zA-Z_]\\\\w*)|\\G([\\S\\s])/iS\";\n\n        do {\n            if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {\n                $yysubmatches = $yymatches;\n                $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns\n                if (!count($yymatches)) {\n                    throw new Exception('Error: lexing failed because a rule matched' .\n                        ' an empty string.  Input \"' . substr($this->data,\n                        $this->counter, 5) . '... state START');\n                }\n                next($yymatches); // skip global match\n                $this->token = key($yymatches); // token number\n                if ($tokenMap[$this->token]) {\n                    // extract sub-patterns for passing to lex function\n                    $yysubmatches = array_slice($yysubmatches, $this->token + 1,\n                        $tokenMap[$this->token]);\n                } else {\n                    $yysubmatches = array();\n                }\n                $this->value = current($yymatches); // token value\n                $r = $this->{'yy_r1_' . $this->token}($yysubmatches);\n                if ($r === null) {\n                    $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));\n                    $this->line += substr_count($this->value, \"\\n\");\n                    // accept this token\n                    return true;\n                } elseif ($r === true) {\n                    // we have changed state\n                    // process this token in the new state\n                    return $this->yylex();\n                } elseif ($r === false) {\n                    $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));\n                    $this->line += substr_count($this->value, \"\\n\");\n                    if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {\n                        return false; // end of input\n                    }\n                    // skip this token\n                    continue;\n                }            } else {\n                throw new Exception('Unexpected input at line' . $this->line .\n                    ': ' . $this->data[$this->counter]);\n            }\n            break;\n        } while (true);\n\n    } // end function\n\n\n    const START = 1;\n    function yy_r1_1($yy_subpatterns)\n    {\n\n    $this->token = Smarty_Internal_Configfileparser::TPC_COMMENTSTART;\n    $this->yypushstate(self::COMMENT);\n    }\n    function yy_r1_2($yy_subpatterns)\n    {\n\n    $this->token = Smarty_Internal_Configfileparser::TPC_OPENB;\n    $this->yypushstate(self::SECTION);\n    }\n    function yy_r1_3($yy_subpatterns)\n    {\n\n    $this->token = Smarty_Internal_Configfileparser::TPC_CLOSEB;\n    }\n    function yy_r1_4($yy_subpatterns)\n    {\n\n    $this->token = Smarty_Internal_Configfileparser::TPC_EQUAL;\n    $this->yypushstate(self::VALUE);\n    }\n    function yy_r1_5($yy_subpatterns)\n    {\n\n    return false;\n    }\n    function yy_r1_6($yy_subpatterns)\n    {\n\n    $this->token = Smarty_Internal_Configfileparser::TPC_NEWLINE;\n    }\n    function yy_r1_7($yy_subpatterns)\n    {\n\n    $this->token = Smarty_Internal_Configfileparser::TPC_ID;\n    }\n    function yy_r1_8($yy_subpatterns)\n    {\n\n    $this->token = Smarty_Internal_Configfileparser::TPC_OTHER;\n    }\n\n\n\n    function yylex2()\n    {\n        $tokenMap = array (\n              1 => 0,\n              2 => 0,\n              3 => 0,\n              4 => 0,\n              5 => 0,\n              6 => 0,\n              7 => 0,\n              8 => 0,\n              9 => 0,\n            );\n        if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {\n            return false; // end of input\n        }\n        $yy_global_pattern = \"/\\G([ \\t\\r]+)|\\G(\\\\d+\\\\.\\\\d+(?=[ \\t\\r]*[\\n#;]))|\\G(\\\\d+(?=[ \\t\\r]*[\\n#;]))|\\G(\\\"\\\"\\\")|\\G('[^'\\\\\\\\]*(?:\\\\\\\\.[^'\\\\\\\\]*)*'(?=[ \\t\\r]*[\\n#;]))|\\G(\\\"[^\\\"\\\\\\\\]*(?:\\\\\\\\.[^\\\"\\\\\\\\]*)*\\\"(?=[ \\t\\r]*[\\n#;]))|\\G([a-zA-Z]+(?=[ \\t\\r]*[\\n#;]))|\\G([^\\n]+?(?=[ \\t\\r]*\\n))|\\G(\\n)/iS\";\n\n        do {\n            if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {\n                $yysubmatches = $yymatches;\n                $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns\n                if (!count($yymatches)) {\n                    throw new Exception('Error: lexing failed because a rule matched' .\n                        ' an empty string.  Input \"' . substr($this->data,\n                        $this->counter, 5) . '... state VALUE');\n                }\n                next($yymatches); // skip global match\n                $this->token = key($yymatches); // token number\n                if ($tokenMap[$this->token]) {\n                    // extract sub-patterns for passing to lex function\n                    $yysubmatches = array_slice($yysubmatches, $this->token + 1,\n                        $tokenMap[$this->token]);\n                } else {\n                    $yysubmatches = array();\n                }\n                $this->value = current($yymatches); // token value\n                $r = $this->{'yy_r2_' . $this->token}($yysubmatches);\n                if ($r === null) {\n                    $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));\n                    $this->line += substr_count($this->value, \"\\n\");\n                    // accept this token\n                    return true;\n                } elseif ($r === true) {\n                    // we have changed state\n                    // process this token in the new state\n                    return $this->yylex();\n                } elseif ($r === false) {\n                    $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));\n                    $this->line += substr_count($this->value, \"\\n\");\n                    if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {\n                        return false; // end of input\n                    }\n                    // skip this token\n                    continue;\n                }            } else {\n                throw new Exception('Unexpected input at line' . $this->line .\n                    ': ' . $this->data[$this->counter]);\n            }\n            break;\n        } while (true);\n\n    } // end function\n\n\n    const VALUE = 2;\n    function yy_r2_1($yy_subpatterns)\n    {\n\n    return false;\n    }\n    function yy_r2_2($yy_subpatterns)\n    {\n\n    $this->token = Smarty_Internal_Configfileparser::TPC_FLOAT;\n    $this->yypopstate();\n    }\n    function yy_r2_3($yy_subpatterns)\n    {\n\n    $this->token = Smarty_Internal_Configfileparser::TPC_INT;\n    $this->yypopstate();\n    }\n    function yy_r2_4($yy_subpatterns)\n    {\n\n    $this->token = Smarty_Internal_Configfileparser::TPC_TRIPPLE_QUOTES;\n    $this->yypushstate(self::TRIPPLE);\n    }\n    function yy_r2_5($yy_subpatterns)\n    {\n\n    $this->token = Smarty_Internal_Configfileparser::TPC_SINGLE_QUOTED_STRING;\n    $this->yypopstate();\n    }\n    function yy_r2_6($yy_subpatterns)\n    {\n\n    $this->token = Smarty_Internal_Configfileparser::TPC_DOUBLE_QUOTED_STRING;\n    $this->yypopstate();\n    }\n    function yy_r2_7($yy_subpatterns)\n    {\n\n    if (!$this->smarty->config_booleanize || !in_array(strtolower($this->value), Array(\"true\", \"false\", \"on\", \"off\", \"yes\", \"no\")) ) {\n        $this->yypopstate();\n        $this->yypushstate(self::NAKED_STRING_VALUE);\n        return true; //reprocess in new state\n    } else {\n        $this->token = Smarty_Internal_Configfileparser::TPC_BOOL;\n        $this->yypopstate();\n    }\n    }\n    function yy_r2_8($yy_subpatterns)\n    {\n\n    $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING;\n    $this->yypopstate();\n    }\n    function yy_r2_9($yy_subpatterns)\n    {\n\n    $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING;\n    $this->value = \"\";\n    $this->yypopstate();\n    }\n\n\n\n    function yylex3()\n    {\n        $tokenMap = array (\n              1 => 0,\n            );\n        if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {\n            return false; // end of input\n        }\n        $yy_global_pattern = \"/\\G([^\\n]+?(?=[ \\t\\r]*\\n))/iS\";\n\n        do {\n            if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {\n                $yysubmatches = $yymatches;\n                $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns\n                if (!count($yymatches)) {\n                    throw new Exception('Error: lexing failed because a rule matched' .\n                        ' an empty string.  Input \"' . substr($this->data,\n                        $this->counter, 5) . '... state NAKED_STRING_VALUE');\n                }\n                next($yymatches); // skip global match\n                $this->token = key($yymatches); // token number\n                if ($tokenMap[$this->token]) {\n                    // extract sub-patterns for passing to lex function\n                    $yysubmatches = array_slice($yysubmatches, $this->token + 1,\n                        $tokenMap[$this->token]);\n                } else {\n                    $yysubmatches = array();\n                }\n                $this->value = current($yymatches); // token value\n                $r = $this->{'yy_r3_' . $this->token}($yysubmatches);\n                if ($r === null) {\n                    $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));\n                    $this->line += substr_count($this->value, \"\\n\");\n                    // accept this token\n                    return true;\n                } elseif ($r === true) {\n                    // we have changed state\n                    // process this token in the new state\n                    return $this->yylex();\n                } elseif ($r === false) {\n                    $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));\n                    $this->line += substr_count($this->value, \"\\n\");\n                    if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {\n                        return false; // end of input\n                    }\n                    // skip this token\n                    continue;\n                }            } else {\n                throw new Exception('Unexpected input at line' . $this->line .\n                    ': ' . $this->data[$this->counter]);\n            }\n            break;\n        } while (true);\n\n    } // end function\n\n\n    const NAKED_STRING_VALUE = 3;\n    function yy_r3_1($yy_subpatterns)\n    {\n\n    $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING;\n    $this->yypopstate();\n    }\n\n\n\n    function yylex4()\n    {\n        $tokenMap = array (\n              1 => 0,\n              2 => 0,\n              3 => 0,\n            );\n        if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {\n            return false; // end of input\n        }\n        $yy_global_pattern = \"/\\G([ \\t\\r]+)|\\G([^\\n]+?(?=[ \\t\\r]*\\n))|\\G(\\n)/iS\";\n\n        do {\n            if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {\n                $yysubmatches = $yymatches;\n                $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns\n                if (!count($yymatches)) {\n                    throw new Exception('Error: lexing failed because a rule matched' .\n                        ' an empty string.  Input \"' . substr($this->data,\n                        $this->counter, 5) . '... state COMMENT');\n                }\n                next($yymatches); // skip global match\n                $this->token = key($yymatches); // token number\n                if ($tokenMap[$this->token]) {\n                    // extract sub-patterns for passing to lex function\n                    $yysubmatches = array_slice($yysubmatches, $this->token + 1,\n                        $tokenMap[$this->token]);\n                } else {\n                    $yysubmatches = array();\n                }\n                $this->value = current($yymatches); // token value\n                $r = $this->{'yy_r4_' . $this->token}($yysubmatches);\n                if ($r === null) {\n                    $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));\n                    $this->line += substr_count($this->value, \"\\n\");\n                    // accept this token\n                    return true;\n                } elseif ($r === true) {\n                    // we have changed state\n                    // process this token in the new state\n                    return $this->yylex();\n                } elseif ($r === false) {\n                    $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));\n                    $this->line += substr_count($this->value, \"\\n\");\n                    if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {\n                        return false; // end of input\n                    }\n                    // skip this token\n                    continue;\n                }            } else {\n                throw new Exception('Unexpected input at line' . $this->line .\n                    ': ' . $this->data[$this->counter]);\n            }\n            break;\n        } while (true);\n\n    } // end function\n\n\n    const COMMENT = 4;\n    function yy_r4_1($yy_subpatterns)\n    {\n\n    return false;\n    }\n    function yy_r4_2($yy_subpatterns)\n    {\n\n    $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING;\n    }\n    function yy_r4_3($yy_subpatterns)\n    {\n\n    $this->token = Smarty_Internal_Configfileparser::TPC_NEWLINE;\n    $this->yypopstate();\n    }\n\n\n\n    function yylex5()\n    {\n        $tokenMap = array (\n              1 => 0,\n              2 => 0,\n            );\n        if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {\n            return false; // end of input\n        }\n        $yy_global_pattern = \"/\\G(\\\\.)|\\G(.*?(?=[\\.=[\\]\\r\\n]))/iS\";\n\n        do {\n            if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {\n                $yysubmatches = $yymatches;\n                $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns\n                if (!count($yymatches)) {\n                    throw new Exception('Error: lexing failed because a rule matched' .\n                        ' an empty string.  Input \"' . substr($this->data,\n                        $this->counter, 5) . '... state SECTION');\n                }\n                next($yymatches); // skip global match\n                $this->token = key($yymatches); // token number\n                if ($tokenMap[$this->token]) {\n                    // extract sub-patterns for passing to lex function\n                    $yysubmatches = array_slice($yysubmatches, $this->token + 1,\n                        $tokenMap[$this->token]);\n                } else {\n                    $yysubmatches = array();\n                }\n                $this->value = current($yymatches); // token value\n                $r = $this->{'yy_r5_' . $this->token}($yysubmatches);\n                if ($r === null) {\n                    $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));\n                    $this->line += substr_count($this->value, \"\\n\");\n                    // accept this token\n                    return true;\n                } elseif ($r === true) {\n                    // we have changed state\n                    // process this token in the new state\n                    return $this->yylex();\n                } elseif ($r === false) {\n                    $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));\n                    $this->line += substr_count($this->value, \"\\n\");\n                    if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {\n                        return false; // end of input\n                    }\n                    // skip this token\n                    continue;\n                }            } else {\n                throw new Exception('Unexpected input at line' . $this->line .\n                    ': ' . $this->data[$this->counter]);\n            }\n            break;\n        } while (true);\n\n    } // end function\n\n\n    const SECTION = 5;\n    function yy_r5_1($yy_subpatterns)\n    {\n\n    $this->token = Smarty_Internal_Configfileparser::TPC_DOT;\n    }\n    function yy_r5_2($yy_subpatterns)\n    {\n\n    $this->token = Smarty_Internal_Configfileparser::TPC_SECTION;\n    $this->yypopstate();\n    }\n\n\n    function yylex6()\n    {\n        $tokenMap = array (\n              1 => 0,\n              2 => 0,\n            );\n        if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {\n            return false; // end of input\n        }\n        $yy_global_pattern = \"/\\G(\\\"\\\"\\\"(?=[ \\t\\r]*[\\n#;]))|\\G([\\S\\s])/iS\";\n\n        do {\n            if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {\n                $yysubmatches = $yymatches;\n                $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns\n                if (!count($yymatches)) {\n                    throw new Exception('Error: lexing failed because a rule matched' .\n                        ' an empty string.  Input \"' . substr($this->data,\n                        $this->counter, 5) . '... state TRIPPLE');\n                }\n                next($yymatches); // skip global match\n                $this->token = key($yymatches); // token number\n                if ($tokenMap[$this->token]) {\n                    // extract sub-patterns for passing to lex function\n                    $yysubmatches = array_slice($yysubmatches, $this->token + 1,\n                        $tokenMap[$this->token]);\n                } else {\n                    $yysubmatches = array();\n                }\n                $this->value = current($yymatches); // token value\n                $r = $this->{'yy_r6_' . $this->token}($yysubmatches);\n                if ($r === null) {\n                    $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));\n                    $this->line += substr_count($this->value, \"\\n\");\n                    // accept this token\n                    return true;\n                } elseif ($r === true) {\n                    // we have changed state\n                    // process this token in the new state\n                    return $this->yylex();\n                } elseif ($r === false) {\n                    $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));\n                    $this->line += substr_count($this->value, \"\\n\");\n                    if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {\n                        return false; // end of input\n                    }\n                    // skip this token\n                    continue;\n                }            } else {\n                throw new Exception('Unexpected input at line' . $this->line .\n                    ': ' . $this->data[$this->counter]);\n            }\n            break;\n        } while (true);\n\n    } // end function\n\n\n    const TRIPPLE = 6;\n    function yy_r6_1($yy_subpatterns)\n    {\n\n    $this->token = Smarty_Internal_Configfileparser::TPC_TRIPPLE_QUOTES_END;\n    $this->yypopstate();\n    $this->yypushstate(self::START);\n    }\n    function yy_r6_2($yy_subpatterns)\n    {\n\n  if ($this->mbstring_overload) {\n    $to = mb_strlen($this->data,'latin1');\n  } else {\n    $to = strlen($this->data);\n  }\n  preg_match(\"/\\\"\\\"\\\"[ \\t\\r]*[\\n#;]/\",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter);\n  if (isset($match[0][1])) {\n    $to = $match[0][1];\n  } else {\n    $this->compiler->trigger_template_error (\"missing or misspelled literal closing tag\");\n  }\n  if ($this->mbstring_overload) {\n    $this->value = mb_substr($this->data,$this->counter,$to-$this->counter,'latin1');\n  } else {\n    $this->value = substr($this->data,$this->counter,$to-$this->counter);\n  }\n  $this->token = Smarty_Internal_Configfileparser::TPC_TRIPPLE_TEXT;\n    }\n\n\n}\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_configfileparser.php",
    "content": "<?php\n/**\n* Smarty Internal Plugin Configfileparser\n*\n* This is the config file parser.\n* It is generated from the internal.configfileparser.y file\n* @package Smarty\n* @subpackage Compiler\n* @author Uwe Tews\n*/\n\nclass TPC_yyToken implements ArrayAccess\n{\n    public $string = '';\n    public $metadata = array();\n\n    function __construct($s, $m = array())\n    {\n        if ($s instanceof TPC_yyToken) {\n            $this->string = $s->string;\n            $this->metadata = $s->metadata;\n        } else {\n            $this->string = (string) $s;\n            if ($m instanceof TPC_yyToken) {\n                $this->metadata = $m->metadata;\n            } elseif (is_array($m)) {\n                $this->metadata = $m;\n            }\n        }\n    }\n\n    function __toString()\n    {\n        return $this->_string;\n    }\n\n    function offsetExists($offset)\n    {\n        return isset($this->metadata[$offset]);\n    }\n\n    function offsetGet($offset)\n    {\n        return $this->metadata[$offset];\n    }\n\n    function offsetSet($offset, $value)\n    {\n        if ($offset === null) {\n            if (isset($value[0])) {\n                $x = ($value instanceof TPC_yyToken) ?\n                    $value->metadata : $value;\n                $this->metadata = array_merge($this->metadata, $x);\n                return;\n            }\n            $offset = count($this->metadata);\n        }\n        if ($value === null) {\n            return;\n        }\n        if ($value instanceof TPC_yyToken) {\n            if ($value->metadata) {\n                $this->metadata[$offset] = $value->metadata;\n            }\n        } elseif ($value) {\n            $this->metadata[$offset] = $value;\n        }\n    }\n\n    function offsetUnset($offset)\n    {\n        unset($this->metadata[$offset]);\n    }\n}\n\nclass TPC_yyStackEntry\n{\n    public $stateno;       /* The state-number */\n    public $major;         /* The major token value.  This is the code\n                     ** number for the token at this stack level */\n    public $minor; /* The user-supplied minor token value.  This\n                     ** is the value of the token  */\n};\n\n\n#line 12 \"smarty_internal_configfileparser.y\"\nclass Smarty_Internal_Configfileparser#line 79 \"smarty_internal_configfileparser.php\"\n{\n#line 14 \"smarty_internal_configfileparser.y\"\n\n    // states whether the parse was successful or not\n    public $successful = true;\n    public $retvalue = 0;\n    private $lex;\n    private $internalError = false;\n\n    function __construct($lex, $compiler) {\n        // set instance object\n        self::instance($this);\n        $this->lex = $lex;\n        $this->smarty = $compiler->smarty;\n        $this->compiler = $compiler;\n    }\n    public static function &instance($new_instance = null)\n    {\n        static $instance = null;\n        if (isset($new_instance) && is_object($new_instance))\n            $instance = $new_instance;\n        return $instance;\n    }\n\n    private function parse_bool($str) {\n        if (in_array(strtolower($str) ,array('on','yes','true'))) {\n            $res = true;\n        } else {\n            $res = false;\n        }\n        return $res;\n    }\n\n    private static $escapes_single = Array('\\\\' => '\\\\',\n                                          '\\'' => '\\'');\n    private static function parse_single_quoted_string($qstr) {\n        $escaped_string = substr($qstr, 1, strlen($qstr)-2); //remove outer quotes\n\n        $ss = preg_split('/(\\\\\\\\.)/', $escaped_string, -1, PREG_SPLIT_DELIM_CAPTURE);\n\n        $str = \"\";\n        foreach ($ss as $s) {\n            if (strlen($s) === 2 && $s[0] === '\\\\') {\n                if (isset(self::$escapes_single[$s[1]])) {\n                    $s = self::$escapes_single[$s[1]];\n                }\n             }\n\n             $str .= $s;\n        }\n\n        return $str;\n    }\n\n    private static function parse_double_quoted_string($qstr) {\n        $inner_str = substr($qstr, 1, strlen($qstr)-2);\n        return stripcslashes($inner_str);\n    }\n\n    private static function parse_tripple_double_quoted_string($qstr) {\n        return stripcslashes($qstr);\n    }\n\n    private function set_var(Array $var, Array &$target_array) {\n        $key = $var[\"key\"];\n        $value = $var[\"value\"];\n\n        if ($this->smarty->config_overwrite || !isset($target_array['vars'][$key])) {\n            $target_array['vars'][$key] = $value;\n        } else {\n            settype($target_array['vars'][$key], 'array');\n            $target_array['vars'][$key][] = $value;\n        }\n    }\n\n    private function add_global_vars(Array $vars) {\n        if (!isset($this->compiler->config_data['vars'])) {\n      $this->compiler->config_data['vars'] = Array();\n        }\n        foreach ($vars as $var) {\n            $this->set_var($var, $this->compiler->config_data);\n        }\n    }\n\n    private function add_section_vars($section_name, Array $vars) {\n        if (!isset($this->compiler->config_data['sections'][$section_name]['vars'])) {\n            $this->compiler->config_data['sections'][$section_name]['vars'] = Array();\n        }\n        foreach ($vars as $var) {\n            $this->set_var($var, $this->compiler->config_data['sections'][$section_name]);\n        }\n    }\n#line 173 \"smarty_internal_configfileparser.php\"\n\n    const TPC_OPENB                          =  1;\n    const TPC_SECTION                        =  2;\n    const TPC_CLOSEB                         =  3;\n    const TPC_DOT                            =  4;\n    const TPC_ID                             =  5;\n    const TPC_EQUAL                          =  6;\n    const TPC_FLOAT                          =  7;\n    const TPC_INT                            =  8;\n    const TPC_BOOL                           =  9;\n    const TPC_SINGLE_QUOTED_STRING           = 10;\n    const TPC_DOUBLE_QUOTED_STRING           = 11;\n    const TPC_TRIPPLE_QUOTES                 = 12;\n    const TPC_TRIPPLE_TEXT                   = 13;\n    const TPC_TRIPPLE_QUOTES_END             = 14;\n    const TPC_NAKED_STRING                   = 15;\n    const TPC_OTHER                          = 16;\n    const TPC_NEWLINE                        = 17;\n    const TPC_COMMENTSTART                   = 18;\n    const YY_NO_ACTION = 60;\n    const YY_ACCEPT_ACTION = 59;\n    const YY_ERROR_ACTION = 58;\n\n    const YY_SZ_ACTTAB = 38;\nstatic public $yy_action = array(\n /*     0 */    29,   30,   34,   33,   24,   13,   19,   25,   35,   21,\n /*    10 */    59,    8,    3,    1,   20,   12,   14,   31,   20,   12,\n /*    20 */    15,   17,   23,   18,   27,   26,    4,    5,    6,   32,\n /*    30 */     2,   11,   28,   22,   16,    9,    7,   10,\n    );\n    static public $yy_lookahead = array(\n /*     0 */     7,    8,    9,   10,   11,   12,    5,   27,   15,   16,\n /*    10 */    20,   21,   23,   23,   17,   18,   13,   14,   17,   18,\n /*    20 */    15,    2,   17,    4,   25,   26,    6,    3,    3,   14,\n /*    30 */    23,    1,   24,   17,    2,   25,   22,   25,\n);\n    const YY_SHIFT_USE_DFLT = -8;\n    const YY_SHIFT_MAX = 19;\n    static public $yy_shift_ofst = array(\n /*     0 */    -8,    1,    1,    1,   -7,   -3,   -3,   30,   -8,   -8,\n /*    10 */    -8,   19,    5,    3,   15,   16,   24,   25,   32,   20,\n);\n    const YY_REDUCE_USE_DFLT = -21;\n    const YY_REDUCE_MAX = 10;\n    static public $yy_reduce_ofst = array(\n /*     0 */   -10,   -1,   -1,   -1,  -20,   10,   12,    8,   14,    7,\n /*    10 */   -11,\n);\n    static public $yyExpectedTokens = array(\n        /* 0 */ array(),\n        /* 1 */ array(5, 17, 18, ),\n        /* 2 */ array(5, 17, 18, ),\n        /* 3 */ array(5, 17, 18, ),\n        /* 4 */ array(7, 8, 9, 10, 11, 12, 15, 16, ),\n        /* 5 */ array(17, 18, ),\n        /* 6 */ array(17, 18, ),\n        /* 7 */ array(1, ),\n        /* 8 */ array(),\n        /* 9 */ array(),\n        /* 10 */ array(),\n        /* 11 */ array(2, 4, ),\n        /* 12 */ array(15, 17, ),\n        /* 13 */ array(13, 14, ),\n        /* 14 */ array(14, ),\n        /* 15 */ array(17, ),\n        /* 16 */ array(3, ),\n        /* 17 */ array(3, ),\n        /* 18 */ array(2, ),\n        /* 19 */ array(6, ),\n        /* 20 */ array(),\n        /* 21 */ array(),\n        /* 22 */ array(),\n        /* 23 */ array(),\n        /* 24 */ array(),\n        /* 25 */ array(),\n        /* 26 */ array(),\n        /* 27 */ array(),\n        /* 28 */ array(),\n        /* 29 */ array(),\n        /* 30 */ array(),\n        /* 31 */ array(),\n        /* 32 */ array(),\n        /* 33 */ array(),\n        /* 34 */ array(),\n        /* 35 */ array(),\n);\n    static public $yy_default = array(\n /*     0 */    44,   37,   41,   40,   58,   58,   58,   36,   39,   44,\n /*    10 */    44,   58,   58,   58,   58,   58,   58,   58,   58,   58,\n /*    20 */    55,   54,   57,   56,   50,   45,   43,   42,   38,   46,\n /*    30 */    47,   52,   51,   49,   48,   53,\n);\n    const YYNOCODE = 29;\n    const YYSTACKDEPTH = 100;\n    const YYNSTATE = 36;\n    const YYNRULE = 22;\n    const YYERRORSYMBOL = 19;\n    const YYERRSYMDT = 'yy0';\n    const YYFALLBACK = 0;\n    static public $yyFallback = array(\n    );\n    static function Trace($TraceFILE, $zTracePrompt)\n    {\n        if (!$TraceFILE) {\n            $zTracePrompt = 0;\n        } elseif (!$zTracePrompt) {\n            $TraceFILE = 0;\n        }\n        self::$yyTraceFILE = $TraceFILE;\n        self::$yyTracePrompt = $zTracePrompt;\n    }\n\n    static function PrintTrace()\n    {\n        self::$yyTraceFILE = fopen('php://output', 'w');\n        self::$yyTracePrompt = '<br>';\n    }\n\n    static public $yyTraceFILE;\n    static public $yyTracePrompt;\n    public $yyidx;                    /* Index of top element in stack */\n    public $yyerrcnt;                 /* Shifts left before out of the error */\n    public $yystack = array();  /* The parser's stack */\n\n    public $yyTokenName = array(\n  '$',             'OPENB',         'SECTION',       'CLOSEB',\n  'DOT',           'ID',            'EQUAL',         'FLOAT',\n  'INT',           'BOOL',          'SINGLE_QUOTED_STRING',  'DOUBLE_QUOTED_STRING',\n  'TRIPPLE_QUOTES',  'TRIPPLE_TEXT',  'TRIPPLE_QUOTES_END',  'NAKED_STRING',\n  'OTHER',         'NEWLINE',       'COMMENTSTART',  'error',\n  'start',         'global_vars',   'sections',      'var_list',\n  'section',       'newline',       'var',           'value',\n    );\n\n    static public $yyRuleName = array(\n /*   0 */ \"start ::= global_vars sections\",\n /*   1 */ \"global_vars ::= var_list\",\n /*   2 */ \"sections ::= sections section\",\n /*   3 */ \"sections ::=\",\n /*   4 */ \"section ::= OPENB SECTION CLOSEB newline var_list\",\n /*   5 */ \"section ::= OPENB DOT SECTION CLOSEB newline var_list\",\n /*   6 */ \"var_list ::= var_list newline\",\n /*   7 */ \"var_list ::= var_list var\",\n /*   8 */ \"var_list ::=\",\n /*   9 */ \"var ::= ID EQUAL value\",\n /*  10 */ \"value ::= FLOAT\",\n /*  11 */ \"value ::= INT\",\n /*  12 */ \"value ::= BOOL\",\n /*  13 */ \"value ::= SINGLE_QUOTED_STRING\",\n /*  14 */ \"value ::= DOUBLE_QUOTED_STRING\",\n /*  15 */ \"value ::= TRIPPLE_QUOTES TRIPPLE_TEXT TRIPPLE_QUOTES_END\",\n /*  16 */ \"value ::= TRIPPLE_QUOTES TRIPPLE_QUOTES_END\",\n /*  17 */ \"value ::= NAKED_STRING\",\n /*  18 */ \"value ::= OTHER\",\n /*  19 */ \"newline ::= NEWLINE\",\n /*  20 */ \"newline ::= COMMENTSTART NEWLINE\",\n /*  21 */ \"newline ::= COMMENTSTART NAKED_STRING NEWLINE\",\n    );\n\n    function tokenName($tokenType)\n    {\n        if ($tokenType === 0) {\n            return 'End of Input';\n        }\n        if ($tokenType > 0 && $tokenType < count($this->yyTokenName)) {\n            return $this->yyTokenName[$tokenType];\n        } else {\n            return \"Unknown\";\n        }\n    }\n\n    static function yy_destructor($yymajor, $yypminor)\n    {\n        switch ($yymajor) {\n            default:  break;   /* If no destructor action specified: do nothing */\n        }\n    }\n\n    function yy_pop_parser_stack()\n    {\n        if (!count($this->yystack)) {\n            return;\n        }\n        $yytos = array_pop($this->yystack);\n        if (self::$yyTraceFILE && $this->yyidx >= 0) {\n            fwrite(self::$yyTraceFILE,\n                self::$yyTracePrompt . 'Popping ' . $this->yyTokenName[$yytos->major] .\n                    \"\\n\");\n        }\n        $yymajor = $yytos->major;\n        self::yy_destructor($yymajor, $yytos->minor);\n        $this->yyidx--;\n        return $yymajor;\n    }\n\n    function __destruct()\n    {\n        while ($this->yystack !== Array()) {\n            $this->yy_pop_parser_stack();\n        }\n        if (is_resource(self::$yyTraceFILE)) {\n            fclose(self::$yyTraceFILE);\n        }\n    }\n\n    function yy_get_expected_tokens($token)\n    {\n        $state = $this->yystack[$this->yyidx]->stateno;\n        $expected = self::$yyExpectedTokens[$state];\n        if (in_array($token, self::$yyExpectedTokens[$state], true)) {\n            return $expected;\n        }\n        $stack = $this->yystack;\n        $yyidx = $this->yyidx;\n        do {\n            $yyact = $this->yy_find_shift_action($token);\n            if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) {\n                // reduce action\n                $done = 0;\n                do {\n                    if ($done++ == 100) {\n                        $this->yyidx = $yyidx;\n                        $this->yystack = $stack;\n                        // too much recursion prevents proper detection\n                        // so give up\n                        return array_unique($expected);\n                    }\n                    $yyruleno = $yyact - self::YYNSTATE;\n                    $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs'];\n                    $nextstate = $this->yy_find_reduce_action(\n                        $this->yystack[$this->yyidx]->stateno,\n                        self::$yyRuleInfo[$yyruleno]['lhs']);\n                    if (isset(self::$yyExpectedTokens[$nextstate])) {\n\t\t        $expected = array_merge($expected, self::$yyExpectedTokens[$nextstate]);\n                            if (in_array($token,\n                                  self::$yyExpectedTokens[$nextstate], true)) {\n                            $this->yyidx = $yyidx;\n                            $this->yystack = $stack;\n                            return array_unique($expected);\n                        }\n                    }\n                    if ($nextstate < self::YYNSTATE) {\n                        // we need to shift a non-terminal\n                        $this->yyidx++;\n                        $x = new TPC_yyStackEntry;\n                        $x->stateno = $nextstate;\n                        $x->major = self::$yyRuleInfo[$yyruleno]['lhs'];\n                        $this->yystack[$this->yyidx] = $x;\n                        continue 2;\n                    } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {\n                        $this->yyidx = $yyidx;\n                        $this->yystack = $stack;\n                        // the last token was just ignored, we can't accept\n                        // by ignoring input, this is in essence ignoring a\n                        // syntax error!\n                        return array_unique($expected);\n                    } elseif ($nextstate === self::YY_NO_ACTION) {\n                        $this->yyidx = $yyidx;\n                        $this->yystack = $stack;\n                        // input accepted, but not shifted (I guess)\n                        return $expected;\n                    } else {\n                        $yyact = $nextstate;\n                    }\n                } while (true);\n            }\n            break;\n        } while (true);\n\t$this->yyidx = $yyidx;\n\t$this->yystack = $stack;\n        return array_unique($expected);\n    }\n\n    function yy_is_expected_token($token)\n    {\n        if ($token === 0) {\n            return true; // 0 is not part of this\n        }\n        $state = $this->yystack[$this->yyidx]->stateno;\n        if (in_array($token, self::$yyExpectedTokens[$state], true)) {\n            return true;\n        }\n        $stack = $this->yystack;\n        $yyidx = $this->yyidx;\n        do {\n            $yyact = $this->yy_find_shift_action($token);\n            if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) {\n                // reduce action\n                $done = 0;\n                do {\n                    if ($done++ == 100) {\n                        $this->yyidx = $yyidx;\n                        $this->yystack = $stack;\n                        // too much recursion prevents proper detection\n                        // so give up\n                        return true;\n                    }\n                    $yyruleno = $yyact - self::YYNSTATE;\n                    $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs'];\n                    $nextstate = $this->yy_find_reduce_action(\n                        $this->yystack[$this->yyidx]->stateno,\n                        self::$yyRuleInfo[$yyruleno]['lhs']);\n                    if (isset(self::$yyExpectedTokens[$nextstate]) &&\n                          in_array($token, self::$yyExpectedTokens[$nextstate], true)) {\n                        $this->yyidx = $yyidx;\n                        $this->yystack = $stack;\n                        return true;\n                    }\n                    if ($nextstate < self::YYNSTATE) {\n                        // we need to shift a non-terminal\n                        $this->yyidx++;\n                        $x = new TPC_yyStackEntry;\n                        $x->stateno = $nextstate;\n                        $x->major = self::$yyRuleInfo[$yyruleno]['lhs'];\n                        $this->yystack[$this->yyidx] = $x;\n                        continue 2;\n                    } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {\n                        $this->yyidx = $yyidx;\n                        $this->yystack = $stack;\n                        if (!$token) {\n                            // end of input: this is valid\n                            return true;\n                        }\n                        // the last token was just ignored, we can't accept\n                        // by ignoring input, this is in essence ignoring a\n                        // syntax error!\n                        return false;\n                    } elseif ($nextstate === self::YY_NO_ACTION) {\n                        $this->yyidx = $yyidx;\n                        $this->yystack = $stack;\n                        // input accepted, but not shifted (I guess)\n                        return true;\n                    } else {\n                        $yyact = $nextstate;\n                    }\n                } while (true);\n            }\n            break;\n        } while (true);\n        $this->yyidx = $yyidx;\n        $this->yystack = $stack;\n        return true;\n    }\n\n   function yy_find_shift_action($iLookAhead)\n    {\n        $stateno = $this->yystack[$this->yyidx]->stateno;\n\n        /* if ($this->yyidx < 0) return self::YY_NO_ACTION;  */\n        if (!isset(self::$yy_shift_ofst[$stateno])) {\n            // no shift actions\n            return self::$yy_default[$stateno];\n        }\n        $i = self::$yy_shift_ofst[$stateno];\n        if ($i === self::YY_SHIFT_USE_DFLT) {\n            return self::$yy_default[$stateno];\n        }\n        if ($iLookAhead == self::YYNOCODE) {\n            return self::YY_NO_ACTION;\n        }\n        $i += $iLookAhead;\n        if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||\n              self::$yy_lookahead[$i] != $iLookAhead) {\n            if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback)\n                   && ($iFallback = self::$yyFallback[$iLookAhead]) != 0) {\n                if (self::$yyTraceFILE) {\n                    fwrite(self::$yyTraceFILE, self::$yyTracePrompt . \"FALLBACK \" .\n                        $this->yyTokenName[$iLookAhead] . \" => \" .\n                        $this->yyTokenName[$iFallback] . \"\\n\");\n                }\n                return $this->yy_find_shift_action($iFallback);\n            }\n            return self::$yy_default[$stateno];\n        } else {\n            return self::$yy_action[$i];\n        }\n    }\n\n    function yy_find_reduce_action($stateno, $iLookAhead)\n    {\n        /* $stateno = $this->yystack[$this->yyidx]->stateno; */\n\n        if (!isset(self::$yy_reduce_ofst[$stateno])) {\n            return self::$yy_default[$stateno];\n        }\n        $i = self::$yy_reduce_ofst[$stateno];\n        if ($i == self::YY_REDUCE_USE_DFLT) {\n            return self::$yy_default[$stateno];\n        }\n        if ($iLookAhead == self::YYNOCODE) {\n            return self::YY_NO_ACTION;\n        }\n        $i += $iLookAhead;\n        if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||\n              self::$yy_lookahead[$i] != $iLookAhead) {\n            return self::$yy_default[$stateno];\n        } else {\n            return self::$yy_action[$i];\n        }\n    }\n\n    function yy_shift($yyNewState, $yyMajor, $yypMinor)\n    {\n        $this->yyidx++;\n        if ($this->yyidx >= self::YYSTACKDEPTH) {\n            $this->yyidx--;\n            if (self::$yyTraceFILE) {\n                fprintf(self::$yyTraceFILE, \"%sStack Overflow!\\n\", self::$yyTracePrompt);\n            }\n            while ($this->yyidx >= 0) {\n                $this->yy_pop_parser_stack();\n            }\n#line 125 \"smarty_internal_configfileparser.y\"\n\n    $this->internalError = true;\n    $this->compiler->trigger_config_file_error(\"Stack overflow in configfile parser\");\n#line 593 \"smarty_internal_configfileparser.php\"\n            return;\n        }\n        $yytos = new TPC_yyStackEntry;\n        $yytos->stateno = $yyNewState;\n        $yytos->major = $yyMajor;\n        $yytos->minor = $yypMinor;\n        array_push($this->yystack, $yytos);\n        if (self::$yyTraceFILE && $this->yyidx > 0) {\n            fprintf(self::$yyTraceFILE, \"%sShift %d\\n\", self::$yyTracePrompt,\n                $yyNewState);\n            fprintf(self::$yyTraceFILE, \"%sStack:\", self::$yyTracePrompt);\n            for($i = 1; $i <= $this->yyidx; $i++) {\n                fprintf(self::$yyTraceFILE, \" %s\",\n                    $this->yyTokenName[$this->yystack[$i]->major]);\n            }\n            fwrite(self::$yyTraceFILE,\"\\n\");\n        }\n    }\n\n    static public $yyRuleInfo = array(\n  array( 'lhs' => 20, 'rhs' => 2 ),\n  array( 'lhs' => 21, 'rhs' => 1 ),\n  array( 'lhs' => 22, 'rhs' => 2 ),\n  array( 'lhs' => 22, 'rhs' => 0 ),\n  array( 'lhs' => 24, 'rhs' => 5 ),\n  array( 'lhs' => 24, 'rhs' => 6 ),\n  array( 'lhs' => 23, 'rhs' => 2 ),\n  array( 'lhs' => 23, 'rhs' => 2 ),\n  array( 'lhs' => 23, 'rhs' => 0 ),\n  array( 'lhs' => 26, 'rhs' => 3 ),\n  array( 'lhs' => 27, 'rhs' => 1 ),\n  array( 'lhs' => 27, 'rhs' => 1 ),\n  array( 'lhs' => 27, 'rhs' => 1 ),\n  array( 'lhs' => 27, 'rhs' => 1 ),\n  array( 'lhs' => 27, 'rhs' => 1 ),\n  array( 'lhs' => 27, 'rhs' => 3 ),\n  array( 'lhs' => 27, 'rhs' => 2 ),\n  array( 'lhs' => 27, 'rhs' => 1 ),\n  array( 'lhs' => 27, 'rhs' => 1 ),\n  array( 'lhs' => 25, 'rhs' => 1 ),\n  array( 'lhs' => 25, 'rhs' => 2 ),\n  array( 'lhs' => 25, 'rhs' => 3 ),\n    );\n\n    static public $yyReduceMap = array(\n        0 => 0,\n        2 => 0,\n        3 => 0,\n        19 => 0,\n        20 => 0,\n        21 => 0,\n        1 => 1,\n        4 => 4,\n        5 => 5,\n        6 => 6,\n        7 => 7,\n        8 => 8,\n        9 => 9,\n        10 => 10,\n        11 => 11,\n        12 => 12,\n        13 => 13,\n        14 => 14,\n        15 => 15,\n        16 => 16,\n        17 => 17,\n        18 => 17,\n    );\n#line 131 \"smarty_internal_configfileparser.y\"\n    function yy_r0(){\n    $this->_retvalue = null;\n    }\n#line 666 \"smarty_internal_configfileparser.php\"\n#line 136 \"smarty_internal_configfileparser.y\"\n    function yy_r1(){\n    $this->add_global_vars($this->yystack[$this->yyidx + 0]->minor); $this->_retvalue = null;\n    }\n#line 671 \"smarty_internal_configfileparser.php\"\n#line 149 \"smarty_internal_configfileparser.y\"\n    function yy_r4(){\n    $this->add_section_vars($this->yystack[$this->yyidx + -3]->minor, $this->yystack[$this->yyidx + 0]->minor);\n    $this->_retvalue = null;\n    }\n#line 677 \"smarty_internal_configfileparser.php\"\n#line 154 \"smarty_internal_configfileparser.y\"\n    function yy_r5(){\n    if ($this->smarty->config_read_hidden) {\n        $this->add_section_vars($this->yystack[$this->yyidx + -3]->minor, $this->yystack[$this->yyidx + 0]->minor);\n    }\n    $this->_retvalue = null;\n    }\n#line 685 \"smarty_internal_configfileparser.php\"\n#line 162 \"smarty_internal_configfileparser.y\"\n    function yy_r6(){\n    $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor;\n    }\n#line 690 \"smarty_internal_configfileparser.php\"\n#line 166 \"smarty_internal_configfileparser.y\"\n    function yy_r7(){\n    $this->_retvalue = array_merge($this->yystack[$this->yyidx + -1]->minor, Array($this->yystack[$this->yyidx + 0]->minor));\n    }\n#line 695 \"smarty_internal_configfileparser.php\"\n#line 170 \"smarty_internal_configfileparser.y\"\n    function yy_r8(){\n    $this->_retvalue = Array();\n    }\n#line 700 \"smarty_internal_configfileparser.php\"\n#line 176 \"smarty_internal_configfileparser.y\"\n    function yy_r9(){\n    $this->_retvalue = Array(\"key\" => $this->yystack[$this->yyidx + -2]->minor, \"value\" => $this->yystack[$this->yyidx + 0]->minor);\n    }\n#line 705 \"smarty_internal_configfileparser.php\"\n#line 181 \"smarty_internal_configfileparser.y\"\n    function yy_r10(){\n    $this->_retvalue = (float) $this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 710 \"smarty_internal_configfileparser.php\"\n#line 185 \"smarty_internal_configfileparser.y\"\n    function yy_r11(){\n    $this->_retvalue = (int) $this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 715 \"smarty_internal_configfileparser.php\"\n#line 189 \"smarty_internal_configfileparser.y\"\n    function yy_r12(){\n    $this->_retvalue = $this->parse_bool($this->yystack[$this->yyidx + 0]->minor);\n    }\n#line 720 \"smarty_internal_configfileparser.php\"\n#line 193 \"smarty_internal_configfileparser.y\"\n    function yy_r13(){\n    $this->_retvalue = self::parse_single_quoted_string($this->yystack[$this->yyidx + 0]->minor);\n    }\n#line 725 \"smarty_internal_configfileparser.php\"\n#line 197 \"smarty_internal_configfileparser.y\"\n    function yy_r14(){\n    $this->_retvalue = self::parse_double_quoted_string($this->yystack[$this->yyidx + 0]->minor);\n    }\n#line 730 \"smarty_internal_configfileparser.php\"\n#line 201 \"smarty_internal_configfileparser.y\"\n    function yy_r15(){\n    $this->_retvalue = self::parse_tripple_double_quoted_string($this->yystack[$this->yyidx + -1]->minor);\n    }\n#line 735 \"smarty_internal_configfileparser.php\"\n#line 205 \"smarty_internal_configfileparser.y\"\n    function yy_r16(){\n    $this->_retvalue = '';\n    }\n#line 740 \"smarty_internal_configfileparser.php\"\n#line 209 \"smarty_internal_configfileparser.y\"\n    function yy_r17(){\n    $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 745 \"smarty_internal_configfileparser.php\"\n\n    private $_retvalue;\n\n    function yy_reduce($yyruleno)\n    {\n        $yymsp = $this->yystack[$this->yyidx];\n        if (self::$yyTraceFILE && $yyruleno >= 0\n              && $yyruleno < count(self::$yyRuleName)) {\n            fprintf(self::$yyTraceFILE, \"%sReduce (%d) [%s].\\n\",\n                self::$yyTracePrompt, $yyruleno,\n                self::$yyRuleName[$yyruleno]);\n        }\n\n        $this->_retvalue = $yy_lefthand_side = null;\n        if (array_key_exists($yyruleno, self::$yyReduceMap)) {\n            // call the action\n            $this->_retvalue = null;\n            $this->{'yy_r' . self::$yyReduceMap[$yyruleno]}();\n            $yy_lefthand_side = $this->_retvalue;\n        }\n        $yygoto = self::$yyRuleInfo[$yyruleno]['lhs'];\n        $yysize = self::$yyRuleInfo[$yyruleno]['rhs'];\n        $this->yyidx -= $yysize;\n        for($i = $yysize; $i; $i--) {\n            // pop all of the right-hand side parameters\n            array_pop($this->yystack);\n        }\n        $yyact = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, $yygoto);\n        if ($yyact < self::YYNSTATE) {\n            if (!self::$yyTraceFILE && $yysize) {\n                $this->yyidx++;\n                $x = new TPC_yyStackEntry;\n                $x->stateno = $yyact;\n                $x->major = $yygoto;\n                $x->minor = $yy_lefthand_side;\n                $this->yystack[$this->yyidx] = $x;\n            } else {\n                $this->yy_shift($yyact, $yygoto, $yy_lefthand_side);\n            }\n        } elseif ($yyact == self::YYNSTATE + self::YYNRULE + 1) {\n            $this->yy_accept();\n        }\n    }\n\n    function yy_parse_failed()\n    {\n        if (self::$yyTraceFILE) {\n            fprintf(self::$yyTraceFILE, \"%sFail!\\n\", self::$yyTracePrompt);\n        }\n        while ($this->yyidx >= 0) {\n            $this->yy_pop_parser_stack();\n        }\n    }\n\n    function yy_syntax_error($yymajor, $TOKEN)\n    {\n#line 118 \"smarty_internal_configfileparser.y\"\n\n    $this->internalError = true;\n    $this->yymajor = $yymajor;\n    $this->compiler->trigger_config_file_error();\n#line 808 \"smarty_internal_configfileparser.php\"\n    }\n\n    function yy_accept()\n    {\n        if (self::$yyTraceFILE) {\n            fprintf(self::$yyTraceFILE, \"%sAccept!\\n\", self::$yyTracePrompt);\n        }\n        while ($this->yyidx >= 0) {\n            $stack = $this->yy_pop_parser_stack();\n        }\n#line 110 \"smarty_internal_configfileparser.y\"\n\n    $this->successful = !$this->internalError;\n    $this->internalError = false;\n    $this->retvalue = $this->_retvalue;\n    //echo $this->retvalue.\"\\n\\n\";\n#line 826 \"smarty_internal_configfileparser.php\"\n    }\n\n    function doParse($yymajor, $yytokenvalue)\n    {\n        $yyerrorhit = 0;   /* True if yymajor has invoked an error */\n\n        if ($this->yyidx === null || $this->yyidx < 0) {\n            $this->yyidx = 0;\n            $this->yyerrcnt = -1;\n            $x = new TPC_yyStackEntry;\n            $x->stateno = 0;\n            $x->major = 0;\n            $this->yystack = array();\n            array_push($this->yystack, $x);\n        }\n        $yyendofinput = ($yymajor==0);\n\n        if (self::$yyTraceFILE) {\n            fprintf(self::$yyTraceFILE, \"%sInput %s\\n\",\n                self::$yyTracePrompt, $this->yyTokenName[$yymajor]);\n        }\n\n        do {\n            $yyact = $this->yy_find_shift_action($yymajor);\n            if ($yymajor < self::YYERRORSYMBOL &&\n                  !$this->yy_is_expected_token($yymajor)) {\n                // force a syntax error\n                $yyact = self::YY_ERROR_ACTION;\n            }\n            if ($yyact < self::YYNSTATE) {\n                $this->yy_shift($yyact, $yymajor, $yytokenvalue);\n                $this->yyerrcnt--;\n                if ($yyendofinput && $this->yyidx >= 0) {\n                    $yymajor = 0;\n                } else {\n                    $yymajor = self::YYNOCODE;\n                }\n            } elseif ($yyact < self::YYNSTATE + self::YYNRULE) {\n                $this->yy_reduce($yyact - self::YYNSTATE);\n            } elseif ($yyact == self::YY_ERROR_ACTION) {\n                if (self::$yyTraceFILE) {\n                    fprintf(self::$yyTraceFILE, \"%sSyntax Error!\\n\",\n                        self::$yyTracePrompt);\n                }\n                if (self::YYERRORSYMBOL) {\n                    if ($this->yyerrcnt < 0) {\n                        $this->yy_syntax_error($yymajor, $yytokenvalue);\n                    }\n                    $yymx = $this->yystack[$this->yyidx]->major;\n                    if ($yymx == self::YYERRORSYMBOL || $yyerrorhit ){\n                        if (self::$yyTraceFILE) {\n                            fprintf(self::$yyTraceFILE, \"%sDiscard input token %s\\n\",\n                                self::$yyTracePrompt, $this->yyTokenName[$yymajor]);\n                        }\n                        $this->yy_destructor($yymajor, $yytokenvalue);\n                        $yymajor = self::YYNOCODE;\n                    } else {\n                        while ($this->yyidx >= 0 &&\n                                 $yymx != self::YYERRORSYMBOL &&\n        ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE\n                              ){\n                            $this->yy_pop_parser_stack();\n                        }\n                        if ($this->yyidx < 0 || $yymajor==0) {\n                            $this->yy_destructor($yymajor, $yytokenvalue);\n                            $this->yy_parse_failed();\n                            $yymajor = self::YYNOCODE;\n                        } elseif ($yymx != self::YYERRORSYMBOL) {\n                            $u2 = 0;\n                            $this->yy_shift($yyact, self::YYERRORSYMBOL, $u2);\n                        }\n                    }\n                    $this->yyerrcnt = 3;\n                    $yyerrorhit = 1;\n                } else {\n                    if ($this->yyerrcnt <= 0) {\n                        $this->yy_syntax_error($yymajor, $yytokenvalue);\n                    }\n                    $this->yyerrcnt = 3;\n                    $this->yy_destructor($yymajor, $yytokenvalue);\n                    if ($yyendofinput) {\n                        $this->yy_parse_failed();\n                    }\n                    $yymajor = self::YYNOCODE;\n                }\n            } else {\n                $this->yy_accept();\n                $yymajor = self::YYNOCODE;\n            }\n        } while ($yymajor != self::YYNOCODE && $this->yyidx >= 0);\n    }\n}\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_data.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Data\n *\n * This file contains the basic classes and methodes for template and variable creation\n *\n * @package Smarty\n * @subpackage Template\n * @author Uwe Tews\n */\n\n/**\n * Base class with template and variable methodes\n *\n * @package Smarty\n * @subpackage Template\n */\nclass Smarty_Internal_Data {\n\n    /**\n     * name of class used for templates\n     *\n     * @var string\n     */\n    public $template_class = 'Smarty_Internal_Template';\n    /**\n     * template variables\n     *\n     * @var array\n     */\n    public $tpl_vars = array();\n    /**\n     * parent template (if any)\n     *\n     * @var Smarty_Internal_Template\n     */\n    public $parent = null;\n    /**\n     * configuration settings\n     *\n     * @var array\n     */\n    public $config_vars = array();\n\n    /**\n     * assigns a Smarty variable\n     *\n     * @param array|string $tpl_var the template variable name(s)\n     * @param mixed        $value   the value to assign\n     * @param boolean      $nocache if true any output of this variable will be not cached\n     * @param boolean $scope the scope the variable will have  (local,parent or root)\n     * @return Smarty_Internal_Data current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining\n     */\n    public function assign($tpl_var, $value = null, $nocache = false)\n    {\n        if (is_array($tpl_var)) {\n            foreach ($tpl_var as $_key => $_val) {\n                if ($_key != '') {\n                    $this->tpl_vars[$_key] = new Smarty_variable($_val, $nocache);\n                }\n            }\n        } else {\n            if ($tpl_var != '') {\n                $this->tpl_vars[$tpl_var] = new Smarty_variable($value, $nocache);\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * assigns a global Smarty variable\n     *\n     * @param string $varname the global variable name\n     * @param mixed  $value   the value to assign\n     * @param boolean $nocache if true any output of this variable will be not cached\n     * @return Smarty_Internal_Data current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining\n     */\n    public function assignGlobal($varname, $value = null, $nocache = false)\n    {\n        if ($varname != '') {\n            Smarty::$global_tpl_vars[$varname] = new Smarty_variable($value, $nocache);\n            $ptr = $this;\n            while ($ptr instanceof Smarty_Internal_Template) {\n                $ptr->tpl_vars[$varname] = clone Smarty::$global_tpl_vars[$varname];\n                $ptr = $ptr->parent;\n            }\n        }\n\n        return $this;\n    }\n    /**\n     * assigns values to template variables by reference\n     *\n     * @param string $tpl_var the template variable name\n     * @param mixed $ &$value the referenced value to assign\n     * @param boolean $nocache if true any output of this variable will be not cached\n     * @return Smarty_Internal_Data current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining\n     */\n    public function assignByRef($tpl_var, &$value, $nocache = false)\n    {\n        if ($tpl_var != '') {\n            $this->tpl_vars[$tpl_var] = new Smarty_variable(null, $nocache);\n            $this->tpl_vars[$tpl_var]->value = &$value;\n        }\n\n        return $this;\n    }\n\n    /**\n     * appends values to template variables\n     *\n     * @param array|string $tpl_var the template variable name(s)\n     * @param mixed        $value   the value to append\n     * @param boolean      $merge   flag if array elements shall be merged\n     * @param boolean $nocache if true any output of this variable will be not cached\n     * @return Smarty_Internal_Data current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining\n     */\n    public function append($tpl_var, $value = null, $merge = false, $nocache = false)\n    {\n        if (is_array($tpl_var)) {\n            // $tpl_var is an array, ignore $value\n            foreach ($tpl_var as $_key => $_val) {\n                if ($_key != '') {\n                    if (!isset($this->tpl_vars[$_key])) {\n                        $tpl_var_inst = $this->getVariable($_key, null, true, false);\n                        if ($tpl_var_inst instanceof Undefined_Smarty_Variable) {\n                            $this->tpl_vars[$_key] = new Smarty_variable(null, $nocache);\n                        } else {\n                            $this->tpl_vars[$_key] = clone $tpl_var_inst;\n                        }\n                    }\n                    if (!(is_array($this->tpl_vars[$_key]->value) || $this->tpl_vars[$_key]->value instanceof ArrayAccess)) {\n                        settype($this->tpl_vars[$_key]->value, 'array');\n                    }\n                    if ($merge && is_array($_val)) {\n                        foreach($_val as $_mkey => $_mval) {\n                            $this->tpl_vars[$_key]->value[$_mkey] = $_mval;\n                        }\n                    } else {\n                        $this->tpl_vars[$_key]->value[] = $_val;\n                    }\n                }\n            }\n        } else {\n            if ($tpl_var != '' && isset($value)) {\n                if (!isset($this->tpl_vars[$tpl_var])) {\n                    $tpl_var_inst = $this->getVariable($tpl_var, null, true, false);\n                    if ($tpl_var_inst instanceof Undefined_Smarty_Variable) {\n                        $this->tpl_vars[$tpl_var] = new Smarty_variable(null, $nocache);\n                    } else {\n                        $this->tpl_vars[$tpl_var] = clone $tpl_var_inst;\n                    }\n                }\n                if (!(is_array($this->tpl_vars[$tpl_var]->value) || $this->tpl_vars[$tpl_var]->value instanceof ArrayAccess)) {\n                    settype($this->tpl_vars[$tpl_var]->value, 'array');\n                }\n                if ($merge && is_array($value)) {\n                    foreach($value as $_mkey => $_mval) {\n                        $this->tpl_vars[$tpl_var]->value[$_mkey] = $_mval;\n                    }\n                } else {\n                    $this->tpl_vars[$tpl_var]->value[] = $value;\n                }\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * appends values to template variables by reference\n     *\n     * @param string $tpl_var the template variable name\n     * @param mixed  &$value  the referenced value to append\n     * @param boolean $merge  flag if array elements shall be merged\n     * @return Smarty_Internal_Data current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining\n     */\n    public function appendByRef($tpl_var, &$value, $merge = false)\n    {\n        if ($tpl_var != '' && isset($value)) {\n            if (!isset($this->tpl_vars[$tpl_var])) {\n                $this->tpl_vars[$tpl_var] = new Smarty_variable();\n            }\n            if (!is_array($this->tpl_vars[$tpl_var]->value)) {\n                settype($this->tpl_vars[$tpl_var]->value, 'array');\n            }\n            if ($merge && is_array($value)) {\n                foreach($value as $_key => $_val) {\n                    $this->tpl_vars[$tpl_var]->value[$_key] = &$value[$_key];\n                }\n            } else {\n                $this->tpl_vars[$tpl_var]->value[] = &$value;\n            }\n        }\n\n        return $this;\n    }\n\n    /**\n     * Returns a single or all template variables\n     *\n     * @param string  $varname        variable name or null\n     * @param string  $_ptr           optional pointer to data object\n     * @param boolean $search_parents include parent templates?\n     * @return string variable value or or array of variables\n     */\n    public function getTemplateVars($varname = null, $_ptr = null, $search_parents = true)\n    {\n        if (isset($varname)) {\n            $_var = $this->getVariable($varname, $_ptr, $search_parents, false);\n            if (is_object($_var)) {\n                return $_var->value;\n            } else {\n                return null;\n            }\n        } else {\n            $_result = array();\n            if ($_ptr === null) {\n                $_ptr = $this;\n            } while ($_ptr !== null) {\n                foreach ($_ptr->tpl_vars AS $key => $var) {\n                    if (!array_key_exists($key, $_result)) {\n                        $_result[$key] = $var->value;\n                    }\n                }\n                // not found, try at parent\n                if ($search_parents) {\n                    $_ptr = $_ptr->parent;\n                } else {\n                    $_ptr = null;\n                }\n            }\n            if ($search_parents && isset(Smarty::$global_tpl_vars)) {\n                foreach (Smarty::$global_tpl_vars AS $key => $var) {\n                    if (!array_key_exists($key, $_result)) {\n                        $_result[$key] = $var->value;\n                    }\n                }\n            }\n            return $_result;\n        }\n    }\n\n    /**\n     * clear the given assigned template variable.\n     *\n     * @param string|array $tpl_var the template variable(s) to clear\n     * @return Smarty_Internal_Data current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining\n     */\n    public function clearAssign($tpl_var)\n    {\n        if (is_array($tpl_var)) {\n            foreach ($tpl_var as $curr_var) {\n                unset($this->tpl_vars[$curr_var]);\n            }\n        } else {\n            unset($this->tpl_vars[$tpl_var]);\n        }\n\n        return $this;\n    }\n\n    /**\n     * clear all the assigned template variables.\n     * @return Smarty_Internal_Data current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining\n     */\n    public function clearAllAssign()\n    {\n        $this->tpl_vars = array();\n        return $this;\n    }\n\n    /**\n     * load a config file, optionally load just selected sections\n     *\n     * @param string $config_file filename\n     * @param mixed  $sections    array of section names, single section or null\n     * @return Smarty_Internal_Data current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining\n     */\n    public function configLoad($config_file, $sections = null)\n    {\n        // load Config class\n        $config = new Smarty_Internal_Config($config_file, $this->smarty, $this);\n        $config->loadConfigVars($sections);\n        return $this;\n    }\n\n    /**\n     * gets the object of a Smarty variable\n     *\n     * @param string  $variable the name of the Smarty variable\n     * @param object  $_ptr     optional pointer to data object\n     * @param boolean $search_parents search also in parent data\n     * @return object the object of the variable\n     */\n    public function getVariable($variable, $_ptr = null, $search_parents = true, $error_enable = true)\n    {\n        if ($_ptr === null) {\n            $_ptr = $this;\n        } while ($_ptr !== null) {\n            if (isset($_ptr->tpl_vars[$variable])) {\n                // found it, return it\n                return $_ptr->tpl_vars[$variable];\n            }\n            // not found, try at parent\n            if ($search_parents) {\n                $_ptr = $_ptr->parent;\n            } else {\n                $_ptr = null;\n            }\n        }\n        if (isset(Smarty::$global_tpl_vars[$variable])) {\n            // found it, return it\n            return Smarty::$global_tpl_vars[$variable];\n        }\n        if ($this->smarty->error_unassigned && $error_enable) {\n            // force a notice\n            $x = $$variable;\n        }\n        return new Undefined_Smarty_Variable;\n    }\n\n    /**\n     * gets  a config variable\n     *\n     * @param string $variable the name of the config variable\n     * @return mixed the value of the config variable\n     */\n    public function getConfigVariable($variable, $error_enable = true)\n    {\n        $_ptr = $this;\n        while ($_ptr !== null) {\n            if (isset($_ptr->config_vars[$variable])) {\n                // found it, return it\n                return $_ptr->config_vars[$variable];\n            }\n            // not found, try at parent\n            $_ptr = $_ptr->parent;\n        }\n        if ($this->smarty->error_unassigned && $error_enable) {\n            // force a notice\n            $x = $$variable;\n        }\n        return null;\n    }\n\n    /**\n     * gets  a stream variable\n     *\n     * @param string $variable the stream of the variable\n     * @return mixed the value of the stream variable\n     */\n    public function getStreamVariable($variable)\n    {\n        $_result = '';\n        $fp = fopen($variable, 'r+');\n        if ($fp) {\n            while (!feof($fp) && ($current_line = fgets($fp)) !== false ) {\n                $_result .= $current_line;\n            }\n            fclose($fp);\n            return $_result;\n        }\n\n        if ($this->smarty->error_unassigned) {\n            throw new SmartyException('Undefined stream variable \"' . $variable . '\"');\n        } else {\n            return null;\n        }\n    }\n\n    /**\n     * Returns a single or all config variables\n     *\n     * @param string $varname variable name or null\n     * @return string variable value or or array of variables\n     */\n    public function getConfigVars($varname = null, $search_parents = true)\n    {\n        $_ptr = $this;\n        $var_array = array();\n        while ($_ptr !== null) {\n            if (isset($varname)) {\n                if (isset($_ptr->config_vars[$varname])) {\n                    return $_ptr->config_vars[$varname];\n                }\n            } else {\n                $var_array = array_merge($_ptr->config_vars, $var_array);\n            }\n             // not found, try at parent\n            if ($search_parents) {\n                $_ptr = $_ptr->parent;\n            } else {\n                $_ptr = null;\n            }\n        }\n        if (isset($varname)) {\n            return '';\n        } else {\n            return $var_array;\n        }\n    }\n\n    /**\n     * Deassigns a single or all config variables\n     *\n     * @param string $varname variable name or null\n     * @return Smarty_Internal_Data current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining\n     */\n    public function clearConfig($varname = null)\n    {\n        if (isset($varname)) {\n            unset($this->config_vars[$varname]);\n        } else {\n            $this->config_vars = array();\n        }\n        return $this;\n    }\n\n}\n\n/**\n * class for the Smarty data object\n *\n * The Smarty data object will hold Smarty variables in the current scope\n *\n * @package Smarty\n * @subpackage Template\n */\nclass Smarty_Data extends Smarty_Internal_Data {\n\n    /**\n     * Smarty object\n     *\n     * @var Smarty\n     */\n    public $smarty = null;\n\n    /**\n     * create Smarty data object\n     *\n     * @param Smarty|array $_parent  parent template\n     * @param Smarty       $smarty   global smarty instance\n     */\n    public function __construct ($_parent = null, $smarty = null)\n    {\n        $this->smarty = $smarty;\n        if (is_object($_parent)) {\n            // when object set up back pointer\n            $this->parent = $_parent;\n        } elseif (is_array($_parent)) {\n            // set up variable values\n            foreach ($_parent as $_key => $_val) {\n                $this->tpl_vars[$_key] = new Smarty_variable($_val);\n            }\n        } elseif ($_parent != null) {\n            throw new SmartyException(\"Wrong type for template variables\");\n        }\n    }\n\n}\n\n/**\n * class for the Smarty variable object\n *\n * This class defines the Smarty variable object\n *\n * @package Smarty\n * @subpackage Template\n */\nclass Smarty_Variable {\n\n    /**\n     * template variable\n     *\n     * @var mixed\n     */\n    public $value = null;\n    /**\n     * if true any output of this variable will be not cached\n     *\n     * @var boolean\n     */\n    public $nocache = false;\n    /**\n     * the scope the variable will have  (local,parent or root)\n     *\n     * @var int\n     */\n    public $scope = Smarty::SCOPE_LOCAL;\n\n    /**\n     * create Smarty variable object\n     *\n     * @param mixed   $value   the value to assign\n     * @param boolean $nocache if true any output of this variable will be not cached\n     * @param int     $scope   the scope the variable will have  (local,parent or root)\n     */\n    public function __construct($value = null, $nocache = false, $scope = Smarty::SCOPE_LOCAL)\n    {\n        $this->value = $value;\n        $this->nocache = $nocache;\n        $this->scope = $scope;\n    }\n\n    /**\n     * <<magic>> String conversion\n     *\n     * @return string\n     */\n    public function __toString()\n    {\n        return (string) $this->value;\n    }\n\n}\n\n/**\n * class for undefined variable object\n *\n * This class defines an object for undefined variable handling\n *\n * @package Smarty\n * @subpackage Template\n */\nclass Undefined_Smarty_Variable {\n\n    /**\n     * Returns FALSE for 'nocache' and NULL otherwise.\n     *\n     * @param string $name\n     * @return bool\n     */\n    public function __get($name)\n    {\n        if ($name == 'nocache') {\n            return false;\n        } else {\n            return null;\n        }\n    }\n\n    /**\n     * Always returns an empty string.\n     *\n     * @return string\n     */\n    public function __toString()\n    {\n        return \"\";\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_debug.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Debug\n *\n * Class to collect data for the Smarty Debugging Consol\n *\n * @package Smarty\n * @subpackage Debug\n * @author Uwe Tews\n */\n\n/**\n * Smarty Internal Plugin Debug Class\n *\n * @package Smarty\n * @subpackage Debug\n */\nclass Smarty_Internal_Debug extends Smarty_Internal_Data {\n\n    /**\n     * template data\n     *\n     * @var array\n     */\n    public static $template_data = array();\n\n    /**\n     * Start logging of compile time\n     *\n     * @param object $template\n     */\n    public static function start_compile($template)\n    {\n        $key = self::get_key($template);\n        self::$template_data[$key]['start_time'] = microtime(true);\n    }\n\n    /**\n     * End logging of compile time\n     *\n     * @param object $template\n     */\n    public static function end_compile($template)\n    {\n        $key = self::get_key($template);\n        self::$template_data[$key]['compile_time'] += microtime(true) - self::$template_data[$key]['start_time'];\n    }\n\n    /**\n     * Start logging of render time\n     *\n     * @param object $template\n     */\n    public static function start_render($template)\n    {\n        $key = self::get_key($template);\n        self::$template_data[$key]['start_time'] = microtime(true);\n    }\n\n    /**\n     * End logging of compile time\n     *\n     * @param object $template\n     */\n    public static function end_render($template)\n    {\n        $key = self::get_key($template);\n        self::$template_data[$key]['render_time'] += microtime(true) - self::$template_data[$key]['start_time'];\n    }\n\n    /**\n     * Start logging of cache time\n     *\n     * @param object $template cached template\n     */\n    public static function start_cache($template)\n    {\n        $key = self::get_key($template);\n        self::$template_data[$key]['start_time'] = microtime(true);\n    }\n\n    /**\n     * End logging of cache time\n     *\n     * @param object $template cached template\n     */\n    public static function end_cache($template)\n    {\n        $key = self::get_key($template);\n        self::$template_data[$key]['cache_time'] += microtime(true) - self::$template_data[$key]['start_time'];\n    }\n\n    /**\n     * Opens a window for the Smarty Debugging Consol and display the data\n     *\n     * @param Smarty_Internal_Template|Smarty $obj object to debug\n     */\n    public static function display_debug($obj)\n    {\n        // prepare information of assigned variables\n        $ptr = self::get_debug_vars($obj);\n        if ($obj instanceof Smarty) {\n            $smarty = clone $obj;\n        } else {\n            $smarty = clone $obj->smarty;\n        }\n        $_assigned_vars = $ptr->tpl_vars;\n        ksort($_assigned_vars);\n        $_config_vars = $ptr->config_vars;\n        ksort($_config_vars);\n        $smarty->registered_filters = array();\n        $smarty->autoload_filters = array();\n        $smarty->default_modifiers = array();\n        $smarty->force_compile = false;\n        $smarty->left_delimiter = '{';\n        $smarty->right_delimiter = '}';\n        $smarty->debugging = false;\n        $smarty->force_compile = false;\n        $_template = new Smarty_Internal_Template($smarty->debug_tpl, $smarty);\n        $_template->caching = false;\n        $_template->disableSecurity();\n        $_template->cache_id = null;\n        $_template->compile_id = null;\n        if ($obj instanceof Smarty_Internal_Template) {\n            $_template->assign('template_name', $obj->source->type . ':' . $obj->source->name);\n        }\n        if ($obj instanceof Smarty) {\n            $_template->assign('template_data', self::$template_data);\n        } else {\n            $_template->assign('template_data', null);\n        }\n        $_template->assign('assigned_vars', $_assigned_vars);\n        $_template->assign('config_vars', $_config_vars);\n        $_template->assign('execution_time', microtime(true) - $smarty->start_time);\n        echo $_template->fetch();\n    }\n\n    /**\n     * Recursively gets variables from all template/data scopes\n     *\n     * @param Smarty_Internal_Template|Smarty_Data $obj object to debug\n     * @return StdClass\n     */\n    public static function get_debug_vars($obj)\n    {\n        $config_vars = $obj->config_vars;\n        $tpl_vars = array();\n        foreach ($obj->tpl_vars as $key => $var) {\n            $tpl_vars[$key] = clone $var;\n            if ($obj instanceof Smarty_Internal_Template) {\n                $tpl_vars[$key]->scope = $obj->source->type . ':' . $obj->source->name;\n            } elseif ($obj instanceof Smarty_Data) {\n                $tpl_vars[$key]->scope = 'Data object';\n            } else {\n                $tpl_vars[$key]->scope = 'Smarty root';\n            }\n        }\n\n        if (isset($obj->parent)) {\n            $parent = self::get_debug_vars($obj->parent);\n            $tpl_vars = array_merge($parent->tpl_vars, $tpl_vars);\n            $config_vars = array_merge($parent->config_vars, $config_vars);\n        } else {\n            foreach (Smarty::$global_tpl_vars as $name => $var) {\n                if (!array_key_exists($name, $tpl_vars)) {\n                    $clone = clone $var;\n                    $clone->scope = 'Global';\n                    $tpl_vars[$name] = $clone;\n                }\n            }\n        }\n        return (object) array('tpl_vars' => $tpl_vars, 'config_vars' => $config_vars);\n    }\n\n    /**\n     * Return key into $template_data for template\n     *\n     * @param object $template  template object\n     * @return string   key into $template_data\n     */\n    private static function get_key($template)\n    {\n        static $_is_stringy = array('string' => true, 'eval' => true);\n        // calculate Uid if not already done\n        if ($template->source->uid == '') {\n            $template->source->filepath;\n        }\n        $key = $template->source->uid;\n        if (isset(self::$template_data[$key])) {\n            return $key;\n        } else {\n            if (isset($_is_stringy[$template->source->type])) {\n                self::$template_data[$key]['name'] = '\\''.substr($template->source->name,0,25).'...\\'';\n            } else {\n                self::$template_data[$key]['name'] = $template->source->filepath;\n            }\n            self::$template_data[$key]['compile_time'] = 0;\n            self::$template_data[$key]['render_time'] = 0;\n            self::$template_data[$key]['cache_time'] = 0;\n            return $key;\n        }\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_filter_handler.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Filter Handler\n *\n * Smarty filter handler class\n *\n * @package Smarty\n * @subpackage PluginsInternal\n * @author Uwe Tews\n */\n\n/**\n * Class for filter processing\n *\n * @package Smarty\n * @subpackage PluginsInternal\n */\nclass Smarty_Internal_Filter_Handler {\n\n    /**\n     * Run filters over content\n     *\n     * The filters will be lazy loaded if required\n     * class name format: Smarty_FilterType_FilterName\n     * plugin filename format: filtertype.filtername.php\n     * Smarty2 filter plugins could be used\n     *\n     * @param string                   $type     the type of filter ('pre','post','output') which shall run\n     * @param string                   $content  the content which shall be processed by the filters\n     * @param Smarty_Internal_Template $template template object\n     * @return string the filtered content\n     */\n    public static function runFilter($type, $content, Smarty_Internal_Template $template)\n    {\n        $output = $content;\n        // loop over autoload filters of specified type\n        if (!empty($template->smarty->autoload_filters[$type])) {\n            foreach ((array)$template->smarty->autoload_filters[$type] as $name) {\n                $plugin_name = \"Smarty_{$type}filter_{$name}\";\n                if ($template->smarty->loadPlugin($plugin_name)) {\n                    if (function_exists($plugin_name)) {\n                        // use loaded Smarty2 style plugin\n                        $output = $plugin_name($output, $template);\n                    } elseif (class_exists($plugin_name, false)) {\n                        // loaded class of filter plugin\n                        $output = call_user_func(array($plugin_name, 'execute'), $output, $template);\n                    }\n                } else {\n                    // nothing found, throw exception\n                    throw new SmartyException(\"Unable to load filter {$plugin_name}\");\n                }\n            }\n        }\n        // loop over registerd filters of specified type\n        if (!empty($template->smarty->registered_filters[$type])) {\n            foreach ($template->smarty->registered_filters[$type] as $key => $name) {\n                if (is_array($template->smarty->registered_filters[$type][$key])) {\n                    $output = call_user_func($template->smarty->registered_filters[$type][$key], $output, $template);\n                } else {\n                    $output = $template->smarty->registered_filters[$type][$key]($output, $template);\n                }\n            }\n        }\n        // return filtered output\n        return $output;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_function_call_handler.php",
    "content": "<?php\r\n/**\r\n * Smarty Internal Plugin Function Call Handler\r\n *\r\n * @package Smarty\r\n * @subpackage PluginsInternal\r\n * @author Uwe Tews\r\n */\r\n\r\n/**\r\n * This class does call function defined with the {function} tag\r\n *\r\n * @package Smarty\r\n * @subpackage PluginsInternal\r\n */\r\nclass Smarty_Internal_Function_Call_Handler {\r\n\r\n    /**\r\n     * This function handles calls to template functions defined by {function}\r\n     * It does create a PHP function at the first call\r\n     *\r\n     * @param string                   $_name       template function name\r\n     * @param Smarty_Internal_Template $_template   template object\r\n     * @param array                    $_params     Smarty variables passed as call parameter\r\n     * @param string                   $_hash       nocache hash value\r\n     * @param bool                     $_nocache    nocache flag\r\n     */\r\n    public static function call($_name, Smarty_Internal_Template $_template, $_params, $_hash, $_nocache)\r\n    {\r\n        if ($_nocache) {\r\n            $_function = \"smarty_template_function_{$_name}_nocache\";\r\n        } else {\r\n            $_function = \"smarty_template_function_{$_hash}_{$_name}\";\r\n        }\r\n        if (!is_callable($_function)) {\r\n            $_code = \"function {$_function}(\\$_smarty_tpl,\\$params) {\r\n    \\$saved_tpl_vars = \\$_smarty_tpl->tpl_vars;\r\n    foreach (\\$_smarty_tpl->smarty->template_functions['{$_name}']['parameter'] as \\$key => \\$value) {\\$_smarty_tpl->tpl_vars[\\$key] = new Smarty_variable(\\$value);};\r\n    foreach (\\$params as \\$key => \\$value) {\\$_smarty_tpl->tpl_vars[\\$key] = new Smarty_variable(\\$value);}?>\";\r\n            if ($_nocache) {\r\n                $_code .= preg_replace(array(\"!<\\?php echo \\\\'/\\*%%SmartyNocache:{$_template->smarty->template_functions[$_name]['nocache_hash']}%%\\*/|/\\*/%%SmartyNocache:{$_template->smarty->template_functions[$_name]['nocache_hash']}%%\\*/\\\\';\\?>!\",\r\n                        \"!\\\\\\'!\"), array('', \"'\"), $_template->smarty->template_functions[$_name]['compiled']);\r\n                $_template->smarty->template_functions[$_name]['called_nocache'] = true;\r\n            } else {\r\n                $_code .= preg_replace(\"/{$_template->smarty->template_functions[$_name]['nocache_hash']}/\", $_template->properties['nocache_hash'], $_template->smarty->template_functions[$_name]['compiled']);\r\n            }\r\n            $_code .= \"<?php \\$_smarty_tpl->tpl_vars = \\$saved_tpl_vars;}\";\r\n            eval($_code);\r\n        }\r\n        $_function($_template, $_params);\r\n    }\r\n\r\n}\r\n\r\n?>\r\n"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_get_include_path.php",
    "content": "<?php\r\n/**\r\n * Smarty read include path plugin\r\n *\r\n * @package Smarty\r\n * @subpackage PluginsInternal\r\n * @author Monte Ohrt\r\n */\r\n\r\n/**\r\n * Smarty Internal Read Include Path Class\r\n *\r\n * @package Smarty\r\n * @subpackage PluginsInternal\r\n */\r\nclass Smarty_Internal_Get_Include_Path {\r\n\r\n    /**\r\n     * Return full file path from PHP include_path\r\n     *\r\n     * @param string $filepath filepath\r\n     * @return string|boolean full filepath or false\r\n     */\r\n    public static function getIncludePath($filepath)\r\n    {\r\n        static $_include_path = null;\r\n        \r\n        if (function_exists('stream_resolve_include_path')) {\r\n            // available since PHP 5.3.2\r\n            return stream_resolve_include_path($filepath);\r\n        }\r\n\r\n        if ($_include_path === null) {\r\n            $_include_path = explode(PATH_SEPARATOR, get_include_path());\r\n        }\r\n\r\n        foreach ($_include_path as $_path) {\r\n            if (file_exists($_path . DS . $filepath)) {\r\n                return $_path . DS . $filepath;\r\n            }\r\n        }\r\n\r\n        return false;\r\n    }\r\n\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_nocache_insert.php",
    "content": "<?php\r\n/**\r\n * Smarty Internal Plugin Nocache Insert\r\n *\r\n * Compiles the {insert} tag into the cache file\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n * @author Uwe Tews\r\n */\r\n\r\n/**\r\n * Smarty Internal Plugin Compile Insert Class\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n */\r\nclass Smarty_Internal_Nocache_Insert {\r\n\r\n    /**\r\n     * Compiles code for the {insert} tag into cache file\r\n     *\r\n     * @param string                   $_function insert function name\r\n     * @param array                    $_attr     array with parameter\r\n     * @param Smarty_Internal_Template $_template template object\r\n     * @param string                   $_script   script name to load or 'null'\r\n     * @param string                   $_assign   optional variable name\r\n     * @return string compiled code\r\n     */\r\n    public static function compile($_function, $_attr, $_template, $_script, $_assign = null)\r\n    {\r\n        $_output = '<?php ';\r\n        if ($_script != 'null') {\r\n            // script which must be included\r\n            // code for script file loading\r\n            $_output .= \"require_once '{$_script}';\";\r\n        }\r\n        // call insert\r\n        if (isset($_assign)) {\r\n            $_output .= \"\\$_smarty_tpl->assign('{$_assign}' , {$_function} (\" . var_export($_attr, true) . \",\\$_smarty_tpl), true);?>\";\r\n        } else {\r\n            $_output .= \"echo {$_function}(\" . var_export($_attr, true) . \",\\$_smarty_tpl);?>\";\r\n        }\r\n        $_tpl = $_template;\r\n        while ($_tpl->parent instanceof Smarty_Internal_Template) {\r\n            $_tpl = $_tpl->parent;\r\n        }\r\n        return \"/*%%SmartyNocache:{$_tpl->properties['nocache_hash']}%%*/\" . $_output . \"/*/%%SmartyNocache:{$_tpl->properties['nocache_hash']}%%*/\";\r\n    }\r\n\r\n}\r\n\r\n?>\r\n"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_parsetree.php",
    "content": "<?php\r\n/**\r\n * Smarty Internal Plugin Templateparser Parsetrees\r\n *\r\n * These are classes to build parsetrees in the template parser\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n * @author Thue Kristensen\r\n * @author Uwe Tews\r\n */\r\n\r\n/**\r\n * @package Smarty\r\n * @subpackage Compiler\r\n * @ignore\r\n */\r\nabstract class _smarty_parsetree {\r\n\r\n    /**\r\n     * Parser object\r\n     * @var object\r\n     */\r\n    public $parser;\r\n    /**\r\n     * Buffer content\r\n     * @var mixed\r\n     */\r\n    public $data;\r\n\r\n    /**\r\n     * Return buffer\r\n     *\r\n     * @return string  buffer content\r\n     */\r\n    abstract public function to_smarty_php();\r\n\r\n}\r\n\r\n/**\r\n * A complete smarty tag.\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n * @ignore\r\n */\r\nclass _smarty_tag extends _smarty_parsetree {\r\n\r\n    /**\r\n     * Saved block nesting level\r\n     * @var int\r\n     */\r\n    public $saved_block_nesting;\r\n\r\n    /**\r\n     * Create parse tree buffer for Smarty tag\r\n     *\r\n     * @param object $parser    parser object\r\n     * @param string $data      content\r\n     */\r\n    public function __construct($parser, $data)\r\n    {\r\n        $this->parser = $parser;\r\n        $this->data = $data;\r\n        $this->saved_block_nesting = $parser->block_nesting_level;\r\n    }\r\n\r\n    /**\r\n     * Return buffer content\r\n     *\r\n     * @return string  content\r\n     */\r\n    public function to_smarty_php()\r\n    {\r\n        return $this->data;\r\n    }\r\n\r\n    /**\r\n     * Return complied code that loads the evaluated outout of buffer content into a temporary variable\r\n     *\r\n     * @return string template code\r\n     */\r\n    public function assign_to_var()\r\n    {\r\n        $var = sprintf('$_tmp%d', ++$this->parser->prefix_number);\r\n        $this->parser->compiler->prefix_code[] = sprintf('<?php ob_start();?>%s<?php %s=ob_get_clean();?>', $this->data, $var);\r\n        return $var;\r\n    }\r\n\r\n}\r\n\r\n/**\r\n * Code fragment inside a tag.\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n * @ignore\r\n */\r\nclass _smarty_code extends _smarty_parsetree {\r\n\r\n\r\n    /**\r\n     * Create parse tree buffer for code fragment\r\n     *\r\n     * @param object $parser    parser object\r\n     * @param string $data      content\r\n     */\r\n    public function __construct($parser, $data)\r\n    {\r\n        $this->parser = $parser;\r\n        $this->data = $data;\r\n    }\r\n\r\n    /**\r\n     * Return buffer content in parentheses\r\n     *\r\n     * @return string  content\r\n     */\r\n    public function to_smarty_php()\r\n    {\r\n        return sprintf(\"(%s)\", $this->data);\r\n    }\r\n\r\n}\r\n\r\n/**\r\n * Double quoted string inside a tag.\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n * @ignore\r\n */\r\nclass _smarty_doublequoted extends _smarty_parsetree {\r\n\r\n    /**\r\n     * Create parse tree buffer for double quoted string subtrees\r\n     *\r\n     * @param object $parser    parser object\r\n     * @param _smarty_parsetree $subtree    parsetree buffer\r\n     */\r\n    public function __construct($parser, _smarty_parsetree $subtree)\r\n    {\r\n        $this->parser = $parser;\r\n        $this->subtrees[] = $subtree;\r\n        if ($subtree instanceof _smarty_tag) {\r\n            $this->parser->block_nesting_level = count($this->parser->compiler->_tag_stack);\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Append buffer to subtree\r\n     *\r\n     * @param _smarty_parsetree $subtree  parsetree buffer\r\n     */\r\n    public function append_subtree(_smarty_parsetree $subtree)\r\n    {\r\n        $last_subtree = count($this->subtrees) - 1;\r\n        if ($last_subtree >= 0 && $this->subtrees[$last_subtree] instanceof _smarty_tag && $this->subtrees[$last_subtree]->saved_block_nesting < $this->parser->block_nesting_level) {\r\n            if ($subtree instanceof _smarty_code) {\r\n                $this->subtrees[$last_subtree]->data .= '<?php echo ' . $subtree->data . ';?>';\r\n            } elseif ($subtree instanceof _smarty_dq_content) {\r\n                $this->subtrees[$last_subtree]->data .= '<?php echo \"' . $subtree->data . '\";?>';\r\n            } else {\r\n                $this->subtrees[$last_subtree]->data .= $subtree->data;\r\n            }\r\n        } else {\r\n            $this->subtrees[] = $subtree;\r\n        }\r\n        if ($subtree instanceof _smarty_tag) {\r\n            $this->parser->block_nesting_level = count($this->parser->compiler->_tag_stack);\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Merge subtree buffer content together\r\n     *\r\n     * @return string  compiled template code\r\n     */\r\n    public function to_smarty_php()\r\n    {\r\n        $code = '';\r\n        foreach ($this->subtrees as $subtree) {\r\n            if ($code !== \"\") {\r\n                $code .= \".\";\r\n            }\r\n            if ($subtree instanceof _smarty_tag) {\r\n                $more_php = $subtree->assign_to_var();\r\n            } else {\r\n                $more_php = $subtree->to_smarty_php();\r\n            }\r\n\r\n            $code .= $more_php;\r\n\r\n            if (!$subtree instanceof _smarty_dq_content) {\r\n                $this->parser->compiler->has_variable_string = true;\r\n            }\r\n        }\r\n        return $code;\r\n    }\r\n\r\n}\r\n\r\n/**\r\n * Raw chars as part of a double quoted string.\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n * @ignore\r\n */\r\nclass _smarty_dq_content extends _smarty_parsetree {\r\n\r\n\r\n    /**\r\n     * Create parse tree buffer with string content\r\n     *\r\n     * @param object $parser  parser object\r\n     * @param string $data    string section\r\n     */\r\n    public function __construct($parser, $data)\r\n    {\r\n        $this->parser = $parser;\r\n        $this->data = $data;\r\n    }\r\n\r\n    /**\r\n     * Return content as double quoted string\r\n     *\r\n     * @return string doubled quoted string\r\n     */\r\n    public function to_smarty_php()\r\n    {\r\n        return '\"' . $this->data . '\"';\r\n    }\r\n\r\n}\r\n\r\n/**\r\n * Template element\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n * @ignore\r\n */\r\nclass _smarty_template_buffer extends _smarty_parsetree {\r\n\r\n    /**\r\n     * Array of template elements\r\n     *\r\n     * @var array\r\n     */\r\n    public $subtrees = Array();\r\n\r\n    /**\r\n     * Create root of parse tree for template elements\r\n     *\r\n     * @param object $parser    parse object\r\n     */\r\n    public function __construct($parser)\r\n    {\r\n        $this->parser = $parser;\r\n    }\r\n\r\n    /**\r\n     * Append buffer to subtree\r\n     *\r\n     * @param _smarty_parsetree $subtree\r\n     */\r\n    public function append_subtree(_smarty_parsetree $subtree)\r\n    {\r\n        $this->subtrees[] = $subtree;\r\n    }\r\n\r\n    /**\r\n     * Sanitize and merge subtree buffers together\r\n     *\r\n     * @return string template code content\r\n     */\r\n    public function to_smarty_php()\r\n    {\r\n        $code = '';\r\n        for ($key = 0, $cnt = count($this->subtrees); $key < $cnt; $key++) {\r\n            if ($key + 2 < $cnt) {\r\n                if ($this->subtrees[$key] instanceof _smarty_linebreak && $this->subtrees[$key + 1] instanceof _smarty_tag && $this->subtrees[$key + 1]->data == '' && $this->subtrees[$key + 2] instanceof _smarty_linebreak) {\r\n                    $key = $key + 1;\r\n                    continue;\r\n                }\r\n                if (substr($this->subtrees[$key]->data, -1) == '<' && $this->subtrees[$key + 1]->data == '' && substr($this->subtrees[$key + 2]->data, -1) == '?') {\r\n                    $key = $key + 2;\r\n                    continue;\r\n                }\r\n            }\r\n            if (substr($code, -1) == '<') {\r\n                $subtree = $this->subtrees[$key]->to_smarty_php();\r\n                if (substr($subtree, 0, 1) == '?') {\r\n                    $code = substr($code, 0, strlen($code) - 1) . '<<?php ?>?' . substr($subtree, 1);\r\n                } elseif ($this->parser->asp_tags && substr($subtree, 0, 1) == '%') {\r\n                    $code = substr($code, 0, strlen($code) - 1) . '<<?php ?>%' . substr($subtree, 1);\r\n                } else {\r\n                    $code .= $subtree;\r\n                }\r\n                continue;\r\n            }\r\n            if ($this->parser->asp_tags && substr($code, -1) == '%') {\r\n                $subtree = $this->subtrees[$key]->to_smarty_php();\r\n                if (substr($subtree, 0, 1) == '>') {\r\n                    $code = substr($code, 0, strlen($code) - 1) . '%<?php ?>>' . substr($subtree, 1);\r\n                } else {\r\n                    $code .= $subtree;\r\n                }\r\n                continue;\r\n            }\r\n            if (substr($code, -1) == '?') {\r\n                $subtree = $this->subtrees[$key]->to_smarty_php();\r\n                if (substr($subtree, 0, 1) == '>') {\r\n                    $code = substr($code, 0, strlen($code) - 1) . '?<?php ?>>' . substr($subtree, 1);\r\n                } else {\r\n                    $code .= $subtree;\r\n                }\r\n                continue;\r\n            }\r\n            $code .= $this->subtrees[$key]->to_smarty_php();\r\n        }\r\n        return $code;\r\n    }\r\n\r\n}\r\n\r\n/**\r\n * template text\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n * @ignore\r\n */\r\nclass _smarty_text extends _smarty_parsetree {\r\n\r\n\r\n    /**\r\n     * Create template text buffer\r\n     *\r\n     * @param object $parser    parser object\r\n     * @param string $data      text\r\n     */\r\n    public function __construct($parser, $data)\r\n    {\r\n        $this->parser = $parser;\r\n        $this->data = $data;\r\n    }\r\n\r\n    /**\r\n     * Return buffer content\r\n     *\r\n     * @return strint text\r\n     */\r\n    public function to_smarty_php()\r\n    {\r\n        return $this->data;\r\n    }\r\n\r\n}\r\n\r\n/**\r\n * template linebreaks\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n * @ignore\r\n */\r\nclass _smarty_linebreak extends _smarty_parsetree {\r\n\r\n    /**\r\n     * Create buffer with linebreak content\r\n     *\r\n     * @param object $parser    parser object\r\n     * @param string  $data     linebreak string\r\n     */\r\n    public function __construct($parser, $data)\r\n    {\r\n        $this->parser = $parser;\r\n        $this->data = $data;\r\n    }\r\n\r\n    /**\r\n     * Return linebrak\r\n     *\r\n     * @return string linebreak\r\n     */\r\n    public function to_smarty_php()\r\n    {\r\n        return $this->data;\r\n    }\r\n\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_resource_eval.php",
    "content": "<?php\r\n/**\r\n * Smarty Internal Plugin Resource Eval\r\n *\r\n * @package Smarty\r\n * @subpackage TemplateResources\r\n * @author Uwe Tews\r\n * @author Rodney Rehm\r\n */\r\n\r\n/**\r\n * Smarty Internal Plugin Resource Eval\r\n *\r\n * Implements the strings as resource for Smarty template\r\n *\r\n * {@internal unlike string-resources the compiled state of eval-resources is NOT saved for subsequent access}}\r\n *\r\n * @package Smarty\r\n * @subpackage TemplateResources\r\n */\r\nclass Smarty_Internal_Resource_Eval extends Smarty_Resource_Recompiled {\r\n\r\n    /**\r\n     * populate Source Object with meta data from Resource\r\n     *\r\n     * @param Smarty_Template_Source   $source    source object\r\n     * @param Smarty_Internal_Template $_template template object\r\n     * @return void\r\n     */\r\n    public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)\r\n    {\r\n        $source->uid = $source->filepath = sha1($source->name);\r\n        $source->timestamp = false;\r\n        $source->exists = true;\r\n    }\r\n\r\n    /**\r\n     * Load template's source from $resource_name into current template object\r\n     *\r\n     * @uses decode() to decode base64 and urlencoded template_resources\r\n     * @param Smarty_Template_Source $source source object\r\n     * @return string template source\r\n     */\r\n    public function getContent(Smarty_Template_Source $source)\r\n    {\r\n        return $this->decode($source->name);\r\n    }\r\n    \r\n    /**\r\n     * decode base64 and urlencode\r\n     *\r\n     * @param string $string template_resource to decode\r\n     * @return string decoded template_resource\r\n     */\r\n    protected function decode($string)\r\n    {\r\n        // decode if specified\r\n        if (($pos = strpos($string, ':')) !== false) {\r\n            if (!strncmp($string, 'base64', 6)) {\r\n                return base64_decode(substr($string, 7));\r\n            } elseif (!strncmp($string, 'urlencode', 9)) {\r\n                return urldecode(substr($string, 10));\r\n            }\r\n        }\r\n        \r\n        return $string;\r\n    }\r\n    \r\n    /**\r\n     * modify resource_name according to resource handlers specifications\r\n     *\r\n     * @param Smarty $smarty        Smarty instance\r\n     * @param string $resource_name resource_name to make unique\r\n     * @return string unique resource name\r\n     */\r\n    protected function buildUniqueResourceName(Smarty $smarty, $resource_name)\r\n    {\r\n        return get_class($this) . '#' .$this->decode($resource_name);\r\n    }\r\n\r\n    /**\r\n     * Determine basename for compiled filename\r\n     *\r\n     * @param Smarty_Template_Source $source source object\r\n     * @return string resource's basename\r\n     */\r\n    protected function getBasename(Smarty_Template_Source $source)\r\n    {\r\n        return '';\r\n    }\r\n\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_resource_extends.php",
    "content": "<?php\n/**\n* Smarty Internal Plugin Resource Extends\n*\n* @package Smarty\n* @subpackage TemplateResources\n* @author Uwe Tews\n* @author Rodney Rehm\n*/\n\n/**\n* Smarty Internal Plugin Resource Extends\n*\n* Implements the file system as resource for Smarty which {extend}s a chain of template files templates\n*\n* @package Smarty\n* @subpackage TemplateResources\n*/\nclass Smarty_Internal_Resource_Extends extends Smarty_Resource {\n\n    /**\n    * mbstring.overload flag\n    *\n    * @var int\n    */\n    public $mbstring_overload = 0;\n\n    /**\n    * populate Source Object with meta data from Resource\n    *\n    * @param Smarty_Template_Source   $source    source object\n    * @param Smarty_Internal_Template $_template template object\n    */\n    public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)\n    {\n        $uid = '';\n        $sources = array();\n        $components = explode('|', $source->name);\n        $exists = true;\n        foreach ($components as $component) {\n            $s = Smarty_Resource::source(null, $source->smarty, $component);\n            if ($s->type == 'php') {\n                throw new SmartyException(\"Resource type {$s->type} cannot be used with the extends resource type\");\n            }\n            $sources[$s->uid] = $s;\n            $uid .= $s->filepath;\n            if ($_template && $_template->smarty->compile_check) {\n                $exists = $exists && $s->exists;\n            }\n        }\n        $source->components = $sources;\n        $source->filepath = $s->filepath;\n        $source->uid = sha1($uid);\n        if ($_template && $_template->smarty->compile_check) {\n            $source->timestamp = $s->timestamp;\n            $source->exists = $exists;\n        }\n        // need the template at getContent()\n        $source->template = $_template;\n    }\n\n    /**\n    * populate Source Object with timestamp and exists from Resource\n    *\n    * @param Smarty_Template_Source $source source object\n    */\n    public function populateTimestamp(Smarty_Template_Source $source)\n    {\n        $source->exists = true;\n        foreach ($source->components as $s) {\n            $source->exists = $source->exists && $s->exists;\n        }\n        $source->timestamp = $s->timestamp;\n    }\n\n    /**\n    * Load template's source from files into current template object\n    *\n    * @param Smarty_Template_Source $source source object\n    * @return string template source\n    * @throws SmartyException if source cannot be loaded\n    */\n    public function getContent(Smarty_Template_Source $source)\n    {\n        if (!$source->exists) {\n            throw new SmartyException(\"Unable to read template {$source->type} '{$source->name}'\");\n        }\n\n        $this->mbstring_overload = ini_get('mbstring.func_overload') & 2;\n        $_rdl = preg_quote($source->smarty->right_delimiter);\n        $_ldl = preg_quote($source->smarty->left_delimiter);\n        if (!$source->smarty->auto_literal) {\n            $al = '\\s*';\n        } else {\n            $al = '';\n        }\n        $_components = array_reverse($source->components);\n        $_first = reset($_components);\n        $_last = end($_components);\n\n        foreach ($_components as $_component) {\n            // register dependency\n            if ($_component != $_first) {\n                $source->template->properties['file_dependency'][$_component->uid] = array($_component->filepath, $_component->timestamp, $_component->type);\n            }\n\n            // read content\n            $source->filepath = $_component->filepath;\n            $_content = $_component->content;\n\n            // extend sources\n            if ($_component != $_last) {\n                if (preg_match_all(\"!({$_ldl}{$al}block\\s(.+?)\\s*{$_rdl})!\", $_content, $_open) !=\n                preg_match_all(\"!({$_ldl}{$al}/block\\s*{$_rdl})!\", $_content, $_close)) {\n                    throw new SmartyException(\"unmatched {block} {/block} pairs in template {$_component->type} '{$_component->name}'\");\n                }\n                preg_match_all(\"!{$_ldl}{$al}block\\s(.+?)\\s*{$_rdl}|{$_ldl}{$al}/block\\s*{$_rdl}|{$_ldl}\\*([\\S\\s]*?)\\*{$_rdl}!\", $_content, $_result, PREG_OFFSET_CAPTURE);\n                $_result_count = count($_result[0]);\n                $_start = 0;\n                while ($_start+1 < $_result_count) {\n                    $_end = 0;\n                    $_level = 1;\n                    if (($this->mbstring_overload ? mb_substr($_result[0][$_start][0],0,mb_strlen($source->smarty->left_delimiter,'latin1')+1, 'latin1') : substr($_result[0][$_start][0],0,strlen($source->smarty->left_delimiter)+1)) == $source->smarty->left_delimiter.'*') {\n                        $_start++;\n                        continue;\n                    }\n                    while ($_level != 0) {\n                        $_end++;\n                        if (($this->mbstring_overload ? mb_substr($_result[0][$_start + $_end][0],0,mb_strlen($source->smarty->left_delimiter,'latin1')+1, 'latin1') : substr($_result[0][$_start + $_end][0],0,strlen($source->smarty->left_delimiter)+1)) == $source->smarty->left_delimiter.'*') {\n                            continue;\n                        }\n                        if (!strpos($_result[0][$_start + $_end][0], '/')) {\n                            $_level++;\n                        } else {\n                            $_level--;\n                        }\n                    }\n                    $_block_content = str_replace($source->smarty->left_delimiter . '$smarty.block.parent' . $source->smarty->right_delimiter, '%%%%SMARTY_PARENT%%%%',\n                    ($this->mbstring_overload ? mb_substr($_content, $_result[0][$_start][1] + mb_strlen($_result[0][$_start][0], 'latin1'), $_result[0][$_start + $_end][1] - $_result[0][$_start][1] - + mb_strlen($_result[0][$_start][0], 'latin1'), 'latin1') : substr($_content, $_result[0][$_start][1] + strlen($_result[0][$_start][0]), $_result[0][$_start + $_end][1] - $_result[0][$_start][1] - + strlen($_result[0][$_start][0]))));\n                    Smarty_Internal_Compile_Block::saveBlockData($_block_content, $_result[0][$_start][0], $source->template, $_component->filepath);\n                    $_start = $_start + $_end + 1;\n                }\n            } else {\n                return $_content;\n            }\n        }\n    }\n\n    /**\n    * Determine basename for compiled filename\n    *\n    * @param Smarty_Template_Source $source source object\n    * @return string resource's basename\n    */\n    public function getBasename(Smarty_Template_Source $source)\n    {\n        return str_replace(':', '.', basename($source->filepath));\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_resource_file.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Resource File\n *\n * @package Smarty\n * @subpackage TemplateResources\n * @author Uwe Tews\n * @author Rodney Rehm\n */\n\n/**\n * Smarty Internal Plugin Resource File\n *\n * Implements the file system as resource for Smarty templates\n *\n * @package Smarty\n * @subpackage TemplateResources\n */\nclass Smarty_Internal_Resource_File extends Smarty_Resource {\n\n    /**\n     * populate Source Object with meta data from Resource\n     *\n     * @param Smarty_Template_Source   $source    source object\n     * @param Smarty_Internal_Template $_template template object\n     */\n    public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)\n    {\n        $source->filepath = $this->buildFilepath($source, $_template);\n\n        if ($source->filepath !== false) {\n            if (is_object($source->smarty->security_policy)) {\n                $source->smarty->security_policy->isTrustedResourceDir($source->filepath);\n            }\n\n            $source->uid = sha1($source->filepath);\n            if ($source->smarty->compile_check && !isset($source->timestamp)) {\n                $source->timestamp = @filemtime($source->filepath);\n                $source->exists = !!$source->timestamp;\n            }\n        }\n    }\n\n    /**\n     * populate Source Object with timestamp and exists from Resource\n     *\n     * @param Smarty_Template_Source $source source object\n     */\n    public function populateTimestamp(Smarty_Template_Source $source)\n    {\n        $source->timestamp = @filemtime($source->filepath);\n        $source->exists = !!$source->timestamp;\n    }\n\n    /**\n     * Load template's source from file into current template object\n     *\n     * @param Smarty_Template_Source $source source object\n     * @return string template source\n     * @throws SmartyException if source cannot be loaded\n     */\n    public function getContent(Smarty_Template_Source $source)\n    {\n        if ($source->timestamp) {\n            return file_get_contents($source->filepath);\n        }\n        if ($source instanceof Smarty_Config_Source) {\n            throw new SmartyException(\"Unable to read config {$source->type} '{$source->name}'\");\n        }\n        throw new SmartyException(\"Unable to read template {$source->type} '{$source->name}'\");\n    }\n\n    /**\n     * Determine basename for compiled filename\n     *\n     * @param Smarty_Template_Source $source source object\n     * @return string resource's basename\n     */\n    public function getBasename(Smarty_Template_Source $source)\n    {\n        $_file = $source->name;\n        if (($_pos = strpos($_file, ']')) !== false) {\n            $_file = substr($_file, $_pos + 1);\n        }\n        return basename($_file);\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_resource_php.php",
    "content": "<?php\n\n/**\n * Smarty Internal Plugin Resource PHP\n *\n * Implements the file system as resource for PHP templates\n *\n * @package Smarty\n * @subpackage TemplateResources\n * @author Uwe Tews\n * @author Rodney Rehm\n */\nclass Smarty_Internal_Resource_PHP extends Smarty_Resource_Uncompiled {\n    /**\n     * container for short_open_tag directive's value before executing PHP templates\n     * @var string\n     */\n    protected $short_open_tag;\n\n    /**\n     * Create a new PHP Resource\n     *\n     */\n    public function __construct()\n    {\n        $this->short_open_tag = ini_get( 'short_open_tag' );\n    }\n\n    /**\n     * populate Source Object with meta data from Resource\n     *\n     * @param Smarty_Template_Source $source source object\n     * @param Smarty_Internal_Template $_template template object\n     * @return void\n     */\n    public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)\n    {\n        $source->filepath = $this->buildFilepath($source, $_template);\n\n        if ($source->filepath !== false) {\n            if (is_object($source->smarty->security_policy)) {\n                $source->smarty->security_policy->isTrustedResourceDir($source->filepath);\n            }\n\n            $source->uid = sha1($source->filepath);\n            if ($source->smarty->compile_check) {\n                $source->timestamp = @filemtime($source->filepath);\n                $source->exists = !!$source->timestamp;\n            }\n        }\n    }\n\n    /**\n     * populate Source Object with timestamp and exists from Resource\n     *\n     * @param Smarty_Template_Source $source source object\n     * @return void\n     */\n    public function populateTimestamp(Smarty_Template_Source $source)\n    {\n        $source->timestamp = @filemtime($source->filepath);\n        $source->exists = !!$source->timestamp;\n    }\n\n    /**\n     * Load template's source from file into current template object\n     *\n     * @param Smarty_Template_Source $source source object\n     * @return string template source\n     * @throws SmartyException if source cannot be loaded\n     */\n    public function getContent(Smarty_Template_Source $source)\n    {\n        if ($source->timestamp) {\n            return '';\n        }\n        throw new SmartyException(\"Unable to read template {$source->type} '{$source->name}'\");\n    }\n\n    /**\n     * Render and output the template (without using the compiler)\n     *\n     * @param Smarty_Template_Source $source source object\n     * @param Smarty_Internal_Template $_template template object\n     * @return void\n     * @throws SmartyException if template cannot be loaded or allow_php_templates is disabled\n     */\n    public function renderUncompiled(Smarty_Template_Source $source, Smarty_Internal_Template $_template)\n    {\n        $_smarty_template = $_template;\n\n        if (!$source->smarty->allow_php_templates) {\n            throw new SmartyException(\"PHP templates are disabled\");\n        }\n        if (!$source->exists) {\n            if ($_template->parent instanceof Smarty_Internal_Template) {\n                $parent_resource = \" in '{$_template->parent->template_resource}'\";\n            } else {\n                $parent_resource = '';\n            }\n            throw new SmartyException(\"Unable to load template {$source->type} '{$source->name}'{$parent_resource}\");\n        }\n\n        // prepare variables\n        extract($_template->getTemplateVars());\n\n        // include PHP template with short open tags enabled\n        ini_set( 'short_open_tag', '1' );\n        include($source->filepath);\n        ini_set( 'short_open_tag', $this->short_open_tag );\n    }\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_resource_registered.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Resource Registered\n *\n * @package Smarty\n * @subpackage TemplateResources\n * @author Uwe Tews\n * @author Rodney Rehm\n */\n\n/**\n * Smarty Internal Plugin Resource Registered\n *\n * Implements the registered resource for Smarty template\n *\n * @package Smarty\n * @subpackage TemplateResources\n * @deprecated\n */\nclass Smarty_Internal_Resource_Registered extends Smarty_Resource {\n\n    /**\n     * populate Source Object with meta data from Resource\n     *\n     * @param Smarty_Template_Source   $source    source object\n     * @param Smarty_Internal_Template $_template template object\n     * @return void\n     */\n    public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)\n    {\n        $source->filepath = $source->type . ':' . $source->name;\n        $source->uid = sha1($source->filepath);\n        if ($source->smarty->compile_check) {\n            $source->timestamp = $this->getTemplateTimestamp($source);\n            $source->exists = !!$source->timestamp;\n        }\n    }\n\n    /**\n     * populate Source Object with timestamp and exists from Resource\n     *\n     * @param Smarty_Template_Source $source source object\n     * @return void\n     */\n    public function populateTimestamp(Smarty_Template_Source $source)\n    {\n        $source->timestamp = $this->getTemplateTimestamp($source);\n        $source->exists = !!$source->timestamp;\n    }\n\n    /**\n     * Get timestamp (epoch) the template source was modified\n     *\n     * @param Smarty_Template_Source $source source object\n     * @return integer|boolean timestamp (epoch) the template was modified, false if resources has no timestamp\n     */\n    public function getTemplateTimestamp(Smarty_Template_Source $source)\n    {\n        // return timestamp\n        $time_stamp = false;\n        call_user_func_array($source->smarty->registered_resources[$source->type][0][1], array($source->name, &$time_stamp, $source->smarty));\n        return is_numeric($time_stamp) ? (int) $time_stamp : $time_stamp;\n    }\n\n    /**\n     * Load template's source by invoking the registered callback into current template object\n     *\n     * @param Smarty_Template_Source $source source object\n     * @return string template source\n     * @throws SmartyException if source cannot be loaded\n     */\n    public function getContent(Smarty_Template_Source $source)\n    {\n        // return template string\n        $t = call_user_func_array($source->smarty->registered_resources[$source->type][0][0], array($source->name, &$source->content, $source->smarty));\n        if (is_bool($t) && !$t) {\n            throw new SmartyException(\"Unable to read template {$source->type} '{$source->name}'\");\n        }\n        return $source->content;\n    }\n\n    /**\n     * Determine basename for compiled filename\n     *\n     * @param Smarty_Template_Source $source source object\n     * @return string resource's basename\n     */\n    protected function getBasename(Smarty_Template_Source $source)\n    {\n        return basename($source->name);\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_resource_stream.php",
    "content": "<?php\n/**\n* Smarty Internal Plugin Resource Stream\n*\n* Implements the streams as resource for Smarty template\n*\n* @package Smarty\n* @subpackage TemplateResources\n* @author Uwe Tews\n* @author Rodney Rehm\n*/\n\n/**\n* Smarty Internal Plugin Resource Stream\n*\n* Implements the streams as resource for Smarty template\n*\n* @link http://php.net/streams\n* @package Smarty\n* @subpackage TemplateResources\n*/\nclass Smarty_Internal_Resource_Stream extends Smarty_Resource_Recompiled {\n\n    /**\n    * populate Source Object with meta data from Resource\n    *\n    * @param Smarty_Template_Source   $source    source object\n    * @param Smarty_Internal_Template $_template template object\n    * @return void\n    */\n    public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)\n    {\n        if(strpos($source->resource, '://') !== false) {\n            $source->filepath = $source->resource;\n        } else {\n            $source->filepath = str_replace(':', '://', $source->resource);\n        }\n        $source->uid = false;\n        $source->content = $this->getContent($source);\n        $source->timestamp = false;\n        $source->exists = !!$source->content;\n    }\n\n    /**\n    * Load template's source from stream into current template object\n    *\n    * @param Smarty_Template_Source $source source object\n    * @return string template source\n    * @throws SmartyException if source cannot be loaded\n    */\n    public function getContent(Smarty_Template_Source $source)\n    {\n        $t = '';\n        // the availability of the stream has already been checked in Smarty_Resource::fetch()\n        $fp = fopen($source->filepath, 'r+');\n        if ($fp) {\n            while (!feof($fp) && ($current_line = fgets($fp)) !== false) {\n                $t .= $current_line;\n            }\n            fclose($fp);\n            return $t;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n    * modify resource_name according to resource handlers specifications\n    *\n    * @param Smarty $smarty        Smarty instance\n    * @param string $resource_name resource_name to make unique\n    * @return string unique resource name\n    */\n    protected function buildUniqueResourceName(Smarty $smarty, $resource_name)\n    {\n        return get_class($this) . '#' . $resource_name;\n    }\n}\n"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_resource_string.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Resource String\n *\n * @package Smarty\n * @subpackage TemplateResources\n * @author Uwe Tews\n * @author Rodney Rehm\n */\n\n/**\n * Smarty Internal Plugin Resource String\n *\n * Implements the strings as resource for Smarty template\n *\n * {@internal unlike eval-resources the compiled state of string-resources is saved for subsequent access}}\n *\n * @package Smarty\n * @subpackage TemplateResources\n */\nclass Smarty_Internal_Resource_String extends Smarty_Resource {\n\n    /**\n     * populate Source Object with meta data from Resource\n     *\n     * @param Smarty_Template_Source   $source    source object\n     * @param Smarty_Internal_Template $_template template object\n     * @return void\n     */\n    public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)\n    {\n        $source->uid = $source->filepath = sha1($source->name);\n        $source->timestamp = 0;\n        $source->exists = true;\n    }\n\n    /**\n     * Load template's source from $resource_name into current template object\n     *\n     * @uses decode() to decode base64 and urlencoded template_resources\n     * @param Smarty_Template_Source $source source object\n     * @return string template source\n     */\n    public function getContent(Smarty_Template_Source $source)\n    {\n        return $this->decode($source->name);\n    }\n    \n    /**\n     * decode base64 and urlencode\n     *\n     * @param string $string template_resource to decode\n     * @return string decoded template_resource\n     */\n    protected function decode($string)\n    {\n        // decode if specified\n        if (($pos = strpos($string, ':')) !== false) {\n            if (!strncmp($string, 'base64', 6)) {\n                return base64_decode(substr($string, 7));\n            } elseif (!strncmp($string, 'urlencode', 9)) {\n                return urldecode(substr($string, 10));\n            }\n        }\n        \n        return $string;\n    }\n    \n    /**\n     * modify resource_name according to resource handlers specifications\n     *\n     * @param Smarty $smarty        Smarty instance\n     * @param string $resource_name resource_name to make unique\n     * @return string unique resource name\n     */\n    protected function buildUniqueResourceName(Smarty $smarty, $resource_name)\n    {\n        return get_class($this) . '#' .$this->decode($resource_name);\n    }\n\n    /**\n     * Determine basename for compiled filename\n     *\n     * Always returns an empty string.\n     *\n     * @param Smarty_Template_Source $source source object\n     * @return string resource's basename\n     */\n    protected function getBasename(Smarty_Template_Source $source)\n    {\n        return '';\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_smartytemplatecompiler.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Smarty Template Compiler Base\n *\n * This file contains the basic classes and methodes for compiling Smarty templates with lexer/parser\n *\n * @package Smarty\n * @subpackage Compiler\n * @author Uwe Tews\n */\n\n/**\n * @ignore\n */\ninclude (\"smarty_internal_parsetree.php\");\n\n/**\n * Class SmartyTemplateCompiler\n *\n * @package Smarty\n * @subpackage Compiler\n */\nclass Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCompilerBase {\n\n    /**\n     * Lexer class name\n     *\n     * @var string\n     */\n    public $lexer_class;\n\n    /**\n     * Parser class name\n     *\n     * @var string\n     */\n    public $parser_class;\n\n    /**\n     * Lexer object\n     *\n     * @var object\n     */\n    public $lex;\n\n    /**\n     * Parser object\n     *\n     * @var object\n     */\n    public $parser;\n\n    /**\n     * Smarty object\n     *\n     * @var object\n     */\n    public $smarty;\n\n    /**\n     * array of vars which can be compiled in local scope\n     *\n     * @var array\n     */\n    public $local_var = array();\n\n    /**\n     * Initialize compiler\n     *\n     * @param string $lexer_class  class name\n     * @param string $parser_class class name\n     * @param Smarty $smarty       global instance\n     */\n    public function __construct($lexer_class, $parser_class, $smarty)\n    {\n        $this->smarty = $smarty;\n        parent::__construct();\n        // get required plugins\n        $this->lexer_class = $lexer_class;\n        $this->parser_class = $parser_class;\n    }\n\n    /**\n     * Methode to compile a Smarty template\n     *\n     * @param  mixed $_content template source\n     * @return bool true if compiling succeeded, false if it failed\n     */\n    protected function doCompile($_content)\n    {\n        /* here is where the compiling takes place. Smarty\n          tags in the templates are replaces with PHP code,\n          then written to compiled files. */\n        // init the lexer/parser to compile the template\n        $this->lex = new $this->lexer_class($_content, $this);\n        $this->parser = new $this->parser_class($this->lex, $this);\n        if ($this->smarty->_parserdebug)\n            $this->parser->PrintTrace();\n        // get tokens from lexer and parse them\n        while ($this->lex->yylex() && !$this->abort_and_recompile) {\n            if ($this->smarty->_parserdebug) {\n                echo \"<pre>Line {$this->lex->line} Parsing  {$this->parser->yyTokenName[$this->lex->token]} Token \" .\n                    htmlentities($this->lex->value) . \"</pre>\";\n            }\n            $this->parser->doParse($this->lex->token, $this->lex->value);\n        }\n\n        if ($this->abort_and_recompile) {\n            // exit here on abort\n            return false;\n        }\n        // finish parsing process\n        $this->parser->doParse(0, 0);\n        // check for unclosed tags\n        if (count($this->_tag_stack) > 0) {\n            // get stacked info\n            list($openTag, $_data) = array_pop($this->_tag_stack);\n            $this->trigger_template_error(\"unclosed {\" . $openTag . \"} tag\");\n        }\n        // return compiled code\n        // return str_replace(array(\"? >\\n<?php\",\"? ><?php\"), array('',''), $this->parser->retvalue);\n        return $this->parser->retvalue;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_template.php",
    "content": "<?php\n/**\n * Smarty Internal Plugin Template\n *\n * This file contains the Smarty template engine\n *\n * @package Smarty\n * @subpackage Template\n * @author Uwe Tews\n */\n\n/**\n * Main class with template data structures and methods\n *\n * @package Smarty\n * @subpackage Template\n *\n * @property Smarty_Template_Source   $source\n * @property Smarty_Template_Compiled $compiled\n * @property Smarty_Template_Cached   $cached\n */\nclass Smarty_Internal_Template extends Smarty_Internal_TemplateBase {\n\n    /**\n     * cache_id\n     * @var string\n     */\n    public $cache_id = null;\n    /**\n     * $compile_id\n     * @var string\n     */\n    public $compile_id = null;\n    /**\n     * caching enabled\n     * @var boolean\n     */\n    public $caching = null;\n    /**\n     * cache lifetime in seconds\n     * @var integer\n     */\n    public $cache_lifetime = null;\n    /**\n     * Template resource\n     * @var string\n     */\n    public $template_resource = null;\n    /**\n     * flag if compiled template is invalid and must be (re)compiled\n     * @var bool\n     */\n    public $mustCompile = null;\n    /**\n     * flag if template does contain nocache code sections\n     * @var bool\n     */\n    public $has_nocache_code = false;\n    /**\n     * special compiled and cached template properties\n     * @var array\n     */\n    public $properties = array('file_dependency' => array(),\n        'nocache_hash' => '',\n        'function' => array());\n    /**\n     * required plugins\n     * @var array\n     */\n    public $required_plugins = array('compiled' => array(), 'nocache' => array());\n    /**\n     * Global smarty instance\n     * @var Smarty\n     */\n    public $smarty = null;\n    /**\n     * blocks for template inheritance\n     * @var array\n     */\n    public $block_data = array();\n    /**\n     * variable filters\n     * @var array\n     */\n    public $variable_filters = array();\n    /**\n     * optional log of tag/attributes\n     * @var array\n     */\n    public $used_tags = array();\n    /**\n     * internal flag to allow relative path in child template blocks\n     * @var bool\n     */\n    public $allow_relative_path = false;\n    /**\n     * internal capture runtime stack\n     * @var array\n     */\n    public $_capture_stack = array(0 => array());\n\n    /**\n     * Create template data object\n     *\n     * Some of the global Smarty settings copied to template scope\n     * It load the required template resources and cacher plugins\n     *\n     * @param string                   $template_resource template resource string\n     * @param Smarty                   $smarty            Smarty instance\n     * @param Smarty_Internal_Template $_parent           back pointer to parent object with variables or null\n     * @param mixed                    $_cache_id cache   id or null\n     * @param mixed                    $_compile_id       compile id or null\n     * @param bool                     $_caching          use caching?\n     * @param int                      $_cache_lifetime   cache life-time in seconds\n     */\n    public function __construct($template_resource, $smarty, $_parent = null, $_cache_id = null, $_compile_id = null, $_caching = null, $_cache_lifetime = null)\n    {\n        $this->smarty = &$smarty;\n        // Smarty parameter\n        $this->cache_id = $_cache_id === null ? $this->smarty->cache_id : $_cache_id;\n        $this->compile_id = $_compile_id === null ? $this->smarty->compile_id : $_compile_id;\n        $this->caching = $_caching === null ? $this->smarty->caching : $_caching;\n        if ($this->caching === true)\n            $this->caching = Smarty::CACHING_LIFETIME_CURRENT;\n        $this->cache_lifetime = $_cache_lifetime === null ? $this->smarty->cache_lifetime : $_cache_lifetime;\n        $this->parent = $_parent;\n        // Template resource\n        $this->template_resource = $template_resource;\n        // copy block data of template inheritance\n        if ($this->parent instanceof Smarty_Internal_Template) {\n            $this->block_data = $this->parent->block_data;\n        }\n    }\n\n    /**\n     * Returns if the current template must be compiled by the Smarty compiler\n     *\n     * It does compare the timestamps of template source and the compiled templates and checks the force compile configuration\n     *\n     * @return boolean true if the template must be compiled\n     */\n    public function mustCompile()\n    {\n        if (!$this->source->exists) {\n            if ($this->parent instanceof Smarty_Internal_Template) {\n                $parent_resource = \" in '$this->parent->template_resource}'\";\n            } else {\n                $parent_resource = '';\n            }\n            throw new SmartyException(\"Unable to load template {$this->source->type} '{$this->source->name}'{$parent_resource}\");\n        }\n        if ($this->mustCompile === null) {\n            $this->mustCompile = (!$this->source->uncompiled && ($this->smarty->force_compile || $this->source->recompiled || $this->compiled->timestamp === false ||\n                    ($this->smarty->compile_check && $this->compiled->timestamp < $this->source->timestamp)));\n        }\n        return $this->mustCompile;\n    }\n\n    /**\n     * Compiles the template\n     *\n     * If the template is not evaluated the compiled template is saved on disk\n     */\n    public function compileTemplateSource()\n    {\n        if (!$this->source->recompiled) {\n            $this->properties['file_dependency'] = array();\n            if ($this->source->components) {\n                // uses real resource for file dependency\n                $source = end($this->source->components);\n                $this->properties['file_dependency'][$this->source->uid] = array($this->source->filepath, $this->source->timestamp, $source->type);\n            } else {\n                $this->properties['file_dependency'][$this->source->uid] = array($this->source->filepath, $this->source->timestamp, $this->source->type);\n            }\n        }\n        if ($this->smarty->debugging) {\n            Smarty_Internal_Debug::start_compile($this);\n        }\n        // compile locking\n        if ($this->smarty->compile_locking && !$this->source->recompiled) {\n            if ($saved_timestamp = $this->compiled->timestamp) {\n                touch($this->compiled->filepath);\n            }\n        }\n        // call compiler\n        try {\n            $code = $this->compiler->compileTemplate($this);\n        } catch (Exception $e) {\n            // restore old timestamp in case of error\n            if ($this->smarty->compile_locking && !$this->source->recompiled && $saved_timestamp) {\n                touch($this->compiled->filepath, $saved_timestamp);\n            }\n            throw $e;\n        }\n        // compiling succeded\n        if (!$this->source->recompiled && $this->compiler->write_compiled_code) {\n            // write compiled template\n            $_filepath = $this->compiled->filepath;\n            if ($_filepath === false)\n                throw new SmartyException('getCompiledFilepath() did not return a destination to save the compiled template to');\n            Smarty_Internal_Write_File::writeFile($_filepath, $code, $this->smarty);\n            $this->compiled->exists = true;\n            $this->compiled->isCompiled = true;\n        }\n        if ($this->smarty->debugging) {\n            Smarty_Internal_Debug::end_compile($this);\n        }\n        // release compiler object to free memory\n        unset($this->compiler);\n    }\n\n    /**\n     * Writes the cached template output\n     *\n     * @return bool\n     */\n    public function writeCachedContent($content)\n    {\n        if ($this->source->recompiled || !($this->caching == Smarty::CACHING_LIFETIME_CURRENT || $this->caching == Smarty::CACHING_LIFETIME_SAVED)) {\n            // don't write cache file\n            return false;\n        }\n        $this->properties['cache_lifetime'] = $this->cache_lifetime;\n        $this->properties['unifunc'] = 'content_' . str_replace('.', '_', uniqid('', true));\n        $content = $this->createTemplateCodeFrame($content, true);\n        $_smarty_tpl = $this;\n        eval(\"?>\" . $content);\n        $this->cached->valid = true;\n        $this->cached->processed = true;\n        return $this->cached->write($this, $content);\n    }\n\n    /**\n     * Template code runtime function to get subtemplate content\n     *\n     * @param string  $template       the resource handle of the template file\n     * @param mixed   $cache_id       cache id to be used with this template\n     * @param mixed   $compile_id     compile id to be used with this template\n     * @param integer $caching        cache mode\n     * @param integer $cache_lifetime life time of cache data\n     * @param array   $vars optional  variables to assign\n     * @param int     $parent_scope   scope in which {include} should execute\n     * @returns string template content\n     */\n    public function getSubTemplate($template, $cache_id, $compile_id, $caching, $cache_lifetime, $data, $parent_scope)\n    {\n        // already in template cache?\n        if ($this->smarty->allow_ambiguous_resources) {\n            $_templateId = Smarty_Resource::getUniqueTemplateName($this->smarty, $template) . $cache_id . $compile_id;\n        } else {\n            $_templateId = $this->smarty->joined_template_dir . '#' . $template . $cache_id . $compile_id;\n        }\n\n        if (isset($_templateId[150])) {\n            $_templateId = sha1($_templateId);\n        }\n        if (isset($this->smarty->template_objects[$_templateId])) {\n            // clone cached template object because of possible recursive call\n            $tpl = clone $this->smarty->template_objects[$_templateId];\n            $tpl->parent = $this;\n            $tpl->caching = $caching;\n            $tpl->cache_lifetime = $cache_lifetime;\n        } else {\n            $tpl = new $this->smarty->template_class($template, $this->smarty, $this, $cache_id, $compile_id, $caching, $cache_lifetime);\n        }\n        // get variables from calling scope\n        if ($parent_scope == Smarty::SCOPE_LOCAL) {\n            $tpl->tpl_vars = $this->tpl_vars;\n            $tpl->tpl_vars['smarty'] = clone $this->tpl_vars['smarty'];\n        } elseif ($parent_scope == Smarty::SCOPE_PARENT) {\n            $tpl->tpl_vars = &$this->tpl_vars;\n        } elseif ($parent_scope == Smarty::SCOPE_GLOBAL) {\n            $tpl->tpl_vars = &Smarty::$global_tpl_vars;\n        } elseif (($scope_ptr = $this->getScopePointer($parent_scope)) == null) {\n            $tpl->tpl_vars = &$this->tpl_vars;\n        } else {\n            $tpl->tpl_vars = &$scope_ptr->tpl_vars;\n        }\n        $tpl->config_vars = $this->config_vars;\n        if (!empty($data)) {\n            // set up variable values\n            foreach ($data as $_key => $_val) {\n                $tpl->tpl_vars[$_key] = new Smarty_variable($_val);\n            }\n        }\n        return $tpl->fetch(null, null, null, null, false, false, true);\n    }\n\n    /**\n     * Template code runtime function to set up an inline subtemplate\n     *\n     * @param string  $template       the resource handle of the template file\n     * @param mixed   $cache_id       cache id to be used with this template\n     * @param mixed   $compile_id     compile id to be used with this template\n     * @param integer $caching        cache mode\n     * @param integer $cache_lifetime life time of cache data\n     * @param array   $vars optional  variables to assign\n     * @param int     $parent_scope   scope in which {include} should execute\n     * @param string  $hash           nocache hash code\n     * @returns string template content\n     */\n    public function setupInlineSubTemplate($template, $cache_id, $compile_id, $caching, $cache_lifetime, $data, $parent_scope, $hash)\n    {\n        $tpl = new $this->smarty->template_class($template, $this->smarty, $this, $cache_id, $compile_id, $caching, $cache_lifetime);\n        $tpl->properties['nocache_hash']  = $hash;\n        // get variables from calling scope\n        if ($parent_scope == Smarty::SCOPE_LOCAL ) {\n            $tpl->tpl_vars = $this->tpl_vars;\n            $tpl->tpl_vars['smarty'] = clone $this->tpl_vars['smarty'];\n        } elseif ($parent_scope == Smarty::SCOPE_PARENT) {\n            $tpl->tpl_vars = &$this->tpl_vars;\n        } elseif ($parent_scope == Smarty::SCOPE_GLOBAL) {\n            $tpl->tpl_vars = &Smarty::$global_tpl_vars;\n        } elseif (($scope_ptr = $this->getScopePointer($parent_scope)) == null) {\n            $tpl->tpl_vars = &$this->tpl_vars;\n        } else {\n            $tpl->tpl_vars = &$scope_ptr->tpl_vars;\n        }\n        $tpl->config_vars = $this->config_vars;\n        if (!empty($data)) {\n            // set up variable values\n            foreach ($data as $_key => $_val) {\n                $tpl->tpl_vars[$_key] = new Smarty_variable($_val);\n            }\n        }\n        return $tpl;\n    }\n\n\n    /**\n     * Create code frame for compiled and cached templates\n     *\n     * @param string $content   optional template content\n     * @param bool   $cache     flag for cache file\n     * @return string\n     */\n    public function createTemplateCodeFrame($content = '', $cache = false)\n    {\n        $plugins_string = '';\n        // include code for plugins\n        if (!$cache) {\n            if (!empty($this->required_plugins['compiled'])) {\n                $plugins_string = '<?php ';\n                foreach ($this->required_plugins['compiled'] as $tmp) {\n                    foreach ($tmp as $data) {\n                        $file = addslashes($data['file']);\n                        if (is_Array($data['function'])){\n                            $plugins_string .= \"if (!is_callable(array('{$data['function'][0]}','{$data['function'][1]}'))) include '{$file}';\\n\";\n                        } else {\n                            $plugins_string .= \"if (!is_callable('{$data['function']}')) include '{$file}';\\n\";\n                        }\n                    }\n                }\n                $plugins_string .= '?>';\n            }\n            if (!empty($this->required_plugins['nocache'])) {\n                $this->has_nocache_code = true;\n                $plugins_string .= \"<?php echo '/*%%SmartyNocache:{$this->properties['nocache_hash']}%%*/<?php \\$_smarty = \\$_smarty_tpl->smarty; \";\n                foreach ($this->required_plugins['nocache'] as $tmp) {\n                    foreach ($tmp as $data) {\n                        $file = addslashes($data['file']);\n                        if (is_Array($data['function'])){\n                            $plugins_string .= addslashes(\"if (!is_callable(array('{$data['function'][0]}','{$data['function'][1]}'))) include '{$file}';\\n\");\n                        } else {\n                            $plugins_string .= addslashes(\"if (!is_callable('{$data['function']}')) include '{$file}';\\n\");\n                        }\n                    }\n                }\n                $plugins_string .= \"?>/*/%%SmartyNocache:{$this->properties['nocache_hash']}%%*/';?>\\n\";\n            }\n        }\n        // build property code\n        $this->properties['has_nocache_code'] = $this->has_nocache_code;\n        $output = '';\n        if (!$this->source->recompiled) {\n            $output = \"<?php /*%%SmartyHeaderCode:{$this->properties['nocache_hash']}%%*/\";\n            if ($this->smarty->direct_access_security) {\n                $output .= \"if(!defined('SMARTY_DIR')) exit('no direct access allowed');\\n\";\n            }\n        }\n        if ($cache) {\n            // remove compiled code of{function} definition\n            unset($this->properties['function']);\n            if (!empty($this->smarty->template_functions)) {\n                // copy code of {function} tags called in nocache mode\n                foreach ($this->smarty->template_functions as $name => $function_data) {\n                    if (isset($function_data['called_nocache'])) {\n                        foreach ($function_data['called_functions'] as $func_name) {\n                            $this->smarty->template_functions[$func_name]['called_nocache'] = true;\n                        }\n                    }\n                }\n                 foreach ($this->smarty->template_functions as $name => $function_data) {\n                    if (isset($function_data['called_nocache'])) {\n                        unset($function_data['called_nocache'], $function_data['called_functions'], $this->smarty->template_functions[$name]['called_nocache']);\n                        $this->properties['function'][$name] = $function_data;\n                    }\n                }\n            }\n        }\n        $this->properties['version'] = Smarty::SMARTY_VERSION;\n        if (!isset($this->properties['unifunc'])) {\n            $this->properties['unifunc'] = 'content_' . str_replace('.', '_', uniqid('', true));\n        }\n        if (!$this->source->recompiled) {\n            $output .= \"\\$_valid = \\$_smarty_tpl->decodeProperties(\" . var_export($this->properties, true) . ',' . ($cache ? 'true' : 'false') . \"); /*/%%SmartyHeaderCode%%*/?>\\n\";\n            $output .= '<?php if ($_valid && !is_callable(\\'' . $this->properties['unifunc'] . '\\')) {function ' . $this->properties['unifunc'] . '($_smarty_tpl) {?>';\n        }\n        $output .= $plugins_string;\n        $output .= $content;\n        if (!$this->source->recompiled) {\n            $output .= '<?php }} ?>';\n        }\n        return $output;\n    }\n\n    /**\n     * This function is executed automatically when a compiled or cached template file is included\n     *\n     * - Decode saved properties from compiled template and cache files\n     * - Check if compiled or cache file is valid\n     *\n     * @param array $properties     special template properties\n     * @param bool  $cache          flag if called from cache file\n     * @return bool                 flag if compiled or cache file is valid\n     */\n    public function decodeProperties($properties, $cache = false)\n    {\n        $this->has_nocache_code = $properties['has_nocache_code'];\n        $this->properties['nocache_hash'] = $properties['nocache_hash'];\n        if (isset($properties['cache_lifetime'])) {\n            $this->properties['cache_lifetime'] = $properties['cache_lifetime'];\n        }\n        if (isset($properties['file_dependency'])) {\n            $this->properties['file_dependency'] = array_merge($this->properties['file_dependency'], $properties['file_dependency']);\n        }\n        if (!empty($properties['function'])) {\n            $this->properties['function'] = array_merge($this->properties['function'], $properties['function']);\n            $this->smarty->template_functions = array_merge($this->smarty->template_functions, $properties['function']);\n        }\n        $this->properties['version'] = (isset($properties['version'])) ? $properties['version'] : '';\n        $this->properties['unifunc'] = $properties['unifunc'];\n        // check file dependencies at compiled code\n        $is_valid = true;\n        if ($this->properties['version'] != Smarty::SMARTY_VERSION) {\n            $is_valid = false;\n        } else if (((!$cache && $this->smarty->compile_check && empty($this->compiled->_properties) && !$this->compiled->isCompiled) || $cache && ($this->smarty->compile_check === true || $this->smarty->compile_check === Smarty::COMPILECHECK_ON)) && !empty($this->properties['file_dependency'])) {\n            foreach ($this->properties['file_dependency'] as $_file_to_check) {\n                if ($_file_to_check[2] == 'file' || $_file_to_check[2] == 'php') {\n                    if ($this->source->filepath == $_file_to_check[0] && isset($this->source->timestamp)) {\n                        // do not recheck current template\n                        $mtime = $this->source->timestamp;\n                    } else {\n                        // file and php types can be checked without loading the respective resource handlers\n                        $mtime = @filemtime($_file_to_check[0]);\n                    }\n                } elseif ($_file_to_check[2] == 'string') {\n                    continue;\n                } else {\n                    $source = Smarty_Resource::source(null, $this->smarty, $_file_to_check[0]);\n                    $mtime = $source->timestamp;\n                }\n                if (!$mtime || $mtime > $_file_to_check[1]) {\n                    $is_valid = false;\n                    break;\n                }\n            }\n        }\n        if ($cache) {\n            $this->cached->valid = $is_valid;\n        } else {\n            $this->mustCompile = !$is_valid;\n        }\n        // store data in reusable Smarty_Template_Compiled\n        if (!$cache) {\n            $this->compiled->_properties = $properties;\n        }\n        return $is_valid;\n    }\n\n    /**\n     * Template code runtime function to create a local Smarty variable for array assignments\n     *\n     * @param string $tpl_var   tempate variable name\n     * @param bool   $nocache   cache mode of variable\n     * @param int    $scope     scope of variable\n     */\n    public function createLocalArrayVariable($tpl_var, $nocache = false, $scope = Smarty::SCOPE_LOCAL)\n    {\n        if (!isset($this->tpl_vars[$tpl_var])) {\n            $this->tpl_vars[$tpl_var] = new Smarty_variable(array(), $nocache, $scope);\n        } else {\n            $this->tpl_vars[$tpl_var] = clone $this->tpl_vars[$tpl_var];\n            if ($scope != Smarty::SCOPE_LOCAL) {\n                $this->tpl_vars[$tpl_var]->scope = $scope;\n            }\n            if (!(is_array($this->tpl_vars[$tpl_var]->value) || $this->tpl_vars[$tpl_var]->value instanceof ArrayAccess)) {\n                settype($this->tpl_vars[$tpl_var]->value, 'array');\n            }\n        }\n    }\n\n    /**\n     * Template code runtime function to get pointer to template variable array of requested scope\n     *\n     * @param int $scope    requested variable scope\n     * @return array        array of template variables\n     */\n    public function &getScope($scope)\n    {\n        if ($scope == Smarty::SCOPE_PARENT && !empty($this->parent)) {\n            return $this->parent->tpl_vars;\n        } elseif ($scope == Smarty::SCOPE_ROOT && !empty($this->parent)) {\n            $ptr = $this->parent;\n            while (!empty($ptr->parent)) {\n                $ptr = $ptr->parent;\n            }\n            return $ptr->tpl_vars;\n        } elseif ($scope == Smarty::SCOPE_GLOBAL) {\n            return Smarty::$global_tpl_vars;\n        }\n        $null = null;\n        return $null;\n    }\n\n    /**\n     * Get parent or root of template parent chain\n     *\n     * @param int $scope    pqrent or root scope\n     * @return mixed object\n     */\n    public function getScopePointer($scope)\n    {\n        if ($scope == Smarty::SCOPE_PARENT && !empty($this->parent)) {\n            return $this->parent;\n        } elseif ($scope == Smarty::SCOPE_ROOT && !empty($this->parent)) {\n            $ptr = $this->parent;\n            while (!empty($ptr->parent)) {\n                $ptr = $ptr->parent;\n            }\n            return $ptr;\n        }\n        return null;\n    }\n\n    /**\n     * [util function] counts an array, arrayaccess/traversable or PDOStatement object\n     *\n     * @param mixed $value\n     * @return int the count for arrays and objects that implement countable, 1 for other objects that don't, and 0 for empty elements\n     */\n    public function _count($value)\n    {\n        if (is_array($value) === true || $value instanceof Countable) {\n            return count($value);\n        } elseif ($value instanceof IteratorAggregate) {\n            // Note: getIterator() returns a Traversable, not an Iterator\n            // thus rewind() and valid() methods may not be present\n            return iterator_count($value->getIterator());\n        } elseif ($value instanceof Iterator) {\n            return iterator_count($value);\n        } elseif ($value instanceof PDOStatement) {\n            return $value->rowCount();\n        } elseif ($value instanceof Traversable) {\n            return iterator_count($value);\n        } elseif ($value instanceof ArrayAccess) {\n            if ($value->offsetExists(0)) {\n                return 1;\n            }\n        } elseif (is_object($value)) {\n            return count($value);\n        }\n        return 0;\n    }\n\n    /**\n     * runtime error not matching capture tags\n     *\n     */\n    public function capture_error()\n    {\n        throw new SmartyException(\"Not matching {capture} open/close in \\\"{$this->template_resource}\\\"\");\n    }\n\n    /**\n    * Empty cache for this template\n    *\n    * @param integer $exp_time      expiration time\n    * @return integer number of cache files deleted\n    */\n    public function clearCache($exp_time=null)\n    {\n        Smarty_CacheResource::invalidLoadedCache($this->smarty);\n        return $this->cached->handler->clear($this->smarty, $this->template_name, $this->cache_id, $this->compile_id, $exp_time);\n    }\n\n     /**\n     * set Smarty property in template context\n     *\n     * @param string $property_name property name\n     * @param mixed  $value         value\n     */\n    public function __set($property_name, $value)\n    {\n        switch ($property_name) {\n            case 'source':\n            case 'compiled':\n            case 'cached':\n            case 'compiler':\n                $this->$property_name = $value;\n                return;\n\n            // FIXME: routing of template -> smarty attributes\n            default:\n                if (property_exists($this->smarty, $property_name)) {\n                    $this->smarty->$property_name = $value;\n                    return;\n                }\n        }\n\n        throw new SmartyException(\"invalid template property '$property_name'.\");\n    }\n\n    /**\n     * get Smarty property in template context\n     *\n     * @param string $property_name property name\n     */\n    public function __get($property_name)\n    {\n        switch ($property_name) {\n            case 'source':\n                if (strlen($this->template_resource) == 0) {\n                    throw new SmartyException('Missing template name');\n                }\n                $this->source = Smarty_Resource::source($this);\n                // cache template object under a unique ID\n                // do not cache eval resources\n                if ($this->source->type != 'eval') {\n                    if ($this->smarty->allow_ambiguous_resources) {\n                        $_templateId = $this->source->unique_resource . $this->cache_id . $this->compile_id;\n                    } else {\n                        $_templateId = $this->smarty->joined_template_dir . '#' . $this->template_resource . $this->cache_id . $this->compile_id;\n                    }\n\n                    if (isset($_templateId[150])) {\n                        $_templateId = sha1($_templateId);\n                    }\n                    $this->smarty->template_objects[$_templateId] = $this;\n                }\n                return $this->source;\n\n            case 'compiled':\n                $this->compiled = $this->source->getCompiled($this);\n                return $this->compiled;\n\n            case 'cached':\n                if (!class_exists('Smarty_Template_Cached')) {\n                    include SMARTY_SYSPLUGINS_DIR . 'smarty_cacheresource.php';\n                }\n                $this->cached = new Smarty_Template_Cached($this);\n                return $this->cached;\n\n            case 'compiler':\n                $this->smarty->loadPlugin($this->source->compiler_class);\n                $this->compiler = new $this->source->compiler_class($this->source->template_lexer_class, $this->source->template_parser_class, $this->smarty);\n                return $this->compiler;\n\n            // FIXME: routing of template -> smarty attributes\n            default:\n                if (property_exists($this->smarty, $property_name)) {\n                    return $this->smarty->$property_name;\n                }\n        }\n\n        throw new SmartyException(\"template property '$property_name' does not exist.\");\n    }\n\n    /**\n     * Template data object destrutor\n     *\n     */\n    public function __destruct()\n    {\n        if ($this->smarty->cache_locking && isset($this->cached) && $this->cached->is_locked) {\n            $this->cached->handler->releaseLock($this->smarty, $this->cached);\n        }\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_templatebase.php",
    "content": "<?php\r\n/**\r\n * Smarty Internal Plugin Smarty Template  Base\r\n *\r\n * This file contains the basic shared methodes for template handling\r\n *\r\n * @package Smarty\r\n * @subpackage Template\r\n * @author Uwe Tews\r\n */\r\n\r\n/**\r\n * Class with shared template methodes\r\n *\r\n * @package Smarty\r\n * @subpackage Template\r\n */\r\nabstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data {\r\n\r\n    /**\r\n     * fetches a rendered Smarty template\r\n     *\r\n     * @param string $template          the resource handle of the template file or template object\r\n     * @param mixed  $cache_id          cache id to be used with this template\r\n     * @param mixed  $compile_id        compile id to be used with this template\r\n     * @param object $parent            next higher level of Smarty variables\r\n     * @param bool   $display           true: display, false: fetch\r\n     * @param bool   $merge_tpl_vars    if true parent template variables merged in to local scope\r\n     * @param bool   $no_output_filter  if true do not run output filter\r\n     * @return string rendered template output\r\n     */\r\n    public function fetch($template = null, $cache_id = null, $compile_id = null, $parent = null, $display = false, $merge_tpl_vars = true, $no_output_filter = false)\r\n    {\r\n        if ($template === null && $this instanceof $this->template_class) {\r\n            $template = $this;\r\n        }\r\n        if (!empty($cache_id) && is_object($cache_id)) {\r\n            $parent = $cache_id;\r\n            $cache_id = null;\r\n        }\r\n        if ($parent === null && ($this instanceof Smarty || is_string($template))) {\r\n            $parent = $this;\r\n        }\r\n        // create template object if necessary\r\n        $_template = ($template instanceof $this->template_class)\r\n        ? $template\r\n        : $this->smarty->createTemplate($template, $cache_id, $compile_id, $parent, false);\r\n        // if called by Smarty object make sure we use current caching status\r\n        if ($this instanceof Smarty) {\r\n            $_template->caching = $this->caching;\r\n        }\r\n        // merge all variable scopes into template\r\n        if ($merge_tpl_vars) {\r\n            // save local variables\r\n            $save_tpl_vars = $_template->tpl_vars;\r\n            $save_config_vars = $_template->config_vars;\r\n            $ptr_array = array($_template);\r\n            $ptr = $_template;\r\n            while (isset($ptr->parent)) {\r\n                $ptr_array[] = $ptr = $ptr->parent;\r\n            }\r\n            $ptr_array = array_reverse($ptr_array);\r\n            $parent_ptr = reset($ptr_array);\r\n            $tpl_vars = $parent_ptr->tpl_vars;\r\n            $config_vars = $parent_ptr->config_vars;\r\n            while ($parent_ptr = next($ptr_array)) {\r\n                if (!empty($parent_ptr->tpl_vars)) {\r\n                    $tpl_vars = array_merge($tpl_vars, $parent_ptr->tpl_vars);\r\n                }\r\n                if (!empty($parent_ptr->config_vars)) {\r\n                    $config_vars = array_merge($config_vars, $parent_ptr->config_vars);\r\n                }\r\n            }\r\n            if (!empty(Smarty::$global_tpl_vars)) {\r\n                $tpl_vars = array_merge(Smarty::$global_tpl_vars, $tpl_vars);\r\n            }\r\n            $_template->tpl_vars = $tpl_vars;\r\n            $_template->config_vars = $config_vars;\r\n        }\r\n        // dummy local smarty variable\r\n        if (!isset($_template->tpl_vars['smarty'])) {\r\n            $_template->tpl_vars['smarty'] = new Smarty_Variable;\r\n        }\r\n        if (isset($this->smarty->error_reporting)) {\r\n            $_smarty_old_error_level = error_reporting($this->smarty->error_reporting);\r\n        }\r\n        // check URL debugging control\r\n        if (!$this->smarty->debugging && $this->smarty->debugging_ctrl == 'URL') {\r\n            if (isset($_SERVER['QUERY_STRING'])) {\r\n                $_query_string = $_SERVER['QUERY_STRING'];\r\n            } else {\r\n                $_query_string = '';\r\n            }\r\n            if (false !== strpos($_query_string, $this->smarty->smarty_debug_id)) {\r\n                if (false !== strpos($_query_string, $this->smarty->smarty_debug_id . '=on')) {\r\n                    // enable debugging for this browser session\r\n                    setcookie('SMARTY_DEBUG', true);\r\n                    $this->smarty->debugging = true;\r\n                } elseif (false !== strpos($_query_string, $this->smarty->smarty_debug_id . '=off')) {\r\n                    // disable debugging for this browser session\r\n                    setcookie('SMARTY_DEBUG', false);\r\n                    $this->smarty->debugging = false;\r\n                } else {\r\n                    // enable debugging for this page\r\n                    $this->smarty->debugging = true;\r\n                }\r\n            } else {\r\n                if (isset($_COOKIE['SMARTY_DEBUG'])) {\r\n                    $this->smarty->debugging = true;\r\n                }\r\n            }\r\n        }\r\n        // must reset merge template date\r\n        $_template->smarty->merged_templates_func = array();\r\n        // get rendered template\r\n        // disable caching for evaluated code\r\n        if ($_template->source->recompiled) {\r\n            $_template->caching = false;\r\n        }\r\n        // checks if template exists\r\n        if (!$_template->source->exists) {\r\n            if ($_template->parent instanceof Smarty_Internal_Template) {\r\n                $parent_resource = \" in '{$_template->parent->template_resource}'\";\r\n            } else {\r\n                $parent_resource = '';\r\n            }\r\n            throw new SmartyException(\"Unable to load template {$_template->source->type} '{$_template->source->name}'{$parent_resource}\");\r\n        }\r\n        // read from cache or render\r\n        if (!($_template->caching == Smarty::CACHING_LIFETIME_CURRENT || $_template->caching == Smarty::CACHING_LIFETIME_SAVED) || !$_template->cached->valid) {\r\n            // render template (not loaded and not in cache)\r\n            if (!$_template->source->uncompiled) {\r\n                $_smarty_tpl = $_template;\r\n                if ($_template->source->recompiled) {\r\n                    if ($this->smarty->debugging) {\r\n                        Smarty_Internal_Debug::start_compile($_template);\r\n                    }\r\n                    $code = $_template->compiler->compileTemplate($_template);\r\n                    if ($this->smarty->debugging) {\r\n                        Smarty_Internal_Debug::end_compile($_template);\r\n                    }\r\n                    if ($this->smarty->debugging) {\r\n                        Smarty_Internal_Debug::start_render($_template);\r\n                    }\r\n                    try {\r\n                        ob_start();\r\n                        eval(\"?>\" . $code);\r\n                        unset($code);\r\n                    } catch (Exception $e) {\r\n                        ob_get_clean();\r\n                        throw $e;\r\n                    }\r\n                } else {\r\n                    if (!$_template->compiled->exists || ($_template->smarty->force_compile && !$_template->compiled->isCompiled)) {\r\n                        $_template->compileTemplateSource();\r\n                    }\r\n                    if ($this->smarty->debugging) {\r\n                        Smarty_Internal_Debug::start_render($_template);\r\n                    }\r\n                    if (!$_template->compiled->loaded) {\r\n                        include($_template->compiled->filepath);\r\n                        if ($_template->mustCompile) {\r\n                            // recompile and load again\r\n                            $_template->compileTemplateSource();\r\n                            include($_template->compiled->filepath);\r\n                        }\r\n                        $_template->compiled->loaded = true;\r\n                    } else {\r\n                        $_template->decodeProperties($_template->compiled->_properties, false);\r\n                    }\r\n                    try {\r\n                        ob_start();\r\n                        if (empty($_template->properties['unifunc']) || !is_callable($_template->properties['unifunc'])) {\r\n                            throw new SmartyException(\"Invalid compiled template for '{$_template->template_resource}'\");\r\n                        }\r\n                        array_unshift($_template->_capture_stack,array());\r\n                        //\r\n                        // render compiled template\r\n                        //\r\n                        $_template->properties['unifunc']($_template);\r\n                        // any unclosed {capture} tags ?\r\n                        if (isset($_template->_capture_stack[0][0])) {\r\n                            $_template->capture_error();\r\n                        }\r\n                        array_shift($_template->_capture_stack);\r\n                    } catch (Exception $e) {\r\n                        ob_get_clean();\r\n                        throw $e;\r\n                    }\r\n                }\r\n            } else {\r\n                if ($_template->source->uncompiled) {\r\n                    if ($this->smarty->debugging) {\r\n                        Smarty_Internal_Debug::start_render($_template);\r\n                    }\r\n                    try {\r\n                        ob_start();\r\n                        $_template->source->renderUncompiled($_template);\r\n                    } catch (Exception $e) {\r\n                        ob_get_clean();\r\n                        throw $e;\r\n                    }\r\n                } else {\r\n                    throw new SmartyException(\"Resource '$_template->source->type' must have 'renderUncompiled' method\");\r\n                }\r\n            }\r\n            $_output = ob_get_clean();\r\n            if (!$_template->source->recompiled && empty($_template->properties['file_dependency'][$_template->source->uid])) {\r\n                $_template->properties['file_dependency'][$_template->source->uid] = array($_template->source->filepath, $_template->source->timestamp, $_template->source->type);\r\n            }\r\n            if ($_template->parent instanceof Smarty_Internal_Template) {\r\n                $_template->parent->properties['file_dependency'] = array_merge($_template->parent->properties['file_dependency'], $_template->properties['file_dependency']);\r\n                foreach ($_template->required_plugins as $code => $tmp1) {\r\n                    foreach ($tmp1 as $name => $tmp) {\r\n                        foreach ($tmp as $type => $data) {\r\n                            $_template->parent->required_plugins[$code][$name][$type] = $data;\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n            if ($this->smarty->debugging) {\r\n                Smarty_Internal_Debug::end_render($_template);\r\n            }\r\n            // write to cache when nessecary\r\n            if (!$_template->source->recompiled && ($_template->caching == Smarty::CACHING_LIFETIME_SAVED || $_template->caching == Smarty::CACHING_LIFETIME_CURRENT)) {\r\n                if ($this->smarty->debugging) {\r\n                    Smarty_Internal_Debug::start_cache($_template);\r\n                }\r\n                $_template->properties['has_nocache_code'] = false;\r\n                // get text between non-cached items\r\n                $cache_split = preg_split(\"!/\\*%%SmartyNocache:{$_template->properties['nocache_hash']}%%\\*\\/(.+?)/\\*/%%SmartyNocache:{$_template->properties['nocache_hash']}%%\\*/!s\", $_output);\r\n                // get non-cached items\r\n                preg_match_all(\"!/\\*%%SmartyNocache:{$_template->properties['nocache_hash']}%%\\*\\/(.+?)/\\*/%%SmartyNocache:{$_template->properties['nocache_hash']}%%\\*/!s\", $_output, $cache_parts);\r\n                $output = '';\r\n                // loop over items, stitch back together\r\n                foreach ($cache_split as $curr_idx => $curr_split) {\r\n                    // escape PHP tags in template content\r\n                    $output .= preg_replace('/(<%|%>|<\\?php|<\\?|\\?>)/', '<?php echo \\'$1\\'; ?>', $curr_split);\r\n                    if (isset($cache_parts[0][$curr_idx])) {\r\n                        $_template->properties['has_nocache_code'] = true;\r\n                        // remove nocache tags from cache output\r\n                        $output .= preg_replace(\"!/\\*/?%%SmartyNocache:{$_template->properties['nocache_hash']}%%\\*/!\", '', $cache_parts[0][$curr_idx]);\r\n                    }\r\n                }\r\n                if (!$no_output_filter && !$_template->has_nocache_code && (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output']))) {\r\n                    $output = Smarty_Internal_Filter_Handler::runFilter('output', $output, $_template);\r\n                }\r\n                // rendering (must be done before writing cache file because of {function} nocache handling)\r\n                $_smarty_tpl = $_template;\r\n                try {\r\n                    ob_start();\r\n                    eval(\"?>\" . $output);\r\n                    $_output = ob_get_clean();\r\n                } catch (Exception $e) {\r\n                    ob_get_clean();\r\n                    throw $e;\r\n                }\r\n                // write cache file content\r\n                $_template->writeCachedContent($output);\r\n                if ($this->smarty->debugging) {\r\n                    Smarty_Internal_Debug::end_cache($_template);\r\n                }\r\n            } else {\r\n                // var_dump('renderTemplate', $_template->has_nocache_code, $_template->template_resource, $_template->properties['nocache_hash'], $_template->parent->properties['nocache_hash'], $_output);\r\n                if (!empty($_template->properties['nocache_hash']) && !empty($_template->parent->properties['nocache_hash'])) {\r\n                    // replace nocache_hash\r\n                    $_output = str_replace(\"{$_template->properties['nocache_hash']}\", $_template->parent->properties['nocache_hash'], $_output);\r\n                    $_template->parent->has_nocache_code = $_template->parent->has_nocache_code || $_template->has_nocache_code;\r\n                }\r\n            }\r\n        } else {\r\n            if ($this->smarty->debugging) {\r\n                Smarty_Internal_Debug::start_cache($_template);\r\n            }\r\n            try {\r\n                ob_start();\r\n                array_unshift($_template->_capture_stack,array());\r\n                //\r\n                // render cached template\r\n                //\r\n                $_template->properties['unifunc']($_template);\r\n                // any unclosed {capture} tags ?\r\n                if (isset($_template->_capture_stack[0][0])) {\r\n                    $_template->capture_error();\r\n                }\r\n                array_shift($_template->_capture_stack);\r\n                $_output = ob_get_clean();\r\n            } catch (Exception $e) {\r\n                ob_get_clean();\r\n                throw $e;\r\n            }\r\n            if ($this->smarty->debugging) {\r\n                Smarty_Internal_Debug::end_cache($_template);\r\n            }\r\n        }\r\n        if ((!$this->caching || $_template->has_nocache_code || $_template->source->recompiled) && !$no_output_filter && (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output']))) {\r\n            $_output = Smarty_Internal_Filter_Handler::runFilter('output', $_output, $_template);\r\n        }\r\n        if (isset($this->error_reporting)) {\r\n            error_reporting($_smarty_old_error_level);\r\n        }\r\n        // display or fetch\r\n        if ($display) {\r\n            if ($this->caching && $this->cache_modified_check) {\r\n                $_isCached = $_template->isCached() && !$_template->has_nocache_code;\r\n                $_last_modified_date = @substr($_SERVER['HTTP_IF_MODIFIED_SINCE'], 0, strpos($_SERVER['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3);\r\n                if ($_isCached && $_template->cached->timestamp <= strtotime($_last_modified_date)) {\r\n                    switch (PHP_SAPI) {\r\n                        case 'cgi':         // php-cgi < 5.3\r\n                        case 'cgi-fcgi':    // php-cgi >= 5.3\r\n                        case 'fpm-fcgi':    // php-fpm >= 5.3.3\r\n                        header('Status: 304 Not Modified');\r\n                        break;\r\n\r\n                        case 'cli':\r\n                        if (/* ^phpunit */!empty($_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS'])/* phpunit$ */) {\r\n                            $_SERVER['SMARTY_PHPUNIT_HEADERS'][] = '304 Not Modified';\r\n                        }\r\n                        break;\r\n\r\n                        default:\r\n                        header($_SERVER['SERVER_PROTOCOL'].' 304 Not Modified');\r\n                        break;\r\n                    }\r\n                } else {\r\n                    switch (PHP_SAPI) {\r\n                        case 'cli':\r\n                        if (/* ^phpunit */!empty($_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS'])/* phpunit$ */) {\r\n                            $_SERVER['SMARTY_PHPUNIT_HEADERS'][] = 'Last-Modified: ' . gmdate('D, d M Y H:i:s', $_template->cached->timestamp) . ' GMT';\r\n                        }\r\n                        break;\r\n\r\n                        default:\r\n                        header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $_template->cached->timestamp) . ' GMT');\r\n                        break;\r\n                    }\r\n                    echo $_output;\r\n                }\r\n            } else {\r\n                echo $_output;\r\n            }\r\n            // debug output\r\n            if ($this->smarty->debugging) {\r\n                Smarty_Internal_Debug::display_debug($this);\r\n            }\r\n            if ($merge_tpl_vars) {\r\n                // restore local variables\r\n                $_template->tpl_vars = $save_tpl_vars;\r\n                $_template->config_vars =  $save_config_vars;\r\n            }\r\n            return;\r\n        } else {\r\n            if ($merge_tpl_vars) {\r\n                // restore local variables\r\n                $_template->tpl_vars = $save_tpl_vars;\r\n                $_template->config_vars =  $save_config_vars;\r\n            }\r\n            // return fetched content\r\n            return $_output;\r\n        }\r\n    }\r\n\r\n    /**\r\n     * displays a Smarty template\r\n     *\r\n     * @param string $template   the resource handle of the template file or template object\r\n     * @param mixed  $cache_id   cache id to be used with this template\r\n     * @param mixed  $compile_id compile id to be used with this template\r\n     * @param object $parent     next higher level of Smarty variables\r\n     */\r\n    public function display($template = null, $cache_id = null, $compile_id = null, $parent = null)\r\n    {\r\n        // display template\r\n        $this->fetch($template, $cache_id, $compile_id, $parent, true);\r\n    }\r\n\r\n    /**\r\n     * test if cache is valid\r\n     *\r\n     * @param string|object $template   the resource handle of the template file or template object\r\n     * @param mixed         $cache_id   cache id to be used with this template\r\n     * @param mixed         $compile_id compile id to be used with this template\r\n     * @param object        $parent     next higher level of Smarty variables\r\n     * @return boolean cache status\r\n     */\r\n    public function isCached($template = null, $cache_id = null, $compile_id = null, $parent = null)\r\n    {\r\n        if ($template === null && $this instanceof $this->template_class) {\r\n            return $this->cached->valid;\r\n        }\r\n        if (!($template instanceof $this->template_class)) {\r\n            if ($parent === null) {\r\n                $parent = $this;\r\n            }\r\n            $template = $this->smarty->createTemplate($template, $cache_id, $compile_id, $parent, false);\r\n        }\r\n        // return cache status of template\r\n        return $template->cached->valid;\r\n    }\r\n\r\n    /**\r\n     * creates a data object\r\n     *\r\n     * @param object $parent next higher level of Smarty variables\r\n     * @returns Smarty_Data data object\r\n     */\r\n    public function createData($parent = null)\r\n    {\r\n        return new Smarty_Data($parent, $this);\r\n    }\r\n\r\n    /**\r\n     * Registers plugin to be used in templates\r\n     *\r\n     * @param string   $type       plugin type\r\n     * @param string   $tag        name of template tag\r\n     * @param callback $callback   PHP callback to register\r\n     * @param boolean  $cacheable  if true (default) this fuction is cachable\r\n     * @param array    $cache_attr caching attributes if any\r\n     * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining\r\n     * @throws SmartyException when the plugin tag is invalid\r\n     */\r\n    public function registerPlugin($type, $tag, $callback, $cacheable = true, $cache_attr = null)\r\n    {\r\n        if (isset($this->smarty->registered_plugins[$type][$tag])) {\r\n            throw new SmartyException(\"Plugin tag \\\"{$tag}\\\" already registered\");\r\n        } elseif (!is_callable($callback)) {\r\n            throw new SmartyException(\"Plugin \\\"{$tag}\\\" not callable\");\r\n        } else {\r\n            $this->smarty->registered_plugins[$type][$tag] = array($callback, (bool) $cacheable, (array) $cache_attr);\r\n        }\r\n\r\n        return $this;\r\n    }\r\n\r\n    /**\r\n     * Unregister Plugin\r\n     *\r\n     * @param string $type of plugin\r\n     * @param string $tag name of plugin\r\n     * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining\r\n     */\r\n    public function unregisterPlugin($type, $tag)\r\n    {\r\n        if (isset($this->smarty->registered_plugins[$type][$tag])) {\r\n            unset($this->smarty->registered_plugins[$type][$tag]);\r\n        }\r\n\r\n        return $this;\r\n    }\r\n\r\n    /**\r\n     * Registers a resource to fetch a template\r\n     *\r\n     * @param string $type name of resource type\r\n     * @param Smarty_Resource|array $callback or instance of Smarty_Resource, or array of callbacks to handle resource (deprecated)\r\n     * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining\r\n     */\r\n    public function registerResource($type, $callback)\r\n    {\r\n        $this->smarty->registered_resources[$type] = $callback instanceof Smarty_Resource ? $callback : array($callback, false);\r\n        return $this;\r\n    }\r\n\r\n    /**\r\n     * Unregisters a resource\r\n     *\r\n     * @param string $type name of resource type\r\n     * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining\r\n     */\r\n    public function unregisterResource($type)\r\n    {\r\n        if (isset($this->smarty->registered_resources[$type])) {\r\n            unset($this->smarty->registered_resources[$type]);\r\n        }\r\n\r\n        return $this;\r\n    }\r\n\r\n    /**\r\n     * Registers a cache resource to cache a template's output\r\n     *\r\n     * @param string               $type     name of cache resource type\r\n     * @param Smarty_CacheResource $callback instance of Smarty_CacheResource to handle output caching\r\n     * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining\r\n     */\r\n    public function registerCacheResource($type, Smarty_CacheResource $callback)\r\n    {\r\n        $this->smarty->registered_cache_resources[$type] = $callback;\r\n        return $this;\r\n    }\r\n\r\n    /**\r\n     * Unregisters a cache resource\r\n     *\r\n     * @param string $type name of cache resource type\r\n     * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining\r\n     */\r\n    public function unregisterCacheResource($type)\r\n    {\r\n        if (isset($this->smarty->registered_cache_resources[$type])) {\r\n            unset($this->smarty->registered_cache_resources[$type]);\r\n        }\r\n\r\n        return $this;\r\n    }\r\n\r\n    /**\r\n     * Registers object to be used in templates\r\n     *\r\n     * @param string  $object        name of template object\r\n     * @param object  $object_impl   the referenced PHP object to register\r\n     * @param array   $allowed       list of allowed methods (empty = all)\r\n     * @param boolean $smarty_args   smarty argument format, else traditional\r\n     * @param array   $block_methods list of block-methods\r\n     * @param array $block_functs list of methods that are block format\r\n     * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining\r\n     * @throws SmartyException if any of the methods in $allowed or $block_methods are invalid\r\n     */\r\n    public function registerObject($object_name, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array())\r\n    {\r\n        // test if allowed methodes callable\r\n        if (!empty($allowed)) {\r\n            foreach ((array) $allowed as $method) {\r\n                if (!is_callable(array($object_impl, $method))) {\r\n                    throw new SmartyException(\"Undefined method '$method' in registered object\");\r\n                }\r\n            }\r\n        }\r\n        // test if block methodes callable\r\n        if (!empty($block_methods)) {\r\n            foreach ((array) $block_methods as $method) {\r\n                if (!is_callable(array($object_impl, $method))) {\r\n                    throw new SmartyException(\"Undefined method '$method' in registered object\");\r\n                }\r\n            }\r\n        }\r\n        // register the object\r\n        $this->smarty->registered_objects[$object_name] =\r\n        array($object_impl, (array) $allowed, (boolean) $smarty_args, (array) $block_methods);\r\n        return $this;\r\n    }\r\n\r\n    /**\r\n     * return a reference to a registered object\r\n     *\r\n     * @param string $name object name\r\n     * @return object\r\n     * @throws SmartyException if no such object is found\r\n     */\r\n    public function getRegisteredObject($name)\r\n    {\r\n        if (!isset($this->smarty->registered_objects[$name])) {\r\n            throw new SmartyException(\"'$name' is not a registered object\");\r\n        }\r\n        if (!is_object($this->smarty->registered_objects[$name][0])) {\r\n            throw new SmartyException(\"registered '$name' is not an object\");\r\n        }\r\n        return $this->smarty->registered_objects[$name][0];\r\n    }\r\n\r\n    /**\r\n     * unregister an object\r\n     *\r\n     * @param string $name object name\r\n     * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining\r\n     */\r\n    public function unregisterObject($name)\r\n    {\r\n        if (isset($this->smarty->registered_objects[$name])) {\r\n            unset($this->smarty->registered_objects[$name]);\r\n        }\r\n\r\n        return $this;\r\n    }\r\n\r\n    /**\r\n     * Registers static classes to be used in templates\r\n     *\r\n     * @param string $class name of template class\r\n     * @param string $class_impl the referenced PHP class to register\r\n     * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining\r\n     * @throws SmartyException if $class_impl does not refer to an existing class\r\n     */\r\n    public function registerClass($class_name, $class_impl)\r\n    {\r\n        // test if exists\r\n        if (!class_exists($class_impl)) {\r\n            throw new SmartyException(\"Undefined class '$class_impl' in register template class\");\r\n        }\r\n        // register the class\r\n        $this->smarty->registered_classes[$class_name] = $class_impl;\r\n        return $this;\r\n    }\r\n\r\n    /**\r\n     * Registers a default plugin handler\r\n     *\r\n     * @param callable $callback class/method name\r\n     * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining\r\n     * @throws SmartyException if $callback is not callable\r\n     */\r\n    public function registerDefaultPluginHandler($callback)\r\n    {\r\n        if (is_callable($callback)) {\r\n            $this->smarty->default_plugin_handler_func = $callback;\r\n        } else {\r\n            throw new SmartyException(\"Default plugin handler '$callback' not callable\");\r\n        }\r\n\r\n        return $this;\r\n    }\r\n\r\n    /**\r\n     * Registers a default template handler\r\n     *\r\n     * @param callable $callback class/method name\r\n     * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining\r\n     * @throws SmartyException if $callback is not callable\r\n     */\r\n    public function registerDefaultTemplateHandler($callback)\r\n    {\r\n        if (is_callable($callback)) {\r\n            $this->smarty->default_template_handler_func = $callback;\r\n        } else {\r\n            throw new SmartyException(\"Default template handler '$callback' not callable\");\r\n        }\r\n\r\n        return $this;\r\n    }\r\n\r\n    /**\r\n     * Registers a default template handler\r\n     *\r\n     * @param callable $callback class/method name\r\n     * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining\r\n     * @throws SmartyException if $callback is not callable\r\n     */\r\n    public function registerDefaultConfigHandler($callback)\r\n    {\r\n        if (is_callable($callback)) {\r\n            $this->smarty->default_config_handler_func = $callback;\r\n        } else {\r\n            throw new SmartyException(\"Default config handler '$callback' not callable\");\r\n        }\r\n\r\n        return $this;\r\n    }\r\n\r\n    /**\r\n     * Registers a filter function\r\n     *\r\n     * @param string $type filter type\r\n     * @param callback $callback\r\n     * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining\r\n     */\r\n    public function registerFilter($type, $callback)\r\n    {\r\n        $this->smarty->registered_filters[$type][$this->_get_filter_name($callback)] = $callback;\r\n        return $this;\r\n    }\r\n\r\n    /**\r\n     * Unregisters a filter function\r\n     *\r\n     * @param string $type filter type\r\n     * @param callback $callback\r\n     * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining\r\n     */\r\n    public function unregisterFilter($type, $callback)\r\n    {\r\n        $name = $this->_get_filter_name($callback);\r\n        if (isset($this->smarty->registered_filters[$type][$name])) {\r\n            unset($this->smarty->registered_filters[$type][$name]);\r\n        }\r\n\r\n        return $this;\r\n    }\r\n\r\n    /**\r\n     * Return internal filter name\r\n     *\r\n     * @param callback $function_name\r\n     * @return string internal filter name\r\n     */\r\n    public function _get_filter_name($function_name)\r\n    {\r\n        if (is_array($function_name)) {\r\n            $_class_name = (is_object($function_name[0]) ?\r\n            get_class($function_name[0]) : $function_name[0]);\r\n            return $_class_name . '_' . $function_name[1];\r\n        } else {\r\n            return $function_name;\r\n        }\r\n    }\r\n\r\n    /**\r\n     * load a filter of specified type and name\r\n     *\r\n     * @param string $type filter type\r\n     * @param string $name filter name\r\n     * @throws SmartyException if filter could not be loaded\r\n     */\r\n    public function loadFilter($type, $name)\r\n    {\r\n        $_plugin = \"smarty_{$type}filter_{$name}\";\r\n        $_filter_name = $_plugin;\r\n        if ($this->smarty->loadPlugin($_plugin)) {\r\n            if (class_exists($_plugin, false)) {\r\n                $_plugin = array($_plugin, 'execute');\r\n            }\r\n            if (is_callable($_plugin)) {\r\n                $this->smarty->registered_filters[$type][$_filter_name] = $_plugin;\r\n                return true;\r\n            }\r\n        }\r\n        throw new SmartyException(\"{$type}filter \\\"{$name}\\\" not callable\");\r\n    }\r\n\r\n    /**\r\n     * unload a filter of specified type and name\r\n     *\r\n     * @param string $type filter type\r\n     * @param string $name filter name\r\n     * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining\r\n     */\r\n    public function unloadFilter($type, $name)\r\n    {\r\n        $_filter_name = \"smarty_{$type}filter_{$name}\";\r\n        if (isset($this->smarty->registered_filters[$type][$_filter_name])) {\r\n            unset ($this->smarty->registered_filters[$type][$_filter_name]);\r\n        }\r\n\r\n        return $this;\r\n    }\r\n\r\n    /**\r\n     * preg_replace callback to convert camelcase getter/setter to underscore property names\r\n     *\r\n     * @param string $match match string\r\n     * @return string replacemant\r\n     */\r\n    private function replaceCamelcase($match) {\r\n        return \"_\" . strtolower($match[1]);\r\n    }\r\n\r\n    /**\r\n     * Handle unknown class methods\r\n     *\r\n     * @param string $name unknown method-name\r\n     * @param array  $args argument array\r\n     */\r\n    public function __call($name, $args)\r\n    {\r\n        static $_prefixes = array('set' => true, 'get' => true);\r\n        static $_resolved_property_name = array();\r\n        static $_resolved_property_source = array();\r\n\r\n        // method of Smarty object?\r\n        if (method_exists($this->smarty, $name)) {\r\n            return call_user_func_array(array($this->smarty, $name), $args);\r\n        }\r\n        // see if this is a set/get for a property\r\n        $first3 = strtolower(substr($name, 0, 3));\r\n        if (isset($_prefixes[$first3]) && isset($name[3]) && $name[3] !== '_') {\r\n            if (isset($_resolved_property_name[$name])) {\r\n                $property_name = $_resolved_property_name[$name];\r\n            } else {\r\n                // try to keep case correct for future PHP 6.0 case-sensitive class methods\r\n                // lcfirst() not available < PHP 5.3.0, so improvise\r\n                $property_name = strtolower(substr($name, 3, 1)) . substr($name, 4);\r\n                // convert camel case to underscored name\r\n                $property_name = preg_replace_callback('/([A-Z])/', array($this,'replaceCamelcase'), $property_name);\r\n                $_resolved_property_name[$name] = $property_name;\r\n            }\r\n            if (isset($_resolved_property_source[$property_name])) {\r\n                $_is_this = $_resolved_property_source[$property_name];\r\n            } else {\r\n                $_is_this = null;\r\n                if (property_exists($this, $property_name)) {\r\n                    $_is_this = true;\r\n                } else if (property_exists($this->smarty, $property_name)) {\r\n                    $_is_this = false;\r\n                }\r\n                $_resolved_property_source[$property_name] = $_is_this;\r\n            }\r\n            if ($_is_this) {\r\n                if ($first3 == 'get')\r\n                return $this->$property_name;\r\n                else\r\n                return $this->$property_name = $args[0];\r\n            } else if ($_is_this === false) {\r\n                if ($first3 == 'get')\r\n                return $this->smarty->$property_name;\r\n                else\r\n                return $this->smarty->$property_name = $args[0];\r\n            } else {\r\n                throw new SmartyException(\"property '$property_name' does not exist.\");\r\n                return false;\r\n            }\r\n        }\r\n        if ($name == 'Smarty') {\r\n            throw new SmartyException(\"PHP5 requires you to call __construct() instead of Smarty()\");\r\n        }\r\n        // must be unknown\r\n        throw new SmartyException(\"Call of unknown method '$name'.\");\r\n    }\r\n\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_templatecompilerbase.php",
    "content": "<?php\r\n\r\n/**\r\n * Smarty Internal Plugin Smarty Template Compiler Base\r\n *\r\n * This file contains the basic classes and methodes for compiling Smarty templates with lexer/parser\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n * @author Uwe Tews\r\n */\r\n\r\n/**\r\n * Main abstract compiler class\r\n *\r\n * @package Smarty\r\n * @subpackage Compiler\r\n */\r\nabstract class Smarty_Internal_TemplateCompilerBase {\r\n\r\n    /**\r\n     * hash for nocache sections\r\n     *\r\n     * @var mixed\r\n     */\r\n    private $nocache_hash = null;\r\n\r\n    /**\r\n     * suppress generation of nocache code\r\n     *\r\n     * @var bool\r\n     */\r\n    public $suppressNocacheProcessing = false;\r\n\r\n    /**\r\n     * suppress generation of merged template code\r\n     *\r\n     * @var bool\r\n     */\r\n    public $suppressMergedTemplates = false;\r\n\r\n    /**\r\n     * compile tag objects\r\n     *\r\n     * @var array\r\n     */\r\n    public static $_tag_objects = array();\r\n\r\n    /**\r\n     * tag stack\r\n     *\r\n     * @var array\r\n     */\r\n    public $_tag_stack = array();\r\n\r\n    /**\r\n     * current template\r\n     *\r\n     * @var Smarty_Internal_Template\r\n     */\r\n    public $template = null;\r\n\r\n    /**\r\n     * merged templates\r\n     *\r\n     * @var array\r\n     */\r\n    public $merged_templates = array();\r\n\r\n    /**\r\n     * flag when compiling {block}\r\n     *\r\n     * @var bool\r\n     */\r\n    public $inheritance = false;\r\n\r\n    /**\r\n     * plugins loaded by default plugin handler\r\n     *\r\n     * @var array\r\n     */\r\n    public $default_handler_plugins = array();\r\n\r\n    /**\r\n     * saved preprocessed modifier list\r\n     *\r\n     * @var mixed\r\n     */\r\n    public $default_modifier_list = null;\r\n\r\n    /**\r\n     * force compilation of complete template as nocache\r\n     * @var boolean\r\n     */\r\n    public $forceNocache = false;\r\n\r\n    /**\r\n     * suppress Smarty header code in compiled template\r\n     * @var bool\r\n     */\r\n    public $suppressHeader = false;\r\n\r\n    /**\r\n     * suppress template property header code in compiled template\r\n     * @var bool\r\n     */\r\n    public $suppressTemplatePropertyHeader = false;\r\n\r\n    /**\r\n     * flag if compiled template file shall we written\r\n     * @var bool\r\n     */\r\n    public $write_compiled_code = true;\r\n\r\n    /**\r\n     * flag if currently a template function is compiled\r\n     * @var bool\r\n     */\r\n    public $compiles_template_function = false;\r\n\r\n    /**\r\n     * called subfuntions from template function\r\n     * @var array\r\n     */\r\n    public $called_functions = array();\r\n\r\n    /**\r\n     * flags for used modifier plugins\r\n     * @var array\r\n     */\r\n    public $modifier_plugins = array();\r\n\r\n    /**\r\n     * type of already compiled modifier\r\n     * @var array\r\n     */\r\n    public $known_modifier_type = array();\r\n\r\n    /**\r\n     * Methode to compile a Smarty template\r\n     *\r\n     * @param  mixed $_content template source\r\n     * @return bool true if compiling succeeded, false if it failed\r\n     */\r\n    abstract protected function doCompile($_content);\r\n\r\n    /**\r\n     * Initialize compiler\r\n     */\r\n    public function __construct() {\r\n        $this->nocache_hash = str_replace('.', '-', uniqid(rand(), true));\r\n    }\r\n\r\n    /**\r\n     * Method to compile a Smarty template\r\n     *\r\n     * @param  Smarty_Internal_Template $template template object to compile\r\n     * @return bool true if compiling succeeded, false if it failed\r\n     */\r\n    public function compileTemplate(Smarty_Internal_Template $template) {\r\n        if (empty($template->properties['nocache_hash'])) {\r\n            $template->properties['nocache_hash'] = $this->nocache_hash;\r\n        } else {\r\n            $this->nocache_hash = $template->properties['nocache_hash'];\r\n        }\r\n        // flag for nochache sections\r\n        $this->nocache = false;\r\n        $this->tag_nocache = false;\r\n        // save template object in compiler class\r\n        $this->template = $template;\r\n        // reset has noche code flag\r\n        $this->template->has_nocache_code = false;\r\n        $this->smarty->_current_file = $saved_filepath = $this->template->source->filepath;\r\n        // template header code\r\n        $template_header = '';\r\n        if (!$this->suppressHeader) {\r\n            $template_header .= \"<?php /* Smarty version \" . Smarty::SMARTY_VERSION . \", created on \" . strftime(\"%Y-%m-%d %H:%M:%S\") . \"\\n\";\r\n            $template_header .= \"         compiled from \\\"\" . $this->template->source->filepath . \"\\\" */ ?>\\n\";\r\n        }\r\n\r\n        do {\r\n            // flag for aborting current and start recompile\r\n            $this->abort_and_recompile = false;\r\n            // get template source\r\n            $_content = $template->source->content;\r\n            // run prefilter if required\r\n            if (isset($this->smarty->autoload_filters['pre']) || isset($this->smarty->registered_filters['pre'])) {\r\n                $_content = Smarty_Internal_Filter_Handler::runFilter('pre', $_content, $template);\r\n            }\r\n            // on empty template just return header\r\n            if ($_content == '') {\r\n                if ($this->suppressTemplatePropertyHeader) {\r\n                    $code = '';\r\n                } else {\r\n                    $code = $template_header . $template->createTemplateCodeFrame();\r\n                }\r\n                return $code;\r\n            }\r\n            // call compiler\r\n            $_compiled_code = $this->doCompile($_content);\r\n        } while ($this->abort_and_recompile);\r\n        $this->template->source->filepath = $saved_filepath;\r\n        // free memory\r\n        unset($this->parser->root_buffer, $this->parser->current_buffer, $this->parser, $this->lex, $this->template);\r\n        self::$_tag_objects = array();\r\n        // return compiled code to template object\r\n        $merged_code = '';\r\n        if (!$this->suppressMergedTemplates && !empty($this->merged_templates)) {\r\n            foreach ($this->merged_templates as $code) {\r\n                $merged_code .= $code;\r\n            }\r\n            // run postfilter if required on merged code\r\n            if (isset($this->smarty->autoload_filters['post']) || isset($this->smarty->registered_filters['post'])) {\r\n                $merged_code = Smarty_Internal_Filter_Handler::runFilter('post', $merged_code, $template);\r\n            }\r\n        }\r\n        // run postfilter if required on compiled template code\r\n        if (isset($this->smarty->autoload_filters['post']) || isset($this->smarty->registered_filters['post'])) {\r\n            $_compiled_code = Smarty_Internal_Filter_Handler::runFilter('post', $_compiled_code, $template);\r\n        }\r\n        if ($this->suppressTemplatePropertyHeader) {\r\n            $code = $_compiled_code . $merged_code;\r\n        } else {\r\n            $code = $template_header . $template->createTemplateCodeFrame($_compiled_code) . $merged_code;\r\n        }\r\n        // unset content because template inheritance could have replace source with parent code\r\n        unset ($template->source->content);\r\n        return $code;\r\n    }\r\n\r\n    /**\r\n     * Compile Tag\r\n     *\r\n     * This is a call back from the lexer/parser\r\n     * It executes the required compile plugin for the Smarty tag\r\n     *\r\n     * @param string $tag       tag name\r\n     * @param array  $args      array with tag attributes\r\n     * @param array  $parameter array with compilation parameter\r\n     * @return string compiled code\r\n     */\r\n    public function compileTag($tag, $args, $parameter = array()) {\r\n        // $args contains the attributes parsed and compiled by the lexer/parser\r\n        // assume that tag does compile into code, but creates no HTML output\r\n        $this->has_code = true;\r\n        $this->has_output = false;\r\n        // log tag/attributes\r\n        if (isset($this->smarty->get_used_tags) && $this->smarty->get_used_tags) {\r\n            $this->template->used_tags[] = array($tag, $args);\r\n        }\r\n        // check nocache option flag\r\n        if (in_array(\"'nocache'\", $args) || in_array(array('nocache' => 'true'), $args)\r\n                || in_array(array('nocache' => '\"true\"'), $args) || in_array(array('nocache' => \"'true'\"), $args)) {\r\n            $this->tag_nocache = true;\r\n        }\r\n        // compile the smarty tag (required compile classes to compile the tag are autoloaded)\r\n        if (($_output = $this->callTagCompiler($tag, $args, $parameter)) === false) {\r\n            if (isset($this->smarty->template_functions[$tag])) {\r\n                // template defined by {template} tag\r\n                $args['_attr']['name'] = \"'\" . $tag . \"'\";\r\n                $_output = $this->callTagCompiler('call', $args, $parameter);\r\n            }\r\n        }\r\n        if ($_output !== false) {\r\n            if ($_output !== true) {\r\n                // did we get compiled code\r\n                if ($this->has_code) {\r\n                    // Does it create output?\r\n                    if ($this->has_output) {\r\n                        $_output .= \"\\n\";\r\n                    }\r\n                    // return compiled code\r\n                    return $_output;\r\n                }\r\n            }\r\n            // tag did not produce compiled code\r\n            return '';\r\n        } else {\r\n            // map_named attributes\r\n            if (isset($args['_attr'])) {\r\n                foreach ($args['_attr'] as $key => $attribute) {\r\n                    if (is_array($attribute)) {\r\n                        $args = array_merge($args, $attribute);\r\n                    }\r\n                }\r\n            }\r\n            // not an internal compiler tag\r\n            if (strlen($tag) < 6 || substr($tag, -5) != 'close') {\r\n                // check if tag is a registered object\r\n                if (isset($this->smarty->registered_objects[$tag]) && isset($parameter['object_methode'])) {\r\n                    $methode = $parameter['object_methode'];\r\n                    if (!in_array($methode, $this->smarty->registered_objects[$tag][3]) &&\r\n                            (empty($this->smarty->registered_objects[$tag][1]) || in_array($methode, $this->smarty->registered_objects[$tag][1]))) {\r\n                        return $this->callTagCompiler('private_object_function', $args, $parameter, $tag, $methode);\r\n                    } elseif (in_array($methode, $this->smarty->registered_objects[$tag][3])) {\r\n                        return $this->callTagCompiler('private_object_block_function', $args, $parameter, $tag, $methode);\r\n                    } else {\r\n                        return $this->trigger_template_error('unallowed methode \"' . $methode . '\" in registered object \"' . $tag . '\"', $this->lex->taglineno);\r\n                    }\r\n                }\r\n                // check if tag is registered\r\n                foreach (array(Smarty::PLUGIN_COMPILER, Smarty::PLUGIN_FUNCTION, Smarty::PLUGIN_BLOCK) as $plugin_type) {\r\n                    if (isset($this->smarty->registered_plugins[$plugin_type][$tag])) {\r\n                        // if compiler function plugin call it now\r\n                        if ($plugin_type == Smarty::PLUGIN_COMPILER) {\r\n                            $new_args = array();\r\n                            foreach ($args as $key => $mixed) {\r\n                                if (is_array($mixed)) {\r\n                                    $new_args = array_merge($new_args, $mixed);\r\n                                } else {\r\n                                    $new_args[$key] = $mixed;\r\n                                }\r\n                            }\r\n                            if (!$this->smarty->registered_plugins[$plugin_type][$tag][1]) {\r\n                                $this->tag_nocache = true;\r\n                            }\r\n                            $function = $this->smarty->registered_plugins[$plugin_type][$tag][0];\r\n                            if (!is_array($function)) {\r\n                                return $function($new_args, $this);\r\n                            } else if (is_object($function[0])) {\r\n                                return $this->smarty->registered_plugins[$plugin_type][$tag][0][0]->$function[1]($new_args, $this);\r\n                            } else {\r\n                                return call_user_func_array($function, array($new_args, $this));\r\n                            }\r\n                        }\r\n                        // compile registered function or block function\r\n                        if ($plugin_type == Smarty::PLUGIN_FUNCTION || $plugin_type == Smarty::PLUGIN_BLOCK) {\r\n                            return $this->callTagCompiler('private_registered_' . $plugin_type, $args, $parameter, $tag);\r\n                        }\r\n                    }\r\n                }\r\n                // check plugins from plugins folder\r\n                foreach ($this->smarty->plugin_search_order as $plugin_type) {\r\n                    if ($plugin_type == Smarty::PLUGIN_BLOCK && $this->smarty->loadPlugin('smarty_compiler_' . $tag) && (!isset($this->smarty->security_policy) || $this->smarty->security_policy->isTrustedTag($tag, $this))) {\r\n                        $plugin = 'smarty_compiler_' . $tag;\r\n                        if (is_callable($plugin)) {\r\n                            // convert arguments format for old compiler plugins\r\n                            $new_args = array();\r\n                            foreach ($args as $key => $mixed) {\r\n                                if (is_array($mixed)) {\r\n                                    $new_args = array_merge($new_args, $mixed);\r\n                                } else {\r\n                                    $new_args[$key] = $mixed;\r\n                                }\r\n                            }\r\n                            return $plugin($new_args, $this->smarty);\r\n                        }\r\n                        if (class_exists($plugin, false)) {\r\n                            $plugin_object = new $plugin;\r\n                            if (method_exists($plugin_object, 'compile')) {\r\n                                return $plugin_object->compile($args, $this);\r\n                            }\r\n                        }\r\n                        throw new SmartyException(\"Plugin \\\"{$tag}\\\" not callable\");\r\n                    } else {\r\n                        if ($function = $this->getPlugin($tag, $plugin_type)) {\r\n                            if (!isset($this->smarty->security_policy) || $this->smarty->security_policy->isTrustedTag($tag, $this)) {\r\n                                return $this->callTagCompiler('private_' . $plugin_type . '_plugin', $args, $parameter, $tag, $function);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                if (is_callable($this->smarty->default_plugin_handler_func)) {\r\n                    $found = false;\r\n                    // look for already resolved tags\r\n                    foreach ($this->smarty->plugin_search_order as $plugin_type) {\r\n                        if (isset($this->default_handler_plugins[$plugin_type][$tag])) {\r\n                            $found = true;\r\n                            break;\r\n                        }\r\n                    }\r\n                    if (!$found) {\r\n                        // call default handler\r\n                        foreach ($this->smarty->plugin_search_order as $plugin_type) {\r\n                            if ($this->getPluginFromDefaultHandler($tag, $plugin_type)) {\r\n                                $found = true;\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n                    if ($found) {\r\n                        // if compiler function plugin call it now\r\n                        if ($plugin_type == Smarty::PLUGIN_COMPILER) {\r\n                            $new_args = array();\r\n                            foreach ($args as $mixed) {\r\n                                $new_args = array_merge($new_args, $mixed);\r\n                            }\r\n                            $function = $this->default_handler_plugins[$plugin_type][$tag][0];\r\n                            if (!is_array($function)) {\r\n                                return $function($new_args, $this);\r\n                            } else if (is_object($function[0])) {\r\n                                return $this->default_handler_plugins[$plugin_type][$tag][0][0]->$function[1]($new_args, $this);\r\n                            } else {\r\n                                return call_user_func_array($function, array($new_args, $this));\r\n                            }\r\n                        } else {\r\n                            return $this->callTagCompiler('private_registered_' . $plugin_type, $args, $parameter, $tag);\r\n                        }\r\n                    }\r\n                }\r\n            } else {\r\n                // compile closing tag of block function\r\n                $base_tag = substr($tag, 0, -5);\r\n                // check if closing tag is a registered object\r\n                if (isset($this->smarty->registered_objects[$base_tag]) && isset($parameter['object_methode'])) {\r\n                    $methode = $parameter['object_methode'];\r\n                    if (in_array($methode, $this->smarty->registered_objects[$base_tag][3])) {\r\n                        return $this->callTagCompiler('private_object_block_function', $args, $parameter, $tag, $methode);\r\n                    } else {\r\n                        return $this->trigger_template_error('unallowed closing tag methode \"' . $methode . '\" in registered object \"' . $base_tag . '\"', $this->lex->taglineno);\r\n                    }\r\n                }\r\n                // registered block tag ?\r\n                if (isset($this->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$base_tag]) || isset($this->default_handler_plugins[Smarty::PLUGIN_BLOCK][$base_tag])) {\r\n                    return $this->callTagCompiler('private_registered_block', $args, $parameter, $tag);\r\n                }\r\n                // block plugin?\r\n                if ($function = $this->getPlugin($base_tag, Smarty::PLUGIN_BLOCK)) {\r\n                    return $this->callTagCompiler('private_block_plugin', $args, $parameter, $tag, $function);\r\n                }\r\n                // registered compiler plugin ?\r\n                if (isset($this->smarty->registered_plugins[Smarty::PLUGIN_COMPILER][$tag])) {\r\n                    // if compiler function plugin call it now\r\n                    $args = array();\r\n                    if (!$this->smarty->registered_plugins[Smarty::PLUGIN_COMPILER][$tag][1]) {\r\n                        $this->tag_nocache = true;\r\n                    }\r\n                    $function = $this->smarty->registered_plugins[Smarty::PLUGIN_COMPILER][$tag][0];\r\n                    if (!is_array($function)) {\r\n                        return $function($args, $this);\r\n                    } else if (is_object($function[0])) {\r\n                        return $this->smarty->registered_plugins[Smarty::PLUGIN_COMPILER][$tag][0][0]->$function[1]($args, $this);\r\n                    } else {\r\n                        return call_user_func_array($function, array($args, $this));\r\n                    }\r\n                }\r\n                if ($this->smarty->loadPlugin('smarty_compiler_' . $tag)) {\r\n                    $plugin = 'smarty_compiler_' . $tag;\r\n                    if (is_callable($plugin)) {\r\n                        return $plugin($args, $this->smarty);\r\n                    }\r\n                    if (class_exists($plugin, false)) {\r\n                        $plugin_object = new $plugin;\r\n                        if (method_exists($plugin_object, 'compile')) {\r\n                            return $plugin_object->compile($args, $this);\r\n                        }\r\n                    }\r\n                    throw new SmartyException(\"Plugin \\\"{$tag}\\\" not callable\");\r\n                }\r\n            }\r\n            $this->trigger_template_error(\"unknown tag \\\"\" . $tag . \"\\\"\", $this->lex->taglineno);\r\n        }\r\n    }\r\n\r\n    /**\r\n     * lazy loads internal compile plugin for tag and calls the compile methode\r\n     *\r\n     * compile objects cached for reuse.\r\n     * class name format:  Smarty_Internal_Compile_TagName\r\n     * plugin filename format: Smarty_Internal_Tagname.php\r\n     *\r\n     * @param string $tag   tag name\r\n     * @param array $args   list of tag attributes\r\n     * @param mixed $param1 optional parameter\r\n     * @param mixed $param2 optional parameter\r\n     * @param mixed $param3 optional parameter\r\n     * @return string compiled code\r\n     */\r\n    public function callTagCompiler($tag, $args, $param1 = null, $param2 = null, $param3 = null) {\r\n        // re-use object if already exists\r\n        if (isset(self::$_tag_objects[$tag])) {\r\n            // compile this tag\r\n            return self::$_tag_objects[$tag]->compile($args, $this, $param1, $param2, $param3);\r\n        }\r\n        // lazy load internal compiler plugin\r\n        $class_name = 'Smarty_Internal_Compile_' . $tag;\r\n        if ($this->smarty->loadPlugin($class_name)) {\r\n            // check if tag allowed by security\r\n            if (!isset($this->smarty->security_policy) || $this->smarty->security_policy->isTrustedTag($tag, $this)) {\r\n                // use plugin if found\r\n                self::$_tag_objects[$tag] = new $class_name;\r\n                // compile this tag\r\n                return self::$_tag_objects[$tag]->compile($args, $this, $param1, $param2, $param3);\r\n            }\r\n        }\r\n        // no internal compile plugin for this tag\r\n        return false;\r\n    }\r\n\r\n    /**\r\n     * Check for plugins and return function name\r\n     *\r\n     * @param string $pugin_name  name of plugin or function\r\n     * @param string $plugin_type type of plugin\r\n     * @return string call name of function\r\n     */\r\n    public function getPlugin($plugin_name, $plugin_type) {\r\n        $function = null;\r\n        if ($this->template->caching && ($this->nocache || $this->tag_nocache)) {\r\n            if (isset($this->template->required_plugins['nocache'][$plugin_name][$plugin_type])) {\r\n                $function = $this->template->required_plugins['nocache'][$plugin_name][$plugin_type]['function'];\r\n            } else if (isset($this->template->required_plugins['compiled'][$plugin_name][$plugin_type])) {\r\n                $this->template->required_plugins['nocache'][$plugin_name][$plugin_type] = $this->template->required_plugins['compiled'][$plugin_name][$plugin_type];\r\n                $function = $this->template->required_plugins['nocache'][$plugin_name][$plugin_type]['function'];\r\n            }\r\n        } else {\r\n            if (isset($this->template->required_plugins['compiled'][$plugin_name][$plugin_type])) {\r\n                $function = $this->template->required_plugins['compiled'][$plugin_name][$plugin_type]['function'];\r\n            } else if (isset($this->template->required_plugins['nocache'][$plugin_name][$plugin_type])) {\r\n                $this->template->required_plugins['compiled'][$plugin_name][$plugin_type] = $this->template->required_plugins['nocache'][$plugin_name][$plugin_type];\r\n                $function = $this->template->required_plugins['compiled'][$plugin_name][$plugin_type]['function'];\r\n            }\r\n        }\r\n        if (isset($function)) {\r\n            if ($plugin_type == 'modifier') {\r\n                $this->modifier_plugins[$plugin_name] = true;\r\n            }\r\n            return $function;\r\n        }\r\n        // loop through plugin dirs and find the plugin\r\n        $function = 'smarty_' . $plugin_type . '_' . $plugin_name;\r\n        $file = $this->smarty->loadPlugin($function, false);\r\n\r\n        if (is_string($file)) {\r\n            if ($this->template->caching && ($this->nocache || $this->tag_nocache)) {\r\n                $this->template->required_plugins['nocache'][$plugin_name][$plugin_type]['file'] = $file;\r\n                $this->template->required_plugins['nocache'][$plugin_name][$plugin_type]['function'] = $function;\r\n            } else {\r\n                $this->template->required_plugins['compiled'][$plugin_name][$plugin_type]['file'] = $file;\r\n                $this->template->required_plugins['compiled'][$plugin_name][$plugin_type]['function'] = $function;\r\n            }\r\n            if ($plugin_type == 'modifier') {\r\n                $this->modifier_plugins[$plugin_name] = true;\r\n            }\r\n            return $function;\r\n        }\r\n        if (is_callable($function)) {\r\n            // plugin function is defined in the script\r\n            return $function;\r\n        }\r\n        return false;\r\n    }\r\n\r\n    /**\r\n     * Check for plugins by default plugin handler\r\n     *\r\n     * @param string $tag         name of tag\r\n     * @param string $plugin_type type of plugin\r\n     * @return boolean true if found\r\n     */\r\n    public function getPluginFromDefaultHandler($tag, $plugin_type) {\r\n        $callback = null;\r\n        $script = null;\r\n        $cacheable = true;\r\n        $result = call_user_func_array(\r\n                $this->smarty->default_plugin_handler_func, array($tag, $plugin_type, $this->template, &$callback, &$script, &$cacheable)\r\n        );\r\n        if ($result) {\r\n            $this->tag_nocache = $this->tag_nocache || !$cacheable;\r\n            if ($script !== null) {\r\n                if (is_file($script)) {\r\n                    if ($this->template->caching && ($this->nocache || $this->tag_nocache)) {\r\n                        $this->template->required_plugins['nocache'][$tag][$plugin_type]['file'] = $script;\r\n                        $this->template->required_plugins['nocache'][$tag][$plugin_type]['function'] = $callback;\r\n                    } else {\r\n                        $this->template->required_plugins['compiled'][$tag][$plugin_type]['file'] = $script;\r\n                        $this->template->required_plugins['compiled'][$tag][$plugin_type]['function'] = $callback;\r\n                    }\r\n                    include_once $script;\r\n                } else {\r\n                    $this->trigger_template_error(\"Default plugin handler: Returned script file \\\"{$script}\\\" for \\\"{$tag}\\\" not found\");\r\n                }\r\n            }\r\n            if (!is_string($callback) && !(is_array($callback) && is_string($callback[0]) && is_string($callback[1]))) {\r\n                $this->trigger_template_error(\"Default plugin handler: Returned callback for \\\"{$tag}\\\" must be a static function name or array of class and function name\");\r\n            }\r\n            if (is_callable($callback)) {\r\n                $this->default_handler_plugins[$plugin_type][$tag] = array($callback, true, array());\r\n                return true;\r\n            } else {\r\n                $this->trigger_template_error(\"Default plugin handler: Returned callback for \\\"{$tag}\\\" not callable\");\r\n            }\r\n        }\r\n        return false;\r\n    }\r\n\r\n    /**\r\n     * Inject inline code for nocache template sections\r\n     *\r\n     * This method gets the content of each template element from the parser.\r\n     * If the content is compiled code and it should be not cached the code is injected\r\n     * into the rendered output.\r\n     *\r\n     * @param string  $content content of template element\r\n     * @param boolean $is_code true if content is compiled code\r\n     * @return string content\r\n     */\r\n    public function processNocacheCode($content, $is_code) {\r\n        // If the template is not evaluated and we have a nocache section and or a nocache tag\r\n        if ($is_code && !empty($content)) {\r\n            // generate replacement code\r\n            if ((!($this->template->source->recompiled) || $this->forceNocache) && $this->template->caching && !$this->suppressNocacheProcessing &&\r\n                    ($this->nocache || $this->tag_nocache || $this->forceNocache == 2)) {\r\n                $this->template->has_nocache_code = true;\r\n                $_output = addcslashes($content,'\\'\\\\');\r\n                $_output = str_replace(\"^#^\", \"'\", $_output);\r\n                $_output = \"<?php echo '/*%%SmartyNocache:{$this->nocache_hash}%%*/\" . $_output . \"/*/%%SmartyNocache:{$this->nocache_hash}%%*/';?>\\n\";\r\n                // make sure we include modifer plugins for nocache code\r\n                foreach ($this->modifier_plugins as $plugin_name => $dummy) {\r\n                    if (isset($this->template->required_plugins['compiled'][$plugin_name]['modifier'])) {\r\n                        $this->template->required_plugins['nocache'][$plugin_name]['modifier'] = $this->template->required_plugins['compiled'][$plugin_name]['modifier'];\r\n                    }\r\n                }\r\n            } else {\r\n                $_output = $content;\r\n            }\r\n        } else {\r\n            $_output = $content;\r\n        }\r\n        $this->modifier_plugins = array();\r\n        $this->suppressNocacheProcessing = false;\r\n        $this->tag_nocache = false;\r\n        return $_output;\r\n    }\r\n\r\n    /**\r\n     * display compiler error messages without dying\r\n     *\r\n     * If parameter $args is empty it is a parser detected syntax error.\r\n     * In this case the parser is called to obtain information about expected tokens.\r\n     *\r\n     * If parameter $args contains a string this is used as error message\r\n     *\r\n     * @param string $args individual error message or null\r\n     * @param string $line line-number\r\n     * @throws SmartyCompilerException when an unexpected token is found\r\n     */\r\n    public function trigger_template_error($args = null, $line = null) {\r\n        // get template source line which has error\r\n        if (!isset($line)) {\r\n            $line = $this->lex->line;\r\n        }\r\n        $match = preg_split(\"/\\n/\", $this->lex->data);\r\n        $error_text = 'Syntax Error in template \"' . $this->template->source->filepath . '\"  on line ' . $line . ' \"' . htmlspecialchars(trim(preg_replace('![\\t\\r\\n]+!', ' ', $match[$line - 1]))) . '\" ';\r\n        if (isset($args)) {\r\n            // individual error message\r\n            $error_text .= $args;\r\n        } else {\r\n            // expected token from parser\r\n            $error_text .= ' - Unexpected \"' . $this->lex->value . '\"';\r\n            if (count($this->parser->yy_get_expected_tokens($this->parser->yymajor)) <= 4) {\r\n                foreach ($this->parser->yy_get_expected_tokens($this->parser->yymajor) as $token) {\r\n                    $exp_token = $this->parser->yyTokenName[$token];\r\n                    if (isset($this->lex->smarty_token_names[$exp_token])) {\r\n                        // token type from lexer\r\n                        $expect[] = '\"' . $this->lex->smarty_token_names[$exp_token] . '\"';\r\n                    } else {\r\n                        // otherwise internal token name\r\n                        $expect[] = $this->parser->yyTokenName[$token];\r\n                    }\r\n                }\r\n                $error_text .= ', expected one of: ' . implode(' , ', $expect);\r\n            }\r\n        }\r\n        throw new SmartyCompilerException($error_text);\r\n    }\r\n\r\n}\r\n\r\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_templatelexer.php",
    "content": "<?php\n/**\n* Smarty Internal Plugin Templatelexer\n*\n* This is the lexer to break the template source into tokens\n* @package Smarty\n* @subpackage Compiler\n* @author Uwe Tews\n*/\n/**\n* Smarty Internal Plugin Templatelexer\n*/\nclass Smarty_Internal_Templatelexer\n{\n    public $data;\n    public $counter;\n    public $token;\n    public $value;\n    public $node;\n    public $line;\n    public $taglineno;\n    public $state = 1;\n    private $heredoc_id_stack = Array();\n    public $smarty_token_names = array (\t\t// Text for parser error messages\n    \t\t\t\t'IDENTITY'\t=> '===',\n    \t\t\t\t'NONEIDENTITY'\t=> '!==',\n    \t\t\t\t'EQUALS'\t=> '==',\n    \t\t\t\t'NOTEQUALS'\t=> '!=',\n    \t\t\t\t'GREATEREQUAL' => '(>=,ge)',\n    \t\t\t\t'LESSEQUAL' => '(<=,le)',\n    \t\t\t\t'GREATERTHAN' => '(>,gt)',\n    \t\t\t\t'LESSTHAN' => '(<,lt)',\n    \t\t\t\t'MOD' => '(%,mod)',\n    \t\t\t\t'NOT'\t\t\t=> '(!,not)',\n    \t\t\t\t'LAND'\t\t=> '(&&,and)',\n    \t\t\t\t'LOR'\t\t\t=> '(||,or)',\n    \t\t\t\t'LXOR'\t\t\t=> 'xor',\n    \t\t\t\t'OPENP'\t\t=> '(',\n    \t\t\t\t'CLOSEP'\t=> ')',\n    \t\t\t\t'OPENB'\t\t=> '[',\n    \t\t\t\t'CLOSEB'\t=> ']',\n    \t\t\t\t'PTR'\t\t\t=> '->',\n    \t\t\t\t'APTR'\t\t=> '=>',\n    \t\t\t\t'EQUAL'\t\t=> '=',\n    \t\t\t\t'NUMBER'\t=> 'number',\n    \t\t\t\t'UNIMATH'\t=> '+\" , \"-',\n    \t\t\t\t'MATH'\t\t=> '*\" , \"/\" , \"%',\n    \t\t\t\t'INCDEC'\t=> '++\" , \"--',\n    \t\t\t\t'SPACE'\t\t=> ' ',\n    \t\t\t\t'DOLLAR'\t=> '$',\n    \t\t\t\t'SEMICOLON' => ';',\n    \t\t\t\t'COLON'\t\t=> ':',\n    \t\t\t\t'DOUBLECOLON'\t\t=> '::',\n    \t\t\t\t'AT'\t\t=> '@',\n    \t\t\t\t'HATCH'\t\t=> '#',\n    \t\t\t\t'QUOTE'\t\t=> '\"',\n    \t\t\t\t'BACKTICK'\t\t=> '`',\n    \t\t\t\t'VERT'\t\t=> '|',\n    \t\t\t\t'DOT'\t\t\t=> '.',\n    \t\t\t\t'COMMA'\t\t=> '\",\"',\n    \t\t\t\t'ANDSYM'\t\t=> '\"&\"',\n    \t\t\t\t'QMARK'\t\t=> '\"?\"',\n    \t\t\t\t'ID'\t\t\t=> 'identifier',\n    \t\t\t\t'TEXT'\t\t=> 'text',\n     \t\t\t\t'FAKEPHPSTARTTAG'\t=> 'Fake PHP start tag',\n     \t\t\t\t'PHPSTARTTAG'\t=> 'PHP start tag',\n     \t\t\t\t'PHPENDTAG'\t=> 'PHP end tag',\n \t\t\t\t\t\t'LITERALSTART'  => 'Literal start',\n \t\t\t\t\t\t'LITERALEND'    => 'Literal end',\n    \t\t\t\t'LDELSLASH' => 'closing tag',\n    \t\t\t\t'COMMENT' => 'comment',\n    \t\t\t\t'AS' => 'as',\n    \t\t\t\t'TO' => 'to',\n    \t\t\t\t);\n\n\n    function __construct($data,$compiler)\n    {\n//        $this->data = preg_replace(\"/(\\r\\n|\\r|\\n)/\", \"\\n\", $data);\n        $this->data = $data;\n        $this->counter = 0;\n        $this->line = 1;\n        $this->smarty = $compiler->smarty;\n        $this->compiler = $compiler;\n        $this->ldel = preg_quote($this->smarty->left_delimiter,'/');\n        $this->ldel_length = strlen($this->smarty->left_delimiter);\n        $this->rdel = preg_quote($this->smarty->right_delimiter,'/');\n        $this->rdel_length = strlen($this->smarty->right_delimiter);\n        $this->smarty_token_names['LDEL'] =\t$this->smarty->left_delimiter;\n        $this->smarty_token_names['RDEL'] =\t$this->smarty->right_delimiter;\n        $this->mbstring_overload = ini_get('mbstring.func_overload') & 2;\n     }\n\n\n    private $_yy_state = 1;\n    private $_yy_stack = array();\n\n    function yylex()\n    {\n        return $this->{'yylex' . $this->_yy_state}();\n    }\n\n    function yypushstate($state)\n    {\n        array_push($this->_yy_stack, $this->_yy_state);\n        $this->_yy_state = $state;\n    }\n\n    function yypopstate()\n    {\n        $this->_yy_state = array_pop($this->_yy_stack);\n    }\n\n    function yybegin($state)\n    {\n        $this->_yy_state = $state;\n    }\n\n\n\n    function yylex1()\n    {\n        $tokenMap = array (\n              1 => 0,\n              2 => 0,\n              3 => 1,\n              5 => 0,\n              6 => 0,\n              7 => 0,\n              8 => 0,\n              9 => 0,\n              10 => 0,\n              11 => 1,\n              13 => 0,\n              14 => 0,\n              15 => 0,\n              16 => 0,\n              17 => 0,\n              18 => 0,\n              19 => 0,\n              20 => 0,\n              21 => 0,\n              22 => 0,\n              23 => 0,\n              24 => 0,\n            );\n        if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {\n            return false; // end of input\n        }\n        $yy_global_pattern = \"/\\G(\".$this->ldel.\"[$]smarty\\\\.block\\\\.child\".$this->rdel.\")|\\G(\\\\{\\\\})|\\G(\".$this->ldel.\"\\\\*([\\S\\s]*?)\\\\*\".$this->rdel.\")|\\G(\".$this->ldel.\"strip\".$this->rdel.\")|\\G(\".$this->ldel.\"\\\\s{1,}strip\\\\s{1,}\".$this->rdel.\")|\\G(\".$this->ldel.\"\\/strip\".$this->rdel.\")|\\G(\".$this->ldel.\"\\\\s{1,}\\/strip\\\\s{1,}\".$this->rdel.\")|\\G(\".$this->ldel.\"\\\\s*literal\\\\s*\".$this->rdel.\")|\\G(\".$this->ldel.\"\\\\s{1,}\\/)|\\G(\".$this->ldel.\"\\\\s*(if|elseif|else if|while)\\\\s+)|\\G(\".$this->ldel.\"\\\\s*for\\\\s+)|\\G(\".$this->ldel.\"\\\\s*foreach(?![^\\s]))|\\G(\".$this->ldel.\"\\\\s*setfilter\\\\s+)|\\G(\".$this->ldel.\"\\\\s{1,})|\\G(\".$this->ldel.\"\\/)|\\G(\".$this->ldel.\")|\\G(<\\\\?(?:php\\\\w+|=|[a-zA-Z]+)?)|\\G(\\\\?>)|\\G(\".$this->rdel.\")|\\G(<%)|\\G(%>)|\\G([\\S\\s])/iS\";\n\n        do {\n            if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {\n                $yysubmatches = $yymatches;\n                $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns\n                if (!count($yymatches)) {\n                    throw new Exception('Error: lexing failed because a rule matched' .\n                        ' an empty string.  Input \"' . substr($this->data,\n                        $this->counter, 5) . '... state TEXT');\n                }\n                next($yymatches); // skip global match\n                $this->token = key($yymatches); // token number\n                if ($tokenMap[$this->token]) {\n                    // extract sub-patterns for passing to lex function\n                    $yysubmatches = array_slice($yysubmatches, $this->token + 1,\n                        $tokenMap[$this->token]);\n                } else {\n                    $yysubmatches = array();\n                }\n                $this->value = current($yymatches); // token value\n                $r = $this->{'yy_r1_' . $this->token}($yysubmatches);\n                if ($r === null) {\n                    $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));\n                    $this->line += substr_count($this->value, \"\\n\");\n                    // accept this token\n                    return true;\n                } elseif ($r === true) {\n                    // we have changed state\n                    // process this token in the new state\n                    return $this->yylex();\n                } elseif ($r === false) {\n                    $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));\n                    $this->line += substr_count($this->value, \"\\n\");\n                    if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {\n                        return false; // end of input\n                    }\n                    // skip this token\n                    continue;\n                }            } else {\n                throw new Exception('Unexpected input at line' . $this->line .\n                    ': ' . $this->data[$this->counter]);\n            }\n            break;\n        } while (true);\n\n    } // end function\n\n\n    const TEXT = 1;\n    function yy_r1_1($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_SMARTYBLOCKCHILD;\n    }\n    function yy_r1_2($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n    }\n    function yy_r1_3($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_COMMENT;\n    }\n    function yy_r1_5($yy_subpatterns)\n    {\n\n    $this->token = Smarty_Internal_Templateparser::TP_STRIPON;\n    }\n    function yy_r1_6($yy_subpatterns)\n    {\n\n  if ($this->smarty->auto_literal) {\n    $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n  } else {\n    $this->token = Smarty_Internal_Templateparser::TP_STRIPON;\n  }\n    }\n    function yy_r1_7($yy_subpatterns)\n    {\n\n    $this->token = Smarty_Internal_Templateparser::TP_STRIPOFF;\n    }\n    function yy_r1_8($yy_subpatterns)\n    {\n\n  if ($this->smarty->auto_literal) {\n     $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n  } else {\n    $this->token = Smarty_Internal_Templateparser::TP_STRIPOFF;\n  }\n    }\n    function yy_r1_9($yy_subpatterns)\n    {\n\n   $this->token = Smarty_Internal_Templateparser::TP_LITERALSTART;\n   $this->yypushstate(self::LITERAL);\n    }\n    function yy_r1_10($yy_subpatterns)\n    {\n\n  if ($this->smarty->auto_literal) {\n     $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n  } else {\n     $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;\n     $this->yypushstate(self::SMARTY);\n     $this->taglineno = $this->line;\n  }\n    }\n    function yy_r1_11($yy_subpatterns)\n    {\n\n  if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {\n     $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n  } else {\n     $this->token = Smarty_Internal_Templateparser::TP_LDELIF;\n     $this->yypushstate(self::SMARTY);\n     $this->taglineno = $this->line;\n  }\n    }\n    function yy_r1_13($yy_subpatterns)\n    {\n\n  if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {\n     $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n  } else {\n     $this->token = Smarty_Internal_Templateparser::TP_LDELFOR;\n     $this->yypushstate(self::SMARTY);\n     $this->taglineno = $this->line;\n  }\n    }\n    function yy_r1_14($yy_subpatterns)\n    {\n\n  if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {\n     $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n  } else {\n     $this->token = Smarty_Internal_Templateparser::TP_LDELFOREACH;\n     $this->yypushstate(self::SMARTY);\n     $this->taglineno = $this->line;\n  }\n    }\n    function yy_r1_15($yy_subpatterns)\n    {\n\n  if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {\n     $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n  } else {\n     $this->token = Smarty_Internal_Templateparser::TP_LDELSETFILTER;\n     $this->yypushstate(self::SMARTY);\n     $this->taglineno = $this->line;\n  }\n    }\n    function yy_r1_16($yy_subpatterns)\n    {\n\n  if ($this->smarty->auto_literal) {\n     $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n  } else {\n     $this->token = Smarty_Internal_Templateparser::TP_LDEL;\n     $this->yypushstate(self::SMARTY);\n     $this->taglineno = $this->line;\n  }\n    }\n    function yy_r1_17($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;\n     $this->yypushstate(self::SMARTY);\n     $this->taglineno = $this->line;\n    }\n    function yy_r1_18($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_LDEL;\n     $this->yypushstate(self::SMARTY);\n     $this->taglineno = $this->line;\n    }\n    function yy_r1_19($yy_subpatterns)\n    {\n\n  if (in_array($this->value, Array('<?', '<?=', '<?php'))) {\n    $this->token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG;\n  } elseif ($this->value == '<?xml') {\n      $this->token = Smarty_Internal_Templateparser::TP_XMLTAG;\n  } else {\n    $this->token = Smarty_Internal_Templateparser::TP_FAKEPHPSTARTTAG;\n    $this->value = substr($this->value, 0, 2);\n  }\n     }\n    function yy_r1_20($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG;\n    }\n    function yy_r1_21($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n    }\n    function yy_r1_22($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG;\n    }\n    function yy_r1_23($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG;\n    }\n    function yy_r1_24($yy_subpatterns)\n    {\n\n  if ($this->mbstring_overload) {\n    $to = mb_strlen($this->data,'latin1');\n  } else {\n    $to = strlen($this->data);\n  }\n  preg_match(\"/{$this->ldel}|<\\?|\\?>|<%|%>/\",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter);\n  if (isset($match[0][1])) {\n    $to = $match[0][1];\n  }\n  if ($this->mbstring_overload) {\n    $this->value = mb_substr($this->data,$this->counter,$to-$this->counter,'latin1');\n  } else {\n    $this->value = substr($this->data,$this->counter,$to-$this->counter);\n  }\n  $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n    }\n\n\n    function yylex2()\n    {\n        $tokenMap = array (\n              1 => 0,\n              2 => 0,\n              3 => 1,\n              5 => 0,\n              6 => 0,\n              7 => 0,\n              8 => 0,\n              9 => 0,\n              10 => 0,\n              11 => 0,\n              12 => 0,\n              13 => 0,\n              14 => 0,\n              15 => 0,\n              16 => 0,\n              17 => 0,\n              18 => 0,\n              19 => 0,\n              20 => 1,\n              22 => 1,\n              24 => 1,\n              26 => 0,\n              27 => 0,\n              28 => 0,\n              29 => 0,\n              30 => 0,\n              31 => 0,\n              32 => 0,\n              33 => 0,\n              34 => 0,\n              35 => 0,\n              36 => 0,\n              37 => 0,\n              38 => 0,\n              39 => 0,\n              40 => 0,\n              41 => 0,\n              42 => 0,\n              43 => 3,\n              47 => 0,\n              48 => 0,\n              49 => 0,\n              50 => 0,\n              51 => 0,\n              52 => 0,\n              53 => 0,\n              54 => 0,\n              55 => 1,\n              57 => 1,\n              59 => 0,\n              60 => 0,\n              61 => 0,\n              62 => 0,\n              63 => 0,\n              64 => 0,\n              65 => 0,\n              66 => 0,\n              67 => 0,\n              68 => 0,\n              69 => 0,\n              70 => 0,\n              71 => 0,\n              72 => 0,\n              73 => 0,\n              74 => 0,\n              75 => 0,\n              76 => 0,\n              77 => 0,\n            );\n        if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {\n            return false; // end of input\n        }\n        $yy_global_pattern = \"/\\G('[^'\\\\\\\\]*(?:\\\\\\\\.[^'\\\\\\\\]*)*')|\\G(\".$this->ldel.\"\\\\s{1,}\\/)|\\G(\".$this->ldel.\"\\\\s*(if|elseif|else if|while)\\\\s+)|\\G(\".$this->ldel.\"\\\\s*for\\\\s+)|\\G(\".$this->ldel.\"\\\\s*foreach(?![^\\s]))|\\G(\".$this->ldel.\"\\\\s{1,})|\\G(\\\\s{1,}\".$this->rdel.\")|\\G(\".$this->ldel.\"\\/)|\\G(\".$this->ldel.\")|\\G(\".$this->rdel.\")|\\G(\\\\s+is\\\\s+in\\\\s+)|\\G(\\\\s+as\\\\s+)|\\G(\\\\s+to\\\\s+)|\\G(\\\\s+step\\\\s+)|\\G(\\\\s+instanceof\\\\s+)|\\G(\\\\s*===\\\\s*)|\\G(\\\\s*!==\\\\s*)|\\G(\\\\s*==\\\\s*|\\\\s+eq\\\\s+)|\\G(\\\\s*!=\\\\s*|\\\\s*<>\\\\s*|\\\\s+(ne|neq)\\\\s+)|\\G(\\\\s*>=\\\\s*|\\\\s+(ge|gte)\\\\s+)|\\G(\\\\s*<=\\\\s*|\\\\s+(le|lte)\\\\s+)|\\G(\\\\s*>\\\\s*|\\\\s+gt\\\\s+)|\\G(\\\\s*<\\\\s*|\\\\s+lt\\\\s+)|\\G(\\\\s+mod\\\\s+)|\\G(!\\\\s*|not\\\\s+)|\\G(\\\\s*&&\\\\s*|\\\\s*and\\\\s+)|\\G(\\\\s*\\\\|\\\\|\\\\s*|\\\\s*or\\\\s+)|\\G(\\\\s*xor\\\\s+)|\\G(\\\\s+is\\\\s+odd\\\\s+by\\\\s+)|\\G(\\\\s+is\\\\s+not\\\\s+odd\\\\s+by\\\\s+)|\\G(\\\\s+is\\\\s+odd)|\\G(\\\\s+is\\\\s+not\\\\s+odd)|\\G(\\\\s+is\\\\s+even\\\\s+by\\\\s+)|\\G(\\\\s+is\\\\s+not\\\\s+even\\\\s+by\\\\s+)|\\G(\\\\s+is\\\\s+even)|\\G(\\\\s+is\\\\s+not\\\\s+even)|\\G(\\\\s+is\\\\s+div\\\\s+by\\\\s+)|\\G(\\\\s+is\\\\s+not\\\\s+div\\\\s+by\\\\s+)|\\G(\\\\((int(eger)?|bool(ean)?|float|double|real|string|binary|array|object)\\\\)\\\\s*)|\\G(\\\\s*\\\\(\\\\s*)|\\G(\\\\s*\\\\))|\\G(\\\\[\\\\s*)|\\G(\\\\s*\\\\])|\\G(\\\\s*->\\\\s*)|\\G(\\\\s*=>\\\\s*)|\\G(\\\\s*=\\\\s*)|\\G(\\\\+\\\\+|--)|\\G(\\\\s*(\\\\+|-)\\\\s*)|\\G(\\\\s*(\\\\*|\\/|%)\\\\s*)|\\G(\\\\$)|\\G(\\\\s*;)|\\G(::)|\\G(\\\\s*:\\\\s*)|\\G(@)|\\G(#)|\\G(\\\")|\\G(`)|\\G(\\\\|)|\\G(\\\\.)|\\G(\\\\s*,\\\\s*)|\\G(\\\\s*&\\\\s*)|\\G(\\\\s*\\\\?\\\\s*)|\\G(0[xX][0-9a-fA-F]+)|\\G(\\\\s+[0-9]*[a-zA-Z_][a-zA-Z0-9_\\-:]*\\\\s*=\\\\s*)|\\G([0-9]*[a-zA-Z_]\\\\w*)|\\G(\\\\d+)|\\G(\\\\s+)|\\G([\\S\\s])/iS\";\n\n        do {\n            if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {\n                $yysubmatches = $yymatches;\n                $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns\n                if (!count($yymatches)) {\n                    throw new Exception('Error: lexing failed because a rule matched' .\n                        ' an empty string.  Input \"' . substr($this->data,\n                        $this->counter, 5) . '... state SMARTY');\n                }\n                next($yymatches); // skip global match\n                $this->token = key($yymatches); // token number\n                if ($tokenMap[$this->token]) {\n                    // extract sub-patterns for passing to lex function\n                    $yysubmatches = array_slice($yysubmatches, $this->token + 1,\n                        $tokenMap[$this->token]);\n                } else {\n                    $yysubmatches = array();\n                }\n                $this->value = current($yymatches); // token value\n                $r = $this->{'yy_r2_' . $this->token}($yysubmatches);\n                if ($r === null) {\n                    $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));\n                    $this->line += substr_count($this->value, \"\\n\");\n                    // accept this token\n                    return true;\n                } elseif ($r === true) {\n                    // we have changed state\n                    // process this token in the new state\n                    return $this->yylex();\n                } elseif ($r === false) {\n                    $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));\n                    $this->line += substr_count($this->value, \"\\n\");\n                    if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {\n                        return false; // end of input\n                    }\n                    // skip this token\n                    continue;\n                }            } else {\n                throw new Exception('Unexpected input at line' . $this->line .\n                    ': ' . $this->data[$this->counter]);\n            }\n            break;\n        } while (true);\n\n    } // end function\n\n\n    const SMARTY = 2;\n    function yy_r2_1($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_SINGLEQUOTESTRING;\n    }\n    function yy_r2_2($yy_subpatterns)\n    {\n\n  if ($this->smarty->auto_literal) {\n     $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n  } else {\n     $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;\n     $this->yypushstate(self::SMARTY);\n     $this->taglineno = $this->line;\n  }\n    }\n    function yy_r2_3($yy_subpatterns)\n    {\n\n  if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {\n     $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n  } else {\n     $this->token = Smarty_Internal_Templateparser::TP_LDELIF;\n     $this->yypushstate(self::SMARTY);\n     $this->taglineno = $this->line;\n  }\n    }\n    function yy_r2_5($yy_subpatterns)\n    {\n\n  if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {\n     $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n  } else {\n     $this->token = Smarty_Internal_Templateparser::TP_LDELFOR;\n     $this->yypushstate(self::SMARTY);\n     $this->taglineno = $this->line;\n  }\n    }\n    function yy_r2_6($yy_subpatterns)\n    {\n\n  if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {\n     $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n  } else {\n     $this->token = Smarty_Internal_Templateparser::TP_LDELFOREACH;\n     $this->yypushstate(self::SMARTY);\n     $this->taglineno = $this->line;\n  }\n    }\n    function yy_r2_7($yy_subpatterns)\n    {\n\n  if ($this->smarty->auto_literal) {\n     $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n  } else {\n     $this->token = Smarty_Internal_Templateparser::TP_LDEL;\n     $this->yypushstate(self::SMARTY);\n     $this->taglineno = $this->line;\n  }\n    }\n    function yy_r2_8($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_RDEL;\n  $this->yypopstate();\n    }\n    function yy_r2_9($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;\n     $this->yypushstate(self::SMARTY);\n     $this->taglineno = $this->line;\n    }\n    function yy_r2_10($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_LDEL;\n     $this->yypushstate(self::SMARTY);\n     $this->taglineno = $this->line;\n    }\n    function yy_r2_11($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_RDEL;\n     $this->yypopstate();\n    }\n    function yy_r2_12($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_ISIN;\n    }\n    function yy_r2_13($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_AS;\n    }\n    function yy_r2_14($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_TO;\n    }\n    function yy_r2_15($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_STEP;\n    }\n    function yy_r2_16($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_INSTANCEOF;\n    }\n    function yy_r2_17($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_IDENTITY;\n    }\n    function yy_r2_18($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_NONEIDENTITY;\n    }\n    function yy_r2_19($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_EQUALS;\n    }\n    function yy_r2_20($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_NOTEQUALS;\n    }\n    function yy_r2_22($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_GREATEREQUAL;\n    }\n    function yy_r2_24($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_LESSEQUAL;\n    }\n    function yy_r2_26($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_GREATERTHAN;\n    }\n    function yy_r2_27($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_LESSTHAN;\n    }\n    function yy_r2_28($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_MOD;\n    }\n    function yy_r2_29($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_NOT;\n    }\n    function yy_r2_30($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_LAND;\n    }\n    function yy_r2_31($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_LOR;\n    }\n    function yy_r2_32($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_LXOR;\n    }\n    function yy_r2_33($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_ISODDBY;\n    }\n    function yy_r2_34($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_ISNOTODDBY;\n    }\n    function yy_r2_35($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_ISODD;\n    }\n    function yy_r2_36($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_ISNOTODD;\n    }\n    function yy_r2_37($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_ISEVENBY;\n    }\n    function yy_r2_38($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_ISNOTEVENBY;\n    }\n    function yy_r2_39($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_ISEVEN;\n    }\n    function yy_r2_40($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_ISNOTEVEN;\n    }\n    function yy_r2_41($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_ISDIVBY;\n    }\n    function yy_r2_42($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_ISNOTDIVBY;\n    }\n    function yy_r2_43($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_TYPECAST;\n    }\n    function yy_r2_47($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_OPENP;\n    }\n    function yy_r2_48($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_CLOSEP;\n    }\n    function yy_r2_49($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_OPENB;\n    }\n    function yy_r2_50($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_CLOSEB;\n    }\n    function yy_r2_51($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_PTR;\n    }\n    function yy_r2_52($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_APTR;\n    }\n    function yy_r2_53($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_EQUAL;\n    }\n    function yy_r2_54($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_INCDEC;\n    }\n    function yy_r2_55($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_UNIMATH;\n    }\n    function yy_r2_57($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_MATH;\n    }\n    function yy_r2_59($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_DOLLAR;\n    }\n    function yy_r2_60($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_SEMICOLON;\n    }\n    function yy_r2_61($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_DOUBLECOLON;\n    }\n    function yy_r2_62($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_COLON;\n    }\n    function yy_r2_63($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_AT;\n    }\n    function yy_r2_64($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_HATCH;\n    }\n    function yy_r2_65($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_QUOTE;\n  $this->yypushstate(self::DOUBLEQUOTEDSTRING);\n    }\n    function yy_r2_66($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_BACKTICK;\n  $this->yypopstate();\n    }\n    function yy_r2_67($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_VERT;\n    }\n    function yy_r2_68($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_DOT;\n    }\n    function yy_r2_69($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_COMMA;\n    }\n    function yy_r2_70($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_ANDSYM;\n    }\n    function yy_r2_71($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_QMARK;\n    }\n    function yy_r2_72($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_HEX;\n    }\n    function yy_r2_73($yy_subpatterns)\n    {\n\n  // resolve conflicts with shorttag and right_delimiter starting with '='\n  if (substr($this->data, $this->counter + strlen($this->value) - 1, $this->rdel_length) == $this->smarty->right_delimiter) {\n     preg_match(\"/\\s+/\",$this->value,$match);\n     $this->value = $match[0];\n     $this->token = Smarty_Internal_Templateparser::TP_SPACE;\n  } else {\n     $this->token = Smarty_Internal_Templateparser::TP_ATTR;\n  }\n    }\n    function yy_r2_74($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_ID;\n    }\n    function yy_r2_75($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_INTEGER;\n    }\n    function yy_r2_76($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_SPACE;\n    }\n    function yy_r2_77($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n    }\n\n\n\n    function yylex3()\n    {\n        $tokenMap = array (\n              1 => 0,\n              2 => 0,\n              3 => 0,\n              4 => 0,\n              5 => 0,\n              6 => 0,\n              7 => 0,\n            );\n        if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {\n            return false; // end of input\n        }\n        $yy_global_pattern = \"/\\G(\".$this->ldel.\"\\\\s*literal\\\\s*\".$this->rdel.\")|\\G(\".$this->ldel.\"\\\\s*\\/literal\\\\s*\".$this->rdel.\")|\\G(<\\\\?(?:php\\\\w+|=|[a-zA-Z]+)?)|\\G(\\\\?>)|\\G(<%)|\\G(%>)|\\G([\\S\\s])/iS\";\n\n        do {\n            if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {\n                $yysubmatches = $yymatches;\n                $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns\n                if (!count($yymatches)) {\n                    throw new Exception('Error: lexing failed because a rule matched' .\n                        ' an empty string.  Input \"' . substr($this->data,\n                        $this->counter, 5) . '... state LITERAL');\n                }\n                next($yymatches); // skip global match\n                $this->token = key($yymatches); // token number\n                if ($tokenMap[$this->token]) {\n                    // extract sub-patterns for passing to lex function\n                    $yysubmatches = array_slice($yysubmatches, $this->token + 1,\n                        $tokenMap[$this->token]);\n                } else {\n                    $yysubmatches = array();\n                }\n                $this->value = current($yymatches); // token value\n                $r = $this->{'yy_r3_' . $this->token}($yysubmatches);\n                if ($r === null) {\n                    $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));\n                    $this->line += substr_count($this->value, \"\\n\");\n                    // accept this token\n                    return true;\n                } elseif ($r === true) {\n                    // we have changed state\n                    // process this token in the new state\n                    return $this->yylex();\n                } elseif ($r === false) {\n                    $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));\n                    $this->line += substr_count($this->value, \"\\n\");\n                    if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {\n                        return false; // end of input\n                    }\n                    // skip this token\n                    continue;\n                }            } else {\n                throw new Exception('Unexpected input at line' . $this->line .\n                    ': ' . $this->data[$this->counter]);\n            }\n            break;\n        } while (true);\n\n    } // end function\n\n\n    const LITERAL = 3;\n    function yy_r3_1($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_LITERALSTART;\n  $this->yypushstate(self::LITERAL);\n    }\n    function yy_r3_2($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_LITERALEND;\n  $this->yypopstate();\n    }\n    function yy_r3_3($yy_subpatterns)\n    {\n\n  if (in_array($this->value, Array('<?', '<?=', '<?php'))) {\n    $this->token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG;\n   } else {\n    $this->token = Smarty_Internal_Templateparser::TP_FAKEPHPSTARTTAG;\n    $this->value = substr($this->value, 0, 2);\n   }\n    }\n    function yy_r3_4($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG;\n    }\n    function yy_r3_5($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG;\n    }\n    function yy_r3_6($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG;\n    }\n    function yy_r3_7($yy_subpatterns)\n    {\n\n  if ($this->mbstring_overload) {\n    $to = mb_strlen($this->data,'latin1');\n  } else {\n    $to = strlen($this->data);\n  }\n  preg_match(\"/{$this->ldel}\\/?literal{$this->rdel}|<\\?|<%|\\?>|%>/\",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter);\n  if (isset($match[0][1])) {\n    $to = $match[0][1];\n  } else {\n    $this->compiler->trigger_template_error (\"missing or misspelled literal closing tag\");\n  }\n  if ($this->mbstring_overload) {\n    $this->value = mb_substr($this->data,$this->counter,$to-$this->counter,'latin1');\n  } else {\n    $this->value = substr($this->data,$this->counter,$to-$this->counter);\n  }\n  $this->token = Smarty_Internal_Templateparser::TP_LITERAL;\n    }\n\n\n    function yylex4()\n    {\n        $tokenMap = array (\n              1 => 0,\n              2 => 1,\n              4 => 0,\n              5 => 0,\n              6 => 0,\n              7 => 0,\n              8 => 0,\n              9 => 0,\n              10 => 0,\n              11 => 0,\n              12 => 0,\n              13 => 3,\n              17 => 0,\n            );\n        if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {\n            return false; // end of input\n        }\n        $yy_global_pattern = \"/\\G(\".$this->ldel.\"\\\\s{1,}\\/)|\\G(\".$this->ldel.\"\\\\s*(if|elseif|else if|while)\\\\s+)|\\G(\".$this->ldel.\"\\\\s*for\\\\s+)|\\G(\".$this->ldel.\"\\\\s*foreach(?![^\\s]))|\\G(\".$this->ldel.\"\\\\s{1,})|\\G(\".$this->ldel.\"\\/)|\\G(\".$this->ldel.\")|\\G(\\\")|\\G(`\\\\$)|\\G(\\\\$[0-9]*[a-zA-Z_]\\\\w*)|\\G(\\\\$)|\\G(([^\\\"\\\\\\\\]*?)((?:\\\\\\\\.[^\\\"\\\\\\\\]*?)*?)(?=(\".$this->ldel.\"|\\\\$|`\\\\$|\\\")))|\\G([\\S\\s])/iS\";\n\n        do {\n            if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {\n                $yysubmatches = $yymatches;\n                $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns\n                if (!count($yymatches)) {\n                    throw new Exception('Error: lexing failed because a rule matched' .\n                        ' an empty string.  Input \"' . substr($this->data,\n                        $this->counter, 5) . '... state DOUBLEQUOTEDSTRING');\n                }\n                next($yymatches); // skip global match\n                $this->token = key($yymatches); // token number\n                if ($tokenMap[$this->token]) {\n                    // extract sub-patterns for passing to lex function\n                    $yysubmatches = array_slice($yysubmatches, $this->token + 1,\n                        $tokenMap[$this->token]);\n                } else {\n                    $yysubmatches = array();\n                }\n                $this->value = current($yymatches); // token value\n                $r = $this->{'yy_r4_' . $this->token}($yysubmatches);\n                if ($r === null) {\n                    $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));\n                    $this->line += substr_count($this->value, \"\\n\");\n                    // accept this token\n                    return true;\n                } elseif ($r === true) {\n                    // we have changed state\n                    // process this token in the new state\n                    return $this->yylex();\n                } elseif ($r === false) {\n                    $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));\n                    $this->line += substr_count($this->value, \"\\n\");\n                    if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {\n                        return false; // end of input\n                    }\n                    // skip this token\n                    continue;\n                }            } else {\n                throw new Exception('Unexpected input at line' . $this->line .\n                    ': ' . $this->data[$this->counter]);\n            }\n            break;\n        } while (true);\n\n    } // end function\n\n\n    const DOUBLEQUOTEDSTRING = 4;\n    function yy_r4_1($yy_subpatterns)\n    {\n\n  if ($this->smarty->auto_literal) {\n     $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n  } else {\n     $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;\n     $this->yypushstate(self::SMARTY);\n     $this->taglineno = $this->line;\n  }\n    }\n    function yy_r4_2($yy_subpatterns)\n    {\n\n  if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {\n     $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n  } else {\n     $this->token = Smarty_Internal_Templateparser::TP_LDELIF;\n     $this->yypushstate(self::SMARTY);\n     $this->taglineno = $this->line;\n  }\n    }\n    function yy_r4_4($yy_subpatterns)\n    {\n\n  if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {\n     $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n  } else {\n     $this->token = Smarty_Internal_Templateparser::TP_LDELFOR;\n     $this->yypushstate(self::SMARTY);\n     $this->taglineno = $this->line;\n  }\n    }\n    function yy_r4_5($yy_subpatterns)\n    {\n\n  if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {\n     $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n  } else {\n     $this->token = Smarty_Internal_Templateparser::TP_LDELFOREACH;\n     $this->yypushstate(self::SMARTY);\n     $this->taglineno = $this->line;\n  }\n    }\n    function yy_r4_6($yy_subpatterns)\n    {\n\n  if ($this->smarty->auto_literal) {\n     $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n  } else {\n     $this->token = Smarty_Internal_Templateparser::TP_LDEL;\n     $this->yypushstate(self::SMARTY);\n     $this->taglineno = $this->line;\n  }\n    }\n    function yy_r4_7($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;\n     $this->yypushstate(self::SMARTY);\n     $this->taglineno = $this->line;\n    }\n    function yy_r4_8($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_LDEL;\n     $this->yypushstate(self::SMARTY);\n     $this->taglineno = $this->line;\n    }\n    function yy_r4_9($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_QUOTE;\n  $this->yypopstate();\n    }\n    function yy_r4_10($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_BACKTICK;\n  $this->value = substr($this->value,0,-1);\n  $this->yypushstate(self::SMARTY);\n  $this->taglineno = $this->line;\n    }\n    function yy_r4_11($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_DOLLARID;\n    }\n    function yy_r4_12($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n    }\n    function yy_r4_13($yy_subpatterns)\n    {\n\n  $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n    }\n    function yy_r4_17($yy_subpatterns)\n    {\n\n  if ($this->mbstring_overload) {\n    $to = mb_strlen($this->data,'latin1');\n  } else {\n    $to = strlen($this->data);\n  }\n  if ($this->mbstring_overload) {\n    $this->value = mb_substr($this->data,$this->counter,$to-$this->counter,'latin1');\n  } else {\n    $this->value = substr($this->data,$this->counter,$to-$this->counter);\n  }\n  $this->token = Smarty_Internal_Templateparser::TP_TEXT;\n    }\n\n}\n"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_templateparser.php",
    "content": "<?php\n/**\n* Smarty Internal Plugin Templateparser\n*\n* This is the template parser.\n* It is generated from the internal.templateparser.y file\n* @package Smarty\n* @subpackage Compiler\n* @author Uwe Tews\n*/\n\nclass TP_yyToken implements ArrayAccess\n{\n    public $string = '';\n    public $metadata = array();\n\n    function __construct($s, $m = array())\n    {\n        if ($s instanceof TP_yyToken) {\n            $this->string = $s->string;\n            $this->metadata = $s->metadata;\n        } else {\n            $this->string = (string) $s;\n            if ($m instanceof TP_yyToken) {\n                $this->metadata = $m->metadata;\n            } elseif (is_array($m)) {\n                $this->metadata = $m;\n            }\n        }\n    }\n\n    function __toString()\n    {\n        return $this->_string;\n    }\n\n    function offsetExists($offset)\n    {\n        return isset($this->metadata[$offset]);\n    }\n\n    function offsetGet($offset)\n    {\n        return $this->metadata[$offset];\n    }\n\n    function offsetSet($offset, $value)\n    {\n        if ($offset === null) {\n            if (isset($value[0])) {\n                $x = ($value instanceof TP_yyToken) ?\n                    $value->metadata : $value;\n                $this->metadata = array_merge($this->metadata, $x);\n                return;\n            }\n            $offset = count($this->metadata);\n        }\n        if ($value === null) {\n            return;\n        }\n        if ($value instanceof TP_yyToken) {\n            if ($value->metadata) {\n                $this->metadata[$offset] = $value->metadata;\n            }\n        } elseif ($value) {\n            $this->metadata[$offset] = $value;\n        }\n    }\n\n    function offsetUnset($offset)\n    {\n        unset($this->metadata[$offset]);\n    }\n}\n\nclass TP_yyStackEntry\n{\n    public $stateno;       /* The state-number */\n    public $major;         /* The major token value.  This is the code\n                     ** number for the token at this stack level */\n    public $minor; /* The user-supplied minor token value.  This\n                     ** is the value of the token  */\n};\n\n\n#line 12 \"smarty_internal_templateparser.y\"\nclass Smarty_Internal_Templateparser#line 79 \"smarty_internal_templateparser.php\"\n{\n#line 14 \"smarty_internal_templateparser.y\"\n\n    const Err1 = \"Security error: Call to private object member not allowed\";\n    const Err2 = \"Security error: Call to dynamic object member not allowed\";\n    const Err3 = \"PHP in template not allowed. Use SmartyBC to enable it\";\n    // states whether the parse was successful or not\n    public $successful = true;\n    public $retvalue = 0;\n    private $lex;\n    private $internalError = false;\n    private $strip = false;\n\n    function __construct($lex, $compiler) {\n        $this->lex = $lex;\n        $this->compiler = $compiler;\n        $this->smarty = $this->compiler->smarty;\n        $this->template = $this->compiler->template;\n        $this->compiler->has_variable_string = false;\n        $this->compiler->prefix_code = array();\n        $this->prefix_number = 0;\n        $this->block_nesting_level = 0;\n        if ($this->security = isset($this->smarty->security_policy)) {\n            $this->php_handling = $this->smarty->security_policy->php_handling;\n        } else {\n            $this->php_handling = $this->smarty->php_handling;\n        }\n        $this->is_xml = false;\n        $this->asp_tags = (ini_get('asp_tags') != '0');\n        $this->current_buffer = $this->root_buffer = new _smarty_template_buffer($this);\n    }\n\n    public static function escape_start_tag($tag_text) {\n        $tag = preg_replace('/\\A<\\?(.*)\\z/', '<<?php ?>?\\1', $tag_text, -1 , $count); //Escape tag\n        return $tag;\n    }\n\n    public static function escape_end_tag($tag_text) {\n        return '?<?php ?>>';\n    }\n\n    public function compileVariable($variable) {\n        if (strpos($variable,'(') == 0) {\n            // not a variable variable\n            $var = trim($variable,'\\'');\n            $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable($var, null, true, false)->nocache;\n            $this->template->properties['variables'][$var] = $this->compiler->tag_nocache|$this->compiler->nocache;\n        }\n//       return '(isset($_smarty_tpl->tpl_vars['. $variable .'])?$_smarty_tpl->tpl_vars['. $variable .']->value:$_smarty_tpl->getVariable('. $variable .')->value)';\n        return '$_smarty_tpl->tpl_vars['. $variable .']->value';\n    }\n#line 132 \"smarty_internal_templateparser.php\"\n\n    const TP_VERT                           =  1;\n    const TP_COLON                          =  2;\n    const TP_COMMENT                        =  3;\n    const TP_PHPSTARTTAG                    =  4;\n    const TP_PHPENDTAG                      =  5;\n    const TP_ASPSTARTTAG                    =  6;\n    const TP_ASPENDTAG                      =  7;\n    const TP_FAKEPHPSTARTTAG                =  8;\n    const TP_XMLTAG                         =  9;\n    const TP_TEXT                           = 10;\n    const TP_STRIPON                        = 11;\n    const TP_STRIPOFF                       = 12;\n    const TP_LITERALSTART                   = 13;\n    const TP_LITERALEND                     = 14;\n    const TP_LITERAL                        = 15;\n    const TP_LDEL                           = 16;\n    const TP_RDEL                           = 17;\n    const TP_DOLLAR                         = 18;\n    const TP_ID                             = 19;\n    const TP_EQUAL                          = 20;\n    const TP_PTR                            = 21;\n    const TP_LDELIF                         = 22;\n    const TP_LDELFOR                        = 23;\n    const TP_SEMICOLON                      = 24;\n    const TP_INCDEC                         = 25;\n    const TP_TO                             = 26;\n    const TP_STEP                           = 27;\n    const TP_LDELFOREACH                    = 28;\n    const TP_SPACE                          = 29;\n    const TP_AS                             = 30;\n    const TP_APTR                           = 31;\n    const TP_LDELSETFILTER                  = 32;\n    const TP_SMARTYBLOCKCHILD               = 33;\n    const TP_LDELSLASH                      = 34;\n    const TP_ATTR                           = 35;\n    const TP_INTEGER                        = 36;\n    const TP_COMMA                          = 37;\n    const TP_OPENP                          = 38;\n    const TP_CLOSEP                         = 39;\n    const TP_MATH                           = 40;\n    const TP_UNIMATH                        = 41;\n    const TP_ANDSYM                         = 42;\n    const TP_ISIN                           = 43;\n    const TP_ISDIVBY                        = 44;\n    const TP_ISNOTDIVBY                     = 45;\n    const TP_ISEVEN                         = 46;\n    const TP_ISNOTEVEN                      = 47;\n    const TP_ISEVENBY                       = 48;\n    const TP_ISNOTEVENBY                    = 49;\n    const TP_ISODD                          = 50;\n    const TP_ISNOTODD                       = 51;\n    const TP_ISODDBY                        = 52;\n    const TP_ISNOTODDBY                     = 53;\n    const TP_INSTANCEOF                     = 54;\n    const TP_QMARK                          = 55;\n    const TP_NOT                            = 56;\n    const TP_TYPECAST                       = 57;\n    const TP_HEX                            = 58;\n    const TP_DOT                            = 59;\n    const TP_SINGLEQUOTESTRING              = 60;\n    const TP_DOUBLECOLON                    = 61;\n    const TP_AT                             = 62;\n    const TP_HATCH                          = 63;\n    const TP_OPENB                          = 64;\n    const TP_CLOSEB                         = 65;\n    const TP_EQUALS                         = 66;\n    const TP_NOTEQUALS                      = 67;\n    const TP_GREATERTHAN                    = 68;\n    const TP_LESSTHAN                       = 69;\n    const TP_GREATEREQUAL                   = 70;\n    const TP_LESSEQUAL                      = 71;\n    const TP_IDENTITY                       = 72;\n    const TP_NONEIDENTITY                   = 73;\n    const TP_MOD                            = 74;\n    const TP_LAND                           = 75;\n    const TP_LOR                            = 76;\n    const TP_LXOR                           = 77;\n    const TP_QUOTE                          = 78;\n    const TP_BACKTICK                       = 79;\n    const TP_DOLLARID                       = 80;\n    const YY_NO_ACTION = 597;\n    const YY_ACCEPT_ACTION = 596;\n    const YY_ERROR_ACTION = 595;\n\n    const YY_SZ_ACTTAB = 2383;\nstatic public $yy_action = array(\n /*     0 */   225,  275,  263,  276,  259,  257,  260,  390,  356,  359,\n /*    10 */   353,  193,   18,  127,   42,  317,  381,  351,  196,  350,\n /*    20 */     6,  108,   24,   98,  128,  190,  134,  318,   41,   41,\n /*    30 */   249,  329,  231,   18,   43,   43,  317,   26,  298,   50,\n /*    40 */    47,   48,   44,   10,   13,  305,  306,   12,   11,  340,\n /*    50 */   341,   40,   20,  387,  308,  307,  309,  374,  254,  248,\n /*    60 */   252,  217,  193,  385,  291,  375,  376,  377,  373,  372,\n /*    70 */   368,  367,  369,  370,  371,  378,  379,  225,  312,  255,\n /*    80 */   225,  225,  118,    2,  207,   76,  135,  596,   95,  281,\n /*    90 */   271,  264,    2,  366,  315,  386,  461,  383,  232,  294,\n /*   100 */   303,  388,  313,  389,  227,   41,  144,  225,  461,  245,\n /*   110 */   282,   43,  218,  358,  461,  144,   50,   47,   48,   44,\n /*   120 */    10,   13,  305,  306,   12,   11,  340,  341,   40,   20,\n /*   130 */   105,  177,  522,   46,   46,   41,   19,  522,  143,  297,\n /*   140 */   325,   43,  375,  376,  377,  373,  372,  368,  367,  369,\n /*   150 */   370,  371,  378,  379,  225,  312,  293,  206,  225,  141,\n /*   160 */   124,  225,   54,  119,  123,  225,  459,   38,  173,  246,\n /*   170 */   319,  315,  386,  347,  455,  232,  294,  303,  459,  313,\n /*   180 */   139,  321,   41,   31,  459,   41,   41,    2,   43,  188,\n /*   190 */     2,   43,   43,   50,   47,   48,   44,   10,   13,  305,\n /*   200 */   306,   12,   11,  340,  341,   40,   20,  225,  136,  301,\n /*   210 */   144,  194,  350,  144,   46,  202,  206,  328,  198,  375,\n /*   220 */   376,  377,  373,  372,  368,  367,  369,  370,  371,  378,\n /*   230 */   379,   21,    9,   28,  185,   41,  318,  225,  265,  271,\n /*   240 */   264,   43,  206,   27,  173,  206,   50,   47,   48,   44,\n /*   250 */    10,   13,  305,  306,   12,   11,  340,  341,   40,   20,\n /*   260 */   225,  178,   18,  212,  330,  317,   17,   32,    8,   14,\n /*   270 */   325,  267,  375,  376,  377,  373,  372,  368,  367,  369,\n /*   280 */   370,  371,  378,  379,  136,  363,  363,  207,   41,    4,\n /*   290 */    46,    5,  131,  233,   43,   25,  186,  289,  318,   50,\n /*   300 */    47,   48,   44,   10,   13,  305,  306,   12,   11,  340,\n /*   310 */   341,   40,   20,  225,  100,  161,   18,  355,  361,  317,\n /*   320 */    26,  109,  360,  346,  325,  375,  376,  377,  373,  372,\n /*   330 */   368,  367,  369,  370,  371,  378,  379,  106,  201,  172,\n /*   340 */    25,  206,  288,   25,   18,  261,  181,  317,  325,   45,\n /*   350 */   339,  129,   50,   47,   48,   44,   10,   13,  305,  306,\n /*   360 */    12,   11,  340,  341,   40,   20,  225,  104,  162,   18,\n /*   370 */    16,  205,  317,  206,  248,  238,   43,  325,  375,  376,\n /*   380 */   377,  373,  372,  368,  367,  369,  370,  371,  378,  379,\n /*   390 */   255,  354,  243,  229,  206,  342,   18,  239,  242,  241,\n /*   400 */   248,  266,  300,  330,  240,   50,   47,   48,   44,   10,\n /*   410 */    13,  305,  306,   12,   11,  340,  341,   40,   20,  225,\n /*   420 */   165,  176,  184,   18,   18,   18,  253,  215,  251,  325,\n /*   430 */   325,  375,  376,  377,  373,  372,  368,  367,  369,  370,\n /*   440 */   371,  378,  379,  304,  268,  159,  207,  207,  247,  206,\n /*   450 */   148,   41,  195,  350,  325,   27,   33,   43,   50,   47,\n /*   460 */    48,   44,   10,   13,  305,  306,   12,   11,  340,  341,\n /*   470 */    40,   20,  163,  225,  328,  199,  133,   29,  187,   23,\n /*   480 */   250,  325,  101,  225,  375,  376,  377,  373,  372,  368,\n /*   490 */   367,  369,  370,  371,  378,  379,  225,  298,  207,  334,\n /*   500 */   225,   45,  312,  103,  299,  192,  154,  364,   18,  302,\n /*   510 */   135,  317,  285,   35,  173,  203,  320,    3,  236,    6,\n /*   520 */   108,   41,  232,  294,  303,  134,  313,   43,  130,  249,\n /*   530 */   329,  231,  250,  225,  280,   50,   47,   48,   44,   10,\n /*   540 */    13,  305,  306,   12,   11,  340,  341,   40,   20,  336,\n /*   550 */    36,  166,  212,  230,  332,  228,  338,    8,  132,  330,\n /*   560 */   325,  375,  376,  377,  373,  372,  368,  367,  369,  370,\n /*   570 */   371,  378,  379,  225,  312,  345,   37,  362,  141,  312,\n /*   580 */    94,   77,  135,  156,  236,  182,  173,  135,  122,  204,\n /*   590 */   315,  386,  365,  225,  232,  294,  303,  137,  313,  232,\n /*   600 */   294,  303,  125,  313,   41,  222,  333,  180,  277,  337,\n /*   610 */    43,  225,   50,   47,   48,   44,   10,   13,  305,  306,\n /*   620 */    12,   11,  340,  341,   40,   20,  136,  335,  316,    5,\n /*   630 */    22,  197,  269,   34,  173,  148,  126,  116,  375,  376,\n /*   640 */   377,  373,  372,  368,  367,  369,  370,  371,  378,  379,\n /*   650 */   225,  312,  298,  225,  292,  141,  312,  258,   77,  135,\n /*   660 */   153,  183,  318,  301,  135,  175,  284,  315,  386,  461,\n /*   670 */   117,  232,  294,  303,  325,  313,  232,  294,  303,  382,\n /*   680 */   313,  461,  220,  110,  329,  298,  318,  461,  329,   50,\n /*   690 */    47,   48,   44,   10,   13,  305,  306,   12,   11,  340,\n /*   700 */   341,   40,   20,  225,   30,  191,   46,  189,  314,  107,\n /*   710 */   329,  329,  146,   97,  102,  375,  376,  377,  373,  372,\n /*   720 */   368,  367,  369,  370,  371,  378,  379,  298,  298,  298,\n /*   730 */   329,  329,  329,  329,  329,  329,  329,  329,  329,  329,\n /*   740 */   329,  329,   50,   47,   48,   44,   10,   13,  305,  306,\n /*   750 */    12,   11,  340,  341,   40,   20,  225,  329,  329,  329,\n /*   760 */   329,  329,  329,  329,  329,  114,  160,  115,  375,  376,\n /*   770 */   377,  373,  372,  368,  367,  369,  370,  371,  378,  379,\n /*   780 */   298,  298,  298,  329,  329,  329,  329,  329,  329,  329,\n /*   790 */   329,  329,  329,  329,  283,   50,   47,   48,   44,   10,\n /*   800 */    13,  305,  306,   12,   11,  340,  341,   40,   20,  329,\n /*   810 */   225,  329,  329,  329,  329,  329,  329,  329,  329,  329,\n /*   820 */   329,  375,  376,  377,  373,  372,  368,  367,  369,  370,\n /*   830 */   371,  378,  379,  200,  329,  329,  329,  329,  329,  329,\n /*   840 */   329,  329,  329,  329,  329,  329,  329,  329,  329,   50,\n /*   850 */    47,   48,   44,   10,   13,  305,  306,   12,   11,  340,\n /*   860 */   341,   40,   20,  225,  329,  329,  329,  329,  329,  329,\n /*   870 */   329,  329,  329,  329,  329,  375,  376,  377,  373,  372,\n /*   880 */   368,  367,  369,  370,  371,  378,  379,  329,  329,  329,\n /*   890 */   329,  329,  329,  329,  329,  329,  329,  329,  329,  329,\n /*   900 */   329,  329,   50,   47,   48,   44,   10,   13,  305,  306,\n /*   910 */    12,   11,  340,  341,   40,   20,  329,  329,  329,  329,\n /*   920 */   329,  329,  329,  329,  329,  329,  329,  290,  375,  376,\n /*   930 */   377,  373,  372,  368,  367,  369,  370,  371,  378,  379,\n /*   940 */   225,  312,  329,  225,  329,  141,  312,  329,   77,  135,\n /*   950 */   152,  329,  329,  329,  135,  158,  208,  315,  386,  458,\n /*   960 */   329,  232,  294,  303,  325,  313,  232,  294,  303,  329,\n /*   970 */   313,  458,  223,  329,  329,  329,  318,  458,  329,   50,\n /*   980 */    47,   48,   44,   10,   13,  305,  306,   12,   11,  340,\n /*   990 */   341,   40,   20,  225,  329,  329,   46,  329,  329,  329,\n /*  1000 */   329,  329,  329,  329,  329,  375,  376,  377,  373,  372,\n /*  1010 */   368,  367,  369,  370,  371,  378,  379,  329,  329,  329,\n /*  1020 */   329,  329,  329,  329,  329,  329,  329,  329,  329,  329,\n /*  1030 */   329,  329,   50,   47,   48,   44,   10,   13,  305,  306,\n /*  1040 */    12,   11,  340,  341,   40,   20,  329,  329,  329,  329,\n /*  1050 */   329,  329,  329,  329,  329,  329,  329,  329,  375,  376,\n /*  1060 */   377,  373,  372,  368,  367,  369,  370,  371,  378,  379,\n /*  1070 */   329,  329,  329,   50,   47,   48,   44,   10,   13,  305,\n /*  1080 */   306,   12,   11,  340,  341,   40,   20,  329,  329,  329,\n /*  1090 */   329,  329,  329,  329,  329,  329,  329,  329,  329,  375,\n /*  1100 */   376,  377,  373,  372,  368,  367,  369,  370,  371,  378,\n /*  1110 */   379,  329,  329,  329,  329,  329,   42,  329,  145,  211,\n /*  1120 */   329,  329,    6,  108,  329,  279,  329,  312,  134,  329,\n /*  1130 */   329,  150,  249,  329,  231,  135,  235,   41,   39,  329,\n /*  1140 */   329,   52,  329,   43,  311,  329,  312,  232,  294,  303,\n /*  1150 */   147,  313,  329,  170,  135,  329,   51,   49,  331,  237,\n /*  1160 */   296,  329,  325,  106,    1,  278,  232,  294,  303,  329,\n /*  1170 */   313,  155,  329,   42,  318,  145,  216,  329,   96,    6,\n /*  1180 */   108,   18,  329,  226,  317,  134,  329,  313,  329,  249,\n /*  1190 */   329,  231,  329,  235,   41,   39,  256,  329,   52,  329,\n /*  1200 */    43,  329,  312,  329,  329,  329,  141,  329,  329,   66,\n /*  1210 */   119,  238,  329,   51,   49,  331,  237,  296,  315,  386,\n /*  1220 */   106,    1,  232,  294,  303,  329,  313,  270,  329,  329,\n /*  1230 */    42,  329,  140,   92,  329,   96,    6,  108,   18,   41,\n /*  1240 */   169,  317,  134,  329,  273,   43,  249,  329,  231,  325,\n /*  1250 */   235,   41,   39,  244,  329,   52,   41,   43,  329,  312,\n /*  1260 */   329,  318,   43,  141,  329,  329,   67,  135,  225,  329,\n /*  1270 */    51,   49,  331,  237,  296,  315,  386,  106,    1,  224,\n /*  1280 */   294,  303,  329,  313,  310,  329,  329,   42,  329,  145,\n /*  1290 */   213,  329,   96,    6,  108,  329,   41,  329,  329,  134,\n /*  1300 */   329,  323,   43,  249,  329,  231,  329,  235,  329,   39,\n /*  1310 */   329,  329,   52,   41,  329,  329,  312,  329,  329,   43,\n /*  1320 */   141,   46,  329,   86,  135,  329,  329,   51,   49,  331,\n /*  1330 */   237,  296,  315,  386,  106,    1,  232,  294,  303,  329,\n /*  1340 */   313,  274,  329,  329,   42,  329,  142,  216,  329,   96,\n /*  1350 */     6,  108,  329,   41,  329,  329,  134,  329,  348,   43,\n /*  1360 */   249,  329,  231,  329,  235,  329,    7,  329,  329,   52,\n /*  1370 */    41,  329,  329,  312,  329,  329,   43,  141,  329,  329,\n /*  1380 */    90,  135,  329,  329,   51,   49,  331,  237,  296,  315,\n /*  1390 */   386,  106,    1,  232,  294,  303,  329,  313,  295,  329,\n /*  1400 */   329,   42,  329,  138,  216,  329,   96,    6,  108,  329,\n /*  1410 */    41,  329,  329,  134,  329,  322,   43,  249,  329,  231,\n /*  1420 */   329,  235,  329,   39,  329,  329,   52,   41,  329,  329,\n /*  1430 */   312,  329,  329,   43,  141,  329,  329,   87,  135,  329,\n /*  1440 */   329,   51,   49,  331,  237,  296,  315,  386,  106,    1,\n /*  1450 */   232,  294,  303,  329,  313,  384,  329,  329,   42,  329,\n /*  1460 */   131,  216,  329,   96,    6,  108,  329,   41,  329,  329,\n /*  1470 */   134,  329,  380,   43,  249,  329,  231,  329,  235,  329,\n /*  1480 */    15,  329,  329,   52,   41,  329,  329,  312,  329,  329,\n /*  1490 */    43,  141,  329,  329,   79,  135,  329,  329,   51,   49,\n /*  1500 */   331,  237,  296,  315,  386,  106,    1,  232,  294,  303,\n /*  1510 */   329,  313,  272,  329,  329,   42,  329,  145,  210,  329,\n /*  1520 */    96,    6,  108,  329,   41,  329,  329,  134,  329,  349,\n /*  1530 */    43,  249,  329,  231,  329,  221,  329,   39,  329,  329,\n /*  1540 */    52,   41,  329,  329,  312,  329,  329,   43,  141,  329,\n /*  1550 */   329,   70,  135,  329,  329,   51,   49,  331,  237,  296,\n /*  1560 */   315,  386,  106,    1,  232,  294,  303,  329,  313,  324,\n /*  1570 */   329,  329,   42,  329,  145,  209,  329,   96,    6,  108,\n /*  1580 */   329,   41,  329,  329,  134,  329,  326,   43,  249,  329,\n /*  1590 */   231,  329,  235,  329,   39,  329,  329,   52,   41,  329,\n /*  1600 */   329,  312,  329,  329,   43,  141,  329,  329,   74,  135,\n /*  1610 */   329,  329,   51,   49,  331,  237,  296,  315,  386,  106,\n /*  1620 */     1,  232,  294,  303,  329,  313,  262,  329,  329,   42,\n /*  1630 */   329,  131,  214,  329,   96,    6,  108,  329,   41,  329,\n /*  1640 */   329,  134,  329,  327,   43,  249,  329,  231,  329,  235,\n /*  1650 */   329,   15,  329,  329,   52,   41,  329,  329,  312,  329,\n /*  1660 */   329,   43,  141,  329,  329,   53,  135,  329,  329,   51,\n /*  1670 */    49,  331,  237,  296,  315,  386,  106,  329,  232,  294,\n /*  1680 */   303,  329,  313,  286,  329,  329,   42,  329,  131,  216,\n /*  1690 */   329,   96,    6,  108,  329,   41,  329,  329,  134,  329,\n /*  1700 */   343,   43,  249,  329,  231,  329,  235,  329,   15,  329,\n /*  1710 */   329,   52,   41,  329,  329,  312,  329,  329,   43,  118,\n /*  1720 */   329,  329,   76,  135,  329,  329,   51,   49,  331,  237,\n /*  1730 */   296,  315,  386,  106,  329,  232,  294,  303,  329,  313,\n /*  1740 */   329,  329,  329,  329,  504,  329,  329,  329,   96,  329,\n /*  1750 */   357,  504,  329,  504,  504,  364,  504,  504,  329,  329,\n /*  1760 */   329,   35,  504,  329,  504,    2,  504,    6,  108,  329,\n /*  1770 */   198,  174,  329,  134,  329,  329,  329,  249,  329,  231,\n /*  1780 */   325,  504,  329,   21,    9,  329,  329,  329,  144,  329,\n /*  1790 */   329,  329,  504,  329,  312,   99,  179,  206,  141,  329,\n /*  1800 */   329,   58,  135,  329,  329,  325,  504,  329,   21,    9,\n /*  1810 */   315,  386,  329,  312,  232,  294,  303,  141,  313,  329,\n /*  1820 */    71,  135,  206,  344,   37,  362,  329,  329,  329,  315,\n /*  1830 */   386,  329,  329,  232,  294,  303,  312,  313,  329,  329,\n /*  1840 */   141,  329,  329,   72,  135,  329,  329,  312,  329,  329,\n /*  1850 */   329,  141,  315,  386,   65,  135,  232,  294,  303,  329,\n /*  1860 */   313,  329,  329,  315,  386,  329,  329,  232,  294,  303,\n /*  1870 */   329,  313,  329,  329,  312,  198,  167,  329,  141,  329,\n /*  1880 */   329,   69,  135,  329,  329,  325,  329,  329,   21,    9,\n /*  1890 */   315,  386,  329,  329,  232,  294,  303,  312,  313,  329,\n /*  1900 */   329,  141,  206,  329,   85,  135,  329,  312,  329,  329,\n /*  1910 */   329,  149,  329,  315,  386,  135,  312,  232,  294,  303,\n /*  1920 */   141,  313,  329,   81,  135,  329,  329,  232,  294,  303,\n /*  1930 */   329,  313,  315,  386,  329,  329,  232,  294,  303,  312,\n /*  1940 */   313,  329,  329,  141,  329,  329,   82,  135,  329,  329,\n /*  1950 */   312,  329,  329,  329,  141,  315,  386,   63,  135,  232,\n /*  1960 */   294,  303,  329,  313,  329,  329,  315,  386,  329,  329,\n /*  1970 */   232,  294,  303,  329,  313,  329,  312,  329,  329,  329,\n /*  1980 */   141,  329,  329,   73,  135,  329,  329,  312,  329,  329,\n /*  1990 */   329,  141,  315,  386,   83,  135,  232,  294,  303,  329,\n /*  2000 */   313,  329,  329,  315,  386,  329,  312,  232,  294,  303,\n /*  2010 */   141,  313,  329,   89,  135,  329,  329,  329,  329,  329,\n /*  2020 */   329,  329,  315,  386,  329,  312,  232,  294,  303,  111,\n /*  2030 */   313,  329,   68,  135,  329,  329,  312,  329,  329,  329,\n /*  2040 */   141,  315,  386,   62,  135,  232,  294,  303,  329,  313,\n /*  2050 */   329,  329,  315,  386,  329,  329,  232,  294,  303,  329,\n /*  2060 */   313,  329,  312,  329,  329,  329,  141,  329,  329,   61,\n /*  2070 */   135,  329,  329,  312,  329,  329,  329,  141,  315,  386,\n /*  2080 */    91,  135,  232,  294,  303,  329,  313,  329,  329,  315,\n /*  2090 */   386,  329,  312,  232,  294,  303,  141,  313,  329,   78,\n /*  2100 */   135,  329,  329,  329,  329,  329,  329,  329,  315,  386,\n /*  2110 */   329,  312,  232,  294,  303,  141,  313,  329,   66,  135,\n /*  2120 */   329,  329,  312,  329,  329,  329,  141,  315,  386,   80,\n /*  2130 */   135,  232,  294,  303,  329,  313,  329,  329,  315,  386,\n /*  2140 */   329,  329,  232,  294,  303,  329,  313,  329,  312,  329,\n /*  2150 */   329,  329,  113,  329,  329,   88,  135,  329,  329,  312,\n /*  2160 */   329,  329,  329,  112,  315,  386,   84,  135,  232,  294,\n /*  2170 */   303,  329,  313,  329,  329,  315,  386,  329,  312,  232,\n /*  2180 */   294,  303,  141,  313,  329,   57,  135,  329,  329,  329,\n /*  2190 */   329,  329,  329,  329,  315,  386,  329,  312,  232,  294,\n /*  2200 */   303,   93,  313,  329,   59,  121,  329,  329,  312,  329,\n /*  2210 */   329,  329,  141,  315,  386,   75,  135,  232,  294,  303,\n /*  2220 */   329,  313,  329,  329,  315,  386,  329,  329,  232,  294,\n /*  2230 */   303,  329,  313,  329,  312,  329,  329,  329,  141,  329,\n /*  2240 */   329,   60,  135,  329,  329,  312,  329,  329,  329,  141,\n /*  2250 */   315,  386,   64,  135,  232,  294,  303,  329,  313,  329,\n /*  2260 */   329,  315,  386,  329,  312,  232,  294,  303,  120,  313,\n /*  2270 */   329,   55,  135,  329,  329,  329,  329,  329,  329,  329,\n /*  2280 */   315,  386,  329,  312,  232,  294,  303,   93,  313,  329,\n /*  2290 */    56,  121,  225,  329,  312,  329,  198,  164,  157,  315,\n /*  2300 */   386,  329,  135,  219,  294,  303,  325,  313,  352,   21,\n /*  2310 */     9,  287,  234,  329,  232,  294,  303,  329,  313,  329,\n /*  2320 */    41,  329,  329,  206,  312,  329,   43,  329,  151,    2,\n /*  2330 */   329,  329,  135,  329,  329,  329,  329,  329,  329,  329,\n /*  2340 */   198,  168,  329,  329,  232,  294,  303,  329,  313,  329,\n /*  2350 */   325,  329,  144,   21,    9,  198,  171,  329,  329,  329,\n /*  2360 */   329,  329,  329,  329,  329,  325,  329,  206,   21,    9,\n /*  2370 */   329,  329,  329,  329,  329,  329,  329,  329,  329,  329,\n /*  2380 */   329,  329,  206,\n    );\n    static public $yy_lookahead = array(\n /*     0 */     1,    3,    4,    5,    6,    7,    8,    9,   10,   11,\n /*    10 */    12,   13,   16,   98,   16,   19,   17,   17,  113,  114,\n /*    20 */    22,   23,   16,   97,   18,   19,   28,  112,   29,   29,\n /*    30 */    32,   33,   34,   16,   35,   35,   19,   20,  112,   40,\n /*    40 */    41,   42,   43,   44,   45,   46,   47,   48,   49,   50,\n /*    50 */    51,   52,   53,    4,    5,    6,    7,    8,   62,   93,\n /*    60 */    94,   95,   13,   14,   15,   66,   67,   68,   69,   70,\n /*    70 */    71,   72,   73,   74,   75,   76,   77,    1,   85,   62,\n /*    80 */     1,    1,   89,   38,  117,   92,   93,   82,   83,   84,\n /*    90 */    85,   86,   38,   17,  101,  102,   17,   17,  105,  106,\n /*   100 */   107,   86,  109,   88,   59,   29,   61,    1,   29,   30,\n /*   110 */    65,   35,  119,  120,   35,   61,   40,   41,   42,   43,\n /*   120 */    44,   45,   46,   47,   48,   49,   50,   51,   52,   53,\n /*   130 */    90,   91,   59,   54,   54,   29,   16,   64,   18,   19,\n /*   140 */   100,   35,   66,   67,   68,   69,   70,   71,   72,   73,\n /*   150 */    74,   75,   76,   77,    1,   85,   36,  117,    1,   89,\n /*   160 */    18,    1,   92,   93,   94,    1,   17,   20,   21,   20,\n /*   170 */    17,  101,  102,   17,   17,  105,  106,  107,   29,  109,\n /*   180 */    38,   17,   29,   31,   35,   29,   29,   38,   35,   90,\n /*   190 */    38,   35,   35,   40,   41,   42,   43,   44,   45,   46,\n /*   200 */    47,   48,   49,   50,   51,   52,   53,    1,   61,  111,\n /*   210 */    61,  113,  114,   61,   54,   90,  117,  118,   90,   66,\n /*   220 */    67,   68,   69,   70,   71,   72,   73,   74,   75,   76,\n /*   230 */    77,  103,  104,   27,  110,   29,  112,    1,   84,   85,\n /*   240 */    86,   35,  117,   20,   21,  117,   40,   41,   42,   43,\n /*   250 */    44,   45,   46,   47,   48,   49,   50,   51,   52,   53,\n /*   260 */     1,   91,   16,   59,   25,   19,   20,   31,   64,   16,\n /*   270 */   100,   25,   66,   67,   68,   69,   70,   71,   72,   73,\n /*   280 */    74,   75,   76,   77,   61,   85,   85,  117,   29,   37,\n /*   290 */    54,   38,   18,   19,   35,   37,  110,   39,  112,   40,\n /*   300 */    41,   42,   43,   44,   45,   46,   47,   48,   49,   50,\n /*   310 */    51,   52,   53,    1,   90,   91,   16,   65,   79,   19,\n /*   320 */    20,  121,  122,  122,  100,   66,   67,   68,   69,   70,\n /*   330 */    71,   72,   73,   74,   75,   76,   77,   63,   24,   91,\n /*   340 */    37,  117,   39,   37,   16,   39,   90,   19,  100,    2,\n /*   350 */    19,   37,   40,   41,   42,   43,   44,   45,   46,   47,\n /*   360 */    48,   49,   50,   51,   52,   53,    1,   90,   91,   16,\n /*   370 */    29,   19,   19,  117,   93,   94,   35,  100,   66,   67,\n /*   380 */    68,   69,   70,   71,   72,   73,   74,   75,   76,   77,\n /*   390 */    62,   79,   96,   62,  117,   17,   16,   18,   19,   19,\n /*   400 */    93,   94,   19,   25,   39,   40,   41,   42,   43,   44,\n /*   410 */    45,   46,   47,   48,   49,   50,   51,   52,   53,    1,\n /*   420 */    91,   91,   90,   16,   16,   16,   19,   19,   19,  100,\n /*   430 */   100,   66,   67,   68,   69,   70,   71,   72,   73,   74,\n /*   440 */    75,   76,   77,  108,   29,   91,  117,  117,   30,  117,\n /*   450 */   115,   29,  113,  114,  100,   20,   96,   35,   40,   41,\n /*   460 */    42,   43,   44,   45,   46,   47,   48,   49,   50,   51,\n /*   470 */    52,   53,   91,    1,  118,   99,   18,   26,  110,   20,\n /*   480 */     2,  100,   97,    1,   66,   67,   68,   69,   70,   71,\n /*   490 */    72,   73,   74,   75,   76,   77,    1,  112,  117,   17,\n /*   500 */     1,    2,   85,   99,   19,  110,   89,   10,   16,   19,\n /*   510 */    93,   19,   17,   16,   21,   99,   17,   38,   59,   22,\n /*   520 */    23,   29,  105,  106,  107,   28,  109,   35,   18,   32,\n /*   530 */    33,   34,    2,    1,   65,   40,   41,   42,   43,   44,\n /*   540 */    45,   46,   47,   48,   49,   50,   51,   52,   53,   17,\n /*   550 */    20,   91,   59,   21,   36,   19,   19,   64,   19,   25,\n /*   560 */   100,   66,   67,   68,   69,   70,   71,   72,   73,   74,\n /*   570 */    75,   76,   77,    1,   85,   78,   79,   80,   89,   85,\n /*   580 */    19,   92,   93,   89,   59,   63,   21,   93,   19,   17,\n /*   590 */   101,  102,   17,    1,  105,  106,  107,   18,  109,  105,\n /*   600 */   106,  107,   18,  109,   29,  116,   36,   63,   19,   17,\n /*   610 */    35,    1,   40,   41,   42,   43,   44,   45,   46,   47,\n /*   620 */    48,   49,   50,   51,   52,   53,   61,   17,  108,   38,\n /*   630 */     2,   19,   39,   55,   21,  115,   18,   97,   66,   67,\n /*   640 */    68,   69,   70,   71,   72,   73,   74,   75,   76,   77,\n /*   650 */     1,   85,  112,    1,  100,   89,   85,  115,   92,   93,\n /*   660 */    89,  110,  112,  111,   93,   91,   17,  101,  102,   17,\n /*   670 */    97,  105,  106,  107,  100,  109,  105,  106,  107,   14,\n /*   680 */   109,   29,  116,   87,  123,  112,  112,   35,  123,   40,\n /*   690 */    41,   42,   43,   44,   45,   46,   47,   48,   49,   50,\n /*   700 */    51,   52,   53,    1,    2,  110,   54,  110,  114,  110,\n /*   710 */   123,  123,   97,   97,   97,   66,   67,   68,   69,   70,\n /*   720 */    71,   72,   73,   74,   75,   76,   77,  112,  112,  112,\n /*   730 */   123,  123,  123,  123,  123,  123,  123,  123,  123,  123,\n /*   740 */   123,  123,   40,   41,   42,   43,   44,   45,   46,   47,\n /*   750 */    48,   49,   50,   51,   52,   53,    1,  123,  123,  123,\n /*   760 */   123,  123,  123,  123,  123,   97,   97,   97,   66,   67,\n /*   770 */    68,   69,   70,   71,   72,   73,   74,   75,   76,   77,\n /*   780 */   112,  112,  112,  123,  123,  123,  123,  123,  123,  123,\n /*   790 */   123,  123,  123,  123,   39,   40,   41,   42,   43,   44,\n /*   800 */    45,   46,   47,   48,   49,   50,   51,   52,   53,  123,\n /*   810 */     1,  123,  123,  123,  123,  123,  123,  123,  123,  123,\n /*   820 */   123,   66,   67,   68,   69,   70,   71,   72,   73,   74,\n /*   830 */    75,   76,   77,   24,  123,  123,  123,  123,  123,  123,\n /*   840 */   123,  123,  123,  123,  123,  123,  123,  123,  123,   40,\n /*   850 */    41,   42,   43,   44,   45,   46,   47,   48,   49,   50,\n /*   860 */    51,   52,   53,    1,  123,  123,  123,  123,  123,  123,\n /*   870 */   123,  123,  123,  123,  123,   66,   67,   68,   69,   70,\n /*   880 */    71,   72,   73,   74,   75,   76,   77,  123,  123,  123,\n /*   890 */   123,  123,  123,  123,  123,  123,  123,  123,  123,  123,\n /*   900 */   123,  123,   40,   41,   42,   43,   44,   45,   46,   47,\n /*   910 */    48,   49,   50,   51,   52,   53,  123,  123,  123,  123,\n /*   920 */   123,  123,  123,  123,  123,  123,  123,   65,   66,   67,\n /*   930 */    68,   69,   70,   71,   72,   73,   74,   75,   76,   77,\n /*   940 */     1,   85,  123,    1,  123,   89,   85,  123,   92,   93,\n /*   950 */    89,  123,  123,  123,   93,   91,   17,  101,  102,   17,\n /*   960 */   123,  105,  106,  107,  100,  109,  105,  106,  107,  123,\n /*   970 */   109,   29,  116,  123,  123,  123,  112,   35,  123,   40,\n /*   980 */    41,   42,   43,   44,   45,   46,   47,   48,   49,   50,\n /*   990 */    51,   52,   53,    1,  123,  123,   54,  123,  123,  123,\n /*  1000 */   123,  123,  123,  123,  123,   66,   67,   68,   69,   70,\n /*  1010 */    71,   72,   73,   74,   75,   76,   77,  123,  123,  123,\n /*  1020 */   123,  123,  123,  123,  123,  123,  123,  123,  123,  123,\n /*  1030 */   123,  123,   40,   41,   42,   43,   44,   45,   46,   47,\n /*  1040 */    48,   49,   50,   51,   52,   53,  123,  123,  123,  123,\n /*  1050 */   123,  123,  123,  123,  123,  123,  123,  123,   66,   67,\n /*  1060 */    68,   69,   70,   71,   72,   73,   74,   75,   76,   77,\n /*  1070 */   123,  123,  123,   40,   41,   42,   43,   44,   45,   46,\n /*  1080 */    47,   48,   49,   50,   51,   52,   53,  123,  123,  123,\n /*  1090 */   123,  123,  123,  123,  123,  123,  123,  123,  123,   66,\n /*  1100 */    67,   68,   69,   70,   71,   72,   73,   74,   75,   76,\n /*  1110 */    77,  123,  123,  123,  123,  123,   16,  123,   18,   19,\n /*  1120 */   123,  123,   22,   23,  123,   17,  123,   85,   28,  123,\n /*  1130 */   123,   89,   32,   33,   34,   93,   36,   29,   38,  123,\n /*  1140 */   123,   41,  123,   35,  102,  123,   85,  105,  106,  107,\n /*  1150 */    89,  109,  123,   91,   93,  123,   56,   57,   58,   59,\n /*  1160 */    60,  123,  100,   63,   64,   65,  105,  106,  107,  123,\n /*  1170 */   109,   93,  123,   16,  112,   18,   19,  123,   78,   22,\n /*  1180 */    23,   16,  123,  105,   19,   28,  123,  109,  123,   32,\n /*  1190 */    33,   34,  123,   36,   29,   38,   31,  123,   41,  123,\n /*  1200 */    35,  123,   85,  123,  123,  123,   89,  123,  123,   92,\n /*  1210 */    93,   94,  123,   56,   57,   58,   59,   60,  101,  102,\n /*  1220 */    63,   64,  105,  106,  107,  123,  109,   17,  123,  123,\n /*  1230 */    16,  123,   18,   19,  123,   78,   22,   23,   16,   29,\n /*  1240 */    91,   19,   28,  123,   17,   35,   32,   33,   34,  100,\n /*  1250 */    36,   29,   38,   31,  123,   41,   29,   35,  123,   85,\n /*  1260 */   123,  112,   35,   89,  123,  123,   92,   93,    1,  123,\n /*  1270 */    56,   57,   58,   59,   60,  101,  102,   63,   64,  105,\n /*  1280 */   106,  107,  123,  109,   17,  123,  123,   16,  123,   18,\n /*  1290 */    19,  123,   78,   22,   23,  123,   29,  123,  123,   28,\n /*  1300 */   123,   17,   35,   32,   33,   34,  123,   36,  123,   38,\n /*  1310 */   123,  123,   41,   29,  123,  123,   85,  123,  123,   35,\n /*  1320 */    89,   54,  123,   92,   93,  123,  123,   56,   57,   58,\n /*  1330 */    59,   60,  101,  102,   63,   64,  105,  106,  107,  123,\n /*  1340 */   109,   17,  123,  123,   16,  123,   18,   19,  123,   78,\n /*  1350 */    22,   23,  123,   29,  123,  123,   28,  123,   17,   35,\n /*  1360 */    32,   33,   34,  123,   36,  123,   38,  123,  123,   41,\n /*  1370 */    29,  123,  123,   85,  123,  123,   35,   89,  123,  123,\n /*  1380 */    92,   93,  123,  123,   56,   57,   58,   59,   60,  101,\n /*  1390 */   102,   63,   64,  105,  106,  107,  123,  109,   17,  123,\n /*  1400 */   123,   16,  123,   18,   19,  123,   78,   22,   23,  123,\n /*  1410 */    29,  123,  123,   28,  123,   17,   35,   32,   33,   34,\n /*  1420 */   123,   36,  123,   38,  123,  123,   41,   29,  123,  123,\n /*  1430 */    85,  123,  123,   35,   89,  123,  123,   92,   93,  123,\n /*  1440 */   123,   56,   57,   58,   59,   60,  101,  102,   63,   64,\n /*  1450 */   105,  106,  107,  123,  109,   17,  123,  123,   16,  123,\n /*  1460 */    18,   19,  123,   78,   22,   23,  123,   29,  123,  123,\n /*  1470 */    28,  123,   17,   35,   32,   33,   34,  123,   36,  123,\n /*  1480 */    38,  123,  123,   41,   29,  123,  123,   85,  123,  123,\n /*  1490 */    35,   89,  123,  123,   92,   93,  123,  123,   56,   57,\n /*  1500 */    58,   59,   60,  101,  102,   63,   64,  105,  106,  107,\n /*  1510 */   123,  109,   17,  123,  123,   16,  123,   18,   19,  123,\n /*  1520 */    78,   22,   23,  123,   29,  123,  123,   28,  123,   17,\n /*  1530 */    35,   32,   33,   34,  123,   36,  123,   38,  123,  123,\n /*  1540 */    41,   29,  123,  123,   85,  123,  123,   35,   89,  123,\n /*  1550 */   123,   92,   93,  123,  123,   56,   57,   58,   59,   60,\n /*  1560 */   101,  102,   63,   64,  105,  106,  107,  123,  109,   17,\n /*  1570 */   123,  123,   16,  123,   18,   19,  123,   78,   22,   23,\n /*  1580 */   123,   29,  123,  123,   28,  123,   17,   35,   32,   33,\n /*  1590 */    34,  123,   36,  123,   38,  123,  123,   41,   29,  123,\n /*  1600 */   123,   85,  123,  123,   35,   89,  123,  123,   92,   93,\n /*  1610 */   123,  123,   56,   57,   58,   59,   60,  101,  102,   63,\n /*  1620 */    64,  105,  106,  107,  123,  109,   17,  123,  123,   16,\n /*  1630 */   123,   18,   19,  123,   78,   22,   23,  123,   29,  123,\n /*  1640 */   123,   28,  123,   17,   35,   32,   33,   34,  123,   36,\n /*  1650 */   123,   38,  123,  123,   41,   29,  123,  123,   85,  123,\n /*  1660 */   123,   35,   89,  123,  123,   92,   93,  123,  123,   56,\n /*  1670 */    57,   58,   59,   60,  101,  102,   63,  123,  105,  106,\n /*  1680 */   107,  123,  109,   17,  123,  123,   16,  123,   18,   19,\n /*  1690 */   123,   78,   22,   23,  123,   29,  123,  123,   28,  123,\n /*  1700 */    17,   35,   32,   33,   34,  123,   36,  123,   38,  123,\n /*  1710 */   123,   41,   29,  123,  123,   85,  123,  123,   35,   89,\n /*  1720 */   123,  123,   92,   93,  123,  123,   56,   57,   58,   59,\n /*  1730 */    60,  101,  102,   63,  123,  105,  106,  107,  123,  109,\n /*  1740 */   123,  123,  123,  123,   17,  123,  123,  123,   78,  123,\n /*  1750 */   120,   24,  123,   26,   27,   10,   29,   30,  123,  123,\n /*  1760 */   123,   16,   35,  123,   37,   38,   39,   22,   23,  123,\n /*  1770 */    90,   91,  123,   28,  123,  123,  123,   32,   33,   34,\n /*  1780 */   100,   54,  123,  103,  104,  123,  123,  123,   61,  123,\n /*  1790 */   123,  123,   65,  123,   85,   90,   91,  117,   89,  123,\n /*  1800 */   123,   92,   93,  123,  123,  100,   79,  123,  103,  104,\n /*  1810 */   101,  102,  123,   85,  105,  106,  107,   89,  109,  123,\n /*  1820 */    92,   93,  117,   78,   79,   80,  123,  123,  123,  101,\n /*  1830 */   102,  123,  123,  105,  106,  107,   85,  109,  123,  123,\n /*  1840 */    89,  123,  123,   92,   93,  123,  123,   85,  123,  123,\n /*  1850 */   123,   89,  101,  102,   92,   93,  105,  106,  107,  123,\n /*  1860 */   109,  123,  123,  101,  102,  123,  123,  105,  106,  107,\n /*  1870 */   123,  109,  123,  123,   85,   90,   91,  123,   89,  123,\n /*  1880 */   123,   92,   93,  123,  123,  100,  123,  123,  103,  104,\n /*  1890 */   101,  102,  123,  123,  105,  106,  107,   85,  109,  123,\n /*  1900 */   123,   89,  117,  123,   92,   93,  123,   85,  123,  123,\n /*  1910 */   123,   89,  123,  101,  102,   93,   85,  105,  106,  107,\n /*  1920 */    89,  109,  123,   92,   93,  123,  123,  105,  106,  107,\n /*  1930 */   123,  109,  101,  102,  123,  123,  105,  106,  107,   85,\n /*  1940 */   109,  123,  123,   89,  123,  123,   92,   93,  123,  123,\n /*  1950 */    85,  123,  123,  123,   89,  101,  102,   92,   93,  105,\n /*  1960 */   106,  107,  123,  109,  123,  123,  101,  102,  123,  123,\n /*  1970 */   105,  106,  107,  123,  109,  123,   85,  123,  123,  123,\n /*  1980 */    89,  123,  123,   92,   93,  123,  123,   85,  123,  123,\n /*  1990 */   123,   89,  101,  102,   92,   93,  105,  106,  107,  123,\n /*  2000 */   109,  123,  123,  101,  102,  123,   85,  105,  106,  107,\n /*  2010 */    89,  109,  123,   92,   93,  123,  123,  123,  123,  123,\n /*  2020 */   123,  123,  101,  102,  123,   85,  105,  106,  107,   89,\n /*  2030 */   109,  123,   92,   93,  123,  123,   85,  123,  123,  123,\n /*  2040 */    89,  101,  102,   92,   93,  105,  106,  107,  123,  109,\n /*  2050 */   123,  123,  101,  102,  123,  123,  105,  106,  107,  123,\n /*  2060 */   109,  123,   85,  123,  123,  123,   89,  123,  123,   92,\n /*  2070 */    93,  123,  123,   85,  123,  123,  123,   89,  101,  102,\n /*  2080 */    92,   93,  105,  106,  107,  123,  109,  123,  123,  101,\n /*  2090 */   102,  123,   85,  105,  106,  107,   89,  109,  123,   92,\n /*  2100 */    93,  123,  123,  123,  123,  123,  123,  123,  101,  102,\n /*  2110 */   123,   85,  105,  106,  107,   89,  109,  123,   92,   93,\n /*  2120 */   123,  123,   85,  123,  123,  123,   89,  101,  102,   92,\n /*  2130 */    93,  105,  106,  107,  123,  109,  123,  123,  101,  102,\n /*  2140 */   123,  123,  105,  106,  107,  123,  109,  123,   85,  123,\n /*  2150 */   123,  123,   89,  123,  123,   92,   93,  123,  123,   85,\n /*  2160 */   123,  123,  123,   89,  101,  102,   92,   93,  105,  106,\n /*  2170 */   107,  123,  109,  123,  123,  101,  102,  123,   85,  105,\n /*  2180 */   106,  107,   89,  109,  123,   92,   93,  123,  123,  123,\n /*  2190 */   123,  123,  123,  123,  101,  102,  123,   85,  105,  106,\n /*  2200 */   107,   89,  109,  123,   92,   93,  123,  123,   85,  123,\n /*  2210 */   123,  123,   89,  101,  102,   92,   93,  105,  106,  107,\n /*  2220 */   123,  109,  123,  123,  101,  102,  123,  123,  105,  106,\n /*  2230 */   107,  123,  109,  123,   85,  123,  123,  123,   89,  123,\n /*  2240 */   123,   92,   93,  123,  123,   85,  123,  123,  123,   89,\n /*  2250 */   101,  102,   92,   93,  105,  106,  107,  123,  109,  123,\n /*  2260 */   123,  101,  102,  123,   85,  105,  106,  107,   89,  109,\n /*  2270 */   123,   92,   93,  123,  123,  123,  123,  123,  123,  123,\n /*  2280 */   101,  102,  123,   85,  105,  106,  107,   89,  109,  123,\n /*  2290 */    92,   93,    1,  123,   85,  123,   90,   91,   89,  101,\n /*  2300 */   102,  123,   93,  105,  106,  107,  100,  109,   17,  103,\n /*  2310 */   104,  102,   21,  123,  105,  106,  107,  123,  109,  123,\n /*  2320 */    29,  123,  123,  117,   85,  123,   35,  123,   89,   38,\n /*  2330 */   123,  123,   93,  123,  123,  123,  123,  123,  123,  123,\n /*  2340 */    90,   91,  123,  123,  105,  106,  107,  123,  109,  123,\n /*  2350 */   100,  123,   61,  103,  104,   90,   91,  123,  123,  123,\n /*  2360 */   123,  123,  123,  123,  123,  100,  123,  117,  103,  104,\n /*  2370 */   123,  123,  123,  123,  123,  123,  123,  123,  123,  123,\n /*  2380 */   123,  123,  117,\n);\n    const YY_SHIFT_USE_DFLT = -5;\n    const YY_SHIFT_MAX = 256;\n    static public $yy_shift_ofst = array(\n /*     0 */    -2, 1271, 1157, 1157, 1271, 1157, 1328, 1328, 1100, 1157,\n /*    10 */  1157, 1157, 1157, 1157, 1157, 1157, 1499, 1157, 1157, 1157,\n /*    20 */  1157, 1157, 1556, 1157, 1157, 1157, 1157, 1157, 1157, 1157,\n /*    30 */  1157, 1157, 1157, 1157, 1385, 1214, 1157, 1157, 1157, 1157,\n /*    40 */  1157, 1499, 1214, 1157, 1442, 1442, 1613, 1670, 1670, 1670,\n /*    50 */  1670, 1670, 1670,  206,  153,   76,   -1,  259,  259,  259,\n /*    60 */   809,  939,  755,  862,  702,  649,  365,  312,  418,  495,\n /*    70 */   572,  992,  992,  992,  992,  992,  992,  992,  992,  992,\n /*    80 */   992,  992,  992,  992,  992,  992,  992,  992,  992,  992,\n /*    90 */  1033, 1033, 2291, 1267,  106,   -2, 1745, 1222, 1165,  157,\n /*   100 */   157,  492,  492,  499,  106,  106,  274,  493,  142,  497,\n /*   110 */    49,   79,  942,  652,  246,   17,  328,  300,  236,  223,\n /*   120 */    80,  147,  532, 1227,  353,  353,  353,  422,  407,  142,\n /*   130 */   353,  353,  610,  353,  341,  565,  379,  353,  380,  142,\n /*   140 */   408,  160,  409,  353,  379,  409,  353,  472,  613,  472,\n /*   150 */   472,  472,  472,  472,  472,  613,  472,   -5, 1284, 1210,\n /*   160 */    -4, 1108,    0,  156,  575, 1683, 1552, 1512, 1569, 1609,\n /*   170 */  1666, 1324, 1626,    6, 1495, 1398, 1381, 1341, 1438, 1455,\n /*   180 */    73,  482,   73,  204,  592,  204,  204,  204,  164,  204,\n /*   190 */   253,  204,  204,  665,  613,  613,  613,  479,  472,  347,\n /*   200 */   415,  415,  472,  347,   -5,   -5,   -5,   -5,   -5, 1727,\n /*   210 */   149,   45,  120,  152,   54,  530,   54,  314,  252,  378,\n /*   220 */   306,  459,  258,  303,  239,  331,  522,  536,  469,  537,\n /*   230 */   539,  569,  534,  544,  561,  525,  518,  570,  593,  612,\n /*   240 */   578,  628,  591,  579,  510,  584,  589,  458,  435,  352,\n /*   250 */   485,  478,  451,  479,  490,  383,  618,\n);\n    const YY_REDUCE_USE_DFLT = -96;\n    const YY_REDUCE_MAX = 208;\n    static public $yy_reduce_ofst = array(\n /*     0 */     5,   -7,  489,  566, 1630,  856,   70, 1117, 1865, 1854,\n /*    10 */  1831, 1812, 1891, 1902, 1977, 1951, 1940, 1921, 1789, 1762,\n /*    20 */  1402, 1345, 1288, 1231, 1459, 1516, 1751, 1728, 1709, 1573,\n /*    30 */  1988, 2007, 2123, 2149, 2160, 2198, 2179, 1174, 2093, 2026,\n /*    40 */  2037, 2063, 2112, 2074, 1042, 2209, 1822, 2239, 1061,  861,\n /*    50 */   494,  417,  571, 2265, 2250, 2206, 1705, 1785, 1680, 1705,\n /*    60 */   128,  128,  128,  128,  128,  128,  128,  128,  128,  128,\n /*    70 */   128,  128,  128,  128,  128,  128,  128,  128,  128,  128,\n /*    80 */   128,  128,  128,  128,  128,  128,  128,  128,  128,  128,\n /*    90 */   128,  128,  277,  224,   40,  154,  200,  864, 1062,  170,\n /*   100 */   330,  574, 1149,   99,  329,  381, 1078,   98,  -34,  201,\n /*   110 */    15,  125,  125,  125,  -85,  124,  124,  124,  125,  -95,\n /*   120 */   125,  -95,  332,  354,  573,  616,  617,  460,  615,  307,\n /*   130 */   385,  540,  256,  -74,  248,  -95,  335,  668,  540,  281,\n /*   140 */   540,  125,  670,  669,  520,  540,  186,  125,  339,  125,\n /*   150 */   125,  125,  125,  125,  125,  -95,  125,  125,  554,  554,\n /*   160 */   550,  554,  554,  554,  554,  554,  554,  554,  554,  554,\n /*   170 */   554,  554,  554,  542,  554,  554,  554,  554,  554,  554,\n /*   180 */   595,  -33,  551,  552,  -33,  552,  552,  552,  -33,  552,\n /*   190 */   597,  552,  552,  596,  594,  594,  594,  599,  -33,  356,\n /*   200 */   296,  360,  -33,  356,  395,  404,  376,  416,  368,\n);\n    static public $yyExpectedTokens = array(\n        /* 0 */ array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 22, 23, 28, 32, 33, 34, ),\n        /* 1 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 2 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 3 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 4 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 5 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 6 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 7 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 8 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 65, 78, ),\n        /* 9 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 10 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 11 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 12 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 13 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 14 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 15 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 16 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 17 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 18 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 19 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 20 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 21 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 22 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 23 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 24 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 25 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 26 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 27 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 28 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 29 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 30 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 31 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 32 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 33 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 34 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 35 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 36 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 37 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 38 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 39 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 40 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 41 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 42 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 43 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 44 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 45 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),\n        /* 46 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 78, ),\n        /* 47 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 78, ),\n        /* 48 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 78, ),\n        /* 49 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 78, ),\n        /* 50 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 78, ),\n        /* 51 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 78, ),\n        /* 52 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 78, ),\n        /* 53 */ array(1, 27, 29, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 54 */ array(1, 17, 29, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 55 */ array(1, 17, 29, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 56 */ array(1, 17, 29, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 57 */ array(1, 29, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 58 */ array(1, 29, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 59 */ array(1, 29, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 60 */ array(1, 24, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 61 */ array(1, 17, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 62 */ array(1, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 63 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 64 */ array(1, 2, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 65 */ array(1, 17, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 66 */ array(1, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 67 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 79, ),\n        /* 68 */ array(1, 30, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 69 */ array(1, 17, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 70 */ array(1, 17, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 71 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 72 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 73 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 74 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 75 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 76 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 77 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 78 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 79 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 80 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 81 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 82 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 83 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 84 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 85 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 86 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 87 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 88 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 89 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 90 */ array(40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 91 */ array(40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),\n        /* 92 */ array(1, 17, 21, 29, 35, 38, 61, ),\n        /* 93 */ array(1, 17, 29, 35, 54, ),\n        /* 94 */ array(1, 29, 35, ),\n        /* 95 */ array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 22, 23, 28, 32, 33, 34, ),\n        /* 96 */ array(10, 16, 22, 23, 28, 32, 33, 34, 78, 79, 80, ),\n        /* 97 */ array(16, 19, 29, 31, 35, ),\n        /* 98 */ array(16, 19, 29, 31, 35, ),\n        /* 99 */ array(1, 17, 29, 35, ),\n        /* 100 */ array(1, 17, 29, 35, ),\n        /* 101 */ array(16, 19, 29, 35, ),\n        /* 102 */ array(16, 19, 29, 35, ),\n        /* 103 */ array(1, 2, 17, ),\n        /* 104 */ array(1, 29, 35, ),\n        /* 105 */ array(1, 29, 35, ),\n        /* 106 */ array(18, 19, 63, ),\n        /* 107 */ array(21, 59, 64, ),\n        /* 108 */ array(18, 38, ),\n        /* 109 */ array(10, 16, 22, 23, 28, 32, 33, 34, 78, 79, 80, ),\n        /* 110 */ array(4, 5, 6, 7, 8, 13, 14, 15, ),\n        /* 111 */ array(1, 17, 29, 30, 35, 54, ),\n        /* 112 */ array(1, 17, 29, 35, 54, ),\n        /* 113 */ array(1, 17, 29, 35, 54, ),\n        /* 114 */ array(16, 19, 20, 25, ),\n        /* 115 */ array(16, 19, 20, 62, ),\n        /* 116 */ array(16, 19, 62, ),\n        /* 117 */ array(16, 19, 20, ),\n        /* 118 */ array(1, 31, 54, ),\n        /* 119 */ array(20, 21, 61, ),\n        /* 120 */ array(1, 17, 54, ),\n        /* 121 */ array(20, 21, 61, ),\n        /* 122 */ array(1, 17, 21, ),\n        /* 123 */ array(17, 29, 35, ),\n        /* 124 */ array(16, 19, ),\n        /* 125 */ array(16, 19, ),\n        /* 126 */ array(16, 19, ),\n        /* 127 */ array(29, 35, ),\n        /* 128 */ array(16, 19, ),\n        /* 129 */ array(18, 38, ),\n        /* 130 */ array(16, 19, ),\n        /* 131 */ array(16, 19, ),\n        /* 132 */ array(1, 17, ),\n        /* 133 */ array(16, 19, ),\n        /* 134 */ array(29, 35, ),\n        /* 135 */ array(21, 61, ),\n        /* 136 */ array(18, 19, ),\n        /* 137 */ array(16, 19, ),\n        /* 138 */ array(16, 19, ),\n        /* 139 */ array(18, 38, ),\n        /* 140 */ array(16, 19, ),\n        /* 141 */ array(1, 54, ),\n        /* 142 */ array(16, 19, ),\n        /* 143 */ array(16, 19, ),\n        /* 144 */ array(18, 19, ),\n        /* 145 */ array(16, 19, ),\n        /* 146 */ array(16, 19, ),\n        /* 147 */ array(1, ),\n        /* 148 */ array(21, ),\n        /* 149 */ array(1, ),\n        /* 150 */ array(1, ),\n        /* 151 */ array(1, ),\n        /* 152 */ array(1, ),\n        /* 153 */ array(1, ),\n        /* 154 */ array(1, ),\n        /* 155 */ array(21, ),\n        /* 156 */ array(1, ),\n        /* 157 */ array(),\n        /* 158 */ array(17, 29, 35, ),\n        /* 159 */ array(17, 29, 35, ),\n        /* 160 */ array(16, 19, 62, ),\n        /* 161 */ array(17, 29, 35, ),\n        /* 162 */ array(17, 29, 35, ),\n        /* 163 */ array(17, 29, 35, ),\n        /* 164 */ array(17, 29, 35, ),\n        /* 165 */ array(17, 29, 35, ),\n        /* 166 */ array(17, 29, 35, ),\n        /* 167 */ array(17, 29, 35, ),\n        /* 168 */ array(17, 29, 35, ),\n        /* 169 */ array(17, 29, 35, ),\n        /* 170 */ array(17, 29, 35, ),\n        /* 171 */ array(17, 29, 35, ),\n        /* 172 */ array(17, 29, 35, ),\n        /* 173 */ array(16, 18, 19, ),\n        /* 174 */ array(17, 29, 35, ),\n        /* 175 */ array(17, 29, 35, ),\n        /* 176 */ array(17, 29, 35, ),\n        /* 177 */ array(17, 29, 35, ),\n        /* 178 */ array(17, 29, 35, ),\n        /* 179 */ array(17, 29, 35, ),\n        /* 180 */ array(59, 64, ),\n        /* 181 */ array(1, 17, ),\n        /* 182 */ array(59, 64, ),\n        /* 183 */ array(59, 64, ),\n        /* 184 */ array(1, 17, ),\n        /* 185 */ array(59, 64, ),\n        /* 186 */ array(59, 64, ),\n        /* 187 */ array(59, 64, ),\n        /* 188 */ array(1, 17, ),\n        /* 189 */ array(59, 64, ),\n        /* 190 */ array(16, 38, ),\n        /* 191 */ array(59, 64, ),\n        /* 192 */ array(59, 64, ),\n        /* 193 */ array(14, ),\n        /* 194 */ array(21, ),\n        /* 195 */ array(21, ),\n        /* 196 */ array(21, ),\n        /* 197 */ array(38, ),\n        /* 198 */ array(1, ),\n        /* 199 */ array(2, ),\n        /* 200 */ array(29, ),\n        /* 201 */ array(29, ),\n        /* 202 */ array(1, ),\n        /* 203 */ array(2, ),\n        /* 204 */ array(),\n        /* 205 */ array(),\n        /* 206 */ array(),\n        /* 207 */ array(),\n        /* 208 */ array(),\n        /* 209 */ array(17, 24, 26, 27, 29, 30, 35, 37, 38, 39, 54, 61, 65, 79, ),\n        /* 210 */ array(17, 20, 29, 35, 38, 61, ),\n        /* 211 */ array(38, 59, 61, 65, ),\n        /* 212 */ array(16, 18, 19, 36, ),\n        /* 213 */ array(31, 38, 61, ),\n        /* 214 */ array(38, 61, ),\n        /* 215 */ array(2, 20, ),\n        /* 216 */ array(38, 61, ),\n        /* 217 */ array(24, 37, ),\n        /* 218 */ array(37, 65, ),\n        /* 219 */ array(17, 25, ),\n        /* 220 */ array(37, 39, ),\n        /* 221 */ array(20, 59, ),\n        /* 222 */ array(37, 39, ),\n        /* 223 */ array(37, 39, ),\n        /* 224 */ array(25, 79, ),\n        /* 225 */ array(19, 62, ),\n        /* 226 */ array(63, ),\n        /* 227 */ array(19, ),\n        /* 228 */ array(65, ),\n        /* 229 */ array(19, ),\n        /* 230 */ array(19, ),\n        /* 231 */ array(19, ),\n        /* 232 */ array(25, ),\n        /* 233 */ array(63, ),\n        /* 234 */ array(19, ),\n        /* 235 */ array(59, ),\n        /* 236 */ array(36, ),\n        /* 237 */ array(36, ),\n        /* 238 */ array(39, ),\n        /* 239 */ array(19, ),\n        /* 240 */ array(55, ),\n        /* 241 */ array(2, ),\n        /* 242 */ array(38, ),\n        /* 243 */ array(18, ),\n        /* 244 */ array(18, ),\n        /* 245 */ array(18, ),\n        /* 246 */ array(19, ),\n        /* 247 */ array(18, ),\n        /* 248 */ array(20, ),\n        /* 249 */ array(19, ),\n        /* 250 */ array(19, ),\n        /* 251 */ array(2, ),\n        /* 252 */ array(26, ),\n        /* 253 */ array(38, ),\n        /* 254 */ array(19, ),\n        /* 255 */ array(19, ),\n        /* 256 */ array(18, ),\n        /* 257 */ array(),\n        /* 258 */ array(),\n        /* 259 */ array(),\n        /* 260 */ array(),\n        /* 261 */ array(),\n        /* 262 */ array(),\n        /* 263 */ array(),\n        /* 264 */ array(),\n        /* 265 */ array(),\n        /* 266 */ array(),\n        /* 267 */ array(),\n        /* 268 */ array(),\n        /* 269 */ array(),\n        /* 270 */ array(),\n        /* 271 */ array(),\n        /* 272 */ array(),\n        /* 273 */ array(),\n        /* 274 */ array(),\n        /* 275 */ array(),\n        /* 276 */ array(),\n        /* 277 */ array(),\n        /* 278 */ array(),\n        /* 279 */ array(),\n        /* 280 */ array(),\n        /* 281 */ array(),\n        /* 282 */ array(),\n        /* 283 */ array(),\n        /* 284 */ array(),\n        /* 285 */ array(),\n        /* 286 */ array(),\n        /* 287 */ array(),\n        /* 288 */ array(),\n        /* 289 */ array(),\n        /* 290 */ array(),\n        /* 291 */ array(),\n        /* 292 */ array(),\n        /* 293 */ array(),\n        /* 294 */ array(),\n        /* 295 */ array(),\n        /* 296 */ array(),\n        /* 297 */ array(),\n        /* 298 */ array(),\n        /* 299 */ array(),\n        /* 300 */ array(),\n        /* 301 */ array(),\n        /* 302 */ array(),\n        /* 303 */ array(),\n        /* 304 */ array(),\n        /* 305 */ array(),\n        /* 306 */ array(),\n        /* 307 */ array(),\n        /* 308 */ array(),\n        /* 309 */ array(),\n        /* 310 */ array(),\n        /* 311 */ array(),\n        /* 312 */ array(),\n        /* 313 */ array(),\n        /* 314 */ array(),\n        /* 315 */ array(),\n        /* 316 */ array(),\n        /* 317 */ array(),\n        /* 318 */ array(),\n        /* 319 */ array(),\n        /* 320 */ array(),\n        /* 321 */ array(),\n        /* 322 */ array(),\n        /* 323 */ array(),\n        /* 324 */ array(),\n        /* 325 */ array(),\n        /* 326 */ array(),\n        /* 327 */ array(),\n        /* 328 */ array(),\n        /* 329 */ array(),\n        /* 330 */ array(),\n        /* 331 */ array(),\n        /* 332 */ array(),\n        /* 333 */ array(),\n        /* 334 */ array(),\n        /* 335 */ array(),\n        /* 336 */ array(),\n        /* 337 */ array(),\n        /* 338 */ array(),\n        /* 339 */ array(),\n        /* 340 */ array(),\n        /* 341 */ array(),\n        /* 342 */ array(),\n        /* 343 */ array(),\n        /* 344 */ array(),\n        /* 345 */ array(),\n        /* 346 */ array(),\n        /* 347 */ array(),\n        /* 348 */ array(),\n        /* 349 */ array(),\n        /* 350 */ array(),\n        /* 351 */ array(),\n        /* 352 */ array(),\n        /* 353 */ array(),\n        /* 354 */ array(),\n        /* 355 */ array(),\n        /* 356 */ array(),\n        /* 357 */ array(),\n        /* 358 */ array(),\n        /* 359 */ array(),\n        /* 360 */ array(),\n        /* 361 */ array(),\n        /* 362 */ array(),\n        /* 363 */ array(),\n        /* 364 */ array(),\n        /* 365 */ array(),\n        /* 366 */ array(),\n        /* 367 */ array(),\n        /* 368 */ array(),\n        /* 369 */ array(),\n        /* 370 */ array(),\n        /* 371 */ array(),\n        /* 372 */ array(),\n        /* 373 */ array(),\n        /* 374 */ array(),\n        /* 375 */ array(),\n        /* 376 */ array(),\n        /* 377 */ array(),\n        /* 378 */ array(),\n        /* 379 */ array(),\n        /* 380 */ array(),\n        /* 381 */ array(),\n        /* 382 */ array(),\n        /* 383 */ array(),\n        /* 384 */ array(),\n        /* 385 */ array(),\n        /* 386 */ array(),\n        /* 387 */ array(),\n        /* 388 */ array(),\n        /* 389 */ array(),\n        /* 390 */ array(),\n);\n    static public $yy_default = array(\n /*     0 */   394,  578,  549,  549,  595,  549,  595,  595,  595,  595,\n /*    10 */   595,  595,  595,  595,  595,  595,  595,  595,  595,  595,\n /*    20 */   595,  595,  595,  595,  595,  595,  595,  595,  595,  595,\n /*    30 */   595,  595,  595,  595,  595,  595,  595,  595,  595,  595,\n /*    40 */   595,  595,  595,  595,  595,  595,  595,  595,  595,  595,\n /*    50 */   595,  595,  595,  455,  595,  595,  595,  455,  455,  455,\n /*    60 */   595,  595,  595,  595,  595,  595,  595,  595,  460,  595,\n /*    70 */   595,  466,  465,  484,  547,  579,  581,  548,  580,  489,\n /*    80 */   488,  480,  479,  481,  457,  485,  462,  476,  460,  437,\n /*    90 */   492,  493,  504,  468,  455,  391,  595,  455,  455,  475,\n /*   100 */   512,  455,  455,  595,  455,  455,  595,  561,  595,  595,\n /*   110 */   595,  468,  468,  468,  595,  522,  522,  522,  468,  513,\n /*   120 */   468,  513,  595,  595,  595,  595,  595,  455,  595,  595,\n /*   130 */   595,  595,  595,  595,  455,  513,  595,  595,  595,  595,\n /*   140 */   595,  468,  595,  595,  595,  595,  522,  473,  558,  491,\n /*   150 */   478,  472,  497,  495,  496,  513,  471,  556,  595,  595,\n /*   160 */   523,  595,  595,  595,  595,  595,  595,  595,  595,  595,\n /*   170 */   595,  595,  595,  595,  595,  595,  595,  595,  595,  595,\n /*   180 */   516,  595,  518,  519,  595,  520,  540,  542,  595,  539,\n /*   190 */   522,  517,  541,  410,  562,  559,  536,  522,  475,  551,\n /*   200 */   594,  594,  512,  550,  522,  555,  555,  555,  522,  470,\n /*   210 */   504,  504,  595,  504,  490,  534,  504,  595,  595,  494,\n /*   220 */   595,  500,  595,  595,  494,  595,  595,  595,  595,  595,\n /*   230 */   595,  595,  494,  595,  595,  500,  502,  595,  595,  595,\n /*   240 */   506,  534,  560,  595,  595,  595,  595,  595,  595,  595,\n /*   250 */   595,  534,  463,  534,  595,  595,  595,  401,  543,  400,\n /*   260 */   402,  546,  445,  398,  397,  393,  464,  438,  593,  467,\n /*   270 */   435,  395,  440,  434,  439,  396,  399,  456,  531,  420,\n /*   280 */   529,  392,  528,  506,  527,  535,  444,  557,  545,  544,\n /*   290 */   530,  412,  453,  526,  505,  419,  507,  525,  532,  470,\n /*   300 */   514,  521,  524,  508,  510,  482,  483,  416,  415,  417,\n /*   310 */   418,  477,  511,  515,  538,  469,  509,  534,  533,  432,\n /*   320 */   446,  447,  443,  442,  436,  454,  433,  441,  554,  448,\n /*   330 */   498,  499,  501,  503,  452,  451,  449,  450,  552,  553,\n /*   340 */   486,  487,  589,  430,  582,  583,  584,  431,  429,  426,\n /*   350 */   537,  427,  428,  406,  587,  575,  404,  577,  576,  405,\n /*   360 */   585,  586,  588,  591,  592,  425,  424,  569,  568,  570,\n /*   370 */   571,  572,  567,  566,  414,  563,  564,  565,  573,  574,\n /*   380 */   422,  590,  407,  423,  421,  408,  474,  413,  411,  409,\n /*   390 */   403,\n);\n    const YYNOCODE = 124;\n    const YYSTACKDEPTH = 100;\n    const YYNSTATE = 391;\n    const YYNRULE = 204;\n    const YYERRORSYMBOL = 81;\n    const YYERRSYMDT = 'yy0';\n    const YYFALLBACK = 0;\n    static public $yyFallback = array(\n    );\n    static function Trace($TraceFILE, $zTracePrompt)\n    {\n        if (!$TraceFILE) {\n            $zTracePrompt = 0;\n        } elseif (!$zTracePrompt) {\n            $TraceFILE = 0;\n        }\n        self::$yyTraceFILE = $TraceFILE;\n        self::$yyTracePrompt = $zTracePrompt;\n    }\n\n    static function PrintTrace()\n    {\n        self::$yyTraceFILE = fopen('php://output', 'w');\n        self::$yyTracePrompt = '<br>';\n    }\n\n    static public $yyTraceFILE;\n    static public $yyTracePrompt;\n    public $yyidx;                    /* Index of top element in stack */\n    public $yyerrcnt;                 /* Shifts left before out of the error */\n    public $yystack = array();  /* The parser's stack */\n\n    public $yyTokenName = array(\n  '$',             'VERT',          'COLON',         'COMMENT',\n  'PHPSTARTTAG',   'PHPENDTAG',     'ASPSTARTTAG',   'ASPENDTAG',\n  'FAKEPHPSTARTTAG',  'XMLTAG',        'TEXT',          'STRIPON',\n  'STRIPOFF',      'LITERALSTART',  'LITERALEND',    'LITERAL',\n  'LDEL',          'RDEL',          'DOLLAR',        'ID',\n  'EQUAL',         'PTR',           'LDELIF',        'LDELFOR',\n  'SEMICOLON',     'INCDEC',        'TO',            'STEP',\n  'LDELFOREACH',   'SPACE',         'AS',            'APTR',\n  'LDELSETFILTER',  'SMARTYBLOCKCHILD',  'LDELSLASH',     'ATTR',\n  'INTEGER',       'COMMA',         'OPENP',         'CLOSEP',\n  'MATH',          'UNIMATH',       'ANDSYM',        'ISIN',\n  'ISDIVBY',       'ISNOTDIVBY',    'ISEVEN',        'ISNOTEVEN',\n  'ISEVENBY',      'ISNOTEVENBY',   'ISODD',         'ISNOTODD',\n  'ISODDBY',       'ISNOTODDBY',    'INSTANCEOF',    'QMARK',\n  'NOT',           'TYPECAST',      'HEX',           'DOT',\n  'SINGLEQUOTESTRING',  'DOUBLECOLON',   'AT',            'HATCH',\n  'OPENB',         'CLOSEB',        'EQUALS',        'NOTEQUALS',\n  'GREATERTHAN',   'LESSTHAN',      'GREATEREQUAL',  'LESSEQUAL',\n  'IDENTITY',      'NONEIDENTITY',  'MOD',           'LAND',\n  'LOR',           'LXOR',          'QUOTE',         'BACKTICK',\n  'DOLLARID',      'error',         'start',         'template',\n  'template_element',  'smartytag',     'literal',       'literal_elements',\n  'literal_element',  'value',         'modifierlist',  'attributes',\n  'expr',          'varindexed',    'statement',     'statements',\n  'optspace',      'varvar',        'foraction',     'modparameters',\n  'attribute',     'ternary',       'array',         'ifcond',\n  'lop',           'variable',      'function',      'doublequoted_with_quotes',\n  'static_class_access',  'object',        'arrayindex',    'indexdef',\n  'varvarele',     'objectchain',   'objectelement',  'method',\n  'params',        'modifier',      'modparameter',  'arrayelements',\n  'arrayelement',  'doublequoted',  'doublequotedcontent',\n    );\n\n    static public $yyRuleName = array(\n /*   0 */ \"start ::= template\",\n /*   1 */ \"template ::= template_element\",\n /*   2 */ \"template ::= template template_element\",\n /*   3 */ \"template ::=\",\n /*   4 */ \"template_element ::= smartytag\",\n /*   5 */ \"template_element ::= COMMENT\",\n /*   6 */ \"template_element ::= literal\",\n /*   7 */ \"template_element ::= PHPSTARTTAG\",\n /*   8 */ \"template_element ::= PHPENDTAG\",\n /*   9 */ \"template_element ::= ASPSTARTTAG\",\n /*  10 */ \"template_element ::= ASPENDTAG\",\n /*  11 */ \"template_element ::= FAKEPHPSTARTTAG\",\n /*  12 */ \"template_element ::= XMLTAG\",\n /*  13 */ \"template_element ::= TEXT\",\n /*  14 */ \"template_element ::= STRIPON\",\n /*  15 */ \"template_element ::= STRIPOFF\",\n /*  16 */ \"literal ::= LITERALSTART LITERALEND\",\n /*  17 */ \"literal ::= LITERALSTART literal_elements LITERALEND\",\n /*  18 */ \"literal_elements ::= literal_elements literal_element\",\n /*  19 */ \"literal_elements ::=\",\n /*  20 */ \"literal_element ::= literal\",\n /*  21 */ \"literal_element ::= LITERAL\",\n /*  22 */ \"literal_element ::= PHPSTARTTAG\",\n /*  23 */ \"literal_element ::= FAKEPHPSTARTTAG\",\n /*  24 */ \"literal_element ::= PHPENDTAG\",\n /*  25 */ \"literal_element ::= ASPSTARTTAG\",\n /*  26 */ \"literal_element ::= ASPENDTAG\",\n /*  27 */ \"smartytag ::= LDEL value RDEL\",\n /*  28 */ \"smartytag ::= LDEL value modifierlist attributes RDEL\",\n /*  29 */ \"smartytag ::= LDEL value attributes RDEL\",\n /*  30 */ \"smartytag ::= LDEL expr modifierlist attributes RDEL\",\n /*  31 */ \"smartytag ::= LDEL expr attributes RDEL\",\n /*  32 */ \"smartytag ::= LDEL DOLLAR ID EQUAL value RDEL\",\n /*  33 */ \"smartytag ::= LDEL DOLLAR ID EQUAL expr RDEL\",\n /*  34 */ \"smartytag ::= LDEL DOLLAR ID EQUAL expr attributes RDEL\",\n /*  35 */ \"smartytag ::= LDEL varindexed EQUAL expr attributes RDEL\",\n /*  36 */ \"smartytag ::= LDEL ID attributes RDEL\",\n /*  37 */ \"smartytag ::= LDEL ID RDEL\",\n /*  38 */ \"smartytag ::= LDEL ID PTR ID attributes RDEL\",\n /*  39 */ \"smartytag ::= LDEL ID modifierlist attributes RDEL\",\n /*  40 */ \"smartytag ::= LDEL ID PTR ID modifierlist attributes RDEL\",\n /*  41 */ \"smartytag ::= LDELIF expr RDEL\",\n /*  42 */ \"smartytag ::= LDELIF expr attributes RDEL\",\n /*  43 */ \"smartytag ::= LDELIF statement RDEL\",\n /*  44 */ \"smartytag ::= LDELIF statement attributes RDEL\",\n /*  45 */ \"smartytag ::= LDELFOR statements SEMICOLON optspace expr SEMICOLON optspace DOLLAR varvar foraction attributes RDEL\",\n /*  46 */ \"foraction ::= EQUAL expr\",\n /*  47 */ \"foraction ::= INCDEC\",\n /*  48 */ \"smartytag ::= LDELFOR statement TO expr attributes RDEL\",\n /*  49 */ \"smartytag ::= LDELFOR statement TO expr STEP expr attributes RDEL\",\n /*  50 */ \"smartytag ::= LDELFOREACH attributes RDEL\",\n /*  51 */ \"smartytag ::= LDELFOREACH SPACE value AS DOLLAR varvar attributes RDEL\",\n /*  52 */ \"smartytag ::= LDELFOREACH SPACE value AS DOLLAR varvar APTR DOLLAR varvar attributes RDEL\",\n /*  53 */ \"smartytag ::= LDELFOREACH SPACE expr AS DOLLAR varvar attributes RDEL\",\n /*  54 */ \"smartytag ::= LDELFOREACH SPACE expr AS DOLLAR varvar APTR DOLLAR varvar attributes RDEL\",\n /*  55 */ \"smartytag ::= LDELSETFILTER ID modparameters RDEL\",\n /*  56 */ \"smartytag ::= LDELSETFILTER ID modparameters modifierlist RDEL\",\n /*  57 */ \"smartytag ::= SMARTYBLOCKCHILD\",\n /*  58 */ \"smartytag ::= LDELSLASH ID RDEL\",\n /*  59 */ \"smartytag ::= LDELSLASH ID modifierlist RDEL\",\n /*  60 */ \"smartytag ::= LDELSLASH ID PTR ID RDEL\",\n /*  61 */ \"smartytag ::= LDELSLASH ID PTR ID modifierlist RDEL\",\n /*  62 */ \"attributes ::= attributes attribute\",\n /*  63 */ \"attributes ::= attribute\",\n /*  64 */ \"attributes ::=\",\n /*  65 */ \"attribute ::= SPACE ID EQUAL ID\",\n /*  66 */ \"attribute ::= ATTR expr\",\n /*  67 */ \"attribute ::= ATTR value\",\n /*  68 */ \"attribute ::= SPACE ID\",\n /*  69 */ \"attribute ::= SPACE expr\",\n /*  70 */ \"attribute ::= SPACE value\",\n /*  71 */ \"attribute ::= SPACE INTEGER EQUAL expr\",\n /*  72 */ \"statements ::= statement\",\n /*  73 */ \"statements ::= statements COMMA statement\",\n /*  74 */ \"statement ::= DOLLAR varvar EQUAL expr\",\n /*  75 */ \"statement ::= varindexed EQUAL expr\",\n /*  76 */ \"statement ::= OPENP statement CLOSEP\",\n /*  77 */ \"expr ::= value\",\n /*  78 */ \"expr ::= ternary\",\n /*  79 */ \"expr ::= DOLLAR ID COLON ID\",\n /*  80 */ \"expr ::= expr MATH value\",\n /*  81 */ \"expr ::= expr UNIMATH value\",\n /*  82 */ \"expr ::= expr ANDSYM value\",\n /*  83 */ \"expr ::= array\",\n /*  84 */ \"expr ::= expr modifierlist\",\n /*  85 */ \"expr ::= expr ifcond expr\",\n /*  86 */ \"expr ::= expr ISIN array\",\n /*  87 */ \"expr ::= expr ISIN value\",\n /*  88 */ \"expr ::= expr lop expr\",\n /*  89 */ \"expr ::= expr ISDIVBY expr\",\n /*  90 */ \"expr ::= expr ISNOTDIVBY expr\",\n /*  91 */ \"expr ::= expr ISEVEN\",\n /*  92 */ \"expr ::= expr ISNOTEVEN\",\n /*  93 */ \"expr ::= expr ISEVENBY expr\",\n /*  94 */ \"expr ::= expr ISNOTEVENBY expr\",\n /*  95 */ \"expr ::= expr ISODD\",\n /*  96 */ \"expr ::= expr ISNOTODD\",\n /*  97 */ \"expr ::= expr ISODDBY expr\",\n /*  98 */ \"expr ::= expr ISNOTODDBY expr\",\n /*  99 */ \"expr ::= value INSTANCEOF ID\",\n /* 100 */ \"expr ::= value INSTANCEOF value\",\n /* 101 */ \"ternary ::= OPENP expr CLOSEP QMARK DOLLAR ID COLON expr\",\n /* 102 */ \"ternary ::= OPENP expr CLOSEP QMARK expr COLON expr\",\n /* 103 */ \"value ::= variable\",\n /* 104 */ \"value ::= UNIMATH value\",\n /* 105 */ \"value ::= NOT value\",\n /* 106 */ \"value ::= TYPECAST value\",\n /* 107 */ \"value ::= variable INCDEC\",\n /* 108 */ \"value ::= HEX\",\n /* 109 */ \"value ::= INTEGER\",\n /* 110 */ \"value ::= INTEGER DOT INTEGER\",\n /* 111 */ \"value ::= INTEGER DOT\",\n /* 112 */ \"value ::= DOT INTEGER\",\n /* 113 */ \"value ::= ID\",\n /* 114 */ \"value ::= function\",\n /* 115 */ \"value ::= OPENP expr CLOSEP\",\n /* 116 */ \"value ::= SINGLEQUOTESTRING\",\n /* 117 */ \"value ::= doublequoted_with_quotes\",\n /* 118 */ \"value ::= ID DOUBLECOLON static_class_access\",\n /* 119 */ \"value ::= varindexed DOUBLECOLON static_class_access\",\n /* 120 */ \"value ::= smartytag\",\n /* 121 */ \"value ::= value modifierlist\",\n /* 122 */ \"variable ::= varindexed\",\n /* 123 */ \"variable ::= DOLLAR varvar AT ID\",\n /* 124 */ \"variable ::= object\",\n /* 125 */ \"variable ::= HATCH ID HATCH\",\n /* 126 */ \"variable ::= HATCH ID HATCH arrayindex\",\n /* 127 */ \"variable ::= HATCH variable HATCH\",\n /* 128 */ \"variable ::= HATCH variable HATCH arrayindex\",\n /* 129 */ \"varindexed ::= DOLLAR varvar arrayindex\",\n /* 130 */ \"arrayindex ::= arrayindex indexdef\",\n /* 131 */ \"arrayindex ::=\",\n /* 132 */ \"indexdef ::= DOT DOLLAR varvar\",\n /* 133 */ \"indexdef ::= DOT DOLLAR varvar AT ID\",\n /* 134 */ \"indexdef ::= DOT ID\",\n /* 135 */ \"indexdef ::= DOT INTEGER\",\n /* 136 */ \"indexdef ::= DOT LDEL expr RDEL\",\n /* 137 */ \"indexdef ::= OPENB ID CLOSEB\",\n /* 138 */ \"indexdef ::= OPENB ID DOT ID CLOSEB\",\n /* 139 */ \"indexdef ::= OPENB expr CLOSEB\",\n /* 140 */ \"indexdef ::= OPENB CLOSEB\",\n /* 141 */ \"varvar ::= varvarele\",\n /* 142 */ \"varvar ::= varvar varvarele\",\n /* 143 */ \"varvarele ::= ID\",\n /* 144 */ \"varvarele ::= LDEL expr RDEL\",\n /* 145 */ \"object ::= varindexed objectchain\",\n /* 146 */ \"objectchain ::= objectelement\",\n /* 147 */ \"objectchain ::= objectchain objectelement\",\n /* 148 */ \"objectelement ::= PTR ID arrayindex\",\n /* 149 */ \"objectelement ::= PTR DOLLAR varvar arrayindex\",\n /* 150 */ \"objectelement ::= PTR LDEL expr RDEL arrayindex\",\n /* 151 */ \"objectelement ::= PTR ID LDEL expr RDEL arrayindex\",\n /* 152 */ \"objectelement ::= PTR method\",\n /* 153 */ \"function ::= ID OPENP params CLOSEP\",\n /* 154 */ \"method ::= ID OPENP params CLOSEP\",\n /* 155 */ \"method ::= DOLLAR ID OPENP params CLOSEP\",\n /* 156 */ \"params ::= params COMMA expr\",\n /* 157 */ \"params ::= expr\",\n /* 158 */ \"params ::=\",\n /* 159 */ \"modifierlist ::= modifierlist modifier modparameters\",\n /* 160 */ \"modifierlist ::= modifier modparameters\",\n /* 161 */ \"modifier ::= VERT AT ID\",\n /* 162 */ \"modifier ::= VERT ID\",\n /* 163 */ \"modparameters ::= modparameters modparameter\",\n /* 164 */ \"modparameters ::=\",\n /* 165 */ \"modparameter ::= COLON value\",\n /* 166 */ \"modparameter ::= COLON array\",\n /* 167 */ \"static_class_access ::= method\",\n /* 168 */ \"static_class_access ::= method objectchain\",\n /* 169 */ \"static_class_access ::= ID\",\n /* 170 */ \"static_class_access ::= DOLLAR ID arrayindex\",\n /* 171 */ \"static_class_access ::= DOLLAR ID arrayindex objectchain\",\n /* 172 */ \"ifcond ::= EQUALS\",\n /* 173 */ \"ifcond ::= NOTEQUALS\",\n /* 174 */ \"ifcond ::= GREATERTHAN\",\n /* 175 */ \"ifcond ::= LESSTHAN\",\n /* 176 */ \"ifcond ::= GREATEREQUAL\",\n /* 177 */ \"ifcond ::= LESSEQUAL\",\n /* 178 */ \"ifcond ::= IDENTITY\",\n /* 179 */ \"ifcond ::= NONEIDENTITY\",\n /* 180 */ \"ifcond ::= MOD\",\n /* 181 */ \"lop ::= LAND\",\n /* 182 */ \"lop ::= LOR\",\n /* 183 */ \"lop ::= LXOR\",\n /* 184 */ \"array ::= OPENB arrayelements CLOSEB\",\n /* 185 */ \"arrayelements ::= arrayelement\",\n /* 186 */ \"arrayelements ::= arrayelements COMMA arrayelement\",\n /* 187 */ \"arrayelements ::=\",\n /* 188 */ \"arrayelement ::= value APTR expr\",\n /* 189 */ \"arrayelement ::= ID APTR expr\",\n /* 190 */ \"arrayelement ::= expr\",\n /* 191 */ \"doublequoted_with_quotes ::= QUOTE QUOTE\",\n /* 192 */ \"doublequoted_with_quotes ::= QUOTE doublequoted QUOTE\",\n /* 193 */ \"doublequoted ::= doublequoted doublequotedcontent\",\n /* 194 */ \"doublequoted ::= doublequotedcontent\",\n /* 195 */ \"doublequotedcontent ::= BACKTICK variable BACKTICK\",\n /* 196 */ \"doublequotedcontent ::= BACKTICK expr BACKTICK\",\n /* 197 */ \"doublequotedcontent ::= DOLLARID\",\n /* 198 */ \"doublequotedcontent ::= LDEL variable RDEL\",\n /* 199 */ \"doublequotedcontent ::= LDEL expr RDEL\",\n /* 200 */ \"doublequotedcontent ::= smartytag\",\n /* 201 */ \"doublequotedcontent ::= TEXT\",\n /* 202 */ \"optspace ::= SPACE\",\n /* 203 */ \"optspace ::=\",\n    );\n\n    function tokenName($tokenType)\n    {\n        if ($tokenType === 0) {\n            return 'End of Input';\n        }\n        if ($tokenType > 0 && $tokenType < count($this->yyTokenName)) {\n            return $this->yyTokenName[$tokenType];\n        } else {\n            return \"Unknown\";\n        }\n    }\n\n    static function yy_destructor($yymajor, $yypminor)\n    {\n        switch ($yymajor) {\n            default:  break;   /* If no destructor action specified: do nothing */\n        }\n    }\n\n    function yy_pop_parser_stack()\n    {\n        if (!count($this->yystack)) {\n            return;\n        }\n        $yytos = array_pop($this->yystack);\n        if (self::$yyTraceFILE && $this->yyidx >= 0) {\n            fwrite(self::$yyTraceFILE,\n                self::$yyTracePrompt . 'Popping ' . $this->yyTokenName[$yytos->major] .\n                    \"\\n\");\n        }\n        $yymajor = $yytos->major;\n        self::yy_destructor($yymajor, $yytos->minor);\n        $this->yyidx--;\n        return $yymajor;\n    }\n\n    function __destruct()\n    {\n        while ($this->yystack !== Array()) {\n            $this->yy_pop_parser_stack();\n        }\n        if (is_resource(self::$yyTraceFILE)) {\n            fclose(self::$yyTraceFILE);\n        }\n    }\n\n    function yy_get_expected_tokens($token)\n    {\n        $state = $this->yystack[$this->yyidx]->stateno;\n        $expected = self::$yyExpectedTokens[$state];\n        if (in_array($token, self::$yyExpectedTokens[$state], true)) {\n            return $expected;\n        }\n        $stack = $this->yystack;\n        $yyidx = $this->yyidx;\n        do {\n            $yyact = $this->yy_find_shift_action($token);\n            if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) {\n                // reduce action\n                $done = 0;\n                do {\n                    if ($done++ == 100) {\n                        $this->yyidx = $yyidx;\n                        $this->yystack = $stack;\n                        // too much recursion prevents proper detection\n                        // so give up\n                        return array_unique($expected);\n                    }\n                    $yyruleno = $yyact - self::YYNSTATE;\n                    $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs'];\n                    $nextstate = $this->yy_find_reduce_action(\n                        $this->yystack[$this->yyidx]->stateno,\n                        self::$yyRuleInfo[$yyruleno]['lhs']);\n                    if (isset(self::$yyExpectedTokens[$nextstate])) {\n\t\t        $expected = array_merge($expected, self::$yyExpectedTokens[$nextstate]);\n                            if (in_array($token,\n                                  self::$yyExpectedTokens[$nextstate], true)) {\n                            $this->yyidx = $yyidx;\n                            $this->yystack = $stack;\n                            return array_unique($expected);\n                        }\n                    }\n                    if ($nextstate < self::YYNSTATE) {\n                        // we need to shift a non-terminal\n                        $this->yyidx++;\n                        $x = new TP_yyStackEntry;\n                        $x->stateno = $nextstate;\n                        $x->major = self::$yyRuleInfo[$yyruleno]['lhs'];\n                        $this->yystack[$this->yyidx] = $x;\n                        continue 2;\n                    } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {\n                        $this->yyidx = $yyidx;\n                        $this->yystack = $stack;\n                        // the last token was just ignored, we can't accept\n                        // by ignoring input, this is in essence ignoring a\n                        // syntax error!\n                        return array_unique($expected);\n                    } elseif ($nextstate === self::YY_NO_ACTION) {\n                        $this->yyidx = $yyidx;\n                        $this->yystack = $stack;\n                        // input accepted, but not shifted (I guess)\n                        return $expected;\n                    } else {\n                        $yyact = $nextstate;\n                    }\n                } while (true);\n            }\n            break;\n        } while (true);\n\t$this->yyidx = $yyidx;\n\t$this->yystack = $stack;\n        return array_unique($expected);\n    }\n\n    function yy_is_expected_token($token)\n    {\n        if ($token === 0) {\n            return true; // 0 is not part of this\n        }\n        $state = $this->yystack[$this->yyidx]->stateno;\n        if (in_array($token, self::$yyExpectedTokens[$state], true)) {\n            return true;\n        }\n        $stack = $this->yystack;\n        $yyidx = $this->yyidx;\n        do {\n            $yyact = $this->yy_find_shift_action($token);\n            if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) {\n                // reduce action\n                $done = 0;\n                do {\n                    if ($done++ == 100) {\n                        $this->yyidx = $yyidx;\n                        $this->yystack = $stack;\n                        // too much recursion prevents proper detection\n                        // so give up\n                        return true;\n                    }\n                    $yyruleno = $yyact - self::YYNSTATE;\n                    $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs'];\n                    $nextstate = $this->yy_find_reduce_action(\n                        $this->yystack[$this->yyidx]->stateno,\n                        self::$yyRuleInfo[$yyruleno]['lhs']);\n                    if (isset(self::$yyExpectedTokens[$nextstate]) &&\n                          in_array($token, self::$yyExpectedTokens[$nextstate], true)) {\n                        $this->yyidx = $yyidx;\n                        $this->yystack = $stack;\n                        return true;\n                    }\n                    if ($nextstate < self::YYNSTATE) {\n                        // we need to shift a non-terminal\n                        $this->yyidx++;\n                        $x = new TP_yyStackEntry;\n                        $x->stateno = $nextstate;\n                        $x->major = self::$yyRuleInfo[$yyruleno]['lhs'];\n                        $this->yystack[$this->yyidx] = $x;\n                        continue 2;\n                    } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {\n                        $this->yyidx = $yyidx;\n                        $this->yystack = $stack;\n                        if (!$token) {\n                            // end of input: this is valid\n                            return true;\n                        }\n                        // the last token was just ignored, we can't accept\n                        // by ignoring input, this is in essence ignoring a\n                        // syntax error!\n                        return false;\n                    } elseif ($nextstate === self::YY_NO_ACTION) {\n                        $this->yyidx = $yyidx;\n                        $this->yystack = $stack;\n                        // input accepted, but not shifted (I guess)\n                        return true;\n                    } else {\n                        $yyact = $nextstate;\n                    }\n                } while (true);\n            }\n            break;\n        } while (true);\n        $this->yyidx = $yyidx;\n        $this->yystack = $stack;\n        return true;\n    }\n\n   function yy_find_shift_action($iLookAhead)\n    {\n        $stateno = $this->yystack[$this->yyidx]->stateno;\n\n        /* if ($this->yyidx < 0) return self::YY_NO_ACTION;  */\n        if (!isset(self::$yy_shift_ofst[$stateno])) {\n            // no shift actions\n            return self::$yy_default[$stateno];\n        }\n        $i = self::$yy_shift_ofst[$stateno];\n        if ($i === self::YY_SHIFT_USE_DFLT) {\n            return self::$yy_default[$stateno];\n        }\n        if ($iLookAhead == self::YYNOCODE) {\n            return self::YY_NO_ACTION;\n        }\n        $i += $iLookAhead;\n        if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||\n              self::$yy_lookahead[$i] != $iLookAhead) {\n            if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback)\n                   && ($iFallback = self::$yyFallback[$iLookAhead]) != 0) {\n                if (self::$yyTraceFILE) {\n                    fwrite(self::$yyTraceFILE, self::$yyTracePrompt . \"FALLBACK \" .\n                        $this->yyTokenName[$iLookAhead] . \" => \" .\n                        $this->yyTokenName[$iFallback] . \"\\n\");\n                }\n                return $this->yy_find_shift_action($iFallback);\n            }\n            return self::$yy_default[$stateno];\n        } else {\n            return self::$yy_action[$i];\n        }\n    }\n\n    function yy_find_reduce_action($stateno, $iLookAhead)\n    {\n        /* $stateno = $this->yystack[$this->yyidx]->stateno; */\n\n        if (!isset(self::$yy_reduce_ofst[$stateno])) {\n            return self::$yy_default[$stateno];\n        }\n        $i = self::$yy_reduce_ofst[$stateno];\n        if ($i == self::YY_REDUCE_USE_DFLT) {\n            return self::$yy_default[$stateno];\n        }\n        if ($iLookAhead == self::YYNOCODE) {\n            return self::YY_NO_ACTION;\n        }\n        $i += $iLookAhead;\n        if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||\n              self::$yy_lookahead[$i] != $iLookAhead) {\n            return self::$yy_default[$stateno];\n        } else {\n            return self::$yy_action[$i];\n        }\n    }\n\n    function yy_shift($yyNewState, $yyMajor, $yypMinor)\n    {\n        $this->yyidx++;\n        if ($this->yyidx >= self::YYSTACKDEPTH) {\n            $this->yyidx--;\n            if (self::$yyTraceFILE) {\n                fprintf(self::$yyTraceFILE, \"%sStack Overflow!\\n\", self::$yyTracePrompt);\n            }\n            while ($this->yyidx >= 0) {\n                $this->yy_pop_parser_stack();\n            }\n#line 84 \"smarty_internal_templateparser.y\"\n\n    $this->internalError = true;\n    $this->compiler->trigger_template_error(\"Stack overflow in template parser\");\n#line 1724 \"smarty_internal_templateparser.php\"\n            return;\n        }\n        $yytos = new TP_yyStackEntry;\n        $yytos->stateno = $yyNewState;\n        $yytos->major = $yyMajor;\n        $yytos->minor = $yypMinor;\n        array_push($this->yystack, $yytos);\n        if (self::$yyTraceFILE && $this->yyidx > 0) {\n            fprintf(self::$yyTraceFILE, \"%sShift %d\\n\", self::$yyTracePrompt,\n                $yyNewState);\n            fprintf(self::$yyTraceFILE, \"%sStack:\", self::$yyTracePrompt);\n            for($i = 1; $i <= $this->yyidx; $i++) {\n                fprintf(self::$yyTraceFILE, \" %s\",\n                    $this->yyTokenName[$this->yystack[$i]->major]);\n            }\n            fwrite(self::$yyTraceFILE,\"\\n\");\n        }\n    }\n\n    static public $yyRuleInfo = array(\n  array( 'lhs' => 82, 'rhs' => 1 ),\n  array( 'lhs' => 83, 'rhs' => 1 ),\n  array( 'lhs' => 83, 'rhs' => 2 ),\n  array( 'lhs' => 83, 'rhs' => 0 ),\n  array( 'lhs' => 84, 'rhs' => 1 ),\n  array( 'lhs' => 84, 'rhs' => 1 ),\n  array( 'lhs' => 84, 'rhs' => 1 ),\n  array( 'lhs' => 84, 'rhs' => 1 ),\n  array( 'lhs' => 84, 'rhs' => 1 ),\n  array( 'lhs' => 84, 'rhs' => 1 ),\n  array( 'lhs' => 84, 'rhs' => 1 ),\n  array( 'lhs' => 84, 'rhs' => 1 ),\n  array( 'lhs' => 84, 'rhs' => 1 ),\n  array( 'lhs' => 84, 'rhs' => 1 ),\n  array( 'lhs' => 84, 'rhs' => 1 ),\n  array( 'lhs' => 84, 'rhs' => 1 ),\n  array( 'lhs' => 86, 'rhs' => 2 ),\n  array( 'lhs' => 86, 'rhs' => 3 ),\n  array( 'lhs' => 87, 'rhs' => 2 ),\n  array( 'lhs' => 87, 'rhs' => 0 ),\n  array( 'lhs' => 88, 'rhs' => 1 ),\n  array( 'lhs' => 88, 'rhs' => 1 ),\n  array( 'lhs' => 88, 'rhs' => 1 ),\n  array( 'lhs' => 88, 'rhs' => 1 ),\n  array( 'lhs' => 88, 'rhs' => 1 ),\n  array( 'lhs' => 88, 'rhs' => 1 ),\n  array( 'lhs' => 88, 'rhs' => 1 ),\n  array( 'lhs' => 85, 'rhs' => 3 ),\n  array( 'lhs' => 85, 'rhs' => 5 ),\n  array( 'lhs' => 85, 'rhs' => 4 ),\n  array( 'lhs' => 85, 'rhs' => 5 ),\n  array( 'lhs' => 85, 'rhs' => 4 ),\n  array( 'lhs' => 85, 'rhs' => 6 ),\n  array( 'lhs' => 85, 'rhs' => 6 ),\n  array( 'lhs' => 85, 'rhs' => 7 ),\n  array( 'lhs' => 85, 'rhs' => 6 ),\n  array( 'lhs' => 85, 'rhs' => 4 ),\n  array( 'lhs' => 85, 'rhs' => 3 ),\n  array( 'lhs' => 85, 'rhs' => 6 ),\n  array( 'lhs' => 85, 'rhs' => 5 ),\n  array( 'lhs' => 85, 'rhs' => 7 ),\n  array( 'lhs' => 85, 'rhs' => 3 ),\n  array( 'lhs' => 85, 'rhs' => 4 ),\n  array( 'lhs' => 85, 'rhs' => 3 ),\n  array( 'lhs' => 85, 'rhs' => 4 ),\n  array( 'lhs' => 85, 'rhs' => 12 ),\n  array( 'lhs' => 98, 'rhs' => 2 ),\n  array( 'lhs' => 98, 'rhs' => 1 ),\n  array( 'lhs' => 85, 'rhs' => 6 ),\n  array( 'lhs' => 85, 'rhs' => 8 ),\n  array( 'lhs' => 85, 'rhs' => 3 ),\n  array( 'lhs' => 85, 'rhs' => 8 ),\n  array( 'lhs' => 85, 'rhs' => 11 ),\n  array( 'lhs' => 85, 'rhs' => 8 ),\n  array( 'lhs' => 85, 'rhs' => 11 ),\n  array( 'lhs' => 85, 'rhs' => 4 ),\n  array( 'lhs' => 85, 'rhs' => 5 ),\n  array( 'lhs' => 85, 'rhs' => 1 ),\n  array( 'lhs' => 85, 'rhs' => 3 ),\n  array( 'lhs' => 85, 'rhs' => 4 ),\n  array( 'lhs' => 85, 'rhs' => 5 ),\n  array( 'lhs' => 85, 'rhs' => 6 ),\n  array( 'lhs' => 91, 'rhs' => 2 ),\n  array( 'lhs' => 91, 'rhs' => 1 ),\n  array( 'lhs' => 91, 'rhs' => 0 ),\n  array( 'lhs' => 100, 'rhs' => 4 ),\n  array( 'lhs' => 100, 'rhs' => 2 ),\n  array( 'lhs' => 100, 'rhs' => 2 ),\n  array( 'lhs' => 100, 'rhs' => 2 ),\n  array( 'lhs' => 100, 'rhs' => 2 ),\n  array( 'lhs' => 100, 'rhs' => 2 ),\n  array( 'lhs' => 100, 'rhs' => 4 ),\n  array( 'lhs' => 95, 'rhs' => 1 ),\n  array( 'lhs' => 95, 'rhs' => 3 ),\n  array( 'lhs' => 94, 'rhs' => 4 ),\n  array( 'lhs' => 94, 'rhs' => 3 ),\n  array( 'lhs' => 94, 'rhs' => 3 ),\n  array( 'lhs' => 92, 'rhs' => 1 ),\n  array( 'lhs' => 92, 'rhs' => 1 ),\n  array( 'lhs' => 92, 'rhs' => 4 ),\n  array( 'lhs' => 92, 'rhs' => 3 ),\n  array( 'lhs' => 92, 'rhs' => 3 ),\n  array( 'lhs' => 92, 'rhs' => 3 ),\n  array( 'lhs' => 92, 'rhs' => 1 ),\n  array( 'lhs' => 92, 'rhs' => 2 ),\n  array( 'lhs' => 92, 'rhs' => 3 ),\n  array( 'lhs' => 92, 'rhs' => 3 ),\n  array( 'lhs' => 92, 'rhs' => 3 ),\n  array( 'lhs' => 92, 'rhs' => 3 ),\n  array( 'lhs' => 92, 'rhs' => 3 ),\n  array( 'lhs' => 92, 'rhs' => 3 ),\n  array( 'lhs' => 92, 'rhs' => 2 ),\n  array( 'lhs' => 92, 'rhs' => 2 ),\n  array( 'lhs' => 92, 'rhs' => 3 ),\n  array( 'lhs' => 92, 'rhs' => 3 ),\n  array( 'lhs' => 92, 'rhs' => 2 ),\n  array( 'lhs' => 92, 'rhs' => 2 ),\n  array( 'lhs' => 92, 'rhs' => 3 ),\n  array( 'lhs' => 92, 'rhs' => 3 ),\n  array( 'lhs' => 92, 'rhs' => 3 ),\n  array( 'lhs' => 92, 'rhs' => 3 ),\n  array( 'lhs' => 101, 'rhs' => 8 ),\n  array( 'lhs' => 101, 'rhs' => 7 ),\n  array( 'lhs' => 89, 'rhs' => 1 ),\n  array( 'lhs' => 89, 'rhs' => 2 ),\n  array( 'lhs' => 89, 'rhs' => 2 ),\n  array( 'lhs' => 89, 'rhs' => 2 ),\n  array( 'lhs' => 89, 'rhs' => 2 ),\n  array( 'lhs' => 89, 'rhs' => 1 ),\n  array( 'lhs' => 89, 'rhs' => 1 ),\n  array( 'lhs' => 89, 'rhs' => 3 ),\n  array( 'lhs' => 89, 'rhs' => 2 ),\n  array( 'lhs' => 89, 'rhs' => 2 ),\n  array( 'lhs' => 89, 'rhs' => 1 ),\n  array( 'lhs' => 89, 'rhs' => 1 ),\n  array( 'lhs' => 89, 'rhs' => 3 ),\n  array( 'lhs' => 89, 'rhs' => 1 ),\n  array( 'lhs' => 89, 'rhs' => 1 ),\n  array( 'lhs' => 89, 'rhs' => 3 ),\n  array( 'lhs' => 89, 'rhs' => 3 ),\n  array( 'lhs' => 89, 'rhs' => 1 ),\n  array( 'lhs' => 89, 'rhs' => 2 ),\n  array( 'lhs' => 105, 'rhs' => 1 ),\n  array( 'lhs' => 105, 'rhs' => 4 ),\n  array( 'lhs' => 105, 'rhs' => 1 ),\n  array( 'lhs' => 105, 'rhs' => 3 ),\n  array( 'lhs' => 105, 'rhs' => 4 ),\n  array( 'lhs' => 105, 'rhs' => 3 ),\n  array( 'lhs' => 105, 'rhs' => 4 ),\n  array( 'lhs' => 93, 'rhs' => 3 ),\n  array( 'lhs' => 110, 'rhs' => 2 ),\n  array( 'lhs' => 110, 'rhs' => 0 ),\n  array( 'lhs' => 111, 'rhs' => 3 ),\n  array( 'lhs' => 111, 'rhs' => 5 ),\n  array( 'lhs' => 111, 'rhs' => 2 ),\n  array( 'lhs' => 111, 'rhs' => 2 ),\n  array( 'lhs' => 111, 'rhs' => 4 ),\n  array( 'lhs' => 111, 'rhs' => 3 ),\n  array( 'lhs' => 111, 'rhs' => 5 ),\n  array( 'lhs' => 111, 'rhs' => 3 ),\n  array( 'lhs' => 111, 'rhs' => 2 ),\n  array( 'lhs' => 97, 'rhs' => 1 ),\n  array( 'lhs' => 97, 'rhs' => 2 ),\n  array( 'lhs' => 112, 'rhs' => 1 ),\n  array( 'lhs' => 112, 'rhs' => 3 ),\n  array( 'lhs' => 109, 'rhs' => 2 ),\n  array( 'lhs' => 113, 'rhs' => 1 ),\n  array( 'lhs' => 113, 'rhs' => 2 ),\n  array( 'lhs' => 114, 'rhs' => 3 ),\n  array( 'lhs' => 114, 'rhs' => 4 ),\n  array( 'lhs' => 114, 'rhs' => 5 ),\n  array( 'lhs' => 114, 'rhs' => 6 ),\n  array( 'lhs' => 114, 'rhs' => 2 ),\n  array( 'lhs' => 106, 'rhs' => 4 ),\n  array( 'lhs' => 115, 'rhs' => 4 ),\n  array( 'lhs' => 115, 'rhs' => 5 ),\n  array( 'lhs' => 116, 'rhs' => 3 ),\n  array( 'lhs' => 116, 'rhs' => 1 ),\n  array( 'lhs' => 116, 'rhs' => 0 ),\n  array( 'lhs' => 90, 'rhs' => 3 ),\n  array( 'lhs' => 90, 'rhs' => 2 ),\n  array( 'lhs' => 117, 'rhs' => 3 ),\n  array( 'lhs' => 117, 'rhs' => 2 ),\n  array( 'lhs' => 99, 'rhs' => 2 ),\n  array( 'lhs' => 99, 'rhs' => 0 ),\n  array( 'lhs' => 118, 'rhs' => 2 ),\n  array( 'lhs' => 118, 'rhs' => 2 ),\n  array( 'lhs' => 108, 'rhs' => 1 ),\n  array( 'lhs' => 108, 'rhs' => 2 ),\n  array( 'lhs' => 108, 'rhs' => 1 ),\n  array( 'lhs' => 108, 'rhs' => 3 ),\n  array( 'lhs' => 108, 'rhs' => 4 ),\n  array( 'lhs' => 103, 'rhs' => 1 ),\n  array( 'lhs' => 103, 'rhs' => 1 ),\n  array( 'lhs' => 103, 'rhs' => 1 ),\n  array( 'lhs' => 103, 'rhs' => 1 ),\n  array( 'lhs' => 103, 'rhs' => 1 ),\n  array( 'lhs' => 103, 'rhs' => 1 ),\n  array( 'lhs' => 103, 'rhs' => 1 ),\n  array( 'lhs' => 103, 'rhs' => 1 ),\n  array( 'lhs' => 103, 'rhs' => 1 ),\n  array( 'lhs' => 104, 'rhs' => 1 ),\n  array( 'lhs' => 104, 'rhs' => 1 ),\n  array( 'lhs' => 104, 'rhs' => 1 ),\n  array( 'lhs' => 102, 'rhs' => 3 ),\n  array( 'lhs' => 119, 'rhs' => 1 ),\n  array( 'lhs' => 119, 'rhs' => 3 ),\n  array( 'lhs' => 119, 'rhs' => 0 ),\n  array( 'lhs' => 120, 'rhs' => 3 ),\n  array( 'lhs' => 120, 'rhs' => 3 ),\n  array( 'lhs' => 120, 'rhs' => 1 ),\n  array( 'lhs' => 107, 'rhs' => 2 ),\n  array( 'lhs' => 107, 'rhs' => 3 ),\n  array( 'lhs' => 121, 'rhs' => 2 ),\n  array( 'lhs' => 121, 'rhs' => 1 ),\n  array( 'lhs' => 122, 'rhs' => 3 ),\n  array( 'lhs' => 122, 'rhs' => 3 ),\n  array( 'lhs' => 122, 'rhs' => 1 ),\n  array( 'lhs' => 122, 'rhs' => 3 ),\n  array( 'lhs' => 122, 'rhs' => 3 ),\n  array( 'lhs' => 122, 'rhs' => 1 ),\n  array( 'lhs' => 122, 'rhs' => 1 ),\n  array( 'lhs' => 96, 'rhs' => 1 ),\n  array( 'lhs' => 96, 'rhs' => 0 ),\n    );\n\n    static public $yyReduceMap = array(\n        0 => 0,\n        1 => 1,\n        2 => 1,\n        4 => 4,\n        5 => 5,\n        6 => 6,\n        7 => 7,\n        8 => 8,\n        9 => 9,\n        10 => 10,\n        11 => 11,\n        12 => 12,\n        13 => 13,\n        14 => 14,\n        15 => 15,\n        16 => 16,\n        19 => 16,\n        203 => 16,\n        17 => 17,\n        76 => 17,\n        18 => 18,\n        104 => 18,\n        106 => 18,\n        107 => 18,\n        130 => 18,\n        168 => 18,\n        20 => 20,\n        21 => 20,\n        47 => 20,\n        69 => 20,\n        70 => 20,\n        77 => 20,\n        78 => 20,\n        83 => 20,\n        103 => 20,\n        108 => 20,\n        109 => 20,\n        114 => 20,\n        116 => 20,\n        117 => 20,\n        124 => 20,\n        141 => 20,\n        167 => 20,\n        169 => 20,\n        185 => 20,\n        190 => 20,\n        202 => 20,\n        22 => 22,\n        23 => 22,\n        24 => 24,\n        25 => 25,\n        26 => 26,\n        27 => 27,\n        28 => 28,\n        29 => 29,\n        31 => 29,\n        30 => 30,\n        32 => 32,\n        33 => 32,\n        34 => 34,\n        35 => 35,\n        36 => 36,\n        37 => 37,\n        38 => 38,\n        39 => 39,\n        40 => 40,\n        41 => 41,\n        42 => 42,\n        44 => 42,\n        43 => 43,\n        45 => 45,\n        46 => 46,\n        48 => 48,\n        49 => 49,\n        50 => 50,\n        51 => 51,\n        52 => 52,\n        53 => 53,\n        54 => 54,\n        55 => 55,\n        56 => 56,\n        57 => 57,\n        58 => 58,\n        59 => 59,\n        60 => 60,\n        61 => 61,\n        62 => 62,\n        63 => 63,\n        72 => 63,\n        157 => 63,\n        161 => 63,\n        165 => 63,\n        166 => 63,\n        64 => 64,\n        158 => 64,\n        164 => 64,\n        65 => 65,\n        66 => 66,\n        67 => 66,\n        68 => 68,\n        71 => 71,\n        73 => 73,\n        74 => 74,\n        75 => 74,\n        79 => 79,\n        80 => 80,\n        81 => 80,\n        82 => 80,\n        84 => 84,\n        121 => 84,\n        85 => 85,\n        88 => 85,\n        99 => 85,\n        86 => 86,\n        87 => 87,\n        89 => 89,\n        90 => 90,\n        91 => 91,\n        96 => 91,\n        92 => 92,\n        95 => 92,\n        93 => 93,\n        98 => 93,\n        94 => 94,\n        97 => 94,\n        100 => 100,\n        101 => 101,\n        102 => 102,\n        105 => 105,\n        110 => 110,\n        111 => 111,\n        112 => 112,\n        113 => 113,\n        115 => 115,\n        118 => 118,\n        119 => 119,\n        120 => 120,\n        122 => 122,\n        123 => 123,\n        125 => 125,\n        126 => 126,\n        127 => 127,\n        128 => 128,\n        129 => 129,\n        131 => 131,\n        187 => 131,\n        132 => 132,\n        133 => 133,\n        134 => 134,\n        135 => 135,\n        136 => 136,\n        139 => 136,\n        137 => 137,\n        138 => 138,\n        140 => 140,\n        142 => 142,\n        143 => 143,\n        144 => 144,\n        145 => 145,\n        146 => 146,\n        147 => 147,\n        148 => 148,\n        149 => 149,\n        150 => 150,\n        151 => 151,\n        152 => 152,\n        153 => 153,\n        154 => 154,\n        155 => 155,\n        156 => 156,\n        159 => 159,\n        160 => 160,\n        162 => 162,\n        163 => 163,\n        170 => 170,\n        171 => 171,\n        172 => 172,\n        173 => 173,\n        174 => 174,\n        175 => 175,\n        176 => 176,\n        177 => 177,\n        178 => 178,\n        179 => 179,\n        180 => 180,\n        181 => 181,\n        182 => 182,\n        183 => 183,\n        184 => 184,\n        186 => 186,\n        188 => 188,\n        189 => 189,\n        191 => 191,\n        192 => 192,\n        193 => 193,\n        194 => 194,\n        195 => 195,\n        196 => 195,\n        198 => 195,\n        197 => 197,\n        199 => 199,\n        200 => 200,\n        201 => 201,\n    );\n#line 95 \"smarty_internal_templateparser.y\"\n    function yy_r0(){\n    $this->_retvalue = $this->root_buffer->to_smarty_php();\n    }\n#line 2160 \"smarty_internal_templateparser.php\"\n#line 103 \"smarty_internal_templateparser.y\"\n    function yy_r1(){\n    $this->current_buffer->append_subtree($this->yystack[$this->yyidx + 0]->minor);\n    }\n#line 2165 \"smarty_internal_templateparser.php\"\n#line 119 \"smarty_internal_templateparser.y\"\n    function yy_r4(){\n    if ($this->compiler->has_code) {\n        $tmp =''; foreach ($this->compiler->prefix_code as $code) {$tmp.=$code;} $this->compiler->prefix_code=array();\n        $this->_retvalue = new _smarty_tag($this, $this->compiler->processNocacheCode($tmp.$this->yystack[$this->yyidx + 0]->minor,true));\n    } else {\n        $this->_retvalue = new _smarty_tag($this, $this->yystack[$this->yyidx + 0]->minor);\n    }\n    $this->compiler->has_variable_string = false;\n    $this->block_nesting_level = count($this->compiler->_tag_stack);\n    }\n#line 2177 \"smarty_internal_templateparser.php\"\n#line 131 \"smarty_internal_templateparser.y\"\n    function yy_r5(){\n    $this->_retvalue = new _smarty_tag($this, '');\n    }\n#line 2182 \"smarty_internal_templateparser.php\"\n#line 136 \"smarty_internal_templateparser.y\"\n    function yy_r6(){\n    $this->_retvalue = new _smarty_text($this, $this->yystack[$this->yyidx + 0]->minor);\n    }\n#line 2187 \"smarty_internal_templateparser.php\"\n#line 141 \"smarty_internal_templateparser.y\"\n    function yy_r7(){\n    if ($this->php_handling == Smarty::PHP_PASSTHRU) {\n        $this->_retvalue = new _smarty_text($this, self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor));\n    } elseif ($this->php_handling == Smarty::PHP_QUOTE) {\n        $this->_retvalue = new _smarty_text($this, htmlspecialchars($this->yystack[$this->yyidx + 0]->minor, ENT_QUOTES));\n    } elseif ($this->php_handling == Smarty::PHP_ALLOW) {\n        if (!($this->smarty instanceof SmartyBC)) {\n            $this->compiler->trigger_template_error (self::Err3);\n        }\n        $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('<?php', true));\n    } elseif ($this->php_handling == Smarty::PHP_REMOVE) {\n        $this->_retvalue = new _smarty_text($this, '');\n    }\n    }\n#line 2203 \"smarty_internal_templateparser.php\"\n#line 157 \"smarty_internal_templateparser.y\"\n    function yy_r8(){\n    if ($this->is_xml) {\n        $this->compiler->tag_nocache = true;\n        $this->is_xml = false;\n        $save = $this->template->has_nocache_code;\n        $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode(\"<?php echo '?>';?>\\n\", $this->compiler, true));\n        $this->template->has_nocache_code = $save;\n    } elseif ($this->php_handling == Smarty::PHP_PASSTHRU) {\n        $this->_retvalue = new _smarty_text($this, '?<?php ?>>');\n    } elseif ($this->php_handling == Smarty::PHP_QUOTE) {\n        $this->_retvalue = new _smarty_text($this, htmlspecialchars('?>', ENT_QUOTES));\n    } elseif ($this->php_handling == Smarty::PHP_ALLOW) {\n        $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('?>', true));\n    } elseif ($this->php_handling == Smarty::PHP_REMOVE) {\n        $this->_retvalue = new _smarty_text($this, '');\n    }\n    }\n#line 2222 \"smarty_internal_templateparser.php\"\n#line 176 \"smarty_internal_templateparser.y\"\n    function yy_r9(){\n    if ($this->php_handling == Smarty::PHP_PASSTHRU) {\n        $this->_retvalue = new _smarty_text($this, '<<?php ?>%');\n    } elseif ($this->php_handling == Smarty::PHP_QUOTE) {\n        $this->_retvalue = new _smarty_text($this, htmlspecialchars($this->yystack[$this->yyidx + 0]->minor, ENT_QUOTES));\n    } elseif ($this->php_handling == Smarty::PHP_ALLOW) {\n        if ($this->asp_tags) {\n            if (!($this->smarty instanceof SmartyBC)) {\n                $this->compiler->trigger_template_error (self::Err3);\n            }\n            $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('<%', true));\n        } else {\n            $this->_retvalue = new _smarty_text($this, '<<?php ?>%');\n        }\n    } elseif ($this->php_handling == Smarty::PHP_REMOVE) {\n        if ($this->asp_tags) {\n            $this->_retvalue = new _smarty_text($this, '');\n        } else {\n            $this->_retvalue = new _smarty_text($this, '<<?php ?>%');\n        }\n    }\n    }\n#line 2246 \"smarty_internal_templateparser.php\"\n#line 200 \"smarty_internal_templateparser.y\"\n    function yy_r10(){\n    if ($this->php_handling == Smarty::PHP_PASSTHRU) {\n        $this->_retvalue = new _smarty_text($this, '%<?php ?>>');\n    } elseif ($this->php_handling == Smarty::PHP_QUOTE) {\n        $this->_retvalue = new _smarty_text($this, htmlspecialchars('%>', ENT_QUOTES));\n    } elseif ($this->php_handling == Smarty::PHP_ALLOW) {\n        if ($this->asp_tags) {\n            $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('%>', true));\n        } else {\n            $this->_retvalue = new _smarty_text($this, '%<?php ?>>');\n        }\n    } elseif ($this->php_handling == Smarty::PHP_REMOVE) {\n        if ($this->asp_tags) {\n            $this->_retvalue = new _smarty_text($this, '');\n        } else {\n            $this->_retvalue = new _smarty_text($this, '%<?php ?>>');\n        }\n    }\n    }\n#line 2267 \"smarty_internal_templateparser.php\"\n#line 220 \"smarty_internal_templateparser.y\"\n    function yy_r11(){\n    if ($this->strip) {\n        $this->_retvalue = new _smarty_text($this, preg_replace('![\\t ]*[\\r\\n]+[\\t ]*!', '', self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor)));\n    } else {\n        $this->_retvalue = new _smarty_text($this, self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor));\n    }\n    }\n#line 2276 \"smarty_internal_templateparser.php\"\n#line 229 \"smarty_internal_templateparser.y\"\n    function yy_r12(){\n    $this->compiler->tag_nocache = true;\n    $this->is_xml = true;\n    $save = $this->template->has_nocache_code;\n    $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode(\"<?php echo '<?xml';?>\", $this->compiler, true));\n    $this->template->has_nocache_code = $save;\n    }\n#line 2285 \"smarty_internal_templateparser.php\"\n#line 238 \"smarty_internal_templateparser.y\"\n    function yy_r13(){\n    if ($this->strip) {\n        $this->_retvalue = new _smarty_text($this, preg_replace('![\\t ]*[\\r\\n]+[\\t ]*!', '', $this->yystack[$this->yyidx + 0]->minor));\n    } else {\n        $this->_retvalue = new _smarty_text($this, $this->yystack[$this->yyidx + 0]->minor);\n    }\n    }\n#line 2294 \"smarty_internal_templateparser.php\"\n#line 247 \"smarty_internal_templateparser.y\"\n    function yy_r14(){\n    $this->strip = true;\n    $this->_retvalue = new _smarty_text($this, '');\n    }\n#line 2300 \"smarty_internal_templateparser.php\"\n#line 252 \"smarty_internal_templateparser.y\"\n    function yy_r15(){\n    $this->strip = false;\n    $this->_retvalue = new _smarty_text($this, '');\n    }\n#line 2306 \"smarty_internal_templateparser.php\"\n#line 258 \"smarty_internal_templateparser.y\"\n    function yy_r16(){\n    $this->_retvalue = '';\n    }\n#line 2311 \"smarty_internal_templateparser.php\"\n#line 262 \"smarty_internal_templateparser.y\"\n    function yy_r17(){\n    $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor;\n    }\n#line 2316 \"smarty_internal_templateparser.php\"\n#line 266 \"smarty_internal_templateparser.y\"\n    function yy_r18(){\n    $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 2321 \"smarty_internal_templateparser.php\"\n#line 274 \"smarty_internal_templateparser.y\"\n    function yy_r20(){\n    $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 2326 \"smarty_internal_templateparser.php\"\n#line 282 \"smarty_internal_templateparser.y\"\n    function yy_r22(){\n    $this->_retvalue = self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor);\n    }\n#line 2331 \"smarty_internal_templateparser.php\"\n#line 290 \"smarty_internal_templateparser.y\"\n    function yy_r24(){\n    $this->_retvalue = self::escape_end_tag($this->yystack[$this->yyidx + 0]->minor);\n    }\n#line 2336 \"smarty_internal_templateparser.php\"\n#line 294 \"smarty_internal_templateparser.y\"\n    function yy_r25(){\n    $this->_retvalue = '<<?php ?>%';\n    }\n#line 2341 \"smarty_internal_templateparser.php\"\n#line 298 \"smarty_internal_templateparser.y\"\n    function yy_r26(){\n    $this->_retvalue = '%<?php ?>>';\n    }\n#line 2346 \"smarty_internal_templateparser.php\"\n#line 307 \"smarty_internal_templateparser.y\"\n    function yy_r27(){\n    $this->_retvalue = $this->compiler->compileTag('private_print_expression',array(),array('value'=>$this->yystack[$this->yyidx + -1]->minor));\n    }\n#line 2351 \"smarty_internal_templateparser.php\"\n#line 311 \"smarty_internal_templateparser.y\"\n    function yy_r28(){\n    $this->_retvalue = $this->compiler->compileTag('private_print_expression',$this->yystack[$this->yyidx + -1]->minor,array('value'=>$this->yystack[$this->yyidx + -3]->minor, 'modifierlist'=>$this->yystack[$this->yyidx + -2]->minor));\n    }\n#line 2356 \"smarty_internal_templateparser.php\"\n#line 315 \"smarty_internal_templateparser.y\"\n    function yy_r29(){\n    $this->_retvalue = $this->compiler->compileTag('private_print_expression',$this->yystack[$this->yyidx + -1]->minor,array('value'=>$this->yystack[$this->yyidx + -2]->minor));\n    }\n#line 2361 \"smarty_internal_templateparser.php\"\n#line 319 \"smarty_internal_templateparser.y\"\n    function yy_r30(){\n    $this->_retvalue = $this->compiler->compileTag('private_print_expression',$this->yystack[$this->yyidx + -1]->minor,array('value'=>$this->yystack[$this->yyidx + -3]->minor,'modifierlist'=>$this->yystack[$this->yyidx + -2]->minor));\n    }\n#line 2366 \"smarty_internal_templateparser.php\"\n#line 332 \"smarty_internal_templateparser.y\"\n    function yy_r32(){\n    $this->_retvalue = $this->compiler->compileTag('assign',array(array('value'=>$this->yystack[$this->yyidx + -1]->minor),array('var'=>\"'\".$this->yystack[$this->yyidx + -3]->minor.\"'\")));\n    }\n#line 2371 \"smarty_internal_templateparser.php\"\n#line 340 \"smarty_internal_templateparser.y\"\n    function yy_r34(){\n    $this->_retvalue = $this->compiler->compileTag('assign',array_merge(array(array('value'=>$this->yystack[$this->yyidx + -2]->minor),array('var'=>\"'\".$this->yystack[$this->yyidx + -4]->minor.\"'\")),$this->yystack[$this->yyidx + -1]->minor));\n    }\n#line 2376 \"smarty_internal_templateparser.php\"\n#line 344 \"smarty_internal_templateparser.y\"\n    function yy_r35(){\n    $this->_retvalue = $this->compiler->compileTag('assign',array_merge(array(array('value'=>$this->yystack[$this->yyidx + -2]->minor),array('var'=>$this->yystack[$this->yyidx + -4]->minor['var'])),$this->yystack[$this->yyidx + -1]->minor),array('smarty_internal_index'=>$this->yystack[$this->yyidx + -4]->minor['smarty_internal_index']));\n    }\n#line 2381 \"smarty_internal_templateparser.php\"\n#line 349 \"smarty_internal_templateparser.y\"\n    function yy_r36(){\n    $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -2]->minor,$this->yystack[$this->yyidx + -1]->minor);\n    }\n#line 2386 \"smarty_internal_templateparser.php\"\n#line 353 \"smarty_internal_templateparser.y\"\n    function yy_r37(){\n    $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -1]->minor,array());\n    }\n#line 2391 \"smarty_internal_templateparser.php\"\n#line 358 \"smarty_internal_templateparser.y\"\n    function yy_r38(){\n    $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -4]->minor,$this->yystack[$this->yyidx + -1]->minor,array('object_methode'=>$this->yystack[$this->yyidx + -2]->minor));\n    }\n#line 2396 \"smarty_internal_templateparser.php\"\n#line 363 \"smarty_internal_templateparser.y\"\n    function yy_r39(){\n    $this->_retvalue = '<?php ob_start();?>'.$this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor,$this->yystack[$this->yyidx + -1]->minor).'<?php echo ';\n    $this->_retvalue .= $this->compiler->compileTag('private_modifier',array(),array('modifierlist'=>$this->yystack[$this->yyidx + -2]->minor,'value'=>'ob_get_clean()')).'?>';\n    }\n#line 2402 \"smarty_internal_templateparser.php\"\n#line 369 \"smarty_internal_templateparser.y\"\n    function yy_r40(){\n    $this->_retvalue = '<?php ob_start();?>'.$this->compiler->compileTag($this->yystack[$this->yyidx + -5]->minor,$this->yystack[$this->yyidx + -1]->minor,array('object_methode'=>$this->yystack[$this->yyidx + -3]->minor)).'<?php echo ';\n    $this->_retvalue .= $this->compiler->compileTag('private_modifier',array(),array('modifierlist'=>$this->yystack[$this->yyidx + -2]->minor,'value'=>'ob_get_clean()')).'?>';\n    }\n#line 2408 \"smarty_internal_templateparser.php\"\n#line 375 \"smarty_internal_templateparser.y\"\n    function yy_r41(){\n    $tag = trim(substr($this->yystack[$this->yyidx + -2]->minor,$this->lex->ldel_length));\n    $this->_retvalue = $this->compiler->compileTag(($tag == 'else if')? 'elseif' : $tag,array(),array('if condition'=>$this->yystack[$this->yyidx + -1]->minor));\n    }\n#line 2414 \"smarty_internal_templateparser.php\"\n#line 380 \"smarty_internal_templateparser.y\"\n    function yy_r42(){\n    $tag = trim(substr($this->yystack[$this->yyidx + -3]->minor,$this->lex->ldel_length));\n    $this->_retvalue = $this->compiler->compileTag(($tag == 'else if')? 'elseif' : $tag,$this->yystack[$this->yyidx + -1]->minor,array('if condition'=>$this->yystack[$this->yyidx + -2]->minor));\n    }\n#line 2420 \"smarty_internal_templateparser.php\"\n#line 385 \"smarty_internal_templateparser.y\"\n    function yy_r43(){\n    $tag = trim(substr($this->yystack[$this->yyidx + -2]->minor,$this->lex->ldel_length));\n    $this->_retvalue = $this->compiler->compileTag(($tag == 'else if')? 'elseif' : $tag,array(),array('if condition'=>$this->yystack[$this->yyidx + -1]->minor));\n    }\n#line 2426 \"smarty_internal_templateparser.php\"\n#line 396 \"smarty_internal_templateparser.y\"\n    function yy_r45(){\n    $this->_retvalue = $this->compiler->compileTag('for',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('start'=>$this->yystack[$this->yyidx + -10]->minor),array('ifexp'=>$this->yystack[$this->yyidx + -7]->minor),array('var'=>$this->yystack[$this->yyidx + -3]->minor),array('step'=>$this->yystack[$this->yyidx + -2]->minor))),1);\n    }\n#line 2431 \"smarty_internal_templateparser.php\"\n#line 400 \"smarty_internal_templateparser.y\"\n    function yy_r46(){\n    $this->_retvalue = '='.$this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 2436 \"smarty_internal_templateparser.php\"\n#line 408 \"smarty_internal_templateparser.y\"\n    function yy_r48(){\n    $this->_retvalue = $this->compiler->compileTag('for',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('start'=>$this->yystack[$this->yyidx + -4]->minor),array('to'=>$this->yystack[$this->yyidx + -2]->minor))),0);\n    }\n#line 2441 \"smarty_internal_templateparser.php\"\n#line 412 \"smarty_internal_templateparser.y\"\n    function yy_r49(){\n    $this->_retvalue = $this->compiler->compileTag('for',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('start'=>$this->yystack[$this->yyidx + -6]->minor),array('to'=>$this->yystack[$this->yyidx + -4]->minor),array('step'=>$this->yystack[$this->yyidx + -2]->minor))),0);\n    }\n#line 2446 \"smarty_internal_templateparser.php\"\n#line 417 \"smarty_internal_templateparser.y\"\n    function yy_r50(){\n    $this->_retvalue = $this->compiler->compileTag('foreach',$this->yystack[$this->yyidx + -1]->minor);\n    }\n#line 2451 \"smarty_internal_templateparser.php\"\n#line 422 \"smarty_internal_templateparser.y\"\n    function yy_r51(){\n    $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('from'=>$this->yystack[$this->yyidx + -5]->minor),array('item'=>$this->yystack[$this->yyidx + -2]->minor))));\n    }\n#line 2456 \"smarty_internal_templateparser.php\"\n#line 426 \"smarty_internal_templateparser.y\"\n    function yy_r52(){\n    $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('from'=>$this->yystack[$this->yyidx + -8]->minor),array('item'=>$this->yystack[$this->yyidx + -2]->minor),array('key'=>$this->yystack[$this->yyidx + -5]->minor))));\n    }\n#line 2461 \"smarty_internal_templateparser.php\"\n#line 430 \"smarty_internal_templateparser.y\"\n    function yy_r53(){\n    $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('from'=>$this->yystack[$this->yyidx + -5]->minor),array('item'=>$this->yystack[$this->yyidx + -2]->minor))));\n    }\n#line 2466 \"smarty_internal_templateparser.php\"\n#line 434 \"smarty_internal_templateparser.y\"\n    function yy_r54(){\n    $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('from'=>$this->yystack[$this->yyidx + -8]->minor),array('item'=>$this->yystack[$this->yyidx + -2]->minor),array('key'=>$this->yystack[$this->yyidx + -5]->minor))));\n    }\n#line 2471 \"smarty_internal_templateparser.php\"\n#line 439 \"smarty_internal_templateparser.y\"\n    function yy_r55(){\n    $this->_retvalue = $this->compiler->compileTag('setfilter',array(),array('modifier_list'=>array(array_merge(array($this->yystack[$this->yyidx + -2]->minor),$this->yystack[$this->yyidx + -1]->minor))));\n    }\n#line 2476 \"smarty_internal_templateparser.php\"\n#line 443 \"smarty_internal_templateparser.y\"\n    function yy_r56(){\n    $this->_retvalue = $this->compiler->compileTag('setfilter',array(),array('modifier_list'=>array_merge(array(array_merge(array($this->yystack[$this->yyidx + -3]->minor),$this->yystack[$this->yyidx + -2]->minor)),$this->yystack[$this->yyidx + -1]->minor)));\n    }\n#line 2481 \"smarty_internal_templateparser.php\"\n#line 448 \"smarty_internal_templateparser.y\"\n    function yy_r57(){\n    $this->_retvalue = SMARTY_INTERNAL_COMPILE_BLOCK::compileChildBlock($this->compiler);\n    }\n#line 2486 \"smarty_internal_templateparser.php\"\n#line 454 \"smarty_internal_templateparser.y\"\n    function yy_r58(){\n    $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -1]->minor.'close',array());\n    }\n#line 2491 \"smarty_internal_templateparser.php\"\n#line 458 \"smarty_internal_templateparser.y\"\n    function yy_r59(){\n    $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -2]->minor.'close',array(),array('modifier_list'=>$this->yystack[$this->yyidx + -1]->minor));\n    }\n#line 2496 \"smarty_internal_templateparser.php\"\n#line 463 \"smarty_internal_templateparser.y\"\n    function yy_r60(){\n    $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor.'close',array(),array('object_methode'=>$this->yystack[$this->yyidx + -1]->minor));\n    }\n#line 2501 \"smarty_internal_templateparser.php\"\n#line 467 \"smarty_internal_templateparser.y\"\n    function yy_r61(){\n    $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -4]->minor.'close',array(),array('object_methode'=>$this->yystack[$this->yyidx + -2]->minor, 'modifier_list'=>$this->yystack[$this->yyidx + -1]->minor));\n    }\n#line 2506 \"smarty_internal_templateparser.php\"\n#line 475 \"smarty_internal_templateparser.y\"\n    function yy_r62(){\n    $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor;\n    $this->_retvalue[] = $this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 2512 \"smarty_internal_templateparser.php\"\n#line 481 \"smarty_internal_templateparser.y\"\n    function yy_r63(){\n    $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor);\n    }\n#line 2517 \"smarty_internal_templateparser.php\"\n#line 486 \"smarty_internal_templateparser.y\"\n    function yy_r64(){\n    $this->_retvalue = array();\n    }\n#line 2522 \"smarty_internal_templateparser.php\"\n#line 491 \"smarty_internal_templateparser.y\"\n    function yy_r65(){\n    if (preg_match('~^true$~i', $this->yystack[$this->yyidx + 0]->minor)) {\n        $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>'true');\n    } elseif (preg_match('~^false$~i', $this->yystack[$this->yyidx + 0]->minor)) {\n        $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>'false');\n    } elseif (preg_match('~^null$~i', $this->yystack[$this->yyidx + 0]->minor)) {\n        $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>'null');\n    } else {\n        $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>\"'\".$this->yystack[$this->yyidx + 0]->minor.\"'\");\n    }\n    }\n#line 2535 \"smarty_internal_templateparser.php\"\n#line 503 \"smarty_internal_templateparser.y\"\n    function yy_r66(){\n    $this->_retvalue = array(trim($this->yystack[$this->yyidx + -1]->minor,\" =\\n\\r\\t\")=>$this->yystack[$this->yyidx + 0]->minor);\n    }\n#line 2540 \"smarty_internal_templateparser.php\"\n#line 511 \"smarty_internal_templateparser.y\"\n    function yy_r68(){\n    $this->_retvalue = \"'\".$this->yystack[$this->yyidx + 0]->minor.\"'\";\n    }\n#line 2545 \"smarty_internal_templateparser.php\"\n#line 523 \"smarty_internal_templateparser.y\"\n    function yy_r71(){\n    $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>$this->yystack[$this->yyidx + 0]->minor);\n    }\n#line 2550 \"smarty_internal_templateparser.php\"\n#line 536 \"smarty_internal_templateparser.y\"\n    function yy_r73(){\n    $this->yystack[$this->yyidx + -2]->minor[]=$this->yystack[$this->yyidx + 0]->minor;\n    $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor;\n    }\n#line 2556 \"smarty_internal_templateparser.php\"\n#line 541 \"smarty_internal_templateparser.y\"\n    function yy_r74(){\n    $this->_retvalue = array('var' => $this->yystack[$this->yyidx + -2]->minor, 'value'=>$this->yystack[$this->yyidx + 0]->minor);\n    }\n#line 2561 \"smarty_internal_templateparser.php\"\n#line 569 \"smarty_internal_templateparser.y\"\n    function yy_r79(){\n    $this->_retvalue = '$_smarty_tpl->getStreamVariable(\\''. $this->yystack[$this->yyidx + -2]->minor .'://'. $this->yystack[$this->yyidx + 0]->minor . '\\')';\n    }\n#line 2566 \"smarty_internal_templateparser.php\"\n#line 574 \"smarty_internal_templateparser.y\"\n    function yy_r80(){\n    $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor . trim($this->yystack[$this->yyidx + -1]->minor) . $this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 2571 \"smarty_internal_templateparser.php\"\n#line 593 \"smarty_internal_templateparser.y\"\n    function yy_r84(){\n    $this->_retvalue = $this->compiler->compileTag('private_modifier',array(),array('value'=>$this->yystack[$this->yyidx + -1]->minor,'modifierlist'=>$this->yystack[$this->yyidx + 0]->minor));\n    }\n#line 2576 \"smarty_internal_templateparser.php\"\n#line 599 \"smarty_internal_templateparser.y\"\n    function yy_r85(){\n    $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 2581 \"smarty_internal_templateparser.php\"\n#line 603 \"smarty_internal_templateparser.y\"\n    function yy_r86(){\n    $this->_retvalue = 'in_array('.$this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor.')';\n    }\n#line 2586 \"smarty_internal_templateparser.php\"\n#line 607 \"smarty_internal_templateparser.y\"\n    function yy_r87(){\n    $this->_retvalue = 'in_array('.$this->yystack[$this->yyidx + -2]->minor.',(array)'.$this->yystack[$this->yyidx + 0]->minor.')';\n    }\n#line 2591 \"smarty_internal_templateparser.php\"\n#line 615 \"smarty_internal_templateparser.y\"\n    function yy_r89(){\n    $this->_retvalue = '!('.$this->yystack[$this->yyidx + -2]->minor.' % '.$this->yystack[$this->yyidx + 0]->minor.')';\n    }\n#line 2596 \"smarty_internal_templateparser.php\"\n#line 619 \"smarty_internal_templateparser.y\"\n    function yy_r90(){\n    $this->_retvalue = '('.$this->yystack[$this->yyidx + -2]->minor.' % '.$this->yystack[$this->yyidx + 0]->minor.')';\n    }\n#line 2601 \"smarty_internal_templateparser.php\"\n#line 623 \"smarty_internal_templateparser.y\"\n    function yy_r91(){\n    $this->_retvalue = '!(1 & '.$this->yystack[$this->yyidx + -1]->minor.')';\n    }\n#line 2606 \"smarty_internal_templateparser.php\"\n#line 627 \"smarty_internal_templateparser.y\"\n    function yy_r92(){\n    $this->_retvalue = '(1 & '.$this->yystack[$this->yyidx + -1]->minor.')';\n    }\n#line 2611 \"smarty_internal_templateparser.php\"\n#line 631 \"smarty_internal_templateparser.y\"\n    function yy_r93(){\n    $this->_retvalue = '!(1 & '.$this->yystack[$this->yyidx + -2]->minor.' / '.$this->yystack[$this->yyidx + 0]->minor.')';\n    }\n#line 2616 \"smarty_internal_templateparser.php\"\n#line 635 \"smarty_internal_templateparser.y\"\n    function yy_r94(){\n    $this->_retvalue = '(1 & '.$this->yystack[$this->yyidx + -2]->minor.' / '.$this->yystack[$this->yyidx + 0]->minor.')';\n    }\n#line 2621 \"smarty_internal_templateparser.php\"\n#line 659 \"smarty_internal_templateparser.y\"\n    function yy_r100(){\n    $this->prefix_number++;\n    $this->compiler->prefix_code[] = '<?php $_tmp'.$this->prefix_number.'='.$this->yystack[$this->yyidx + 0]->minor.';?>';\n    $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.'$_tmp'.$this->prefix_number;\n    }\n#line 2628 \"smarty_internal_templateparser.php\"\n#line 668 \"smarty_internal_templateparser.y\"\n    function yy_r101(){\n    $this->_retvalue = $this->yystack[$this->yyidx + -6]->minor.' ? '. $this->compileVariable(\"'\".$this->yystack[$this->yyidx + -2]->minor.\"'\") . ' : '.$this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 2633 \"smarty_internal_templateparser.php\"\n#line 672 \"smarty_internal_templateparser.y\"\n    function yy_r102(){\n    $this->_retvalue = $this->yystack[$this->yyidx + -5]->minor.' ? '.$this->yystack[$this->yyidx + -2]->minor.' : '.$this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 2638 \"smarty_internal_templateparser.php\"\n#line 687 \"smarty_internal_templateparser.y\"\n    function yy_r105(){\n    $this->_retvalue = '!'.$this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 2643 \"smarty_internal_templateparser.php\"\n#line 708 \"smarty_internal_templateparser.y\"\n    function yy_r110(){\n    $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 2648 \"smarty_internal_templateparser.php\"\n#line 712 \"smarty_internal_templateparser.y\"\n    function yy_r111(){\n    $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.'.';\n    }\n#line 2653 \"smarty_internal_templateparser.php\"\n#line 716 \"smarty_internal_templateparser.y\"\n    function yy_r112(){\n    $this->_retvalue = '.'.$this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 2658 \"smarty_internal_templateparser.php\"\n#line 721 \"smarty_internal_templateparser.y\"\n    function yy_r113(){\n    if (preg_match('~^true$~i', $this->yystack[$this->yyidx + 0]->minor)) {\n        $this->_retvalue = 'true';\n    } elseif (preg_match('~^false$~i', $this->yystack[$this->yyidx + 0]->minor)) {\n        $this->_retvalue = 'false';\n    } elseif (preg_match('~^null$~i', $this->yystack[$this->yyidx + 0]->minor)) {\n        $this->_retvalue = 'null';\n    } else {\n        $this->_retvalue = \"'\".$this->yystack[$this->yyidx + 0]->minor.\"'\";\n    }\n    }\n#line 2671 \"smarty_internal_templateparser.php\"\n#line 739 \"smarty_internal_templateparser.y\"\n    function yy_r115(){\n    $this->_retvalue = \"(\". $this->yystack[$this->yyidx + -1]->minor .\")\";\n    }\n#line 2676 \"smarty_internal_templateparser.php\"\n#line 754 \"smarty_internal_templateparser.y\"\n    function yy_r118(){\n    if (!$this->security || isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor]) || $this->smarty->security_policy->isTrustedStaticClass($this->yystack[$this->yyidx + -2]->minor, $this->compiler)) {\n        if (isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor])) {\n            $this->_retvalue = $this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor].'::'.$this->yystack[$this->yyidx + 0]->minor;\n        } else {\n            $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'::'.$this->yystack[$this->yyidx + 0]->minor;\n        }\n    } else {\n        $this->compiler->trigger_template_error (\"static class '\".$this->yystack[$this->yyidx + -2]->minor.\"' is undefined or not allowed by security setting\");\n    }\n    }\n#line 2689 \"smarty_internal_templateparser.php\"\n#line 766 \"smarty_internal_templateparser.y\"\n    function yy_r119(){\n    if ($this->yystack[$this->yyidx + -2]->minor['var'] == '\\'smarty\\'') {\n        $this->_retvalue =  $this->compiler->compileTag('private_special_variable',array(),$this->yystack[$this->yyidx + -2]->minor['smarty_internal_index']).'::'.$this->yystack[$this->yyidx + 0]->minor;\n    } else {\n        $this->_retvalue = $this->compileVariable($this->yystack[$this->yyidx + -2]->minor['var']).$this->yystack[$this->yyidx + -2]->minor['smarty_internal_index'].'::'.$this->yystack[$this->yyidx + 0]->minor;\n    }\n    }\n#line 2698 \"smarty_internal_templateparser.php\"\n#line 775 \"smarty_internal_templateparser.y\"\n    function yy_r120(){\n    $this->prefix_number++;\n    $this->compiler->prefix_code[] = '<?php ob_start();?>'.$this->yystack[$this->yyidx + 0]->minor.'<?php $_tmp'.$this->prefix_number.'=ob_get_clean();?>';\n    $this->_retvalue = '$_tmp'.$this->prefix_number;\n    }\n#line 2705 \"smarty_internal_templateparser.php\"\n#line 790 \"smarty_internal_templateparser.y\"\n    function yy_r122(){\n    if ($this->yystack[$this->yyidx + 0]->minor['var'] == '\\'smarty\\'') {\n        $smarty_var = $this->compiler->compileTag('private_special_variable',array(),$this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']);\n        $this->_retvalue = $smarty_var;\n    } else {\n        // used for array reset,next,prev,end,current\n        $this->last_variable = $this->yystack[$this->yyidx + 0]->minor['var'];\n        $this->last_index = $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index'];\n        $this->_retvalue = $this->compileVariable($this->yystack[$this->yyidx + 0]->minor['var']).$this->yystack[$this->yyidx + 0]->minor['smarty_internal_index'];\n    }\n    }\n#line 2718 \"smarty_internal_templateparser.php\"\n#line 803 \"smarty_internal_templateparser.y\"\n    function yy_r123(){\n    $this->_retvalue = '$_smarty_tpl->tpl_vars['. $this->yystack[$this->yyidx + -2]->minor .']->'.$this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 2723 \"smarty_internal_templateparser.php\"\n#line 813 \"smarty_internal_templateparser.y\"\n    function yy_r125(){\n    $this->_retvalue = '$_smarty_tpl->getConfigVariable(\\''. $this->yystack[$this->yyidx + -1]->minor .'\\')';\n    }\n#line 2728 \"smarty_internal_templateparser.php\"\n#line 817 \"smarty_internal_templateparser.y\"\n    function yy_r126(){\n    $this->_retvalue = '(is_array($tmp = $_smarty_tpl->getConfigVariable(\\''. $this->yystack[$this->yyidx + -2]->minor .'\\')) ? $tmp'.$this->yystack[$this->yyidx + 0]->minor.' :null)';\n    }\n#line 2733 \"smarty_internal_templateparser.php\"\n#line 821 \"smarty_internal_templateparser.y\"\n    function yy_r127(){\n    $this->_retvalue = '$_smarty_tpl->getConfigVariable('. $this->yystack[$this->yyidx + -1]->minor .')';\n    }\n#line 2738 \"smarty_internal_templateparser.php\"\n#line 825 \"smarty_internal_templateparser.y\"\n    function yy_r128(){\n    $this->_retvalue = '(is_array($tmp = $_smarty_tpl->getConfigVariable('. $this->yystack[$this->yyidx + -2]->minor .')) ? $tmp'.$this->yystack[$this->yyidx + 0]->minor.' : null)';\n    }\n#line 2743 \"smarty_internal_templateparser.php\"\n#line 829 \"smarty_internal_templateparser.y\"\n    function yy_r129(){\n    $this->_retvalue = array('var'=>$this->yystack[$this->yyidx + -1]->minor, 'smarty_internal_index'=>$this->yystack[$this->yyidx + 0]->minor);\n    }\n#line 2748 \"smarty_internal_templateparser.php\"\n#line 842 \"smarty_internal_templateparser.y\"\n    function yy_r131(){\n    return;\n    }\n#line 2753 \"smarty_internal_templateparser.php\"\n#line 848 \"smarty_internal_templateparser.y\"\n    function yy_r132(){\n    $this->_retvalue = '['.$this->compileVariable($this->yystack[$this->yyidx + 0]->minor).']';\n    }\n#line 2758 \"smarty_internal_templateparser.php\"\n#line 852 \"smarty_internal_templateparser.y\"\n    function yy_r133(){\n    $this->_retvalue = '['.$this->compileVariable($this->yystack[$this->yyidx + -2]->minor).'->'.$this->yystack[$this->yyidx + 0]->minor.']';\n    }\n#line 2763 \"smarty_internal_templateparser.php\"\n#line 856 \"smarty_internal_templateparser.y\"\n    function yy_r134(){\n    $this->_retvalue = \"['\". $this->yystack[$this->yyidx + 0]->minor .\"']\";\n    }\n#line 2768 \"smarty_internal_templateparser.php\"\n#line 860 \"smarty_internal_templateparser.y\"\n    function yy_r135(){\n    $this->_retvalue = \"[\". $this->yystack[$this->yyidx + 0]->minor .\"]\";\n    }\n#line 2773 \"smarty_internal_templateparser.php\"\n#line 864 \"smarty_internal_templateparser.y\"\n    function yy_r136(){\n    $this->_retvalue = \"[\". $this->yystack[$this->yyidx + -1]->minor .\"]\";\n    }\n#line 2778 \"smarty_internal_templateparser.php\"\n#line 869 \"smarty_internal_templateparser.y\"\n    function yy_r137(){\n    $this->_retvalue = '['.$this->compiler->compileTag('private_special_variable',array(),'[\\'section\\'][\\''.$this->yystack[$this->yyidx + -1]->minor.'\\'][\\'index\\']').']';\n    }\n#line 2783 \"smarty_internal_templateparser.php\"\n#line 873 \"smarty_internal_templateparser.y\"\n    function yy_r138(){\n    $this->_retvalue = '['.$this->compiler->compileTag('private_special_variable',array(),'[\\'section\\'][\\''.$this->yystack[$this->yyidx + -3]->minor.'\\'][\\''.$this->yystack[$this->yyidx + -1]->minor.'\\']').']';\n    }\n#line 2788 \"smarty_internal_templateparser.php\"\n#line 883 \"smarty_internal_templateparser.y\"\n    function yy_r140(){\n    $this->_retvalue = '[]';\n    }\n#line 2793 \"smarty_internal_templateparser.php\"\n#line 896 \"smarty_internal_templateparser.y\"\n    function yy_r142(){\n    $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 2798 \"smarty_internal_templateparser.php\"\n#line 901 \"smarty_internal_templateparser.y\"\n    function yy_r143(){\n    $this->_retvalue = '\\''.$this->yystack[$this->yyidx + 0]->minor.'\\'';\n    }\n#line 2803 \"smarty_internal_templateparser.php\"\n#line 906 \"smarty_internal_templateparser.y\"\n    function yy_r144(){\n    $this->_retvalue = '('.$this->yystack[$this->yyidx + -1]->minor.')';\n    }\n#line 2808 \"smarty_internal_templateparser.php\"\n#line 913 \"smarty_internal_templateparser.y\"\n    function yy_r145(){\n    if ($this->yystack[$this->yyidx + -1]->minor['var'] == '\\'smarty\\'') {\n        $this->_retvalue =  $this->compiler->compileTag('private_special_variable',array(),$this->yystack[$this->yyidx + -1]->minor['smarty_internal_index']).$this->yystack[$this->yyidx + 0]->minor;\n    } else {\n        $this->_retvalue = $this->compileVariable($this->yystack[$this->yyidx + -1]->minor['var']).$this->yystack[$this->yyidx + -1]->minor['smarty_internal_index'].$this->yystack[$this->yyidx + 0]->minor;\n    }\n    }\n#line 2817 \"smarty_internal_templateparser.php\"\n#line 922 \"smarty_internal_templateparser.y\"\n    function yy_r146(){\n    $this->_retvalue  = $this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 2822 \"smarty_internal_templateparser.php\"\n#line 927 \"smarty_internal_templateparser.y\"\n    function yy_r147(){\n    $this->_retvalue  = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 2827 \"smarty_internal_templateparser.php\"\n#line 932 \"smarty_internal_templateparser.y\"\n    function yy_r148(){\n    if ($this->security && substr($this->yystack[$this->yyidx + -1]->minor,0,1) == '_') {\n        $this->compiler->trigger_template_error (self::Err1);\n    }\n    $this->_retvalue = '->'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 2835 \"smarty_internal_templateparser.php\"\n#line 939 \"smarty_internal_templateparser.y\"\n    function yy_r149(){\n    if ($this->security) {\n        $this->compiler->trigger_template_error (self::Err2);\n    }\n    $this->_retvalue = '->{'.$this->compileVariable($this->yystack[$this->yyidx + -1]->minor).$this->yystack[$this->yyidx + 0]->minor.'}';\n    }\n#line 2843 \"smarty_internal_templateparser.php\"\n#line 946 \"smarty_internal_templateparser.y\"\n    function yy_r150(){\n    if ($this->security) {\n        $this->compiler->trigger_template_error (self::Err2);\n    }\n    $this->_retvalue = '->{'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + 0]->minor.'}';\n    }\n#line 2851 \"smarty_internal_templateparser.php\"\n#line 953 \"smarty_internal_templateparser.y\"\n    function yy_r151(){\n    if ($this->security) {\n        $this->compiler->trigger_template_error (self::Err2);\n    }\n    $this->_retvalue = '->{\\''.$this->yystack[$this->yyidx + -4]->minor.'\\'.'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + 0]->minor.'}';\n    }\n#line 2859 \"smarty_internal_templateparser.php\"\n#line 961 \"smarty_internal_templateparser.y\"\n    function yy_r152(){\n    $this->_retvalue = '->'.$this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 2864 \"smarty_internal_templateparser.php\"\n#line 969 \"smarty_internal_templateparser.y\"\n    function yy_r153(){\n    if (!$this->security || $this->smarty->security_policy->isTrustedPhpFunction($this->yystack[$this->yyidx + -3]->minor, $this->compiler)) {\n        if (strcasecmp($this->yystack[$this->yyidx + -3]->minor,'isset') === 0 || strcasecmp($this->yystack[$this->yyidx + -3]->minor,'empty') === 0 || strcasecmp($this->yystack[$this->yyidx + -3]->minor,'array') === 0 || is_callable($this->yystack[$this->yyidx + -3]->minor)) {\n            $func_name = strtolower($this->yystack[$this->yyidx + -3]->minor);\n            if ($func_name == 'isset') {\n                if (count($this->yystack[$this->yyidx + -1]->minor) == 0) {\n                    $this->compiler->trigger_template_error ('Illegal number of paramer in \"isset()\"');\n                }\n                $par = implode(',',$this->yystack[$this->yyidx + -1]->minor);\n                if (strncasecmp($par,'$_smarty_tpl->getConfigVariable',strlen('$_smarty_tpl->getConfigVariable')) === 0) {\n                    $this->prefix_number++;\n                    $this->compiler->prefix_code[] = '<?php $_tmp'.$this->prefix_number.'='.str_replace(')',', false)',$par).';?>';\n                    $isset_par = '$_tmp'.$this->prefix_number;\n                } else {\n                    $isset_par=str_replace(\"')->value\",\"',null,true,false)->value\",$par);\n                }\n                $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . \"(\". $isset_par .\")\";\n            } elseif (in_array($func_name,array('empty','reset','current','end','prev','next'))){\n                if (count($this->yystack[$this->yyidx + -1]->minor) != 1) {\n                    $this->compiler->trigger_template_error ('Illegal number of paramer in \"empty()\"');\n                }\n                if ($func_name == 'empty') {\n                    $this->_retvalue = $func_name.'('.str_replace(\"')->value\",\"',null,true,false)->value\",$this->yystack[$this->yyidx + -1]->minor[0]).')';\n                } else {\n                    $this->_retvalue = $func_name.'('.$this->yystack[$this->yyidx + -1]->minor[0].')';\n                }\n            } else {\n                $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . \"(\". implode(',',$this->yystack[$this->yyidx + -1]->minor) .\")\";\n            }\n        } else {\n            $this->compiler->trigger_template_error (\"unknown function \\\"\" . $this->yystack[$this->yyidx + -3]->minor . \"\\\"\");\n        }\n    }\n    }\n#line 2900 \"smarty_internal_templateparser.php\"\n#line 1007 \"smarty_internal_templateparser.y\"\n    function yy_r154(){\n    if ($this->security && substr($this->yystack[$this->yyidx + -3]->minor,0,1) == '_') {\n        $this->compiler->trigger_template_error (self::Err1);\n    }\n    $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . \"(\". implode(',',$this->yystack[$this->yyidx + -1]->minor) .\")\";\n    }\n#line 2908 \"smarty_internal_templateparser.php\"\n#line 1014 \"smarty_internal_templateparser.y\"\n    function yy_r155(){\n    if ($this->security) {\n        $this->compiler->trigger_template_error (self::Err2);\n    }\n    $this->prefix_number++;\n    $this->compiler->prefix_code[] = '<?php $_tmp'.$this->prefix_number.'='.$this->compileVariable(\"'\".$this->yystack[$this->yyidx + -3]->minor.\"'\").';?>';\n    $this->_retvalue = '$_tmp'.$this->prefix_number.'('. implode(',',$this->yystack[$this->yyidx + -1]->minor) .')';\n    }\n#line 2918 \"smarty_internal_templateparser.php\"\n#line 1025 \"smarty_internal_templateparser.y\"\n    function yy_r156(){\n    $this->_retvalue = array_merge($this->yystack[$this->yyidx + -2]->minor,array($this->yystack[$this->yyidx + 0]->minor));\n    }\n#line 2923 \"smarty_internal_templateparser.php\"\n#line 1042 \"smarty_internal_templateparser.y\"\n    function yy_r159(){\n    $this->_retvalue = array_merge($this->yystack[$this->yyidx + -2]->minor,array(array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor)));\n    }\n#line 2928 \"smarty_internal_templateparser.php\"\n#line 1046 \"smarty_internal_templateparser.y\"\n    function yy_r160(){\n    $this->_retvalue = array(array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor));\n    }\n#line 2933 \"smarty_internal_templateparser.php\"\n#line 1054 \"smarty_internal_templateparser.y\"\n    function yy_r162(){\n    $this->_retvalue =  array($this->yystack[$this->yyidx + 0]->minor);\n    }\n#line 2938 \"smarty_internal_templateparser.php\"\n#line 1062 \"smarty_internal_templateparser.y\"\n    function yy_r163(){\n    $this->_retvalue = array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor);\n    }\n#line 2943 \"smarty_internal_templateparser.php\"\n#line 1096 \"smarty_internal_templateparser.y\"\n    function yy_r170(){\n    $this->_retvalue = '$'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 2948 \"smarty_internal_templateparser.php\"\n#line 1101 \"smarty_internal_templateparser.y\"\n    function yy_r171(){\n    $this->_retvalue = '$'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 2953 \"smarty_internal_templateparser.php\"\n#line 1107 \"smarty_internal_templateparser.y\"\n    function yy_r172(){\n    $this->_retvalue = '==';\n    }\n#line 2958 \"smarty_internal_templateparser.php\"\n#line 1111 \"smarty_internal_templateparser.y\"\n    function yy_r173(){\n    $this->_retvalue = '!=';\n    }\n#line 2963 \"smarty_internal_templateparser.php\"\n#line 1115 \"smarty_internal_templateparser.y\"\n    function yy_r174(){\n    $this->_retvalue = '>';\n    }\n#line 2968 \"smarty_internal_templateparser.php\"\n#line 1119 \"smarty_internal_templateparser.y\"\n    function yy_r175(){\n    $this->_retvalue = '<';\n    }\n#line 2973 \"smarty_internal_templateparser.php\"\n#line 1123 \"smarty_internal_templateparser.y\"\n    function yy_r176(){\n    $this->_retvalue = '>=';\n    }\n#line 2978 \"smarty_internal_templateparser.php\"\n#line 1127 \"smarty_internal_templateparser.y\"\n    function yy_r177(){\n    $this->_retvalue = '<=';\n    }\n#line 2983 \"smarty_internal_templateparser.php\"\n#line 1131 \"smarty_internal_templateparser.y\"\n    function yy_r178(){\n    $this->_retvalue = '===';\n    }\n#line 2988 \"smarty_internal_templateparser.php\"\n#line 1135 \"smarty_internal_templateparser.y\"\n    function yy_r179(){\n    $this->_retvalue = '!==';\n    }\n#line 2993 \"smarty_internal_templateparser.php\"\n#line 1139 \"smarty_internal_templateparser.y\"\n    function yy_r180(){\n    $this->_retvalue = '%';\n    }\n#line 2998 \"smarty_internal_templateparser.php\"\n#line 1143 \"smarty_internal_templateparser.y\"\n    function yy_r181(){\n    $this->_retvalue = '&&';\n    }\n#line 3003 \"smarty_internal_templateparser.php\"\n#line 1147 \"smarty_internal_templateparser.y\"\n    function yy_r182(){\n    $this->_retvalue = '||';\n    }\n#line 3008 \"smarty_internal_templateparser.php\"\n#line 1151 \"smarty_internal_templateparser.y\"\n    function yy_r183(){\n    $this->_retvalue = ' XOR ';\n    }\n#line 3013 \"smarty_internal_templateparser.php\"\n#line 1158 \"smarty_internal_templateparser.y\"\n    function yy_r184(){\n    $this->_retvalue = 'array('.$this->yystack[$this->yyidx + -1]->minor.')';\n    }\n#line 3018 \"smarty_internal_templateparser.php\"\n#line 1166 \"smarty_internal_templateparser.y\"\n    function yy_r186(){\n    $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 3023 \"smarty_internal_templateparser.php\"\n#line 1174 \"smarty_internal_templateparser.y\"\n    function yy_r188(){\n    $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'=>'.$this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 3028 \"smarty_internal_templateparser.php\"\n#line 1178 \"smarty_internal_templateparser.y\"\n    function yy_r189(){\n    $this->_retvalue = '\\''.$this->yystack[$this->yyidx + -2]->minor.'\\'=>'.$this->yystack[$this->yyidx + 0]->minor;\n    }\n#line 3033 \"smarty_internal_templateparser.php\"\n#line 1190 \"smarty_internal_templateparser.y\"\n    function yy_r191(){\n    $this->_retvalue = \"''\";\n    }\n#line 3038 \"smarty_internal_templateparser.php\"\n#line 1194 \"smarty_internal_templateparser.y\"\n    function yy_r192(){\n    $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor->to_smarty_php();\n    }\n#line 3043 \"smarty_internal_templateparser.php\"\n#line 1199 \"smarty_internal_templateparser.y\"\n    function yy_r193(){\n    $this->yystack[$this->yyidx + -1]->minor->append_subtree($this->yystack[$this->yyidx + 0]->minor);\n    $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor;\n    }\n#line 3049 \"smarty_internal_templateparser.php\"\n#line 1204 \"smarty_internal_templateparser.y\"\n    function yy_r194(){\n    $this->_retvalue = new _smarty_doublequoted($this, $this->yystack[$this->yyidx + 0]->minor);\n    }\n#line 3054 \"smarty_internal_templateparser.php\"\n#line 1208 \"smarty_internal_templateparser.y\"\n    function yy_r195(){\n    $this->_retvalue = new _smarty_code($this, '(string)'.$this->yystack[$this->yyidx + -1]->minor);\n    }\n#line 3059 \"smarty_internal_templateparser.php\"\n#line 1216 \"smarty_internal_templateparser.y\"\n    function yy_r197(){\n    $this->_retvalue = new _smarty_code($this, '(string)$_smarty_tpl->tpl_vars[\\''. substr($this->yystack[$this->yyidx + 0]->minor,1) .'\\']->value');\n    }\n#line 3064 \"smarty_internal_templateparser.php\"\n#line 1224 \"smarty_internal_templateparser.y\"\n    function yy_r199(){\n    $this->_retvalue = new _smarty_code($this, '(string)('.$this->yystack[$this->yyidx + -1]->minor.')');\n    }\n#line 3069 \"smarty_internal_templateparser.php\"\n#line 1228 \"smarty_internal_templateparser.y\"\n    function yy_r200(){\n    $this->_retvalue = new _smarty_tag($this, $this->yystack[$this->yyidx + 0]->minor);\n    }\n#line 3074 \"smarty_internal_templateparser.php\"\n#line 1232 \"smarty_internal_templateparser.y\"\n    function yy_r201(){\n    $this->_retvalue = new _smarty_dq_content($this, $this->yystack[$this->yyidx + 0]->minor);\n    }\n#line 3079 \"smarty_internal_templateparser.php\"\n\n    private $_retvalue;\n\n    function yy_reduce($yyruleno)\n    {\n        $yymsp = $this->yystack[$this->yyidx];\n        if (self::$yyTraceFILE && $yyruleno >= 0\n              && $yyruleno < count(self::$yyRuleName)) {\n            fprintf(self::$yyTraceFILE, \"%sReduce (%d) [%s].\\n\",\n                self::$yyTracePrompt, $yyruleno,\n                self::$yyRuleName[$yyruleno]);\n        }\n\n        $this->_retvalue = $yy_lefthand_side = null;\n        if (array_key_exists($yyruleno, self::$yyReduceMap)) {\n            // call the action\n            $this->_retvalue = null;\n            $this->{'yy_r' . self::$yyReduceMap[$yyruleno]}();\n            $yy_lefthand_side = $this->_retvalue;\n        }\n        $yygoto = self::$yyRuleInfo[$yyruleno]['lhs'];\n        $yysize = self::$yyRuleInfo[$yyruleno]['rhs'];\n        $this->yyidx -= $yysize;\n        for($i = $yysize; $i; $i--) {\n            // pop all of the right-hand side parameters\n            array_pop($this->yystack);\n        }\n        $yyact = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, $yygoto);\n        if ($yyact < self::YYNSTATE) {\n            if (!self::$yyTraceFILE && $yysize) {\n                $this->yyidx++;\n                $x = new TP_yyStackEntry;\n                $x->stateno = $yyact;\n                $x->major = $yygoto;\n                $x->minor = $yy_lefthand_side;\n                $this->yystack[$this->yyidx] = $x;\n            } else {\n                $this->yy_shift($yyact, $yygoto, $yy_lefthand_side);\n            }\n        } elseif ($yyact == self::YYNSTATE + self::YYNRULE + 1) {\n            $this->yy_accept();\n        }\n    }\n\n    function yy_parse_failed()\n    {\n        if (self::$yyTraceFILE) {\n            fprintf(self::$yyTraceFILE, \"%sFail!\\n\", self::$yyTracePrompt);\n        }\n        while ($this->yyidx >= 0) {\n            $this->yy_pop_parser_stack();\n        }\n    }\n\n    function yy_syntax_error($yymajor, $TOKEN)\n    {\n#line 77 \"smarty_internal_templateparser.y\"\n\n    $this->internalError = true;\n    $this->yymajor = $yymajor;\n    $this->compiler->trigger_template_error();\n#line 3142 \"smarty_internal_templateparser.php\"\n    }\n\n    function yy_accept()\n    {\n        if (self::$yyTraceFILE) {\n            fprintf(self::$yyTraceFILE, \"%sAccept!\\n\", self::$yyTracePrompt);\n        }\n        while ($this->yyidx >= 0) {\n            $stack = $this->yy_pop_parser_stack();\n        }\n#line 69 \"smarty_internal_templateparser.y\"\n\n    $this->successful = !$this->internalError;\n    $this->internalError = false;\n    $this->retvalue = $this->_retvalue;\n    //echo $this->retvalue.\"\\n\\n\";\n#line 3160 \"smarty_internal_templateparser.php\"\n    }\n\n    function doParse($yymajor, $yytokenvalue)\n    {\n        $yyerrorhit = 0;   /* True if yymajor has invoked an error */\n\n        if ($this->yyidx === null || $this->yyidx < 0) {\n            $this->yyidx = 0;\n            $this->yyerrcnt = -1;\n            $x = new TP_yyStackEntry;\n            $x->stateno = 0;\n            $x->major = 0;\n            $this->yystack = array();\n            array_push($this->yystack, $x);\n        }\n        $yyendofinput = ($yymajor==0);\n\n        if (self::$yyTraceFILE) {\n            fprintf(self::$yyTraceFILE, \"%sInput %s\\n\",\n                self::$yyTracePrompt, $this->yyTokenName[$yymajor]);\n        }\n\n        do {\n            $yyact = $this->yy_find_shift_action($yymajor);\n            if ($yymajor < self::YYERRORSYMBOL &&\n                  !$this->yy_is_expected_token($yymajor)) {\n                // force a syntax error\n                $yyact = self::YY_ERROR_ACTION;\n            }\n            if ($yyact < self::YYNSTATE) {\n                $this->yy_shift($yyact, $yymajor, $yytokenvalue);\n                $this->yyerrcnt--;\n                if ($yyendofinput && $this->yyidx >= 0) {\n                    $yymajor = 0;\n                } else {\n                    $yymajor = self::YYNOCODE;\n                }\n            } elseif ($yyact < self::YYNSTATE + self::YYNRULE) {\n                $this->yy_reduce($yyact - self::YYNSTATE);\n            } elseif ($yyact == self::YY_ERROR_ACTION) {\n                if (self::$yyTraceFILE) {\n                    fprintf(self::$yyTraceFILE, \"%sSyntax Error!\\n\",\n                        self::$yyTracePrompt);\n                }\n                if (self::YYERRORSYMBOL) {\n                    if ($this->yyerrcnt < 0) {\n                        $this->yy_syntax_error($yymajor, $yytokenvalue);\n                    }\n                    $yymx = $this->yystack[$this->yyidx]->major;\n                    if ($yymx == self::YYERRORSYMBOL || $yyerrorhit ){\n                        if (self::$yyTraceFILE) {\n                            fprintf(self::$yyTraceFILE, \"%sDiscard input token %s\\n\",\n                                self::$yyTracePrompt, $this->yyTokenName[$yymajor]);\n                        }\n                        $this->yy_destructor($yymajor, $yytokenvalue);\n                        $yymajor = self::YYNOCODE;\n                    } else {\n                        while ($this->yyidx >= 0 &&\n                                 $yymx != self::YYERRORSYMBOL &&\n        ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE\n                              ){\n                            $this->yy_pop_parser_stack();\n                        }\n                        if ($this->yyidx < 0 || $yymajor==0) {\n                            $this->yy_destructor($yymajor, $yytokenvalue);\n                            $this->yy_parse_failed();\n                            $yymajor = self::YYNOCODE;\n                        } elseif ($yymx != self::YYERRORSYMBOL) {\n                            $u2 = 0;\n                            $this->yy_shift($yyact, self::YYERRORSYMBOL, $u2);\n                        }\n                    }\n                    $this->yyerrcnt = 3;\n                    $yyerrorhit = 1;\n                } else {\n                    if ($this->yyerrcnt <= 0) {\n                        $this->yy_syntax_error($yymajor, $yytokenvalue);\n                    }\n                    $this->yyerrcnt = 3;\n                    $this->yy_destructor($yymajor, $yytokenvalue);\n                    if ($yyendofinput) {\n                        $this->yy_parse_failed();\n                    }\n                    $yymajor = self::YYNOCODE;\n                }\n            } else {\n                $this->yy_accept();\n                $yymajor = self::YYNOCODE;\n            }\n        } while ($yymajor != self::YYNOCODE && $this->yyidx >= 0);\n    }\n}\n"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_utility.php",
    "content": "<?php\n/**\n * Project:     Smarty: the PHP compiling template engine\n * File:        smarty_internal_utility.php\n * SVN:         $Id: $\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the Free Software\n * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\n *\n * For questions, help, comments, discussion, etc., please join the\n * Smarty mailing list. Send a blank e-mail to\n * smarty-discussion-subscribe@googlegroups.com\n *\n * @link http://www.smarty.net/\n * @copyright 2008 New Digital Group, Inc.\n * @author Monte Ohrt <monte at ohrt dot com>\n * @author Uwe Tews\n * @package Smarty\n * @subpackage PluginsInternal\n * @version 3-SVN$Rev: 3286 $\n */\n\n\n/**\n * Utility class\n *\n * @package Smarty\n * @subpackage Security\n */\nclass Smarty_Internal_Utility {\n\n    /**\n     * private constructor to prevent calls creation of new instances\n     */\n    private final function __construct()\n    {\n        // intentionally left blank\n    }\n\n    /**\n     * Compile all template files\n     *\n     * @param string $extension     template file name extension\n     * @param bool   $force_compile force all to recompile\n     * @param int    $time_limit    set maximum execution time\n     * @param int    $max_errors    set maximum allowed errors\n     * @param Smarty $smarty        Smarty instance\n     * @return integer number of template files compiled\n     */\n    public static function compileAllTemplates($extention, $force_compile, $time_limit, $max_errors, Smarty $smarty)\n    {\n        // switch off time limit\n        if (function_exists('set_time_limit')) {\n            @set_time_limit($time_limit);\n        }\n        $smarty->force_compile = $force_compile;\n        $_count = 0;\n        $_error_count = 0;\n        // loop over array of template directories\n        foreach($smarty->getTemplateDir() as $_dir) {\n            $_compileDirs = new RecursiveDirectoryIterator($_dir);\n            $_compile = new RecursiveIteratorIterator($_compileDirs);\n            foreach ($_compile as $_fileinfo) {\n                $_file = $_fileinfo->getFilename();\n                if (substr(basename($_fileinfo->getPathname()),0,1) == '.' || strpos($_file, '.svn') !== false) continue;\n                if (!substr_compare($_file, $extention, - strlen($extention)) == 0) continue;\n                if ($_fileinfo->getPath() == substr($_dir, 0, -1)) {\n                   $_template_file = $_file;\n                } else {\n                   $_template_file = substr($_fileinfo->getPath(), strlen($_dir)) . DS . $_file;\n                }\n                echo '<br>', $_dir, '---', $_template_file;\n                flush();\n                $_start_time = microtime(true);\n                try {\n                    $_tpl = $smarty->createTemplate($_template_file,null,null,null,false);\n                    if ($_tpl->mustCompile()) {\n                        $_tpl->compileTemplateSource();\n                        $_count++;\n                        echo ' compiled in  ', microtime(true) - $_start_time, ' seconds';\n                        flush();\n                    } else {\n                        echo ' is up to date';\n                        flush();\n                    }\n                }\n                catch (Exception $e) {\n                    echo 'Error: ', $e->getMessage(), \"<br><br>\";\n                    $_error_count++;\n                }\n                // free memory\n                $smarty->template_objects = array();\n                $_tpl->smarty->template_objects = array();\n                $_tpl = null;\n                if ($max_errors !== null && $_error_count == $max_errors) {\n                    echo '<br><br>too many errors';\n                    exit();\n                }\n            }\n        }\n        return $_count;\n    }\n\n    /**\n     * Compile all config files\n     *\n     * @param string $extension     config file name extension\n     * @param bool   $force_compile force all to recompile\n     * @param int    $time_limit    set maximum execution time\n     * @param int    $max_errors    set maximum allowed errors\n     * @param Smarty $smarty        Smarty instance\n     * @return integer number of config files compiled\n     */\n    public static function compileAllConfig($extention, $force_compile, $time_limit, $max_errors, Smarty $smarty)\n    {\n        // switch off time limit\n        if (function_exists('set_time_limit')) {\n            @set_time_limit($time_limit);\n        }\n        $smarty->force_compile = $force_compile;\n        $_count = 0;\n        $_error_count = 0;\n        // loop over array of template directories\n        foreach($smarty->getConfigDir() as $_dir) {\n            $_compileDirs = new RecursiveDirectoryIterator($_dir);\n            $_compile = new RecursiveIteratorIterator($_compileDirs);\n            foreach ($_compile as $_fileinfo) {\n                $_file = $_fileinfo->getFilename();\n                if (substr(basename($_fileinfo->getPathname()),0,1) == '.' || strpos($_file, '.svn') !== false) continue;\n                if (!substr_compare($_file, $extention, - strlen($extention)) == 0) continue;\n                if ($_fileinfo->getPath() == substr($_dir, 0, -1)) {\n                    $_config_file = $_file;\n                } else {\n                    $_config_file = substr($_fileinfo->getPath(), strlen($_dir)) . DS . $_file;\n                }\n                echo '<br>', $_dir, '---', $_config_file;\n                flush();\n                $_start_time = microtime(true);\n                try {\n                    $_config = new Smarty_Internal_Config($_config_file, $smarty);\n                    if ($_config->mustCompile()) {\n                        $_config->compileConfigSource();\n                        $_count++;\n                        echo ' compiled in  ', microtime(true) - $_start_time, ' seconds';\n                        flush();\n                    } else {\n                        echo ' is up to date';\n                        flush();\n                    }\n                }\n                catch (Exception $e) {\n                    echo 'Error: ', $e->getMessage(), \"<br><br>\";\n                    $_error_count++;\n                }\n                if ($max_errors !== null && $_error_count == $max_errors) {\n                    echo '<br><br>too many errors';\n                    exit();\n                }\n            }\n        }\n        return $_count;\n    }\n\n    /**\n     * Delete compiled template file\n     *\n     * @param string  $resource_name template name\n     * @param string  $compile_id    compile id\n     * @param integer $exp_time      expiration time\n     * @param Smarty  $smarty        Smarty instance\n     * @return integer number of template files deleted\n     */\n    public static function clearCompiledTemplate($resource_name, $compile_id, $exp_time, Smarty $smarty)\n    {\n        $_compile_dir = $smarty->getCompileDir();\n        $_compile_id = isset($compile_id) ? preg_replace('![^\\w\\|]+!', '_', $compile_id) : null;\n        $_dir_sep = $smarty->use_sub_dirs ? DS : '^';\n        if (isset($resource_name)) {\n            $_save_stat = $smarty->caching;\n            $smarty->caching = false;\n            $tpl = new $smarty->template_class($resource_name, $smarty);\n            $smarty->caching = $_save_stat;\n\n            // remove from template cache\n            $tpl->source; // have the template registered before unset()\n            if ($smarty->allow_ambiguous_resources) {\n                $_templateId = $tpl->source->unique_resource . $tpl->cache_id . $tpl->compile_id;\n            } else {\n                $_templateId = $smarty->joined_template_dir . '#' . $resource_name . $tpl->cache_id . $tpl->compile_id;\n            }\n            if (isset($_templateId[150])) {\n                $_templateId = sha1($_templateId);\n            }\n            unset($smarty->template_objects[$_templateId]);\n\n            if ($tpl->source->exists) {\n                 $_resource_part_1 = basename(str_replace('^', '/', $tpl->compiled->filepath));\n                 $_resource_part_1_length = strlen($_resource_part_1);\n            } else {\n                return 0;\n            }\n\n            $_resource_part_2 = str_replace('.php','.cache.php',$_resource_part_1);\n            $_resource_part_2_length = strlen($_resource_part_2);\n        }\n        $_dir = $_compile_dir;\n        if ($smarty->use_sub_dirs && isset($_compile_id)) {\n            $_dir .= $_compile_id . $_dir_sep;\n        }\n        if (isset($_compile_id)) {\n            $_compile_id_part = $_compile_dir . $_compile_id . $_dir_sep;\n            $_compile_id_part_length = strlen($_compile_id_part);\n        }\n        $_count = 0;\n        try {\n            $_compileDirs = new RecursiveDirectoryIterator($_dir);\n        // NOTE: UnexpectedValueException thrown for PHP >= 5.3\n        } catch (Exception $e) {\n            return 0;\n        }\n        $_compile = new RecursiveIteratorIterator($_compileDirs, RecursiveIteratorIterator::CHILD_FIRST);\n        foreach ($_compile as $_file) {\n            if (substr(basename($_file->getPathname()), 0, 1) == '.' || strpos($_file, '.svn') !== false)\n                continue;\n\n            $_filepath = (string) $_file;\n\n            if ($_file->isDir()) {\n                if (!$_compile->isDot()) {\n                    // delete folder if empty\n                    @rmdir($_file->getPathname());\n                }\n            } else {\n                $unlink = false;\n                if ((!isset($_compile_id) || (isset($_filepath[$_compile_id_part_length]) && !strncmp($_filepath, $_compile_id_part, $_compile_id_part_length)))\n                    && (!isset($resource_name)\n                        || (isset($_filepath[$_resource_part_1_length])\n                            && substr_compare($_filepath, $_resource_part_1, -$_resource_part_1_length, $_resource_part_1_length) == 0)\n                        || (isset($_filepath[$_resource_part_2_length])\n                            && substr_compare($_filepath, $_resource_part_2, -$_resource_part_2_length, $_resource_part_2_length) == 0))) {\n                    if (isset($exp_time)) {\n                        if (time() - @filemtime($_filepath) >= $exp_time) {\n                            $unlink = true;\n                        }\n                    } else {\n                        $unlink = true;\n                    }\n                }\n\n                if ($unlink && @unlink($_filepath)) {\n                    $_count++;\n                }\n            }\n        }\n        // clear compiled cache\n        Smarty_Resource::$sources = array();\n        Smarty_Resource::$compileds = array();\n        return $_count;\n    }\n\n    /**\n     * Return array of tag/attributes of all tags used by an template\n     *\n     * @param Smarty_Internal_Template $templae template object\n     * @return array of tag/attributes\n     */\n    public static function getTags(Smarty_Internal_Template $template)\n    {\n        $template->smarty->get_used_tags = true;\n        $template->compileTemplateSource();\n        return $template->used_tags;\n    }\n\n\n    /**\n     * diagnose Smarty setup\n     *\n     * If $errors is secified, the diagnostic report will be appended to the array, rather than being output.\n     *\n     * @param Smarty $smarty  Smarty instance to test\n     * @param array  $errors array to push results into rather than outputting them\n     * @return bool status, true if everything is fine, false else\n     */\n    public static function testInstall(Smarty $smarty, &$errors=null)\n    {\n        $status = true;\n\n        if ($errors === null) {\n            echo \"<PRE>\\n\";\n            echo \"Smarty Installation test...\\n\";\n            echo \"Testing template directory...\\n\";\n        }\n\n        $_stream_resolve_include_path = function_exists('stream_resolve_include_path');\n\n        // test if all registered template_dir are accessible\n        foreach($smarty->getTemplateDir() as $template_dir) {\n            $_template_dir = $template_dir;\n            $template_dir = realpath($template_dir);\n            // resolve include_path or fail existance\n            if (!$template_dir) {\n                if ($smarty->use_include_path && !preg_match('/^([\\/\\\\\\\\]|[a-zA-Z]:[\\/\\\\\\\\])/', $_template_dir)) {\n                    // try PHP include_path\n                    if ($_stream_resolve_include_path) {\n                        $template_dir = stream_resolve_include_path($_template_dir);\n                    } else {\n                        $template_dir = Smarty_Internal_Get_Include_Path::getIncludePath($_template_dir);\n                    }\n\n                    if ($template_dir !== false) {\n                        if ($errors === null) {\n                            echo \"$template_dir is OK.\\n\";\n                        }\n\n                        continue;\n                    } else {\n                        $status = false;\n                        $message = \"FAILED: $_template_dir does not exist (and couldn't be found in include_path either)\";\n                        if ($errors === null) {\n                            echo $message . \".\\n\";\n                        } else {\n                            $errors['template_dir'] = $message;\n                        }\n\n                        continue;\n                    }\n                } else {\n                    $status = false;\n                    $message = \"FAILED: $_template_dir does not exist\";\n                    if ($errors === null) {\n                        echo $message . \".\\n\";\n                    } else {\n                        $errors['template_dir'] = $message;\n                    }\n\n                    continue;\n                }\n            }\n\n            if (!is_dir($template_dir)) {\n                $status = false;\n                $message = \"FAILED: $template_dir is not a directory\";\n                if ($errors === null) {\n                    echo $message . \".\\n\";\n                } else {\n                    $errors['template_dir'] = $message;\n                }\n            } elseif (!is_readable($template_dir)) {\n                $status = false;\n                $message = \"FAILED: $template_dir is not readable\";\n                if ($errors === null) {\n                    echo $message . \".\\n\";\n                } else {\n                    $errors['template_dir'] = $message;\n                }\n            } else {\n                if ($errors === null) {\n                    echo \"$template_dir is OK.\\n\";\n                }\n            }\n        }\n\n\n        if ($errors === null) {\n            echo \"Testing compile directory...\\n\";\n        }\n\n        // test if registered compile_dir is accessible\n        $__compile_dir = $smarty->getCompileDir();\n        $_compile_dir = realpath($__compile_dir);\n        if (!$_compile_dir) {\n            $status = false;\n            $message = \"FAILED: {$__compile_dir} does not exist\";\n            if ($errors === null) {\n                echo $message . \".\\n\";\n            } else {\n                $errors['compile_dir'] = $message;\n            }\n        } elseif (!is_dir($_compile_dir)) {\n            $status = false;\n            $message = \"FAILED: {$_compile_dir} is not a directory\";\n            if ($errors === null) {\n                echo $message . \".\\n\";\n            } else {\n                $errors['compile_dir'] = $message;\n            }\n        } elseif (!is_readable($_compile_dir)) {\n            $status = false;\n            $message = \"FAILED: {$_compile_dir} is not readable\";\n            if ($errors === null) {\n                echo $message . \".\\n\";\n            } else {\n                $errors['compile_dir'] = $message;\n            }\n        } elseif (!is_writable($_compile_dir)) {\n            $status = false;\n            $message = \"FAILED: {$_compile_dir} is not writable\";\n            if ($errors === null) {\n                echo $message . \".\\n\";\n            } else {\n                $errors['compile_dir'] = $message;\n            }\n        } else {\n            if ($errors === null) {\n                echo \"{$_compile_dir} is OK.\\n\";\n            }\n        }\n\n\n        if ($errors === null) {\n            echo \"Testing plugins directory...\\n\";\n        }\n\n        // test if all registered plugins_dir are accessible\n        // and if core plugins directory is still registered\n        $_core_plugins_dir = realpath(dirname(__FILE__) .'/../plugins');\n        $_core_plugins_available = false;\n        foreach($smarty->getPluginsDir() as $plugin_dir) {\n            $_plugin_dir = $plugin_dir;\n            $plugin_dir = realpath($plugin_dir);\n            // resolve include_path or fail existance\n            if (!$plugin_dir) {\n                if ($smarty->use_include_path && !preg_match('/^([\\/\\\\\\\\]|[a-zA-Z]:[\\/\\\\\\\\])/', $_plugin_dir)) {\n                    // try PHP include_path\n                    if ($_stream_resolve_include_path) {\n                        $plugin_dir = stream_resolve_include_path($_plugin_dir);\n                    } else {\n                        $plugin_dir = Smarty_Internal_Get_Include_Path::getIncludePath($_plugin_dir);\n                    }\n\n                    if ($plugin_dir !== false) {\n                        if ($errors === null) {\n                            echo \"$plugin_dir is OK.\\n\";\n                        }\n\n                        continue;\n                    } else {\n                        $status = false;\n                        $message = \"FAILED: $_plugin_dir does not exist (and couldn't be found in include_path either)\";\n                        if ($errors === null) {\n                            echo $message . \".\\n\";\n                        } else {\n                            $errors['plugins_dir'] = $message;\n                        }\n\n                        continue;\n                    }\n                } else {\n                    $status = false;\n                    $message = \"FAILED: $_plugin_dir does not exist\";\n                    if ($errors === null) {\n                        echo $message . \".\\n\";\n                    } else {\n                        $errors['plugins_dir'] = $message;\n                    }\n\n                    continue;\n                }\n            }\n\n            if (!is_dir($plugin_dir)) {\n                $status = false;\n                $message = \"FAILED: $plugin_dir is not a directory\";\n                if ($errors === null) {\n                    echo $message . \".\\n\";\n                } else {\n                    $errors['plugins_dir'] = $message;\n                }\n            } elseif (!is_readable($plugin_dir)) {\n                $status = false;\n                $message = \"FAILED: $plugin_dir is not readable\";\n                if ($errors === null) {\n                    echo $message . \".\\n\";\n                } else {\n                    $errors['plugins_dir'] = $message;\n                }\n            } elseif ($_core_plugins_dir && $_core_plugins_dir == realpath($plugin_dir)) {\n                $_core_plugins_available = true;\n                if ($errors === null) {\n                    echo \"$plugin_dir is OK.\\n\";\n                }\n            } else {\n                if ($errors === null) {\n                    echo \"$plugin_dir is OK.\\n\";\n                }\n            }\n        }\n        if (!$_core_plugins_available) {\n            $status = false;\n            $message = \"WARNING: Smarty's own libs/plugins is not available\";\n            if ($errors === null) {\n                echo $message . \".\\n\";\n            } elseif (!isset($errors['plugins_dir'])) {\n                $errors['plugins_dir'] = $message;\n            }\n        }\n\n        if ($errors === null) {\n            echo \"Testing cache directory...\\n\";\n        }\n\n\n        // test if all registered cache_dir is accessible\n        $__cache_dir = $smarty->getCacheDir();\n        $_cache_dir = realpath($__cache_dir);\n        if (!$_cache_dir) {\n            $status = false;\n            $message = \"FAILED: {$__cache_dir} does not exist\";\n            if ($errors === null) {\n                echo $message . \".\\n\";\n            } else {\n                $errors['cache_dir'] = $message;\n            }\n        } elseif (!is_dir($_cache_dir)) {\n            $status = false;\n            $message = \"FAILED: {$_cache_dir} is not a directory\";\n            if ($errors === null) {\n                echo $message . \".\\n\";\n            } else {\n                $errors['cache_dir'] = $message;\n            }\n        } elseif (!is_readable($_cache_dir)) {\n            $status = false;\n            $message = \"FAILED: {$_cache_dir} is not readable\";\n            if ($errors === null) {\n                echo $message . \".\\n\";\n            } else {\n                $errors['cache_dir'] = $message;\n            }\n        } elseif (!is_writable($_cache_dir)) {\n            $status = false;\n            $message = \"FAILED: {$_cache_dir} is not writable\";\n            if ($errors === null) {\n                echo $message . \".\\n\";\n            } else {\n                $errors['cache_dir'] = $message;\n            }\n        } else {\n            if ($errors === null) {\n                echo \"{$_cache_dir} is OK.\\n\";\n            }\n        }\n\n\n        if ($errors === null) {\n            echo \"Testing configs directory...\\n\";\n        }\n\n        // test if all registered config_dir are accessible\n        foreach($smarty->getConfigDir() as $config_dir) {\n            $_config_dir = $config_dir;\n            $config_dir = realpath($config_dir);\n            // resolve include_path or fail existance\n            if (!$config_dir) {\n                if ($smarty->use_include_path && !preg_match('/^([\\/\\\\\\\\]|[a-zA-Z]:[\\/\\\\\\\\])/', $_config_dir)) {\n                    // try PHP include_path\n                    if ($_stream_resolve_include_path) {\n                        $config_dir = stream_resolve_include_path($_config_dir);\n                    } else {\n                        $config_dir = Smarty_Internal_Get_Include_Path::getIncludePath($_config_dir);\n                    }\n\n                    if ($config_dir !== false) {\n                        if ($errors === null) {\n                            echo \"$config_dir is OK.\\n\";\n                        }\n\n                        continue;\n                    } else {\n                        $status = false;\n                        $message = \"FAILED: $_config_dir does not exist (and couldn't be found in include_path either)\";\n                        if ($errors === null) {\n                            echo $message . \".\\n\";\n                        } else {\n                            $errors['config_dir'] = $message;\n                        }\n\n                        continue;\n                    }\n                } else {\n                    $status = false;\n                    $message = \"FAILED: $_config_dir does not exist\";\n                    if ($errors === null) {\n                        echo $message . \".\\n\";\n                    } else {\n                        $errors['config_dir'] = $message;\n                    }\n\n                    continue;\n                }\n            }\n\n            if (!is_dir($config_dir)) {\n                $status = false;\n                $message = \"FAILED: $config_dir is not a directory\";\n                if ($errors === null) {\n                    echo $message . \".\\n\";\n                } else {\n                    $errors['config_dir'] = $message;\n                }\n            } elseif (!is_readable($config_dir)) {\n                $status = false;\n                $message = \"FAILED: $config_dir is not readable\";\n                if ($errors === null) {\n                    echo $message . \".\\n\";\n                } else {\n                    $errors['config_dir'] = $message;\n                }\n            } else {\n                if ($errors === null) {\n                    echo \"$config_dir is OK.\\n\";\n                }\n            }\n        }\n\n\n        if ($errors === null) {\n            echo \"Testing sysplugin files...\\n\";\n        }\n        // test if sysplugins are available\n        $source = SMARTY_SYSPLUGINS_DIR;\n        if (is_dir($source)) {\n            $expected = array(\n                \"smarty_cacheresource.php\" => true,\n                \"smarty_cacheresource_custom.php\" => true,\n                \"smarty_cacheresource_keyvaluestore.php\" => true,\n                \"smarty_config_source.php\" => true,\n                \"smarty_internal_cacheresource_file.php\" => true,\n                \"smarty_internal_compile_append.php\" => true,\n                \"smarty_internal_compile_assign.php\" => true,\n                \"smarty_internal_compile_block.php\" => true,\n                \"smarty_internal_compile_break.php\" => true,\n                \"smarty_internal_compile_call.php\" => true,\n                \"smarty_internal_compile_capture.php\" => true,\n                \"smarty_internal_compile_config_load.php\" => true,\n                \"smarty_internal_compile_continue.php\" => true,\n                \"smarty_internal_compile_debug.php\" => true,\n                \"smarty_internal_compile_eval.php\" => true,\n                \"smarty_internal_compile_extends.php\" => true,\n                \"smarty_internal_compile_for.php\" => true,\n                \"smarty_internal_compile_foreach.php\" => true,\n                \"smarty_internal_compile_function.php\" => true,\n                \"smarty_internal_compile_if.php\" => true,\n                \"smarty_internal_compile_include.php\" => true,\n                \"smarty_internal_compile_include_php.php\" => true,\n                \"smarty_internal_compile_insert.php\" => true,\n                \"smarty_internal_compile_ldelim.php\" => true,\n                \"smarty_internal_compile_nocache.php\" => true,\n                \"smarty_internal_compile_private_block_plugin.php\" => true,\n                \"smarty_internal_compile_private_function_plugin.php\" => true,\n                \"smarty_internal_compile_private_modifier.php\" => true,\n                \"smarty_internal_compile_private_object_block_function.php\" => true,\n                \"smarty_internal_compile_private_object_function.php\" => true,\n                \"smarty_internal_compile_private_print_expression.php\" => true,\n                \"smarty_internal_compile_private_registered_block.php\" => true,\n                \"smarty_internal_compile_private_registered_function.php\" => true,\n                \"smarty_internal_compile_private_special_variable.php\" => true,\n                \"smarty_internal_compile_rdelim.php\" => true,\n                \"smarty_internal_compile_section.php\" => true,\n                \"smarty_internal_compile_setfilter.php\" => true,\n                \"smarty_internal_compile_while.php\" => true,\n                \"smarty_internal_compilebase.php\" => true,\n                \"smarty_internal_config.php\" => true,\n                \"smarty_internal_config_file_compiler.php\" => true,\n                \"smarty_internal_configfilelexer.php\" => true,\n                \"smarty_internal_configfileparser.php\" => true,\n                \"smarty_internal_data.php\" => true,\n                \"smarty_internal_debug.php\" => true,\n                \"smarty_internal_filter_handler.php\" => true,\n                \"smarty_internal_function_call_handler.php\" => true,\n                \"smarty_internal_get_include_path.php\" => true,\n                \"smarty_internal_nocache_insert.php\" => true,\n                \"smarty_internal_parsetree.php\" => true,\n                \"smarty_internal_resource_eval.php\" => true,\n                \"smarty_internal_resource_extends.php\" => true,\n                \"smarty_internal_resource_file.php\" => true,\n                \"smarty_internal_resource_registered.php\" => true,\n                \"smarty_internal_resource_stream.php\" => true,\n                \"smarty_internal_resource_string.php\" => true,\n                \"smarty_internal_smartytemplatecompiler.php\" => true,\n                \"smarty_internal_template.php\" => true,\n                \"smarty_internal_templatebase.php\" => true,\n                \"smarty_internal_templatecompilerbase.php\" => true,\n                \"smarty_internal_templatelexer.php\" => true,\n                \"smarty_internal_templateparser.php\" => true,\n                \"smarty_internal_utility.php\" => true,\n                \"smarty_internal_write_file.php\" => true,\n                \"smarty_resource.php\" => true,\n                \"smarty_resource_custom.php\" => true,\n                \"smarty_resource_recompiled.php\" => true,\n                \"smarty_resource_uncompiled.php\" => true,\n                \"smarty_security.php\" => true,\n            );\n            $iterator = new DirectoryIterator($source);\n            foreach ($iterator as $file) {\n                if (!$file->isDot()) {\n                    $filename = $file->getFilename();\n                    if (isset($expected[$filename])) {\n                        unset($expected[$filename]);\n                    }\n                }\n            }\n            if ($expected) {\n                $status = false;\n                $message = \"FAILED: files missing from libs/sysplugins: \". join(', ', array_keys($expected));\n                if ($errors === null) {\n                    echo $message . \".\\n\";\n                } else {\n                    $errors['sysplugins'] = $message;\n                }\n            } elseif ($errors === null) {\n                echo \"... OK\\n\";\n            }\n        } else {\n            $status = false;\n            $message = \"FAILED: \". SMARTY_SYSPLUGINS_DIR .' is not a directory';\n            if ($errors === null) {\n                echo $message . \".\\n\";\n            } else {\n                $errors['sysplugins_dir_constant'] = $message;\n            }\n        }\n\n        if ($errors === null) {\n            echo \"Testing plugin files...\\n\";\n        }\n        // test if core plugins are available\n        $source = SMARTY_PLUGINS_DIR;\n        if (is_dir($source)) {\n            $expected = array(\n                \"block.textformat.php\" => true,\n                \"function.counter.php\" => true,\n                \"function.cycle.php\" => true,\n                \"function.fetch.php\" => true,\n                \"function.html_checkboxes.php\" => true,\n                \"function.html_image.php\" => true,\n                \"function.html_options.php\" => true,\n                \"function.html_radios.php\" => true,\n                \"function.html_select_date.php\" => true,\n                \"function.html_select_time.php\" => true,\n                \"function.html_table.php\" => true,\n                \"function.mailto.php\" => true,\n                \"function.math.php\" => true,\n                \"modifier.capitalize.php\" => true,\n                \"modifier.date_format.php\" => true,\n                \"modifier.debug_print_var.php\" => true,\n                \"modifier.escape.php\" => true,\n                \"modifier.regex_replace.php\" => true,\n                \"modifier.replace.php\" => true,\n                \"modifier.spacify.php\" => true,\n                \"modifier.truncate.php\" => true,\n                \"modifiercompiler.cat.php\" => true,\n                \"modifiercompiler.count_characters.php\" => true,\n                \"modifiercompiler.count_paragraphs.php\" => true,\n                \"modifiercompiler.count_sentences.php\" => true,\n                \"modifiercompiler.count_words.php\" => true,\n                \"modifiercompiler.default.php\" => true,\n                \"modifiercompiler.escape.php\" => true,\n                \"modifiercompiler.from_charset.php\" => true,\n                \"modifiercompiler.indent.php\" => true,\n                \"modifiercompiler.lower.php\" => true,\n                \"modifiercompiler.noprint.php\" => true,\n                \"modifiercompiler.string_format.php\" => true,\n                \"modifiercompiler.strip.php\" => true,\n                \"modifiercompiler.strip_tags.php\" => true,\n                \"modifiercompiler.to_charset.php\" => true,\n                \"modifiercompiler.unescape.php\" => true,\n                \"modifiercompiler.upper.php\" => true,\n                \"modifiercompiler.wordwrap.php\" => true,\n                \"outputfilter.trimwhitespace.php\" => true,\n                \"shared.escape_special_chars.php\" => true,\n                \"shared.literal_compiler_param.php\" => true,\n                \"shared.make_timestamp.php\" => true,\n                \"shared.mb_str_replace.php\" => true,\n                \"shared.mb_unicode.php\" => true,\n                \"shared.mb_wordwrap.php\" => true,\n                \"variablefilter.htmlspecialchars.php\" => true,\n            );\n            $iterator = new DirectoryIterator($source);\n            foreach ($iterator as $file) {\n                if (!$file->isDot()) {\n                    $filename = $file->getFilename();\n                    if (isset($expected[$filename])) {\n                        unset($expected[$filename]);\n                    }\n                }\n            }\n            if ($expected) {\n                $status = false;\n                $message = \"FAILED: files missing from libs/plugins: \". join(', ', array_keys($expected));\n                if ($errors === null) {\n                    echo $message . \".\\n\";\n                } else {\n                    $errors['plugins'] = $message;\n                }\n            } elseif ($errors === null) {\n                echo \"... OK\\n\";\n            }\n        } else {\n            $status = false;\n            $message = \"FAILED: \". SMARTY_PLUGINS_DIR .' is not a directory';\n            if ($errors === null) {\n                echo $message . \".\\n\";\n            } else {\n                $errors['plugins_dir_constant'] = $message;\n            }\n        }\n\n        if ($errors === null) {\n            echo \"Tests complete.\\n\";\n            echo \"</PRE>\\n\";\n        }\n\n        return $status;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_internal_write_file.php",
    "content": "<?php\n/**\n * Smarty write file plugin\n *\n * @package Smarty\n * @subpackage PluginsInternal\n * @author Monte Ohrt\n */\n\n/**\n * Smarty Internal Write File Class\n *\n * @package Smarty\n * @subpackage PluginsInternal\n */\nclass Smarty_Internal_Write_File {\n\n    /**\n     * Writes file in a safe way to disk\n     *\n     * @param string $_filepath complete filepath\n     * @param string $_contents file content\n     * @param Smarty $smarty    smarty instance\n     * @return boolean true\n     */\n    public static function writeFile($_filepath, $_contents, Smarty $smarty)\n    {\n        $_error_reporting = error_reporting();\n        error_reporting($_error_reporting & ~E_NOTICE & ~E_WARNING);\n        if ($smarty->_file_perms !== null) {\n            $old_umask = umask(0);\n        }\n\n        $_dirpath = dirname($_filepath);\n        // if subdirs, create dir structure\n        if ($_dirpath !== '.' && !file_exists($_dirpath)) {\n            mkdir($_dirpath, $smarty->_dir_perms === null ? 0777 : $smarty->_dir_perms, true);\n        }\n\n        // write to tmp file, then move to overt file lock race condition\n        $_tmp_file = $_dirpath . DS . uniqid('wrt', true);\n        if (!file_put_contents($_tmp_file, $_contents)) {\n            error_reporting($_error_reporting);\n            throw new SmartyException(\"unable to write file {$_tmp_file}\");\n            return false;\n        }\n        \n        /*\n         * Windows' rename() fails if the destination exists,\n         * Linux' rename() properly handles the overwrite.\n         * Simply unlink()ing a file might cause other processes \n         * currently reading that file to fail, but linux' rename()\n         * seems to be smart enough to handle that for us.\n         */\n        if (Smarty::$_IS_WINDOWS) {\n            // remove original file\n            @unlink($_filepath);\n            // rename tmp file\n            $success = @rename($_tmp_file, $_filepath);\n        } else {\n            // rename tmp file\n            $success = @rename($_tmp_file, $_filepath);\n            if (!$success) {\n                // remove original file\n                @unlink($_filepath);\n                // rename tmp file\n                $success = @rename($_tmp_file, $_filepath);\n            }\n        }\n\n        if (!$success) {\n            error_reporting($_error_reporting);\n            throw new SmartyException(\"unable to write file {$_filepath}\");\n            return false;\n        }\n\n        if ($smarty->_file_perms !== null) {\n            // set file permissions\n            chmod($_filepath, $smarty->_file_perms);\n            umask($old_umask);\n        }\n        error_reporting($_error_reporting);\n        return true;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_resource.php",
    "content": "<?php\n/**\n * Smarty Resource Plugin\n *\n * @package Smarty\n * @subpackage TemplateResources\n * @author Rodney Rehm\n */\n\n/**\n * Smarty Resource Plugin\n *\n * Base implementation for resource plugins\n *\n * @package Smarty\n * @subpackage TemplateResources\n */\nabstract class Smarty_Resource {\n    /**\n     * cache for Smarty_Template_Source instances\n     * @var array\n     */\n    public static $sources = array();\n    /**\n     * cache for Smarty_Template_Compiled instances\n     * @var array\n     */\n    public static $compileds = array();\n    /**\n     * cache for Smarty_Resource instances\n     * @var array\n     */\n    public static $resources = array();\n    /**\n     * resource types provided by the core\n     * @var array\n     */\n    protected static $sysplugins = array(\n        'file' => true,\n        'string' => true,\n        'extends' => true,\n        'stream' => true,\n        'eval' => true,\n        'php' => true\n    );\n\n    /**\n     * Name of the Class to compile this resource's contents with\n     * @var string\n     */\n    public $compiler_class = 'Smarty_Internal_SmartyTemplateCompiler';\n\n    /**\n     * Name of the Class to tokenize this resource's contents with\n     * @var string\n     */\n    public $template_lexer_class = 'Smarty_Internal_Templatelexer';\n\n    /**\n     * Name of the Class to parse this resource's contents with\n     * @var string\n     */\n    public $template_parser_class = 'Smarty_Internal_Templateparser';\n\n    /**\n     * Load template's source into current template object\n     *\n     * {@internal The loaded source is assigned to $_template->source->content directly.}}\n     *\n     * @param Smarty_Template_Source $source source object\n     * @return string template source\n     * @throws SmartyException if source cannot be loaded\n     */\n    public abstract function getContent(Smarty_Template_Source $source);\n\n    /**\n     * populate Source Object with meta data from Resource\n     *\n     * @param Smarty_Template_Source   $source source object\n     * @param Smarty_Internal_Template $_template     template object\n     */\n    public abstract function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null);\n\n    /**\n     * populate Source Object with timestamp and exists from Resource\n     *\n     * @param Smarty_Template_Source $source source object\n     */\n    public function populateTimestamp(Smarty_Template_Source $source)\n    {\n        // intentionally left blank\n    }\n\n\n    /**\n     * modify resource_name according to resource handlers specifications\n     *\n     * @param Smarty $smarty        Smarty instance\n     * @param string $resource_name resource_name to make unique\n     * @return string unique resource name\n     */\n    protected function buildUniqueResourceName(Smarty $smarty, $resource_name)\n    {\n        return get_class($this) . '#' . $smarty->joined_template_dir . '#' . $resource_name;\n    }\n\n    /**\n     * populate Compiled Object with compiled filepath\n     *\n     * @param Smarty_Template_Compiled $compiled  compiled object\n     * @param Smarty_Internal_Template $_template template object\n     */\n    public function populateCompiledFilepath(Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template)\n    {\n        $_compile_id = isset($_template->compile_id) ? preg_replace('![^\\w\\|]+!', '_', $_template->compile_id) : null;\n        $_filepath = $compiled->source->uid;\n        // if use_sub_dirs, break file into directories\n        if ($_template->smarty->use_sub_dirs) {\n            $_filepath = substr($_filepath, 0, 2) . DS\n             . substr($_filepath, 2, 2) . DS\n             . substr($_filepath, 4, 2) . DS\n             . $_filepath;\n        }\n        $_compile_dir_sep = $_template->smarty->use_sub_dirs ? DS : '^';\n        if (isset($_compile_id)) {\n            $_filepath = $_compile_id . $_compile_dir_sep . $_filepath;\n        }\n        // caching token\n        if ($_template->caching) {\n            $_cache = '.cache';\n        } else {\n            $_cache = '';\n        }\n        $_compile_dir = $_template->smarty->getCompileDir();\n        // set basename if not specified\n        $_basename = $this->getBasename($compiled->source);\n        if ($_basename === null) {\n            $_basename = basename( preg_replace('![^\\w\\/]+!', '_', $compiled->source->name) );\n        }\n        // separate (optional) basename by dot\n        if ($_basename) {\n            $_basename = '.' . $_basename;\n        }\n\n        $compiled->filepath = $_compile_dir . $_filepath . '.' . $compiled->source->type . $_basename . $_cache . '.php';\n    }\n    \n    /**\n     * Normalize Paths \"foo/../bar\" to \"bar\" \n     *\n     * @param string $_path path to normalize\n     * @param boolean $ds respect windows directory separator\n     * @return string normalized path\n     */\n    protected function normalizePath($_path, $ds=true)\n    {\n        if ($ds) {\n            // don't we all just love windows?\n            $_path = str_replace('\\\\', '/', $_path);\n        }\n        \n        $offset = 0;\n        \n        // resolve simples\n        $_path = preg_replace('#(/\\./(\\./)*)|/{2,}#', '/', $_path);\n        // resolve parents\n        while (true) {\n            $_parent = strpos($_path, '/../', $offset);\n            if (!$_parent) {\n                break;\n            } else if ($_path[$_parent - 1] === '.') {\n                $offset = $_parent + 3;\n                continue;\n            }\n            \n            $_pos = strrpos($_path, '/', $_parent - strlen($_path) - 1);\n            if ($_pos === false) {\n                // don't we all just love windows?\n                $_pos = $_parent;\n            }\n            \n            $_path = substr_replace($_path, '', $_pos, $_parent + 3 - $_pos);\n        }\n        \n        if ($ds && DS != '/') {\n            // don't we all just love windows?\n            $_path = str_replace('/', '\\\\', $_path);\n        }\n        \n        return $_path;\n    }\n    \n    /**\n     * build template filepath by traversing the template_dir array\n     *\n     * @param Smarty_Template_Source   $source    source object\n     * @param Smarty_Internal_Template $_template template object\n     * @return string fully qualified filepath\n     * @throws SmartyException if default template handler is registered but not callable\n     */\n    protected function buildFilepath(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)\n    {\n        $file = $source->name;\n        if ($source instanceof Smarty_Config_Source) {\n            $_directories = $source->smarty->getConfigDir();\n            $_default_handler = $source->smarty->default_config_handler_func;\n        } else {\n            $_directories = $source->smarty->getTemplateDir();\n            $_default_handler = $source->smarty->default_template_handler_func;\n        }\n\n        // go relative to a given template?\n        $_file_is_dotted = $file[0] == '.' && ($file[1] == '.' || $file[1] == '/' || $file[1] == \"\\\\\");\n        if ($_template && $_template->parent instanceof Smarty_Internal_Template && $_file_is_dotted) {\n            if ($_template->parent->source->type != 'file' && $_template->parent->source->type != 'extends' && !$_template->parent->allow_relative_path) {\n                throw new SmartyException(\"Template '{$file}' cannot be relative to template of resource type '{$_template->parent->source->type}'\");\n            }\n            $file = dirname($_template->parent->source->filepath) . DS . $file;\n            $_file_exact_match = true;\n            if (!preg_match('/^([\\/\\\\\\\\]|[a-zA-Z]:[\\/\\\\\\\\])/', $file)) {\n                // the path gained from the parent template is relative to the current working directory\n                // as expansions (like include_path) have already been done\n                $file = getcwd() . DS . $file;\n            }\n        }\n\n        // resolve relative path\n        if (!preg_match('/^([\\/\\\\\\\\]|[a-zA-Z]:[\\/\\\\\\\\])/', $file)) {\n            // don't we all just love windows?\n            $_path = str_replace('\\\\', '/', $file);\n            $_path = DS . trim($file, '/');\n            $_was_relative = true;\n        } else {\n            // don't we all just love windows?\n            $_path = str_replace('\\\\', '/', $file);\n        }\n        $_path = $this->normalizePath($_path, false);\n        if (DS != '/') {\n            // don't we all just love windows?\n            $_path = str_replace('/', '\\\\', $_path);\n        }\n        // revert to relative\n        if (isset($_was_relative)) {\n            $_path = substr($_path, 1);\n        }\n\n        // this is only required for directories\n        $file = rtrim($_path, '/\\\\');\n\n        // files relative to a template only get one shot\n        if (isset($_file_exact_match)) {\n            return $this->fileExists($source, $file) ? $file : false;\n        }\n\n        // template_dir index?\n        if (preg_match('#^\\[(?P<key>[^\\]]+)\\](?P<file>.+)$#', $file, $match)) {\n            $_directory = null;\n            // try string indexes\n            if (isset($_directories[$match['key']])) {\n                $_directory = $_directories[$match['key']];\n            } else if (is_numeric($match['key'])) {\n                // try numeric index\n                $match['key'] = (int) $match['key'];\n                if (isset($_directories[$match['key']])) {\n                    $_directory = $_directories[$match['key']];\n                } else {\n                    // try at location index\n                    $keys = array_keys($_directories);\n                    $_directory = $_directories[$keys[$match['key']]];\n                }\n            }\n\n            if ($_directory) {\n                $_file = substr($file, strpos($file, ']') + 1);\n                $_filepath = $_directory . $_file;\n                if ($this->fileExists($source, $_filepath)) {\n                    return $_filepath;\n                }\n            }\n        }\n\n        $_stream_resolve_include_path = function_exists('stream_resolve_include_path');\n\n        // relative file name?\n        if (!preg_match('/^([\\/\\\\\\\\]|[a-zA-Z]:[\\/\\\\\\\\])/', $file)) {\n            foreach ($_directories as $_directory) {\n                $_filepath = $_directory . $file;\n                if ($this->fileExists($source, $_filepath)) {\n                    return $this->normalizePath($_filepath);\n                }\n                if ($source->smarty->use_include_path && !preg_match('/^([\\/\\\\\\\\]|[a-zA-Z]:[\\/\\\\\\\\])/', $_directory)) {\n                    // try PHP include_path\n                    if ($_stream_resolve_include_path) {\n                        $_filepath = stream_resolve_include_path($_filepath);\n                    } else {\n                        $_filepath = Smarty_Internal_Get_Include_Path::getIncludePath($_filepath);\n                    }\n\n                    if ($_filepath !== false) {\n                        if ($this->fileExists($source, $_filepath)) {\n                            return $this->normalizePath($_filepath);\n                        }\n                    }\n                }\n            }\n        }\n\n        // try absolute filepath\n        if ($this->fileExists($source, $file)) {\n            return $file;\n        }\n\n        // no tpl file found\n        if ($_default_handler) {\n            if (!is_callable($_default_handler)) {\n                if ($source instanceof Smarty_Config_Source) {\n                    throw new SmartyException(\"Default config handler not callable\");\n                } else {\n                    throw new SmartyException(\"Default template handler not callable\");\n                }\n            }\n            $_return = call_user_func_array($_default_handler,\n                array($source->type, $source->name, &$_content, &$_timestamp, $source->smarty));\n            if (is_string($_return)) {\n                $source->timestamp = @filemtime($_return);\n                $source->exists = !!$source->timestamp;\n                return $_return;\n            } elseif ($_return === true) {\n                $source->content = $_content;\n                $source->timestamp = $_timestamp;\n                $source->exists = true;\n                return $_filepath;\n            }\n        }\n\n        // give up\n        return false;\n    }\n\n    /**\n     * test is file exists and save timestamp\n     *\n     * @param Smarty_Template_Source   $source    source object\n     * @param string $file file name\n     * @return bool  true if file exists\n     */\n    protected function fileExists(Smarty_Template_Source $source, $file)\n    {\n        $source->timestamp = @filemtime($file);\n        return $source->exists = !!$source->timestamp;\n\n    }\n\n    /**\n     * Determine basename for compiled filename\n     *\n     * @param Smarty_Template_Source $source source object\n     * @return string resource's basename\n     */\n    protected function getBasename(Smarty_Template_Source $source)\n    {\n        return null;\n    }\n\n    /**\n     * Load Resource Handler\n     *\n     * @param Smarty $smarty    smarty object\n     * @param string $type      name of the resource\n     * @return Smarty_Resource Resource Handler\n     */\n    public static function load(Smarty $smarty, $type)\n    {\n        // try smarty's cache\n        if (isset($smarty->_resource_handlers[$type])) {\n            return $smarty->_resource_handlers[$type];\n        }\n\n        // try registered resource\n        if (isset($smarty->registered_resources[$type])) {\n            if ($smarty->registered_resources[$type] instanceof Smarty_Resource) {\n                $smarty->_resource_handlers[$type] = $smarty->registered_resources[$type];\n                // note registered to smarty is not kept unique!\n                return $smarty->_resource_handlers[$type];\n            }\n\n            if (!isset(self::$resources['registered'])) {\n                self::$resources['registered'] = new Smarty_Internal_Resource_Registered();\n            }\n            if (!isset($smarty->_resource_handlers[$type])) {\n                $smarty->_resource_handlers[$type] = self::$resources['registered'];\n            }\n\n            return $smarty->_resource_handlers[$type];\n        }\n\n        // try sysplugins dir\n        if (isset(self::$sysplugins[$type])) {\n            if (!isset(self::$resources[$type])) {\n                $_resource_class = 'Smarty_Internal_Resource_' . ucfirst($type);\n                self::$resources[$type] = new $_resource_class();\n            }\n            return $smarty->_resource_handlers[$type] = self::$resources[$type];\n        }\n\n        // try plugins dir\n        $_resource_class = 'Smarty_Resource_' . ucfirst($type);\n        if ($smarty->loadPlugin($_resource_class)) {\n            if (isset(self::$resources[$type])) {\n                return $smarty->_resource_handlers[$type] = self::$resources[$type];\n            }\n\n            if (class_exists($_resource_class, false)) {\n                self::$resources[$type] = new $_resource_class();\n                return $smarty->_resource_handlers[$type] = self::$resources[$type];\n            } else {\n                $smarty->registerResource($type, array(\n                    \"smarty_resource_{$type}_source\",\n                    \"smarty_resource_{$type}_timestamp\",\n                    \"smarty_resource_{$type}_secure\",\n                    \"smarty_resource_{$type}_trusted\"\n                ));\n\n                // give it another try, now that the resource is registered properly\n                return self::load($smarty, $type);\n            }\n        }\n\n        // try streams\n        $_known_stream = stream_get_wrappers();\n        if (in_array($type, $_known_stream)) {\n            // is known stream\n            if (is_object($smarty->security_policy)) {\n                $smarty->security_policy->isTrustedStream($type);\n            }\n            if (!isset(self::$resources['stream'])) {\n                self::$resources['stream'] = new Smarty_Internal_Resource_Stream();\n            }\n            return $smarty->_resource_handlers[$type] = self::$resources['stream'];\n        }\n\n        // TODO: try default_(template|config)_handler\n\n        // give up\n        throw new SmartyException(\"Unkown resource type '{$type}'\");\n    }\n\n    /**\n     * extract resource_type and resource_name from template_resource and config_resource\n     *\n     * @note \"C:/foo.tpl\" was forced to file resource up till Smarty 3.1.3 (including).\n     * @param string  $resource_name    template_resource or config_resource to parse\n     * @param string  $default_resource the default resource_type defined in $smarty\n     * @param string &$name             the parsed resource name\n     * @param string &$type             the parsed resource type\n     * @return void\n     */\n    protected static function parseResourceName($resource_name, $default_resource, &$name, &$type)\n    {\n        $parts = explode(':', $resource_name, 2);\n        if (!isset($parts[1]) || !isset($parts[0][1])) {\n            // no resource given, use default\n            // or single character before the colon is not a resource type, but part of the filepath\n            $type = $default_resource;\n            $name = $resource_name;\n        } else {\n            $type = $parts[0];\n            $name = $parts[1];\n        }\n    }\n\n\n    /**\n     * modify resource_name according to resource handlers specifications\n     *\n     * @param Smarty $smarty        Smarty instance\n     * @param string $resource_name resource_name to make unique\n     * @return string unique resource name\n     */\n\n    /**\n     * modify template_resource according to resource handlers specifications\n     *\n     * @param string $smarty            Smarty instance\n     * @param string $template_resource template_resource to extracate resource handler and name of\n     * @return string unique resource name\n     */\n    public static function getUniqueTemplateName($smarty, $template_resource)\n    {\n        self::parseResourceName($template_resource, $smarty->default_resource_type, $name, $type);\n        // TODO: optimize for Smarty's internal resource types\n        $resource = Smarty_Resource::load($smarty, $type);\n        return $resource->buildUniqueResourceName($smarty, $name);\n    }\n\n    /**\n     * initialize Source Object for given resource\n     *\n     * Either [$_template] or [$smarty, $template_resource] must be specified\n     *\n     * @param Smarty_Internal_Template $_template         template object\n     * @param Smarty                   $smarty            smarty object\n     * @param string                   $template_resource resource identifier\n     * @return Smarty_Template_Source Source Object\n     */\n    public static function source(Smarty_Internal_Template $_template=null, Smarty $smarty=null, $template_resource=null)\n    {\n        if ($_template) {\n            $smarty = $_template->smarty;\n            $template_resource = $_template->template_resource;\n        }\n\n        // parse resource_name, load resource handler, identify unique resource name\n        self::parseResourceName($template_resource, $smarty->default_resource_type, $name, $type);\n        $resource = Smarty_Resource::load($smarty, $type);\n        $unique_resource_name = $resource->buildUniqueResourceName($smarty, $name);\n\n        // check runtime cache\n        $_cache_key = 'template|' . $unique_resource_name;\n        if ($smarty->compile_id) {\n            $_cache_key .= '|'.$smarty->compile_id;\n        }\n        if (isset(self::$sources[$_cache_key])) {\n            return self::$sources[$_cache_key];\n        }\n\n        // create source\n        $source = new Smarty_Template_Source($resource, $smarty, $template_resource, $type, $name, $unique_resource_name);\n        $resource->populate($source, $_template);\n\n        // runtime cache\n        self::$sources[$_cache_key] = $source;\n        return $source;\n    }\n\n    /**\n     * initialize Config Source Object for given resource\n     *\n     * @param Smarty_Internal_Config $_config config object\n     * @return Smarty_Config_Source Source Object\n     */\n    public static function config(Smarty_Internal_Config $_config)\n    {\n        static $_incompatible_resources = array('eval' => true, 'string' => true, 'extends' => true, 'php' => true);\n        $config_resource = $_config->config_resource;\n        $smarty = $_config->smarty;\n\n        // parse resource_name\n        self::parseResourceName($config_resource, $smarty->default_config_type, $name, $type);\n\n        // make sure configs are not loaded via anything smarty can't handle\n        if (isset($_incompatible_resources[$type])) {\n            throw new SmartyException (\"Unable to use resource '{$type}' for config\");\n        }\n\n        // load resource handler, identify unique resource name\n        $resource = Smarty_Resource::load($smarty, $type);\n        $unique_resource_name = $resource->buildUniqueResourceName($smarty, $name);\n\n        // check runtime cache\n        $_cache_key = 'config|' . $unique_resource_name;\n        if (isset(self::$sources[$_cache_key])) {\n            return self::$sources[$_cache_key];\n        }\n\n        // create source\n        $source = new Smarty_Config_Source($resource, $smarty, $config_resource, $type, $name, $unique_resource_name);\n        $resource->populate($source, null);\n\n        // runtime cache\n        self::$sources[$_cache_key] = $source;\n        return $source;\n    }\n\n}\n\n/**\n * Smarty Resource Data Object\n *\n * Meta Data Container for Template Files\n *\n * @package Smarty\n * @subpackage TemplateResources\n * @author Rodney Rehm\n *\n * @property integer $timestamp Source Timestamp\n * @property boolean $exists    Source Existance\n * @property boolean $template  Extended Template reference\n * @property string  $content   Source Content\n */\nclass Smarty_Template_Source {\n\n    /**\n     * Name of the Class to compile this resource's contents with\n     * @var string\n     */\n    public $compiler_class = null;\n\n    /**\n     * Name of the Class to tokenize this resource's contents with\n     * @var string\n     */\n    public $template_lexer_class = null;\n\n    /**\n     * Name of the Class to parse this resource's contents with\n     * @var string\n     */\n    public $template_parser_class = null;\n\n    /**\n     * Unique Template ID\n     * @var string\n     */\n    public $uid = null;\n\n    /**\n     * Template Resource (Smarty_Internal_Template::$template_resource)\n     * @var string\n     */\n    public $resource = null;\n\n    /**\n     * Resource Type\n     * @var string\n     */\n    public $type = null;\n\n    /**\n     * Resource Name\n     * @var string\n     */\n    public $name = null;\n\n    /**\n     * Unique Resource Name\n     * @var string\n     */\n    public $unique_resource = null;\n\n    /**\n     * Source Filepath\n     * @var string\n     */\n    public $filepath = null;\n\n    /**\n     * Source is bypassing compiler\n     * @var boolean\n     */\n    public $uncompiled = null;\n\n    /**\n     * Source must be recompiled on every occasion\n     * @var boolean\n     */\n    public $recompiled = null;\n\n    /**\n     * The Components an extended template is made of\n     * @var array\n     */\n    public $components = null;\n\n    /**\n     * Resource Handler\n     * @var Smarty_Resource\n     */\n    public $handler = null;\n\n    /**\n     * Smarty instance\n     * @var Smarty\n     */\n    public $smarty = null;\n\n    /**\n     * create Source Object container\n     *\n     * @param Smarty_Resource $handler          Resource Handler this source object communicates with\n     * @param Smarty          $smarty           Smarty instance this source object belongs to\n     * @param string          $resource         full template_resource\n     * @param string          $type             type of resource\n     * @param string          $name             resource name\n     * @param string          $unique_resource  unqiue resource name\n     */\n    public function __construct(Smarty_Resource $handler, Smarty $smarty, $resource, $type, $name, $unique_resource)\n    {\n        $this->handler = $handler; // Note: prone to circular references\n\n        $this->compiler_class = $handler->compiler_class;\n        $this->template_lexer_class = $handler->template_lexer_class;\n        $this->template_parser_class = $handler->template_parser_class;\n        $this->uncompiled = $this->handler instanceof Smarty_Resource_Uncompiled;\n        $this->recompiled = $this->handler instanceof Smarty_Resource_Recompiled;\n\n        $this->smarty = $smarty;\n        $this->resource = $resource;\n        $this->type = $type;\n        $this->name = $name;\n        $this->unique_resource = $unique_resource;\n    }\n\n    /**\n     * get a Compiled Object of this source\n     *\n     * @param Smarty_Internal_Template $_template template objet\n     * @return Smarty_Template_Compiled compiled object\n     */\n    public function getCompiled(Smarty_Internal_Template $_template)\n    {\n        // check runtime cache\n        $_cache_key = $this->unique_resource . '#' . $_template->compile_id;\n        if (isset(Smarty_Resource::$compileds[$_cache_key])) {\n            return Smarty_Resource::$compileds[$_cache_key];\n        }\n\n        $compiled = new Smarty_Template_Compiled($this);\n        $this->handler->populateCompiledFilepath($compiled, $_template);\n        $compiled->timestamp = @filemtime($compiled->filepath);\n        $compiled->exists = !!$compiled->timestamp;\n\n        // runtime cache\n        Smarty_Resource::$compileds[$_cache_key] = $compiled;\n\n        return $compiled;\n    }\n\n    /**\n     * render the uncompiled source\n     *\n     * @param Smarty_Internal_Template $_template template object\n     */\n    public function renderUncompiled(Smarty_Internal_Template $_template)\n    {\n        return $this->handler->renderUncompiled($this, $_template);\n    }\n\n    /**\n     * <<magic>> Generic Setter.\n     *\n     * @param string $property_name valid: timestamp, exists, content, template\n     * @param mixed  $value        new value (is not checked)\n     * @throws SmartyException if $property_name is not valid\n     */\n    public function __set($property_name, $value)\n    {\n        switch ($property_name) {\n            // regular attributes\n            case 'timestamp':\n            case 'exists':\n            case 'content':\n            // required for extends: only\n            case 'template':\n                $this->$property_name = $value;\n                break;\n\n            default:\n                throw new SmartyException(\"invalid source property '$property_name'.\");\n        }\n    }\n\n    /**\n     * <<magic>> Generic getter.\n     *\n     * @param string $property_name valid: timestamp, exists, content\n     * @return mixed\n     * @throws SmartyException if $property_name is not valid\n     */\n    public function __get($property_name)\n    {\n        switch ($property_name) {\n            case 'timestamp':\n            case 'exists':\n                $this->handler->populateTimestamp($this);\n                return $this->$property_name;\n\n            case 'content':\n                return $this->content = $this->handler->getContent($this);\n\n            default:\n                throw new SmartyException(\"source property '$property_name' does not exist.\");\n        }\n    }\n\n}\n\n/**\n * Smarty Resource Data Object\n *\n * Meta Data Container for Template Files\n *\n * @package Smarty\n * @subpackage TemplateResources\n * @author Rodney Rehm\n *\n * @property string $content compiled content\n */\nclass Smarty_Template_Compiled {\n\n    /**\n     * Compiled Filepath\n     * @var string\n     */\n    public $filepath = null;\n\n    /**\n     * Compiled Timestamp\n     * @var integer\n     */\n    public $timestamp = null;\n\n    /**\n     * Compiled Existance\n     * @var boolean\n     */\n    public $exists = false;\n\n    /**\n     * Compiled Content Loaded\n     * @var boolean\n     */\n    public $loaded = false;\n\n    /**\n     * Template was compiled\n     * @var boolean\n     */\n    public $isCompiled = false;\n\n    /**\n     * Source Object\n     * @var Smarty_Template_Source\n     */\n    public $source = null;\n\n    /**\n     * Metadata properties\n     *\n     * populated by Smarty_Internal_Template::decodeProperties()\n     * @var array\n     */\n    public $_properties = null;\n\n    /**\n     * create Compiled Object container\n     *\n     * @param Smarty_Template_Source $source source object this compiled object belongs to\n     */\n    public function __construct(Smarty_Template_Source $source)\n    {\n        $this->source = $source;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_resource_custom.php",
    "content": "<?php\n/**\n * Smarty Resource Plugin\n *\n * @package Smarty\n * @subpackage TemplateResources\n * @author Rodney Rehm\n */\n\n/**\n * Smarty Resource Plugin\n *\n * Wrapper Implementation for custom resource plugins\n *\n * @package Smarty\n * @subpackage TemplateResources\n */\nabstract class Smarty_Resource_Custom extends Smarty_Resource {\n\n    /**\n     * fetch template and its modification time from data source\n     *\n     * @param string  $name    template name\n     * @param string  &$source template source\n     * @param integer &$mtime  template modification timestamp (epoch)\n     */\n    protected abstract function fetch($name, &$source, &$mtime);\n\n    /**\n     * Fetch template's modification timestamp from data source\n     *\n     * {@internal implementing this method is optional.\n     *  Only implement it if modification times can be accessed faster than loading the complete template source.}}\n     *\n     * @param string $name template name\n     * @return integer|boolean timestamp (epoch) the template was modified, or false if not found\n     */\n    protected function fetchTimestamp($name)\n    {\n        return null;\n    }\n\n    /**\n     * populate Source Object with meta data from Resource\n     *\n     * @param Smarty_Template_Source   $source    source object\n     * @param Smarty_Internal_Template $_template template object\n     */\n    public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)\n    {\n        $source->filepath = strtolower($source->type . ':' . $source->name);\n        $source->uid = sha1($source->type . ':' . $source->name);\n\n        $mtime = $this->fetchTimestamp($source->name);\n        if ($mtime !== null) {\n            $source->timestamp = $mtime;\n        } else {\n            $this->fetch($source->name, $content, $timestamp);\n            $source->timestamp = isset($timestamp) ? $timestamp : false;\n            if( isset($content) )\n                $source->content = $content;\n        }\n        $source->exists = !!$source->timestamp;\n    }\n\n    /**\n     * Load template's source into current template object\n     *\n     * @param Smarty_Template_Source $source source object\n     * @return string template source\n     * @throws SmartyException if source cannot be loaded\n     */\n    public function getContent(Smarty_Template_Source $source)\n    {\n        $this->fetch($source->name, $content, $timestamp);\n        if (isset($content)) {\n            return $content;\n        }\n\n        throw new SmartyException(\"Unable to read template {$source->type} '{$source->name}'\");\n    }\n\n    /**\n     * Determine basename for compiled filename\n     *\n     * @param Smarty_Template_Source $source source object\n     * @return string resource's basename\n     */\n    protected function getBasename(Smarty_Template_Source $source)\n    {\n        return basename($source->name);\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_resource_recompiled.php",
    "content": "<?php\n/**\n * Smarty Resource Plugin\n *\n * @package Smarty\n * @subpackage TemplateResources\n * @author Rodney Rehm\n */\n\n/**\n * Smarty Resource Plugin\n *\n * Base implementation for resource plugins that don't compile cache\n *\n * @package Smarty\n * @subpackage TemplateResources\n */\nabstract class Smarty_Resource_Recompiled extends Smarty_Resource {\n\n    /**\n     * populate Compiled Object with compiled filepath\n     *\n     * @param Smarty_Template_Compiled $compiled compiled object\n     * @param Smarty_Internal_Template $_template template object\n     * @return void\n     */\n    public function populateCompiledFilepath(Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template)\n    {\n        $compiled->filepath = false;\n        $compiled->timestamp = false;\n        $compiled->exists = false;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_resource_uncompiled.php",
    "content": "<?php\n/**\n * Smarty Resource Plugin\n *\n * @package Smarty\n * @subpackage TemplateResources\n * @author Rodney Rehm\n */\n\n/**\n * Smarty Resource Plugin\n *\n * Base implementation for resource plugins that don't use the compiler\n *\n * @package Smarty\n * @subpackage TemplateResources\n */\nabstract class Smarty_Resource_Uncompiled extends Smarty_Resource {\n\n    /**\n     * Render and output the template (without using the compiler)\n     *\n     * @param Smarty_Template_Source   $source    source object\n     * @param Smarty_Internal_Template $_template template object\n     * @throws SmartyException on failure\n     */\n    public abstract function renderUncompiled(Smarty_Template_Source $source, Smarty_Internal_Template $_template);\n\n    /**\n     * populate compiled object with compiled filepath\n     *\n     * @param Smarty_Template_Compiled $compiled  compiled object\n     * @param Smarty_Internal_Template $_template template object (is ignored)\n     */\n    public function populateCompiledFilepath(Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template)\n    {\n        $compiled->filepath = false;\n        $compiled->timestamp = false;\n        $compiled->exists = false;\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty/sysplugins/smarty_security.php",
    "content": "<?php\n/**\n * Smarty plugin\n *\n * @package Smarty\n * @subpackage Security\n * @author Uwe Tews\n */\n \n/*\n * FIXME: Smarty_Security API\n *      - getter and setter instead of public properties would allow cultivating an internal cache properly\n *      - current implementation of isTrustedResourceDir() assumes that Smarty::$template_dir and Smarty::$config_dir are immutable\n *        the cache is killed every time either of the variables change. That means that two distinct Smarty objects with differing\n *        $template_dir or $config_dir should NOT share the same Smarty_Security instance, \n *        as this would lead to (severe) performance penalty! how should this be handled? \n */\n\n/**\n * This class does contain the security settings\n */\nclass Smarty_Security {\n\n    /**\n     * This determines how Smarty handles \"<?php ... ?>\" tags in templates.\n     * possible values:\n     * <ul>\n     *   <li>Smarty::PHP_PASSTHRU -> echo PHP tags as they are</li>\n     *   <li>Smarty::PHP_QUOTE    -> escape tags as entities</li>\n     *   <li>Smarty::PHP_REMOVE   -> remove php tags</li>\n     *   <li>Smarty::PHP_ALLOW    -> execute php tags</li>\n     * </ul>\n     *\n     * @var integer\n     */\n    public $php_handling = Smarty::PHP_PASSTHRU;\n    /**\n     * This is the list of template directories that are considered secure.\n     * $template_dir is in this list implicitly.\n     *\n     * @var array\n     */\n    public $secure_dir = array();\n    /**\n     * This is an array of directories where trusted php scripts reside.\n     * {@link $security} is disabled during their inclusion/execution.\n     *\n     * @var array\n     */\n    public $trusted_dir = array();\n    /**\n     * List of regular expressions (PCRE) that include trusted URIs\n     *\n     * @var array\n     */\n    public $trusted_uri = array();\n    /**\n     * This is an array of trusted static classes.\n     *\n     * If empty access to all static classes is allowed.\n     * If set to 'none' none is allowed.\n     * @var array\n     */\n    public $static_classes = array();\n    /**\n     * This is an array of trusted PHP functions.\n     *\n     * If empty all functions are allowed.\n     * To disable all PHP functions set $php_functions = null.\n     * @var array\n     */\n    public $php_functions = array(\n        'isset', 'empty',\n        'count', 'sizeof',\n        'in_array', 'is_array',\n        'time',\n        'nl2br',\n    );\n    /**\n     * This is an array of trusted PHP modifers.\n     *\n     * If empty all modifiers are allowed.\n     * To disable all modifier set $modifiers = null.\n     * @var array\n     */\n    public $php_modifiers = array(\n        'escape',\n        'count'\n    );\n    /**\n     * This is an array of allowed tags.\n     *\n     * If empty no restriction by allowed_tags.\n     * @var array\n     */\n    public $allowed_tags = array();\n    /**\n     * This is an array of disabled tags.\n     *\n     * If empty no restriction by disabled_tags.\n     * @var array\n     */\n    public $disabled_tags = array();\n    /**\n     * This is an array of allowed modifier plugins.\n     *\n     * If empty no restriction by allowed_modifiers.\n     * @var array\n     */\n    public $allowed_modifiers = array();\n    /**\n     * This is an array of disabled modifier plugins.\n     *\n     * If empty no restriction by disabled_modifiers.\n     * @var array\n     */\n    public $disabled_modifiers = array();\n    /**\n     * This is an array of trusted streams.\n     *\n     * If empty all streams are allowed.\n     * To disable all streams set $streams = null.\n     * @var array\n     */\n    public $streams = array('file');\n    /**\n     * + flag if constants can be accessed from template\n     * @var boolean\n     */\n    public $allow_constants = true;\n    /**\n     * + flag if super globals can be accessed from template\n     * @var boolean\n     */\n    public $allow_super_globals = true;\n\n    /**\n     * Cache for $resource_dir lookups\n     * @var array\n     */\n    protected $_resource_dir = null;\n    /**\n     * Cache for $template_dir lookups\n     * @var array\n     */\n    protected $_template_dir = null;\n    /**\n     * Cache for $config_dir lookups\n     * @var array\n     */\n    protected $_config_dir = null;\n    /**\n     * Cache for $secure_dir lookups\n     * @var array\n     */\n    protected $_secure_dir = null;\n    /**\n     * Cache for $php_resource_dir lookups\n     * @var array\n     */\n    protected $_php_resource_dir = null;\n    /**\n     * Cache for $trusted_dir lookups\n     * @var array\n     */\n    protected $_trusted_dir = null;\n    \n    \n    /**\n     * @param Smarty $smarty\n     */\n    public function __construct($smarty)\n    {\n        $this->smarty = $smarty;\n    }\n    \n    /**\n     * Check if PHP function is trusted.\n     *\n     * @param string $function_name\n     * @param object $compiler compiler object\n     * @return boolean true if function is trusted\n     * @throws SmartyCompilerException if php function is not trusted\n     */\n    public function isTrustedPhpFunction($function_name, $compiler)\n    {\n        if (isset($this->php_functions) && (empty($this->php_functions) || in_array($function_name, $this->php_functions))) {\n            return true;\n        }\n\n        $compiler->trigger_template_error(\"PHP function '{$function_name}' not allowed by security setting\");\n        return false; // should not, but who knows what happens to the compiler in the future?\n    }\n\n    /**\n     * Check if static class is trusted.\n     *\n     * @param string $class_name\n     * @param object $compiler compiler object\n     * @return boolean true if class is trusted\n     * @throws SmartyCompilerException if static class is not trusted\n     */\n    public function isTrustedStaticClass($class_name, $compiler)\n    {\n        if (isset($this->static_classes) && (empty($this->static_classes) || in_array($class_name, $this->static_classes))) {\n            return true;\n        }\n\n        $compiler->trigger_template_error(\"access to static class '{$class_name}' not allowed by security setting\");\n        return false; // should not, but who knows what happens to the compiler in the future?\n    }\n\n    /**\n     * Check if PHP modifier is trusted.\n     *\n     * @param string $modifier_name\n     * @param object $compiler compiler object\n     * @return boolean true if modifier is trusted\n     * @throws SmartyCompilerException if modifier is not trusted\n     */\n    public function isTrustedPhpModifier($modifier_name, $compiler)\n    {\n        if (isset($this->php_modifiers) && (empty($this->php_modifiers) || in_array($modifier_name, $this->php_modifiers))) {\n            return true;\n        }\n\n        $compiler->trigger_template_error(\"modifier '{$modifier_name}' not allowed by security setting\");\n        return false; // should not, but who knows what happens to the compiler in the future?\n    }\n\n    /**\n     * Check if tag is trusted.\n     *\n     * @param string $tag_name\n     * @param object $compiler compiler object\n     * @return boolean true if tag is trusted\n     * @throws SmartyCompilerException if modifier is not trusted\n     */\n    public function isTrustedTag($tag_name, $compiler)\n    {\n        // check for internal always required tags\n        if (in_array($tag_name, array('assign', 'call', 'private_filter', 'private_block_plugin', 'private_function_plugin', 'private_object_block_function',\n                    'private_object_function', 'private_registered_function', 'private_registered_block', 'private_special_variable', 'private_print_expression', 'private_modifier'))) {\n            return true;\n        }\n        // check security settings\n        if (empty($this->allowed_tags)) {\n            if (empty($this->disabled_tags) || !in_array($tag_name, $this->disabled_tags)) {\n                return true;\n            } else {\n                $compiler->trigger_template_error(\"tag '{$tag_name}' disabled by security setting\", $compiler->lex->taglineno);\n            }\n        } else if (in_array($tag_name, $this->allowed_tags) && !in_array($tag_name, $this->disabled_tags)) {\n            return true;\n        } else {\n            $compiler->trigger_template_error(\"tag '{$tag_name}' not allowed by security setting\", $compiler->lex->taglineno);\n        }\n        return false; // should not, but who knows what happens to the compiler in the future?\n    }\n\n    /**\n     * Check if modifier plugin is trusted.\n     *\n     * @param string $modifier_name\n     * @param object $compiler compiler object\n     * @return boolean true if tag is trusted\n     * @throws SmartyCompilerException if modifier is not trusted\n     */\n    public function isTrustedModifier($modifier_name, $compiler)\n    {\n        // check for internal always allowed modifier\n        if (in_array($modifier_name, array('default'))) {\n            return true;\n        }\n        // check security settings\n        if (empty($this->allowed_modifiers)) {\n            if (empty($this->disabled_modifiers) || !in_array($modifier_name, $this->disabled_modifiers)) {\n                return true;\n            } else {\n                $compiler->trigger_template_error(\"modifier '{$modifier_name}' disabled by security setting\", $compiler->lex->taglineno);\n            }\n        } else if (in_array($modifier_name, $this->allowed_modifiers) && !in_array($modifier_name, $this->disabled_modifiers)) {\n            return true;\n        } else {\n            $compiler->trigger_template_error(\"modifier '{$modifier_name}' not allowed by security setting\", $compiler->lex->taglineno);\n        }\n        return false; // should not, but who knows what happens to the compiler in the future?\n    }\n\n    /**\n     * Check if stream is trusted.\n     *\n     * @param string $stream_name\n     * @return boolean true if stream is trusted\n     * @throws SmartyException if stream is not trusted\n     */\n    public function isTrustedStream($stream_name)\n    {\n        if (isset($this->streams) && (empty($this->streams) || in_array($stream_name, $this->streams))) {\n            return true;\n        }\n\n        throw new SmartyException(\"stream '{$stream_name}' not allowed by security setting\");\n    }\n\n    /**\n     * Check if directory of file resource is trusted.\n     *\n     * @param string $filepath\n     * @return boolean true if directory is trusted\n     * @throws SmartyException if directory is not trusted\n     */\n    public function isTrustedResourceDir($filepath)\n    {\n        $_template = false;\n        $_config = false;\n        $_secure = false;\n\n        $_template_dir = $this->smarty->getTemplateDir();\n        $_config_dir = $this->smarty->getConfigDir();\n\n        // check if index is outdated\n        if ((!$this->_template_dir || $this->_template_dir !== $_template_dir)\n                || (!$this->_config_dir || $this->_config_dir !== $_config_dir)\n                || (!empty($this->secure_dir) && (!$this->_secure_dir || $this->_secure_dir !== $this->secure_dir))\n        ) {\n            $this->_resource_dir = array();\n            $_template = true;\n            $_config = true;\n            $_secure = !empty($this->secure_dir);\n        }\n\n        // rebuild template dir index\n        if ($_template) {\n            $this->_template_dir = $_template_dir;\n            foreach ($_template_dir as $directory) {\n                $directory = realpath($directory);\n                $this->_resource_dir[$directory] = true;\n            }\n        }\n\n        // rebuild config dir index\n        if ($_config) {\n            $this->_config_dir = $_config_dir;\n            foreach ($_config_dir as $directory) {\n                $directory = realpath($directory);\n                $this->_resource_dir[$directory] = true;\n            }\n        }\n\n        // rebuild secure dir index\n        if ($_secure) {\n            $this->_secure_dir = $this->secure_dir;\n            foreach ((array) $this->secure_dir as $directory) {\n                $directory = realpath($directory);\n                $this->_resource_dir[$directory] = true;\n            }\n        }\n\n        $_filepath = realpath($filepath);\n        $directory = dirname($_filepath);\n        $_directory = array();\n        while (true) {\n            // remember the directory to add it to _resource_dir in case we're successful\n            $_directory[$directory] = true;\n            // test if the directory is trusted\n            if (isset($this->_resource_dir[$directory])) {\n                // merge sub directories of current $directory into _resource_dir to speed up subsequent lookups\n                $this->_resource_dir = array_merge($this->_resource_dir, $_directory);\n                return true;\n            }\n            // abort if we've reached root\n            if (($pos = strrpos($directory, DS)) === false || !isset($directory[1])) {\n                break;\n            }\n            // bubble up one level\n            $directory = substr($directory, 0, $pos);\n        }\n\n        // give up\n        throw new SmartyException(\"directory '{$_filepath}' not allowed by security setting\");\n    }\n    \n    /**\n     * Check if URI (e.g. {fetch} or {html_image}) is trusted\n     *\n     * To simplify things, isTrustedUri() resolves all input to \"{$PROTOCOL}://{$HOSTNAME}\".\n     * So \"http://username:password@hello.world.example.org:8080/some-path?some=query-string\"\n     * is reduced to \"http://hello.world.example.org\" prior to applying the patters from {@link $trusted_uri}.\n     * @param string $uri \n     * @return boolean true if URI is trusted\n     * @throws SmartyException if URI is not trusted\n     * @uses $trusted_uri for list of patterns to match against $uri\n     */\n    public function isTrustedUri($uri)\n    {\n        $_uri = parse_url($uri);\n        if (!empty($_uri['scheme']) && !empty($_uri['host'])) {\n            $_uri = $_uri['scheme'] . '://' . $_uri['host'];\n            foreach ($this->trusted_uri as $pattern) {\n                if (preg_match($pattern, $_uri)) {\n                    return true;\n                }\n            }\n        }\n        \n        throw new SmartyException(\"URI '{$uri}' not allowed by security setting\");\n    }\n    \n    /**\n     * Check if directory of file resource is trusted.\n     *\n     * @param string $filepath\n     * @return boolean true if directory is trusted\n     * @throws SmartyException if PHP directory is not trusted\n     */\n    public function isTrustedPHPDir($filepath)\n    {\n        if (empty($this->trusted_dir)) {\n            throw new SmartyException(\"directory '{$filepath}' not allowed by security setting (no trusted_dir specified)\");\n        }\n\n        // check if index is outdated\n        if (!$this->_trusted_dir || $this->_trusted_dir !== $this->trusted_dir) {\n            $this->_php_resource_dir = array();\n\n            $this->_trusted_dir = $this->trusted_dir;\n            foreach ((array) $this->trusted_dir as $directory) {\n                $directory = realpath($directory);\n                $this->_php_resource_dir[$directory] = true;\n            }\n        }\n\n        $_filepath = realpath($filepath);\n        $directory = dirname($_filepath);\n        $_directory = array();\n        while (true) {\n            // remember the directory to add it to _resource_dir in case we're successful\n            $_directory[] = $directory;\n            // test if the directory is trusted\n            if (isset($this->_php_resource_dir[$directory])) {\n                // merge sub directories of current $directory into _resource_dir to speed up subsequent lookups\n                $this->_php_resource_dir = array_merge($this->_php_resource_dir, $_directory);\n                return true;\n            }\n            // abort if we've reached root\n            if (($pos = strrpos($directory, DS)) === false || !isset($directory[2])) {\n                break;\n            }\n            // bubble up one level\n            $directory = substr($directory, 0, $pos);\n        }\n\n        throw new SmartyException(\"directory '{$_filepath}' not allowed by security setting\");\n    }\n\n}\n\n?>"
  },
  {
    "path": "packages/chameleon-templates/server/smarty.conf",
    "content": "left_delimiter=\"{\"\nright_delimiter=\"}\"\nencoding=\"utf8\"\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n.vscode\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\n# dist\ndist/\noutput/\n.temp\nnode_modules\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/chameleon.config.js",
    "content": "\n// 设置静态资源的线上路径\nconst publicPath = '//www.static.chameleon.com/cml';\n// 设置api请求前缀\nconst apiPrefix = 'https://api.chameleon.com';\n\ncml.config.merge({\n  templateLang: 'cml',\n  templateType: 'html',\n  platforms: ['web', 'weex', 'wx', 'baidu', 'alipay', 'qq'],\n  buildInfo: {\n    wxAppId: '123456'\n  },\n  wx: {\n    dev: {\n    },\n    build: {\n      apiPrefix\n    }\n  },\n  web: {\n    dev: {\n      analysis: false,\n      console: false\n    },\n    build: {\n      analysis: false,\n      publicPath: `${publicPath}/web/`,\n      apiPrefix\n    }\n  },\n  weex: {\n    dev: {\n    },\n    build: {\n      publicPath: `${publicPath}/weex/`,\n      apiPrefix\n    },\n    custom: {\n      publicPath: `${publicPath}/wx/`,\n      apiPrefix\n    }\n  }\n})\n\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/mock/api/index.js",
    "content": "\nmodule.exports = [\n  {\n    method: ['get', 'post'],\n    path: '/api/getMessage',\n    controller: function (req, res, next) {\n      res.json({\n        total: 0,\n        message: [{\n          name: 'Hello chameleon!'\n        }]\n      });\n    }\n  }\n]\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/mock/template/index.php",
    "content": "<?php\n\t$chameleon = array(\n\t\t\"errno\"=> \"0\",\n\t\t\"errmsg\"=> \"\",\n\t\t\"pageData\"=> array(\n\t\t\t\"name\"=>\"chameleon\",\n\t\t\t\"age\" => 10\n\t\t)\n\t);"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/package.json",
    "content": "{\n  \"name\": \"chameleon\",\n  \"version\": \"1.0.0\",\n  \"description\": \"A chameleon project\",\n  \"author\": \"\",\n  \"private\": true,\n  \"scripts\": {},\n  \"license\": \"MIT\",\n  \"dependencies\": {\n    \"chameleon-api\": \"0.5.4\",\n    \"chameleon-runtime\": \"1.0.0\",\n    \"chameleon-store\": \"1.0.0\",\n    \"chameleon-ui-builtin\": \"1.0.0\",\n    \"cml-ui\": \"1.0.0\"\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/src/app/app.cml",
    "content": "<template>\n  <app router-config=\"{{routerConfig}}\"></app>\n</template>\n\n<script>\nimport routerConfig from '../router.config.json';\n\nclass App {\n  data = {\n    routerConfig\n  }\n  created(res) {\n  }\n}\n\nexport default new App();\n</script>\n\n<style scoped>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"white\"\n    }\n  },\n  \"baidu\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"light\",\n      \"navigationBarBackgroundColor\": \"#ffffff\",\n      \"navigationBarTitleText\": \"Chameleon\",\n      \"navigationBarTextStyle\": \"black\"\n    }\n  },\n  \"alipay\": {\n      \"window\": {\n        \"defaultTitle\": \"Chameleon\"\n      }\n  },\n  \"qq\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"white\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/src/components/c-checkbox/c-checkbox.cml",
    "content": "<template>\n  <view class=\"checkbox-wrap\" style=\"{{wrapStyle}}\" c-bind:tap=\"click\">\n    <view class=\"box\" style=\"{{boxStyle}}\"></view>\n  </view>\n</template>\n<script>\nclass CCheckbox   {\n  props = {\n    checked: {\n      type: Boolean,\n      default: false\n    },\n    color: {\n      type: String,\n      default: '#61c7fc'\n    },\n    width: {\n      type: Number,\n      default: 50\n    }\n  }\n  data = {\n  }\n\n  computed = {\n    wrapStyle() {\n      return this.$cmlStyle({\n        'width': this.width  + 'cpx',\n        'height': this.width  + 'cpx',\n        'border-radius': this.width  + 'cpx',\n        'border': `1px solid ${this.color}`\n      })\n    },\n    boxStyle() {\n      if (this.checked) {\n        return this.$cmlStyle({\n          'width': this.width * 0.8 + 'cpx',\n          'height': this.width * 0.8 + 'cpx',\n          'background': this.color,\n          'border-radius': this.width + 'cpx'\n        })\n      } else {\n        return this.$cmlStyle({\n          'width': '0',\n          'height': '0',\n          'border-radius': this.width + 'cpx',\n          'background': this.color\n        })\n      }\n    }\n  }\n\n  watch  = {\n  }\n\n  methods = {\n    click() {\n      this.$cmlEmit('checkclick')\n    }\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new CCheckbox();\n</script>\n<style scoped>\n.checkbox-wrap {\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n  position: relative;\n}\n\n.box {\n  transition-property: width, height;\n  transition-duration: 0.1s;\n  transition-delay: 0s;\n  transition-timing-function: ease-in-out;\n  transition: all .1s ease-in-out;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/src/components/c-todoitem/c-todoitem.cml",
    "content": "<template>\n<view class=\"wrap border-bottom-1px\">\n  <view class=\"checkbox-wrap\">\n    <c-checkbox width=\"{{40}}\" checked=\"{{completed}}\" c-bind:checkclick=\"checkclick\"></c-checkbox>\n  </view>\n  <text class=\"{{completed ? 'completed-show' : 'text-show'}}\" c-bind:tap=\"checkclick\">{{text}}</text>\n  <view class=\"delete-btn\" c-bind:tap=\"delete\">\n    <image src=\"{{closeImg}}\" style=\"width:30cpx;height:30cpx;\" />\n  </view>\n</view>\n</template>\n<script>\nimport cml from 'chameleon-api'\nclass CTodoitem   {\n  props = {\n    index: {\n      type: Number\n    },\n    completed: {\n      type: Boolean\n    },\n    text: {\n      type: String\n    }\n  }\n  data = {\n    startX: 0,\n    moveDis: 0,\n    minLeft: -240,\n    currenLeft: 0,\n    moved: false,\n    closeImg: require('../../assets/images/close.png')\n  }\n\n  computed = {\n    innerStyle() {\n      if (this.moveDis) {\n        return this.$cmlStyle({\n          left: `${this.moveDis}cpx`\n        })\n      } else {\n        return this.$cmlStyle({\n          left: `${this.currenLeft}cpx`\n        })\n      }\n    }\n  }\n\n  watch  = {\n  }\n\n  methods = {\n    checkclick() {\n      if (this.moved) {\n        return;\n      }\n      this.$cmlEmit('changestatus', {\n        index: this.index,\n        status: !this.completed\n      })\n    },\n    delete() {\n      this.$cmlEmit('delete', {\n        index: this.index\n      })\n    },\n    top() {\n      this.$cmlEmit('top', {\n        index: this.index\n      });\n    },\n    touchstart(e) {\n      this.moved = false;\n      this.startX = e.changedTouches[0].pageX;\n    },\n    touchmove(e) {\n      let moveDis = this.currenLeft + e.changedTouches[0].pageX - this.startX;\n      if (moveDis <= 0 && moveDis >= this.minLeft) {\n        this.moveDis = moveDis;\n      }\n      if (this.moveDis) {\n        this.moved = true;\n      } else {\n        this.moved = false;\n      }\n    }, \n    touchend(e) {\n      if (this.currenLeft) {\n        if (this.moveDis && this.moveDis >= this.minLeft / 2) {\n          this.currenLeft = 0;\n        }\n      } else {\n        if (this.moveDis <= this.minLeft / 2) {\n          this.currenLeft = this.minLeft;\n        }\n      }\n      this.moveDis = 0;\n    }\n  }\n}\n\nexport default new CTodoitem();\n</script>\n<style scoped>\n.wrap {\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  height: 100cpx;\n  width: 640cpx;\n}\n.checkbox-wrap {\n  display: flex;\n  flex-direction: row;\n  width: 80cpx;\n  height: 100cpx;\n  justify-content: center;\n  align-items: center;\n}\n.completed-show {\n  width: 510cpx;\n  font-size: 32cpx;\n  color: #999;\n  height: 100cpx;\n  line-height: 100cpx;\n  text-decoration: line-through;\n}\n.text-show {\n  width: 510cpx;\n  font-size: 32cpx;\n  color: #666;\n  height: 100cpx;\n  line-height: 100cpx;\n}\n.top-btn {\n  font-size: 28cpx;\n  width: 120cpx;\n  height: 100cpx;\n  line-height: 100cpx;\n  text-align: center;\n  color: #fff;\n  background: #61c7fc;\n}\n.delete-btn {\n  margin-right: 10cpx;\n  width: 40cpx;\n  height: 40cpx;\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: center;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-checkbox\": \"/components/c-checkbox/c-checkbox\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/src/pages/index/index.cml",
    "content": "<template>\n  <page title=\"TodoMVC\">\n    <scroller height=\"{{-1}}\">\n      <view class=\"scroller-wrap\">\n        <text class=\"title\">{{title}}</text>\n        <view class=\"main\">\n          <view class=\"input-wrap border-bottom-1px\">\n            <input class=\"input-area\"\n                        placeholder=\"What needs to be done?\"\n                        c-style=\"{{inputStyle}}\"\n                        type=\"text\"\n                        value=\"{{value}}\"\n                        c-bind:input=\"inputHandle\"\n                        c-bind:blur=\"addHandle\" />\n            <view class=\"add-btn\" c-bind:tap=\"addHandle\">\n              <view class=\"black-arrow\" style=\"{{btnStyle}}\"></view>\n              <view class=\"white-arrow\"></view>\n            </view>\n          </view>\n          <view class=\"list-wrap\">\n            <c-todoitem \n                      class=\"border-bottom-1px\"\n                      c-for=\"{{showTodos}}\"\n                      c-key=\"{{todoLength + index}}\"\n                      completed=\"{{item.completed}}\"\n                      index=\"{{item.index}}\"\n                      text=\"{{item.text}}\"\n                      c-bind:changestatus=\"changeStatus\"\n                      c-bind:delete=\"delete\"\n                      c-bind:top=\"top\"></c-todoitem>\n          </view>\n          <text class=\"count\">{{countText}}</text>\n          <view class=\"option-wrap\">\n            <view class=\"filter\">\n              <text class=\"{{filter === 0 ? 'filter-active' : 'filter-default'}}\"\n                    c-bind:tap=\"changeFilter0\">All</text>\n              <text class=\"{{filter === 1 ? 'filter-active' : 'filter-default'}}\"\n                    c-bind:tap=\"changeFilter1\">Active</text>\n              <text class=\"{{filter === 2 ? 'filter-active' : 'filter-default'}}\"\n                    c-bind:tap=\"changeFilter2\">Completed</text>\n            </view>\n            <text class=\"clear-completed\" c-bind:tap=\"clear\">Clear completed</text>\n          </view>\n        </view>\n      </view>\n    </scroller>\n  </page>\n</template>\n\n<script>\n\nimport store from \"../../store\";\nconst {mapGetters, mapMutations, mapActions, mapState} = store;\n\nimport  getterTypes from '../../store/getter-types.js';\nimport  mutationTypes from '../../store/mutation-types.js';\nimport  actionTypes from '../../store/action-types.js';\nimport cml from 'chameleon-api';\nclass Index  {\n  data = {\n    title: 'todos',\n    winHeight: 0,\n    chameleon: require(\"../../assets/images/chameleon.png\"),\n    checked: false,\n    value: '',\n    filter: 0 // 0:all,1:active,2:completed\n  }\n  computed ={\n    ...mapGetters({\n      todos: getterTypes.INDEX_DESC_TODOS\n    }),\n    inputStyle() {\n      return 'border-width: 0;height:100cpx;font-size:32cpx;color:#333;padding-left: 80cpx;';\n    },\n    btnStyle() {\n      if (!this.value) {\n        return 'background: #999999;'\n      } else {\n        return 'background: #333333;'\n      }\n    },\n   \n    countText() {\n      let count = 0;\n      this.todos.forEach(item => {\n        if (!item.completed) {\n          count ++;\n        }\n      })\n      return `${count} items left`;\n    },\n    showTodos() {\n      if (this.filter === 0) {\n        let t = this.todos.map((item, index) => {\n          item.index = index;\n          return item;\n        });\n        return t;\n      }\n      if (this.filter === 1) {\n        let t = [];\n        this.todos.forEach((item, index) => {\n          if (!item.completed) {\n            item.index = index;\n            t.push(item);\n          }\n        })\n        return t;\n      }\n      if (this.filter === 2) {\n        let t = [];\n        this.todos.forEach((item, index) => {\n          if (item.completed) {\n            item.index = index;\n            t.push(item);\n          }\n        })\n        return t;\n      }\n    },\n    todoLength() {\n      return this.showTodos.length + '';\n    }\n  }\n  methods = {\n    ...mapActions([\n      actionTypes.INDEX_ADD_TODOS,\n      actionTypes.INDEX_CHANGE_TODOS_STATUS,\n      actionTypes.INDEX_DELETE_TODOS,\n      actionTypes.INDEX_TOP_TODOS,\n      actionTypes.INDEX_CHANGE_TODOS_CLEAR_COMPLETED\n    ]),\n    changeStatus(e) {\n      let { index, status } = e.detail;\n      this[actionTypes.INDEX_CHANGE_TODOS_STATUS]({\n        index,\n        status\n      })\n    },\n    inputHandle(e) {\n      this.value = e.detail.value;\n    },\n    addHandle(e) {\n      if (!this.value) {\n        return;\n      }\n      this[actionTypes.INDEX_ADD_TODOS](this.value);\n      this.value = '';\n    },\n    delete(e) {\n      this[actionTypes.INDEX_DELETE_TODOS](e.detail.index)\n    },\n    top(e) {\n      this[actionTypes.INDEX_TOP_TODOS](e.detail.index)\n    },\n    clear() {\n      this[actionTypes.INDEX_CHANGE_TODOS_CLEAR_COMPLETED]();\n    },\n    changeFilter0() {\n      this.filter = 0;\n    },\n    changeFilter1() {\n      this.filter = 1;\n    },\n    changeFilter2() {\n      this.filter = 2;\n    }\n  }\n  mounted() {\n    cml.getSystemInfo().then((info)=>{\n      this.winHeight = Number(info.viewportHeight)\n    })\n  }\n\n}\n\nexport default new Index();\n\n</script>\n<style>\n.title {\n  align-self: center;\n  color: #61c7fc;\n  font-size: 72cpx;\n  margin-top: 160cpx;\n  margin-bottom: 20cpx;\n}\n.scroller-wrap {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n.main {\n  width: 640cpx;\n}\n.input-wrap {\n  position: relative;\n  height: 102cpx;\n  border-color: #ccc;\n}\n.input-area {\n  position: absolute;\n  left: 0;\n  top: 0;\n  width: 600cpx;\n  height: 100cpx;\n  font-size: 32cpx;\n}\n.add-btn {\n  position: absolute;\n  left: 10cpx;\n  top: 42cpx;\n  width: 40cpx;\n  height: 22cpx;\n  overflow: hidden;\n}\n\n.black-arrow {\n  position: absolute;\n  left: -20cpx;\n  top: -80cpx;\n  width: 80cpx;\n  height: 80cpx;\n  background: #333;\n  transform: rotate(45deg);\n  transition-property: background;\n  transition-duration: .2s;\n  transition-delay: 0s;\n  transition-timing-function: ease-in-out;\n}\n.white-arrow {\n  position: absolute;\n  left: -15cpx;\n  top: -74cpx;\n  width: 70cpx;\n  height: 70cpx;\n  background: #fff;\n  transform: rotate(45deg);\n}\n.option-wrap {\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  justify-content: space-between;\n  height: 50cpx;\n  margin-top: 10cpx;\n}\n.count {\n  font-size: 24cpx;\n  color: #999;\n  margin-top: 20cpx;\n  padding-left: 10cpx;\n}\n.filter {\n  display: flex;\n  flex-direction: row;\n  justify-content: center;\n  align-items: center;\n}\n.filter-default {\n  font-size: 24cpx;\n  color: #999;\n  margin: 0 10cpx;\n}\n.filter-active {\n  font-size: 24cpx;\n  color: #999;\n  border: 1px solid #999;\n  border-radius: 8cpx;\n  padding: 0 5cpx;\n}\n.clear-completed {\n  font-size: 24cpx;\n  color: #999;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-checkbox\": \"/components/c-checkbox/c-checkbox\",\n      \"c-todoitem\": \"/components/c-todoitem/c-todoitem\"\n    }\n  },\n  \"wx\": {\n    \"navigationBarTitleText\": \"index\",\n    \"backgroundTextStyle\": \"dark\",\n    \"backgroundColor\": \"#E2E2E2\"\n  },\n  \"alipay\": {\n    \"defaultTitle\": \"index\",\n    \"pullRefresh\": false,\n    \"allowsBounceVertical\": \"YES\",\n    \"titleBarColor\": \"#ffffff\"\n  },\n  \"baidu\": {\n    \"navigationBarBackgroundColor\": \"#ffffff\",\n    \"navigationBarTextStyle\": \"white\",\n    \"navigationBarTitleText\": \"index\",\n    \"backgroundColor\": \"#ffffff\",\n    \"backgroundTextStyle\": \"dark\",\n    \"enablePullDownRefresh\": false,\n    \"onReachBottomDistance\": 50\n  },\n  \"qq\": {\n    \"navigationBarTitleText\": \"index\",\n    \"backgroundTextStyle\": \"dark\",\n    \"backgroundColor\": \"#E2E2E2\"\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/src/router.config.json",
    "content": "{\n  \"mode\": \"history\",\n  \"domain\": \"https://api.chameleon.com\",\n  \"routes\":[\n    {\n      \"url\": \"/cml/h5/index\",\n      \"path\": \"/pages/index/index\",\n      \"name\": \"首页\",\n      \"mock\": \"index.php\"\n    }\n  ]\n}"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/src/store/action-types.js",
    "content": "\nimport {checkDuplicate} from './utils';\nimport * as index from './index/action-types';\n\nlet list = [index];\ncheckDuplicate(list);\n\nexport default {\n  ...index\n}\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/src/store/actions.js",
    "content": "import index  from './index/actions'\n\nexport default {\n  ...index\n}\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/src/store/getter-types.js",
    "content": "import {checkDuplicate} from './utils';\nimport * as index from './index/getter-types';\n\nlet list = [index];\ncheckDuplicate(list);\n\nexport default {\n  ...index\n}\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/src/store/getters.js",
    "content": "import index  from './index/getters'\n\nexport default {\n  ...index\n}\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/src/store/index/action-types.js",
    "content": "\n\n//整个替换\nexport const INDEX_CHANGE_TODOS = 'INDEX_CHANGE_TODOS'\n//添加todos\nexport const INDEX_ADD_TODOS = 'INDEX_ADD_TODOS'\n//删除某行\nexport const INDEX_DELETE_TODOS = 'INDEX_DELETE_TODOS'\n//置顶某行\nexport const INDEX_TOP_TODOS = 'INDEX_TOP_TODOS'\n//更改状态\nexport const INDEX_CHANGE_TODOS_STATUS = 'INDEX_CHANGE_TODOS_STATUS'\n//清楚已完成项\nexport const INDEX_CHANGE_TODOS_CLEAR_COMPLETED = 'INDEX_CHANGE_TODOS_CLEAR_COMPLETED'\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/src/store/index/actions.js",
    "content": "import * as mutationTypes from './mutation-types'\nimport * as actionTypes from './action-types'\n\nexport default {\n  [actionTypes.INDEX_ADD_TODOS]({commit, state}, something) {\n    if (!something) {\n      return ;\n    }\n    let tods = state.index.todos;\n    tods.push({\n      text: something,\n      completed: false\n    })\n    commit(mutationTypes.INDEX_CHANGE_TODOS, tods);\n  },\n  [actionTypes.INDEX_DELETE_TODOS]({commit, state}, index) {\n    let tods = state.index.todos;\n    tods.splice(index, 1);\n    commit(mutationTypes.INDEX_CHANGE_TODOS, tods);\n  },\n  [actionTypes.INDEX_TOP_TODOS]({commit, state}, index) {\n    let tods = state.index.todos;\n    let d = tods.splice(index, 1);\n    tods.unshift(d[0]);\n    commit(mutationTypes.INDEX_CHANGE_TODOS, tods);\n  },\n  [actionTypes.INDEX_CHANGE_TODOS_STATUS]({commit, state}, {index, status}) {\n    let tods = state.index.todos;\n    tods[index].completed = status;\n    commit(mutationTypes.INDEX_CHANGE_TODOS, tods);\n  },\n  [actionTypes.INDEX_CHANGE_TODOS_CLEAR_COMPLETED]({commit, state}) {\n    let tods = state.index.todos;\n    tods = tods.filter(item => {\n      return !item.completed;\n    })\n    commit(mutationTypes.INDEX_CHANGE_TODOS, tods);\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/src/store/index/getter-types.js",
    "content": "\nexport const INDEX_DESC_TODOS = 'INDEX_DESC_TODOS'\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/src/store/index/getters.js",
    "content": "import * as types from './getter-types'\n\nexport default {\n  [types.INDEX_DESC_TODOS]: function(state, getters) {\n    return state.index.todos;\n  }\n}\n\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/src/store/index/mutation-types.js",
    "content": "\nexport const INDEX_CHANGE_TODOS = 'INDEX_CHANGE_TODOS'\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/src/store/index/mutations.js",
    "content": "import * as types from './mutation-types'\n\nconst mutations = {\n  [types.INDEX_CHANGE_TODOS](state, todos) {\n    state.index.todos = todos;\n  }\n}\n\nexport default mutations\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/src/store/index/state.js",
    "content": "const state = {\n  todos: []\n}\n\nexport default state\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/src/store/index.js",
    "content": "import actions from './actions'\nimport getters from './getters'\nimport state from './state'\nimport mutations from './mutations'\nimport createStore from \"chameleon-store\";\n\nexport default createStore({\n  actions,\n  getters,\n  state,\n  mutations\n})\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/src/store/mutation-types.js",
    "content": "import {checkDuplicate} from './utils';\nimport * as index from './index/mutation-types';\n\nlet list = [index];\ncheckDuplicate(list);\n\nexport default {\n  ...index\n}\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/src/store/mutations.js",
    "content": "import index  from './index/mutations'\n\nexport default {\n  ...index\n}\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/src/store/state.js",
    "content": "import index from './index/state';\n\nconst state = {\n  index\n}\n\nexport default state\n"
  },
  {
    "path": "packages/chameleon-templates/todo-demo/src/store/utils.js",
    "content": "\nexport function checkDuplicate(list) {\n  let tempArray = [];\n  for(let i=0;i<list.length;i++) {\n    let obj = list[i];\n    let keys = Object.keys(obj);\n    for(let j=0;j<keys.length;j++) {\n      let key = keys[j];\n      if(~tempArray.indexOf(key)) {\n        throw new Error('重复定义key值：'+key)\n      } else {\n        tempArray.push(key);\n      }\n    }\n  }\n}"
  },
  {
    "path": "packages/chameleon-tool/.babelrc",
    "content": "{\n  \"presets\": [\n    \"flow\",\n    [\n      \"env\",\n      {\n        \"targets\": {\n          \"browsers\": [\n            \"> 1%\",\n            \"last 2 versions\",\n            \"not ie <= 8\"\n          ]\n        }\n      }\n    ],\n    \"stage-0\"\n  ],\n  \"plugins\": [\n    \"transform-remove-strict-mode\",\n    [\"transform-runtime\", {\n      \"helpers\": false,\n      \"polyfill\": false,\n      \"regenerator\": true,\n      \"moduleName\": \"babel-runtime\"\n    }],\n    [\"babel-plugin-chameleon-import\",\n      [\n        {\n          \"libraryName\": \"chameleon-api-miniapp\",\n          \"libraryDirectory\": \"src/interfaces\",\n          \"libraryFileName\": \"index.js\",\n          \"defaulLibraryDirectory\": \"\",\n          \"defaulLibraryFileName\": \"index.js\"\n        },\n        {\n          \"libraryName\": \"chameleon-api\",\n          \"libraryDirectory\": \"src/interfaces\",\n          \"libraryFileName\": \"index.js\",\n          \"defaulLibraryDirectory\": \"\",\n          \"defaulLibraryFileName\": \"index.js\"\n        }\n      ]\n    ]\n  ]\n}"
  },
  {
    "path": "packages/chameleon-tool/.eslintrc",
    "content": "{\n    // 在配置文件里配置全局变量时，使用 globals 指出你要使用的全局变量。将变量设置为 true 将允许变量被重写，或 false 将不允许被重写\n    \"globals\": {\n        \"cml\": false\n    },\n    // 环境定义了预定义的全局变量。\n    \"env\": {\n        //环境定义了预定义的全局变量。更多在官网查看\n        \"browser\": true,\n        \"node\": true,\n        \"commonjs\": true,\n        \"amd\": true,\n        \"es6\": true,\n        \"mocha\": true\n    },\n    // JavaScript 语言选项\n    \"parserOptions\": {\n        // ECMAScript 版本\n        \"ecmaVersion\": 9,\n        \"sourceType\": \"module\", //设置为 \"script\" (默认) 或 \"module\"（如果你的代码是 ECMAScript 模块)。\n        //想使用的额外的语言特性:\n        \"ecmaFeatures\": {\n            // 允许在全局作用域下使用 return 语句\n            \"globalReturn\": true,\n            // impliedStric\n            \"impliedStrict\": true,\n            // 启用 JSX\n            \"jsx\": true,\n            \"modules\": true\n        }\n    },\n    //-----让eslint支持 JSX start\n    \"plugins\": [\n\n    ],\n    \"extends\": [\n        \"eslint:recommended\"\n    ],\n    //-----让eslint支持 JSX end\n\n\n    /**\n     * \"off\" 或 0 - 关闭规则\n     * \"warn\" 或 1 - 开启规则，使用警告级别的错误：warn (不会导致程序退出),\n     * \"error\" 或 2 - 开启规则，使用错误级别的错误：error (当被触发的时候，程序会退出)\n     */\n    \"rules\": {\n\n        ////////////////\n        // 可能的错误 //\n        ////////////////\n\n        // 禁止条件表达式中出现赋值操作符\n        \"no-cond-assign\": 2,\n        // 禁用 console\n        \"no-console\": 0,\n        // 禁止在条件中使用常量表达式\n        // if (false) {\n        // doSomethingUnfinished();\n        // } //cuowu\n        \"no-constant-condition\": 2,\n        // 禁止在正则表达式中使用控制字符 ：new RegExp(\"\\x1f\")\n        \"no-control-regex\": 2,\n        // 数组和对象键值对最后一个逗号， never参数：不能带末尾的逗号, always参数：必须带末尾的逗号，\n        // always-multiline：多行模式必须带逗号，单行模式不能带逗号\n        \"comma-dangle\": [1, \"never\"],\n        // 禁用 debugger\n        \"no-debugger\": 2,\n        // 禁止 function 定义中出现重名参数\n        \"no-dupe-args\": 2,\n        // 禁止对象字面量中出现重复的 key\n        \"no-dupe-keys\": 2,\n        // 禁止重复的 case 标签\n        \"no-duplicate-case\": 2,\n        // 禁止空语句块\n        \"no-empty\": 2,\n        // 禁止在正则表达式中使用空字符集 (/^abc[]/)\n        \"no-empty-character-class\": 2,\n        // 禁止对 catch 子句的参数重新赋值\n        \"no-ex-assign\": 2,\n        // 禁止不必要的布尔转换\n        \"no-extra-boolean-cast\": 2,\n        // 禁止不必要的括号 //(a * b) + c;//报错\n        \"no-extra-parens\": 0,\n        // 禁止不必要的分号\n        \"no-extra-semi\": 2,\n        // 禁止对 function 声明重新赋值\n        \"no-func-assign\": 2,\n        // 禁止在嵌套的块中出现 function 或 var 声明\n        \"no-inner-declarations\": [2, \"functions\"],\n        // 禁止 RegExp 构造函数中无效的正则表达式字符串\n        \"no-invalid-regexp\": 2,\n        // 禁止在字符串和注释之外不规则的空白\n        \"no-irregular-whitespace\": 2,\n        // 禁止在 in 表达式中出现否定的左操作数\n        \"no-negated-in-lhs\": 2,\n        // 禁止把全局对象 (Math 和 JSON) 作为函数调用 错误：var math = Math();\n        \"no-obj-calls\": 2,\n        // 禁止直接使用 Object.prototypes 的内置属性\n        \"no-prototype-builtins\": 0,\n        // 禁止正则表达式字面量中出现多个空格\n        \"no-regex-spaces\": 2,\n        // 禁用稀疏数组\n        \"no-sparse-arrays\": 2,\n        // 禁止出现令人困惑的多行表达式\n        \"no-unexpected-multiline\": 2,\n        // 禁止在return、throw、continue 和 break语句之后出现不可达代码\n        \"no-unreachable\": 2,\n        // 要求使用 isNaN() 检查 NaN\n        \"use-isnan\": 2,\n        // 强制使用有效的 JSDoc 注释\n        \"valid-jsdoc\": 0,\n        // 强制 typeof 表达式与有效的字符串进行比较\n        // typeof foo === \"undefimed\" 错误\n        \"valid-typeof\": 2,\n\n\n        //////////////\n        // 最佳实践 //\n        //////////////\n\n        // 定义对象的set存取器属性时，强制定义get\n        \"accessor-pairs\": 2,\n        // 强制数组方法的回调函数中有 return 语句\n        \"array-callback-return\": 0,\n        // 强制把变量的使用限制在其定义的作用域范围内\n        \"block-scoped-var\": 0,\n        // 限制圈复杂度，也就是类似if else能连续接多少个\n        \"complexity\": [2, 20],\n        // 要求 return 语句要么总是指定返回的值，要么不指定\n        \"consistent-return\": 0,\n        // 强制所有控制语句使用一致的括号风格\n        \"curly\": [2, \"all\"],\n        // switch 语句强制 default 分支，也可添加 // no default 注释取消此次警告\n        \"default-case\": 2,\n        // 强制object.key 中 . 的位置，参数:\n        // property，'.'号应与属性在同一行\n        // object, '.' 号应与对象名在同一行\n        \"dot-location\": [2, \"property\"],\n        // 强制使用.号取属性\n        // 参数： allowKeywords：true 使用保留字做属性名时，只能使用.方式取属性\n        // false 使用保留字做属性名时, 只能使用[]方式取属性 e.g [2, {\"allowKeywords\": false}]\n        // allowPattern: 当属性名匹配提供的正则表达式时，允许使用[]方式取值,否则只能用.号取值 e.g [2, {\"allowPattern\": \"^[a-z]+(_[a-z]+)+$\"}]\n        \"dot-notation\": [2, {\n            \"allowKeywords\": false\n        }],\n        // 使用 === 替代 == allow-null允许null和undefined==\n        \"eqeqeq\": [0, \"allow-null\"],\n        // 要求 for-in 循环中有一个 if 语句\n        \"guard-for-in\": 2,\n        // 禁用 alert、confirm 和 prompt\n        \"no-alert\": 0,\n        // 禁用 arguments.caller 或 arguments.callee\n        \"no-caller\": 2,\n        // 不允许在 case 子句中使用词法声明\n        \"no-case-declarations\": 2,\n        // 禁止除法操作符显式的出现在正则表达式开始的位置\n        \"no-div-regex\": 2,\n        // 禁止 if 语句中有 return 之后有 else\n        \"no-else-return\": 0,\n        // 禁止出现空函数.如果一个函数包含了一条注释，它将不会被认为有问题。\n        \"no-empty-function\": 2,\n        // 禁止使用空解构模式no-empty-pattern\n        \"no-empty-pattern\": 2,\n        // 禁止在没有类型检查操作符的情况下与 null 进行比较\n        \"no-eq-null\": 1,\n        // 禁用 eval()\n        \"no-eval\": 2,\n        // 禁止扩展原生类型\n        \"no-extend-native\": 2,\n        // 禁止不必要的 .bind() 调用\n        \"no-extra-bind\": 2,\n        // 禁用不必要的标签\n        \"no-extra-label:\": 0,\n        // 禁止 case 语句落空\n        \"no-fallthrough\": 2,\n        // 禁止数字字面量中使用前导和末尾小数点\n        \"no-floating-decimal\": 2,\n        // 禁止使用短符号进行类型转换(!!fOO)\n        \"no-implicit-coercion\": 0,\n        // 禁止在全局范围内使用 var 和命名的 function 声明\n        \"no-implicit-globals\": 1,\n        // 禁止使用类似 eval() 的方法\n        \"no-implied-eval\": 2,\n        // 禁止 this 关键字出现在类和类对象之外\n        \"no-invalid-this\": 0,\n        // 禁用 __iterator__ 属性\n        \"no-iterator\": 2,\n        // 禁用标签语句\n        \"no-labels\": 2,\n        // 禁用不必要的嵌套块\n        \"no-lone-blocks\": 2,\n        // 禁止在循环中出现 function 声明和表达式\n        \"no-loop-func\": 1,\n        // 禁用魔术数字(3.14什么的用常量代替)\n        \"no-magic-numbers\": [1, {\n            \"ignore\": [0, -1, 1]\n        }],\n        // 禁止使用多个空格\n        \"no-multi-spaces\": 2,\n        // 禁止使用多行字符串，在 JavaScript 中，可以在新行之前使用斜线创建多行字符串\n        \"no-multi-str\": 2,\n        // 禁止对原生对象赋值\n        \"no-native-reassign\": 2,\n        // 禁止在非赋值或条件语句中使用 new 操作符\n        \"no-new\": 2,\n        // 禁止对 Function 对象使用 new 操作符\n        \"no-new-func\": 0,\n        // 禁止对 String，Number 和 Boolean 使用 new 操作符\n        \"no-new-wrappers\": 2,\n        // 禁用八进制字面量\n        \"no-octal\": 2,\n        // 禁止在字符串中使用八进制转义序列\n        \"no-octal-escape\": 2,\n        // 不允许对 function 的参数进行重新赋值\n        \"no-param-reassign\": 0,\n        // 禁用 __proto__ 属性\n        \"no-proto\": 2,\n        // 禁止使用 var 多次声明同一变量\n        \"no-redeclare\": 2,\n        // 禁用指定的通过 require 加载的模块\n        \"no-return-assign\": 0,\n        // 禁止使用 javascript: url\n        \"no-script-url\": 0,\n        // 禁止自我赋值\n        \"no-self-assign\": 2,\n        // 禁止自身比较\n        \"no-self-compare\": 2,\n        // 禁用逗号操作符\n        \"no-sequences\": 2,\n        // 禁止抛出非异常字面量\n        \"no-throw-literal\": 2,\n        // 禁用一成不变的循环条件\n        \"no-unmodified-loop-condition\": 2,\n        // 禁止出现未使用过的表达式\n        \"no-unused-expressions\": 0,\n        // 禁用未使用过的标签\n        \"no-unused-labels\": 2,\n        // 禁止不必要的 .call() 和 .apply()\n        \"no-useless-call\": 2,\n        // 禁止不必要的字符串字面量或模板字面量的连接\n        \"no-useless-concat\": 0,\n        // 禁用不必要的转义字符\n        \"no-useless-escape\": 0,\n        // 禁用 void 操作符\n        \"no-void\": 0,\n        // 禁止在注释中使用特定的警告术语\n        \"no-warning-comments\": 0,\n        // 禁用 with 语句\n        \"no-with\": 2,\n        // 强制在parseInt()使用基数参数\n        \"radix\": 2,\n        // 要求所有的 var 声明出现在它们所在的作用域顶部\n        \"vars-on-top\": 0,\n        // 要求 IIFE 使用括号括起来\n        \"wrap-iife\": [2, \"any\"],\n        // 要求或禁止 “Yoda” 条件\n        \"yoda\": [2, \"never\"],\n        // 要求或禁止使用严格模式指令\n        \"strict\": 0,\n\n\n        //////////////\n        // 变量声明 //\n        //////////////\n\n        // 要求或禁止 var 声明中的初始化(初值)\n        \"init-declarations\": 0,\n        // 不允许 catch 子句的参数与外层作用域中的变量同名\n        \"no-catch-shadow\": 0,\n        // 禁止删除变量\n        \"no-delete-var\": 2,\n        // 不允许标签与变量同名\n        \"no-label-var\": 2,\n        // 禁用特定的全局变量\n        \"no-restricted-globals\": 0,\n        // 禁止 var 声明 与外层作用域的变量同名\n        \"no-shadow\": 0,\n        // 禁止覆盖受限制的标识符\n        \"no-shadow-restricted-names\": 2,\n        // 禁用未声明的变量，除非它们在 /*global */ 注释中被提到\n        \"no-undef\": 2,\n        // 禁止将变量初始化为 undefined\n        \"no-undef-init\": 2,\n        // 禁止将 undefined 作为标识符\n        \"no-undefined\": 0,\n        // 禁止出现未使用过的变量\n        \"no-unused-vars\": [2, {\n            \"vars\": \"all\",\n            \"args\": \"none\"\n        }],\n        // 不允许在变量定义之前使用它们\n        \"no-use-before-define\": 0,\n\n        //////////////////////////\n        // Node.js and CommonJS //\n        //////////////////////////\n\n        // require return statements after callbacks\n        \"callback-return\": 0,\n        // 要求 require() 出现在顶层模块作用域中\n        \"global-require\": 1,\n        // 要求回调函数中有容错处理\n        \"handle-callback-err\": [2, \"^(err|error)$\"],\n        // 禁止混合常规 var 声明和 require 调用\n        \"no-mixed-requires\": 0,\n        // 禁止调用 require 时使用 new 操作符\n        \"no-new-require\": 2,\n        // 禁止对 __dirname 和 __filename进行字符串连接\n        \"no-path-concat\": 0,\n        // 禁用 process.env\n        \"no-process-env\": 0,\n        // 禁用 process.exit()\n        \"no-process-exit\": 0,\n        // 禁用同步方法\n        \"no-sync\": 0,\n\n        //////////////\n        // 风格指南 //\n        //////////////\n\n        // 指定数组的元素之间要以空格隔开(, 后面)， never参数：[ 之前和 ] 之后不能带空格，always参数：[ 之前和 ] 之后必须带空格\n        \"array-bracket-spacing\": [2, \"never\"],\n        // 禁止或强制在单行代码块中使用空格(禁用)\n        \"block-spacing\": [1, \"never\"],\n        //强制使用一致的缩进 第二个参数为 \"tab\" 时，会使用tab，\n        // if while function 后面的{必须与if在同一行，java风格。\n        \"brace-style\": [2, \"1tbs\", {\n            \"allowSingleLine\": true\n        }],\n        // 双峰驼命名格式\n        \"camelcase\": 2,\n        // 控制逗号前后的空格\n        \"comma-spacing\": [2, {\n            \"before\": false,\n            \"after\": true\n        }],\n        // 控制逗号在行尾出现还是在行首出现 (默认行尾)\n        // http://eslint.org/docs/rules/comma-style\n        \"comma-style\": [2, \"last\"],\n        //\"SwitchCase\" (默认：0) 强制 switch 语句中的 case 子句的缩进水平\n        // 以方括号取对象属性时，[ 后面和 ] 前面是否需要空格, 可选参数 never, always\n        \"computed-property-spacing\": [2, \"never\"],\n        // 用于指统一在回调函数中指向this的变量名，箭头函数中的this已经可以指向外层调用者，应该没卵用了\n        // e.g [0,\"that\"] 指定只能 var that = this. that不能指向其他任何值，this也不能赋值给that以外的其他值\n        \"consistent-this\": [1, \"that\"],\n        // 强制使用命名的 function 表达式\n        \"func-names\": 0,\n        // 文件末尾强制换行\n        \"eol-last\": 2,\n        \"indent\": [2, 2, {\n            \"SwitchCase\": 1\n        }],\n        // 强制在对象字面量的属性中键和值之间使用一致的间距\n        \"key-spacing\": [2, {\n            \"beforeColon\": false,\n            \"afterColon\": true\n        }],\n        // 强制使用一致的换行风格\n        \"linebreak-style\": [1, \"unix\"],\n        // 要求在注释周围有空行 ( 要求在块级注释之前有一空行)\n        \"lines-around-comment\": [1, {\n            \"beforeBlockComment\": true\n        }],\n        // 强制一致地使用函数声明或函数表达式，方法定义风格，参数：\n        // declaration: 强制使用方法声明的方式，function f(){} e.g [2, \"declaration\"]\n        // expression：强制使用方法表达式的方式，var f = function() {} e.g [2, \"expression\"]\n        // allowArrowFunctions: declaration风格中允许箭头函数。 e.g [2, \"declaration\", { \"allowArrowFunctions\": true }]\n        \"func-style\": 0,\n        // 强制回调函数最大嵌套深度 5层\n        \"max-nested-callbacks\": [1, 5],\n        // 禁止使用指定的标识符\n        \"id-blacklist\": 0,\n        // 强制标识符的最新和最大长度\n        \"id-length\": 0,\n        // 要求标识符匹配一个指定的正则表达式\n        \"id-match\": 0,\n        // 强制在 JSX 属性中一致地使用双引号或单引号\n        \"jsx-quotes\": 0,\n        // 强制在关键字前后使用一致的空格 (前后腰需要)\n        \"keyword-spacing\": 2,\n        // 强制一行的最大长度\n        \"max-len\": [1, 200],\n        // 强制最大行数\n        \"max-lines\": 0,\n        // 强制 function 定义中最多允许的参数数量\n        \"max-params\": [1, 7],\n        // 强制 function 块最多允许的的语句数量\n        \"max-statements\": [1, 200],\n        // 强制每一行中所允许的最大语句数量\n        \"max-statements-per-line\": 0,\n        // 要求构造函数首字母大写 （要求调用 new 操作符时有首字母大小的函数，允许调用首字母大写的函数时没有 new 操作符。）\n        \"new-cap\": [2, {\n            \"newIsCap\": true,\n            \"capIsNew\": false\n        }],\n        // 要求调用无参构造函数时有圆括号\n        \"new-parens\": 2,\n        // 要求或禁止 var 声明语句后有一行空行\n        \"newline-after-var\": 0,\n        // 禁止使用 Array 构造函数\n        \"no-array-constructor\": 2,\n        // 禁用按位运算符\n        \"no-bitwise\": 0,\n        // 要求 return 语句之前有一空行\n        \"newline-before-return\": 0,\n        // 要求方法链中每个调用都有一个换行符\n        \"newline-per-chained-call\": 1,\n        // 禁用 continue 语句\n        \"no-continue\": 0,\n        // 禁止在代码行后使用内联注释\n        \"no-inline-comments\": 0,\n        // 禁止 if 作为唯一的语句出现在 else 语句中\n        \"no-lonely-if\": 0,\n        // 禁止混合使用不同的操作符\n        \"no-mixed-operators\": 0,\n        // 不允许空格和 tab 混合缩进\n        \"no-mixed-spaces-and-tabs\": 2,\n        // 不允许多个空行\n        \"no-multiple-empty-lines\": [2, {\n            \"max\": 2\n        }],\n        // 不允许否定的表达式\n        \"no-negated-condition\": 0,\n        // 不允许使用嵌套的三元表达式\n        \"no-nested-ternary\": 0,\n        // 禁止使用 Object 的构造函数\n        \"no-new-object\": 2,\n        // 禁止使用一元操作符 ++ 和 --\n        \"no-plusplus\": 0,\n        // 禁止使用特定的语法\n        \"no-restricted-syntax\": 0,\n        // 禁止 function 标识符和括号之间出现空格\n        \"no-spaced-func\": 2,\n        // 不允许使用三元操作符\n        \"no-ternary\": 0,\n        // 禁用行尾空格\n        \"no-trailing-spaces\": 2,\n        // 禁止标识符中有悬空下划线_bar\n        \"no-underscore-dangle\": 0,\n        // 禁止可以在有更简单的可替代的表达式时使用三元操作符\n        \"no-unneeded-ternary\": 2,\n        // 禁止属性前有空白\n        \"no-whitespace-before-property\": 0,\n        // 强制花括号内换行符的一致性\n        \"object-curly-newline\": 0,\n        // 强制在花括号中使用一致的空格\n        \"object-curly-spacing\": 0,\n        // 强制将对象的属性放在不同的行上\n        \"object-property-newline\": 0,\n        // 强制函数中的变量要么一起声明要么分开声明\n        \"one-var\": [2, {\n            \"initialized\": \"never\"\n        }],\n        // 要求或禁止在 var 声明周围换行\n        \"one-var-declaration-per-line\": 0,\n        // 要求或禁止在可能的情况下要求使用简化的赋值操作符\n        \"operator-assignment\": 0,\n        // 强制操作符使用一致的换行符\n        \"operator-linebreak\": [2, \"after\", {\n            \"overrides\": {\n                \"?\": \"before\",\n                \":\": \"before\"\n            }\n        }],\n        // 要求或禁止块内填充\n        \"padded-blocks\": 0,\n        // 要求对象字面量属性名称用引号括起来\n        \"quote-props\": 0,\n        // 强制使用一致的反勾号、双引号或单引号\n        // \"quotes\": [2, \"single\", \"avoid-escape\"],\n        // 要求使用 JSDoc 注释\n        \"require-jsdoc\": 0,\n        // 要求或禁止使用分号而不是 ASI（这个才是控制行尾部分号的，）\n        \"semi\": [0, \"always\"],\n        // 强制分号之前和之后使用一致的空格\n        \"semi-spacing\": 0,\n        // 要求同一个声明块中的变量按顺序排列\n        \"sort-vars\": 0,\n        // 强制在块之前使用一致的空格\n        \"space-before-blocks\": [2, \"always\"],\n        // 强制在 function的左括号之前使用一致的空格\n        \"space-before-function-paren\": [0, \"always\"],\n        // 强制在圆括号内使用一致的空格\n        \"space-in-parens\": [2, \"never\"],\n        // 要求操作符周围有空格\n        \"space-infix-ops\": 2,\n        // 强制在一元操作符前后使用一致的空格\n        \"space-unary-ops\": [2, {\n            \"words\": true,\n            \"nonwords\": false\n        }],\n        // 强制在注释中 // 或 /* 使用一致的空格\n        \"spaced-comment\": [2, \"always\", {\n            \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n        }],\n        // 要求或禁止 Unicode BOM\n        \"unicode-bom\": 0,\n        // 要求正则表达式被括号括起来\n        \"wrap-regex\": 0,\n\n        //////////////\n        // ES6.相关 //\n        //////////////\n\n        // 要求箭头函数体使用大括号\n        \"arrow-body-style\": 2,\n        // 要求箭头函数的参数使用圆括号\n        \"arrow-parens\": 0,\n        \"arrow-spacing\": [2, {\n            \"before\": true,\n            \"after\": true\n        }],\n        // 强制在子类构造函数中用super()调用父类构造函数，TypeScrip的编译器也会提示\n        \"constructor-super\": 0,\n        // 强制 generator 函数中 * 号周围使用一致的空格\n        \"generator-star-spacing\": [2, {\n            \"before\": true,\n            \"after\": true\n        }],\n        // 禁止修改类声明的变量\n        \"no-class-assign\": 2,\n        // 不允许箭头功能，在那里他们可以混淆的比较\n        \"no-confusing-arrow\": 0,\n        // 禁止修改 const 声明的变量\n        \"no-const-assign\": 2,\n        // 禁止类成员中出现重复的名称\n        \"no-dupe-class-members\": 2,\n        // 不允许复制模块的进口\n        \"no-duplicate-imports\": 0,\n        // 禁止 Symbol 的构造函数\n        \"no-new-symbol\": 2,\n        // 允许指定模块加载时的进口\n        \"no-restricted-imports\": 0,\n        // 禁止在构造函数中，在调用 super() 之前使用 this 或 super\n        \"no-this-before-super\": 2,\n        // 禁止不必要的计算性能键对象的文字\n        \"no-useless-computed-key\": 0,\n        // 要求使用 let 或 const 而不是 var\n        \"no-var\": 0,\n        // 要求或禁止对象字面量中方法和属性使用简写语法\n        \"object-shorthand\": 0,\n        // 要求使用箭头函数作为回调\n        \"prefer-arrow-callback\": 0,\n        // 要求使用 const 声明那些声明后不再被修改的变量\n        \"prefer-const\": 0,\n        // 要求在合适的地方使用 Reflect 方法\n        \"prefer-reflect\": 0,\n        // 要求使用扩展运算符而非 .apply()\n        \"prefer-spread\": 0,\n        // 要求使用模板字面量而非字符串连接\n        \"prefer-template\": 0,\n        // Suggest using the rest parameters instead of arguments\n        \"prefer-rest-params\": 0,\n        // 要求generator 函数内有 yield\n        \"require-yield\": 0,\n        // enforce spacing between rest and spread operators and their expressions\n        \"rest-spread-spacing\": 0,\n        // 强制模块内的 import 排序\n        \"sort-imports\": 0,\n        // 要求或禁止模板字符串中的嵌入表达式周围空格的使用\n        \"template-curly-spacing\": 1,\n        // 强制在 yield* 表达式中 * 周围使用空格\n        \"yield-star-spacing\": 2\n    }\n}\n"
  },
  {
    "path": "packages/chameleon-tool/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n.vscode\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\n"
  },
  {
    "path": "packages/chameleon-tool/.istanbul.yml",
    "content": "\nverbose: false\ninstrumentation:\n    root: .\n    extensions:\n        - .js\n    default-excludes: true\n    excludes: [\n      '**/node_modules/**',\n      '**/test/**'\n    ]\n    embed-source: false\n    variable: __coverage__\n    compact: true\n    preserve-comments: false\n    complete-copy: false\n    save-baseline: false\n    baseline-file: ./coverage/coverage-baseline.json\n    include-all-sources: false\n    include-pid: false\n    es-modules: false\nreporting:\n    print: summary\n    reports:\n        - lcov\n    dir: ./coverage\n    watermarks:\n        statements: [50, 80]\n        lines: [50, 80]\n        functions: [50, 80]\n        branches: [50, 80]\n    report-config:\n        clover: {file: clover.xml}\n        cobertura: {file: cobertura-coverage.xml}\n        json: {file: coverage-final.json}\n        json-summary: {file: coverage-summary.json}\n        lcovonly: {file: lcov.info}\n        teamcity: {file: null, blockName: Code Coverage Summary}\n        text: {file: null, maxCols: 0}\n        text-lcov: {file: lcov.info}\n        text-summary: {file: null}\nhooks:\n    hook-run-in-context: false\n    post-require-hook: null\n    handle-sigint: false\ncheck:\n    global:\n        statements: 0\n        lines: 0\n        branches: 0\n        functions: 0\n        excludes: []\n    each:\n        statements: 0\n        lines: 0\n        branches: 0\n        functions: 0\n        excludes: []"
  },
  {
    "path": "packages/chameleon-tool/.npmignore",
    "content": ".scripts\ntest\npackage-lock.json"
  },
  {
    "path": "packages/chameleon-tool/.travis.yml",
    "content": "language: node_js\nnode_js:\n  - \"8\"\nscript:\n  - npm run cover\nafter_script: \"cat coverage/lcov.info | node_modules/coveralls/bin/coveralls.js\"\n"
  },
  {
    "path": "packages/chameleon-tool/README.md",
    "content": "# 快速上手\n\n## 1 安装启动\n\n> **[success] 运行环境 **\n>\n> [node](https://nodejs.org/en/download/) >= 8.10.0\n> npm >= 5.6.0\n\n建议安装使用[nvm](https://github.com/creationix/nvm)管理node版本\n\n### 1.1 全局安装chameleon-tool构建工具\n\n```shell\nnpm i -g chameleon-tool\n```\n安装成功后，执行 `cml -v` 即可查看当前版本， `cml -h`查看命令行帮助文档。\n\n\n### 1.2 创建项目与启动\n\n- 执行 `cml init project`\n- 输入项目名称\n- 等待自动执行npm install依赖\n- 切换到项目根目录执行`cml dev`\n- 会自动打开预览界面 预览界面如下：\n\n![](https://cmljs.org/doc/assets/home.png)\n\nweb端可以点击模拟器内页面右上角打开\b新的浏览器窗口。\n\nnative端的效果请\b下载[chameleon playground](https://beatles-chameleon.github.io/playground/download.html)(目前可下载Android端，IOS端即将发布)或者下载[weex playground](http://weex.apache.org/cn/tools/playground.html)扫码预览\n\n小程序端请下载[微信开发者工具](https://developers.weixin.qq.com/miniprogram/dev/devtools/devtools.html)，打开项目根目录下的 `/dist/wx` 目录预览。\n\n<b>支付宝、百度小程序、快应用正在努力测试中，尽请期待。</b>\n\n### 2 目录与文件结构\n\n生成的目录结构如下，详细介绍参见<a href=\"https://cmljs.org/doc/framework/structure.html\">目录结构</a>：\n\n```bash\n├── chameleon.config.js                 // 项目的配置文件\n├── dist                                // 打包产出目录\n├── mock                                // 模拟数据目录\n├── node_modules                        // npm包依赖\n├── package.json\n└── src                                 // 项目源代码\n    ├── app                             // app启动入口\n    ├── components                      // 组件文件夹\n    ├── pages                           // 页面文件夹\n    ├── router.config.json              // 路由配置\n    └── store                           // 全局状态管理\n```\n> \b编辑器中语法高亮，暂时使用`.vue`的插件，参见<a href=\"https://cmljs.org/doc/framework/edit-plugin.html\">编辑器插件</a>，后续会推出更强大的插件。\n\n\n\n### 4 语法体验\n\n替换`src/pages/index/index.cml`文件，删除`src/pages/index/index.cml`文件中的所有代码，然后替换为下面的代码，体验chameleon语法。\n\n#### 数据绑定\n\n```html\n<template>\n  <view>\n    <!-- 数据绑定与计算属性 -->\n    <text>{{ message }}</text>\n    <text class=\"class1\">{{ message2 }}</text>\n\n    <!-- 条件与循环渲染 -->\n    <view c-if=\"{{showlist}}\">\n      <view c-for=\"{{array}}\" c-for-index=\"idx\" c-for-item=\"itemName\" c-key=\"city\" >\n        <text> {{idx}}: {{itemName.city}}</text>\n      </view>\n    </view>\n\n    <!-- 事件绑定 -->\n    <view c-bind:tap=\"changeShow\"><text>切换展示</text></view>\n  </view>\n</template>\n\n<script>\nclass Index {\n  data = {\n    message: 'Hello Chameleon!',\n    array: [\n      {\n        city: '北京'\n      },\n      {\n        city: '上海'\n      },\n      {\n        city: '广州'\n      }\n    ],\n    showlist: true\n  }\n\n  computed = {\n    message2: function() {\n      return 'computed' + this.message;\n    }\n  }\n\n  watch = {\n    showlist(newVal, oldVal) {\n      console.log(`showlist changed:`+ newVal)\n    }\n  }\n\n  methods = {\n    changeShow() {\n      this.showlist = !this.showlist;\n    }\n  }\n\n  created() {\n    console.log('生命周期')\n  }\n}\n\nexport default new Index();\n</script>\n<style scoped>\n.class1 {\n  color: #f00;\n}\n</style>\n<script cml-type=\"json\">\n{}\n</script>\n```\n\n### 5 创建新页面\n项目根目录下\b执行\b`cml init page`, 输入页面名称first-page\n\n```shell\n$ cml init page\n? Please input page name:\n```\n回车，即可生成页面\b组件`src/pages/first-page/first-page.cml`。\n\n### 6 创建及引用组件\n\n项目根目录下\b执行\b`cml init component`，选择`普通组件`,输入first-com，\b回车，即可生成文件`components/first-com/first-com.cml`。 组件也是cml文件\b结构上与页面相同。\n\n拷贝如下代码到`first-com.cml`\n```html\n<template>\n  <view>\n    <text class=\"first-com-text\">我是组件first-com</text>\n  </view>\n</template>\n<script>\nclass FirstCom {\n\n}\nexport default new FirstCom();\n</script>\n<style scoped>\n.first-com-text {\n  color: #0f0;\n}\n</style>\n<script cml-type=\"json\">\n{}\n</script>\n```\n\n然后在刚才的`src/pages/index/index.cml`中引用`first-com`\n\n```html\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"first-com\": \"components/first-com/first-com\"\n    }\n  }\n}\n</script>\n```\n\ntemplate中使用first-com组件。\n\n```html\n<template>\n  <view>\n    <first-com></first-com>\n  </view>\n</template>\n```\n\n经过以上操作，你已经学会了组件的引用，[丰富的组件](https://cmljs.org/doc/component/component.html)等待着你去学习!\n\n\n##进阶\b体验\n\n### [7 项目配置](https://cmljs.org/doc/framework/config.html)\n\n`chameleon.config.js`为项目的配置文件，以后定制化构建会\b使用到，比如是否带hash，是否\b压缩等等,可以在项目根目录下执行`cml build` \b，\b执行完成后\b，项目根目录的`dist`文件夹下生成build模式的文件。\n\n### [8 模拟\b数据](https://cmljs.org/doc/framework/mock.html)\n\n`mock/api/index.js`文件内容如下，可以本地模拟api请求。访问`localhost:8000/api/getMessage`\b即可看到模拟的api返回。端口以实际启动为准，默认8000.\n\n```javascript\nmodule.exports = [\n  {\n    method: ['get', 'post'],\n    path: '/api/getMessage',\n    controller: function (req, res, next) {\n      res.json({\n        total: 0,\n        message: [{\n          name: 'Hello chameleon!'\n        }]\n      });\n    }\n  }\n];\n```\n### 9 \b示例demo学习\n\b`chameleon-tool`中内置了todolist的项目模板，\b通过命令`cml init project --demo todo` 即可生成该模板，按照1.2节中的说明启动项目，即可看到如下页面\n\n![](https://cmljs.org/doc/assets/todo_preview.jpg)\n\n经过以上的介绍和实践操作，相信你已经了解了chameleon的基本使用，本文档其余部分将涵盖剩余功能和其他高级功能的详尽细节，所以请务必完整阅读整个文档！\n\n### [10 FAQ](https://cmljs.org/doc/framework/faq.html)\n\n##### 我想使用chameleon，是否需要大刀阔斧的重构项目？\n不需要，可以使用chameleon开发公用组件，<a href=\"https://cmljs.org/doc/terminal/io.html\">导出</a>到各端原有项目中使用。\n\n##### 用CML标准编写代码，是否增加调试成本？\n我们实现了全面的语法检查功能，且在持续加强。理论上框架是降低调试成本，就像从原生js开发到vuejs、reactjs是否认为也增加了调试成本，见仁见智。\n\n##### 各端包括小程序的接口更新频繁，如何保证框架编译的抽象度和稳定性？\n1、自建输入语法标准 cml，编译输出结果自定的格式语法。\n2、框架的runtime层实现匹配接收的编译输出代码，runtime跟随小程序更新。\n3、框架整体方向一致：mvvm底层设计模式为标准设计接口。\n基于以上三条，你可以理解为：我们设计了一个框架统一标准协议，再在各个端runtime分别实现这个框架，宏观的角度就像nodejs同时运行在window和macOS系统，就像flutter运行在Android和iOS一个道理。各端小程序接口更新除非遇到不向下兼容情况，否则不影响框架，如果真遇到不向下兼容更新，这种情况下是否用框架都需要改。\n\n##### 框架有多大，性能是否有影响？\n1、小程序的主要运行性能瓶颈是webview和js虚拟机的传输性能，我们在这里会做优化，尽可能diff出修改的部分进行传输，性能会更好。\n2、包大小，小程序有包大小限制，web端包大小也是工程师关心的点。首先基于多态协议，产出包纯净保留单端代码；其次框架的api和组件会按需打包。包大小是我们重点发力点，会持续优化到极致。目前build模式包大小测试结果如下:\n<span style=\"color: #ff534d;\">minimize</span><span style=\"color: #edd0be;\"> | </span><span style=\"color: #25c6fc;\">minimize + gzip</span>   \n<table style=\"color: #edd0be;\">\n<tr>\n  <th>平台</th><th>js总体积</th><th>外部框架</th><th>chameleon运行时代码</th><th>其他代码</th>\n</tr>\n<tr>\n  <td>web</td>\n  <td>\n    <span style=\"color: #ff534d;\">141.87kb</span>  \n    |\n    <span style=\"color: #25c6fc;\">43.72kb</span>\n  </td>\n  <td>\n    vue+vuex+vue-router<br/>\n    <span style=\"color: #ff534d;\">99.26kb</span>  \n    | \n    <span style=\"color: #25c6fc;\">33.89kb</span>\n  </td>\n  <td>\n    <span style=\"color: #ff534d;\">35.96kb</span>  \n    |\n    <span style=\"color: #25c6fc;\"> 8.85kb</span>\n  </td>\n  <td>\n    业务代码\n  </td>\n</tr>\n<tr>\n  <td>weex</td><td>\n    <span style=\"color: #ff534d;\">135kb</span>  \n    |\n    <span style=\"color: #25c6fc;\">32.43kb</span>\n  </td>\n  <td>\n    vuex+vue-router<br/>\n    <span style=\"color: #ff534d;\">33.49kb</span>  \n    | \n    <span style=\"color: #25c6fc;\">17.96kb</span>\n  </td>\n  <td>\n    <span style=\"color: #ff534d;\">25.23kb</span>  \n    |\n    <span style=\"color: #25c6fc;\">5.94kb</span>\n  </td>\n    <td>\n    业务代码\n  </td>\n</tr>\n\n<tr>\n  <td>wx</td><td>\n    <span style=\"color: #ff534d;\">101.66kb</span>  \n    |\n    <span style=\"color: #25c6fc;\">28.12kb</span>\n  </td>\n  <td>\n    mobx算在chameleon运行时中  \n  </td>\n  <td>\n    <span style=\"color: #ff534d;\">98.75kb</span>  \n    |\n    <span style=\"color: #25c6fc;\">26.53kb</span>\n  </td>\n    <td>\n    业务代码\n  </td>\n</tr>\n\n<tr>\n  <td>baidu</td><td>\n    <span style=\"color: #ff534d;\">101.72kb</span>  \n    |\n    <span style=\"color: #25c6fc;\"> 28.13kb</span>\n  </td>\n  <td>\n    mobx算在chameleon运行时中  \n  </td>\n  <td>\n    <span style=\"color: #ff534d;\">98.78kb</span>  \n    |\n    <span style=\"color: #25c6fc;\">26.61kb</span>\n  </td>\n    <td>\n    业务代码\n  </td>\n</tr>\n\n<tr>\n  <td>alipay</td><td>\n    <span style=\"color: #ff534d;\">102kb</span>  \n    |\n    <span style=\"color: #25c6fc;\">28.12kb</span>\n  </td>\n  <td>\n    mobx算在chameleon运行时中  \n  </td>\n  <td>\n    <span style=\"color: #ff534d;\">99.15kb</span>  \n    |\n    <span style=\"color: #25c6fc;\">26.34kb</span>\n  </td>\n    <td>\n    业务代码\n  </td>\n</tr>\n\n\n</table>\n\n##### 我只想跨web和各类小程序，是否可以不使用 Flexbox 布局模型？\n可以，如果你的项目不在 快应用、react-native、weex等平台运行，可以更便捷开发项目，特别是CSS的限制更少：\n<a href=\"https://cmljs.org/doc/example/web_wx.html\">只跨web和小程序的应用</a>\n"
  },
  {
    "path": "packages/chameleon-tool/chameleon.js",
    "content": "#! /usr/bin/env node \n//--inspect-brk\n\nrequire('./lib/index.js');\n"
  },
  {
    "path": "packages/chameleon-tool/commanders/alipay/index.js",
    "content": "\nexports.name = 'alipay';\nexports.usage = '[command] [options]';\nexports.desc = 'tools for the alipay miniprogram project';\n\n/* istanbul ignore next */\nexports.register = function (commander) {\n  commander\n    .option('-r, --root [root]', 'specify project root')\n    .option('-n, --nopreview ', \"don't auto open preview\")\n    .action(function (...args) {\n      cml.utils.checkProjectConfig();\n      /* eslint-disable */\n      //提高cml -h命令速度 \n      cml.log.startBuilding();\n\n      const inquirer = require('inquirer');   \n      const utils = require('../utils.js'); \n      /* eslint-disable */  \n\n      \n      // 不能删除\n      var options = args.pop(); // eslint-disable-line  \n\n      var cmd = args.shift();\n      if (cmd) {\n        handlerCmd(cmd);\n      } else {\n        let questions = [{\n          type: 'list',\n          name: 'type',\n          message: 'Which do you want to do?',\n          choices: [\n            'dev',\n            'build'\n          ]\n        }]\n        inquirer.prompt(questions).then(answers => {\n          handlerCmd(answers.type)\n        })\n      }\n\n      function handlerCmd (cmd) {\n        cml.media = cmd;\n        utils.startReleaseOne(cmd, 'alipay');\n      }\n\n    })\n\n  commander.on('--help', function() {\n    var cmd = `\n  Commands:\n    dev      develop the project for alipay miniprogram\n    build    build the project for alipay miniprogram\n  Examples:\n    cml alipay dev\n    cml alipay build\n    `\n    console.log(cmd)\n  })\n\n}\n\n"
  },
  {
    "path": "packages/chameleon-tool/commanders/baidu/index.js",
    "content": "exports.name = 'baidu';\nexports.usage = '[command] [options]';\nexports.desc = 'tools for the baidu miniprogram project';\n\n/* istanbul ignore next */\nexports.register = function (commander) {\n  commander\n    .option('-r, --root [root]', 'specify project root')\n    .option('-n, --nopreview ', \"don't auto open preview\")\n    .action(function (...args) {\n      cml.utils.checkProjectConfig();\n      /* eslint-disable */ \n      cml.log.startBuilding();\n\n      const inquirer = require('inquirer');   \n      const utils = require('../utils.js'); \n      /* eslint-disable */  \n      \n      // 不能删除\n      var options = args.pop(); // eslint-disable-line  \n      var cmd = args.shift();\n      if (cmd) {\n        handlerCmd(cmd);\n      } else {\n        let questions = [{\n          type: 'list',\n          name: 'type',\n          message: 'Which do you want to do?',\n          choices: [\n            'dev',\n            'build'\n          ]\n        }]\n        inquirer.prompt(questions).then(answers => {\n          handlerCmd(answers.type)\n        })\n      }\n\n      function handlerCmd (cmd) {\n        cml.media = cmd;\n        utils.startReleaseOne(cmd, 'baidu');\n      }\n\n    })\n\n  commander.on('--help', function() {\n    var cmd = `\n  Commands:\n    dev      develop the project for weixin miniprogram\n    build    build the project for weixin miniprogram\n  Examples:\n    cml wx dev\n    cml wx build\n    `\n    console.log(cmd)\n  })\n\n}\n\n"
  },
  {
    "path": "packages/chameleon-tool/commanders/build/index.js",
    "content": "\nexports.name = 'build';\nexports.usage = '';\nexports.desc = 'start build mode';\n\n/* istanbul ignore next */\nexports.register = function (commander) {\n  commander\n    .action(function (...args) {\n      cml.utils.checkProjectConfig();\n\n      /* eslint-disable */ \n      cml.log.startBuilding();\n      const utils = require('../utils.js'); \n      /* eslint-disable */\n      cml.media = 'build';\n      utils.startReleaseAll('build');\n\n    })\n  commander.on('--help', function() {\n    var cmd = `\n      cml build \n    `\n    console.log(cmd)\n  })\n\n}\n"
  },
  {
    "path": "packages/chameleon-tool/commanders/dev/index.js",
    "content": "exports.name = 'dev';\nexports.usage = '';\nexports.desc = 'start dev mode';\n\n/* istanbul ignore next */\nexports.register = function (commander) {\n  commander\n    .option('-n, --nopreview ', \"don't auto open preview\")\n    .action(function (...args) {\n      cml.utils.checkProjectConfig();\n      /* eslint-disable */ \n      cml.log.startBuilding();\n      const utils = require('../utils.js'); \n      /* eslint-disable */\n      cml.media = 'dev';\n      utils.startReleaseAll('dev');\n    })\n  commander.on('--help', function() {\n    var cmd = `\n      cml dev \n    `\n    console.log(cmd)\n  })\n\n}\n"
  },
  {
    "path": "packages/chameleon-tool/commanders/ext/index.js",
    "content": "let extCommandConfig = cml.config.get().extPlatform\nlet extCommand\nif (extCommandConfig && typeof extCommandConfig === 'object') {\n  extCommand = Object.keys(extCommandConfig)[0]\n  exports.name = extCommand;\n}\n\nexports.usage = '[command] [options]';\nexports.desc = 'tools for the weixin miniprogram project';\n\n/* istanbul ignore next */\nexports.register = function (commander) {\n  commander\n    .option('-r, --root [root]', 'specify project root')\n    .option('-n, --nopreview ', \"don't auto open preview\")\n    .action(function (...args) {\n      cml.utils.checkProjectConfig();\n      /* eslint-disable */\n    cml.log.startBuilding();\n    const inquirer = require('inquirer');\n    const utils = require('../utils.js');\n    /* eslint-disable */\n    // 不能删除\n    var options = args.pop(); // eslint-disable-line\n    var cmd = args.shift();\n    if (cmd) {\n      handlerCmd(cmd);\n    } else {\n      let questions = [{\n        type: 'list',\n        name: 'type',\n        message: 'Which do you want to do?',\n        choices: [\n          'dev',\n          'build'\n        ]\n      }]\n      inquirer.prompt(questions).then(answers => {\n        handlerCmd(answers.type)\n      })\n    }\n\n    function handlerCmd (cmd) {\n      cml.media = cmd;\n      utils.startReleaseOne(cmd, extCommand);\n    }\n\n  })\n\ncommander.on('--help', function() {\n  var cmd = `\nCommands:\n  dev      develop the project for weixin miniprogram\n  build    build the project for weixin miniprogram\nExamples:\n  cml ${extCommand} dev\n  cml ${extCommand} build\n  `\n  console.log(cmd)\n})\n\n}\n\n"
  },
  {
    "path": "packages/chameleon-tool/commanders/extPlatform.js",
    "content": "\n\nmodule.exports = function({type, media}) {\n  const utils = require('./utils.js');\n  cml.media = media;\n  cml.log.startBuilding();\n  utils.startReleaseOne(media, type);\n}"
  },
  {
    "path": "packages/chameleon-tool/commanders/info/index.js",
    "content": "const envinfo = require('envinfo');\n\nexports.name = 'info';\nexports.usage = '[command] [options]';\nexports.desc = 'Shows information about the local environment';\n\n/* istanbul ignore next */\nexports.register = function (commander) {\n  commander\n    .action(function (...args) {\n      envinfo.run(\n        {\n          System: ['OS', 'CPU'],\n          Binaries: ['Node', 'Yarn', 'npm'],\n          Browsers: ['Chrome', 'Edge', 'Firefox', 'Safari'],\n          npmGlobalPackages: ['chameleon-tool'],\n          npmPackages: [\n            'chameleon-tool'\n          ]\n        },\n        {\n          showNotFound: true,\n          duplicates: true,\n          fullTree: true\n        }\n      ).then(console.log)\n\n    })\n}\n\n"
  },
  {
    "path": "packages/chameleon-tool/commanders/init/index.js",
    "content": "\nlet fs = null;\nlet path = null;\nlet tpl = null;\nlet inquirer = null;\nlet ora = null;\nlet shelljs = null;\nlet fse = null;\nlet chalk = null;\nlet glob = null;\nconst platformMap = require('./platform.json');\nconst platformTotal = Object.keys(platformMap).length;\n\nexports.name = 'init';\nexports.usage = '[command] [options]';\nexports.desc = 'initialize template for chameleon project';\nconst cmdOptions = {\n  lang: 'cml',\n  tpl: 'html',\n  demo: 'blank'\n}\n\n/* istanbul ignore next */\nexports.register = function (commander) {\n  commander\n    .option('-r, --root [root]', 'specify project root')\n    .option('-g, --lang [cml|vue]', 'specify project template default language, example: cml init project -g vue ')\n    .option('-t, --tpl [html|smarty]', 'specify project templateType, example: cml init project -t html')\n    .option('-d, --demo [blank|todo]', 'specify init project demo, example: cml init project -d todo ')\n  commander\n    .action(function (...args) {\n      /* eslint-disable */\n      fs = require('fs');\n      path = require('path');\n      tpl = require('chameleon-templates');\n      inquirer = require('inquirer');\n      ora = require('ora');\n      shelljs = require('shelljs');\n      fse = require('fs-extra');\n      glob = require('glob');\n      chalk = require('chalk');\n      /* eslint-disable */\n\n      // 不能删除\n      var options = args.pop(); // eslint-disable-line \n      if (options.lang === 'vue') {\n        cmdOptions.lang = options.lang;\n      }\n      if (options.tpl === 'smarty') {\n        cmdOptions.tpl = options.tpl;\n      }\n      if (~['todo'].indexOf(options.demo)) {\n        cmdOptions.demo = options.demo;\n      }\n      var type = args.shift();\n      if (type) {\n        initMethod(type);\n      } else {\n        let questions = [{\n          type: 'list',\n          name: 'type',\n          message: 'Which do you want to init?',\n          choices: [\n            'project',\n            'page',\n            'component'\n          ]\n        }]\n        inquirer.prompt(questions).then(answers => {\n          initMethod(answers.type)\n        })\n\n      }\n    })\n\n  commander.on('--help', function() {\n    var cmd = `\n  Commands:\n    project   initialize a chameleon project\n    page      initialize a chameleon page in project\n    component initialize a chameleon component in project\n    server    initialize the php server for dev\n  Examples:\n    cml init project\n    cml init page\n    cml init component\n  `\n    console.log(cmd)\n  })\n\n  function initMethod(type) {\n    if (!~['project', 'page', 'component'].indexOf(type)) {\n      cml.log.error(`init type must in ['project', 'page', 'component']`);\n      return;\n    }\n    if (type !== 'project') {\n      cml.utils.checkProjectConfig();\n    }\n    switch (type) {\n      case 'project':\n        initProject();\n        break;\n      case 'page':\n        initPage();\n        break;\n      case 'component':\n        initComponent();\n        break;\n      default: break;\n    }\n  }\n\n  function initProject() {\n    let questions = [\n      {\n        type: 'input',\n        name: 'projectName',\n        message: 'please input the name of project:',\n        validate: function (value) {\n          if (!value) {\n            return 'project name can not be empty'\n          }\n          let nameReg = /^[0-9a-zA-Z_\\-\\.]+$/;\n          if (!nameReg.test(value)) {\n            return `project name characters must only in [0-9a-zA-Z_\\-\\.]`\n          }\n\n          if (fs.existsSync(value)) {\n            return 'There is already a project with the same name in the current directory,please change one'\n          }\n          return true;\n        }\n      }\n    ]\n\n    inquirer.prompt(questions).then(answers => {\n      let {projectName } = answers;\n      let platforms = ['h5', 'weex', '微信小程序','支付宝小程序','百度小程序','qq小程序'];\n      let templateType = cmdOptions.tpl;\n      let templateLang = cmdOptions.lang;\n      platforms = platforms.map(item => platformMap[item]);\n      let pagedir = path.join(cml.projectRoot, projectName);\n      let projectMap = {\n        blank: tpl.blankDemoTpl,\n        todo: tpl.todoDemoTpl\n      }\n      let projectTpl = projectMap[cmdOptions.demo];\n\n      fse.copySync(projectTpl, pagedir);\n      // package.json文件中的name需要更改\n      var packagePath = path.join(pagedir, 'package.json');\n      let packageContent = JSON.parse(fs.readFileSync(packagePath, 'utf-8'));\n      packageContent.name = projectName;\n      fs.writeFileSync(packagePath, JSON.stringify(packageContent, '', 2))\n\n      // 修改配置文件\n      let configFile = path.join(pagedir, 'chameleon.config.js');\n      let content = fs.readFileSync(configFile, {encoding: 'utf-8'}).replace(/templateLang\\s*:\\s*[\"'](cml|vue)[\"']/g, function() {\n        return `templateLang: \"${templateLang}\"`\n      })\n        .replace(/templateType\\s*:\\s*[\"'](smarty|html)[\"']/g, function() {\n          return `templateType: \"${templateType}\"`\n        })\n        .replace(/platforms\\s*:\\s*\\[(.+?)\\]/g, function() {\n          return `platforms: ${JSON.stringify(platforms)}`\n        })\n      fs.writeFileSync(configFile, content);\n\n      var npmignore = path.join(pagedir, '.npmignore');\n      // npm包中的.gitignore变成了.npmignore\n      if (cml.utils.isFile(npmignore)) {\n        fse.moveSync(npmignore, path.join(pagedir, '.gitignore'));\n      }\n      // 处理平台文件\n      if (platforms.length < platformTotal) {\n        let { ignorePlatform, ignoreReg } = exports.getIgnorePlatform(platforms);\n        let currentPlatforms = platforms;\n        let currentReg = new RegExp(`\\\\.(${currentPlatforms.join('|')})\\\\.cml$`);\n        // 处理.cml文件\n        let cmlFilePath = path.join(pagedir, '**/*.cml');\n        glob.sync(cmlFilePath).forEach(cfp => {\n          // 删除忽略平台的文件\n          if (ignoreReg.test(cfp)) {\n            fse.removeSync(cfp);\n          } else {\n            if (cfp.endsWith('.cml') && !currentReg.test(cfp)) {\n              let content = fs.readFileSync(cfp, {encoding: 'utf-8'});\n              let splitContent = cml.utils.getScriptPart({content, cmlType: 'json'});\n              let jsonObj = JSON.parse(splitContent.content);\n              ignorePlatform.forEach(item => {\n                delete jsonObj[item];\n              });\n              content = content.replace(splitContent.content, `\\n${JSON.stringify(jsonObj, null, 2)}\\n`);\n              fs.writeFileSync(cfp, content);\n            }\n          }\n        })\n        // 处理 .interface文件\n        let interfaceFilePath = path.join(pagedir, '**/*.interface');\n        glob.sync(interfaceFilePath).forEach(ifp => {\n          content = fs.readFileSync(ifp, {encoding: 'utf-8'});\n          ignorePlatform.forEach(item => {\n            content = cml.utils.deleteScript({\n              content,\n              cmlType: item\n            });\n          });\n\n          fs.writeFileSync(ifp, content);\n        })\n\n      }\n\n      const installSpinner = ora('npm installing...').start()\n      const install = shelljs.exec(`cd ${projectName} && npm install`, {\n        silent: true\n      })\n      if (install.code === 0) {\n        installSpinner.color = 'green'\n        installSpinner.succeed('install success')\n        console.log(chalk.yellow('To get started:\\n'))\n        console.log(chalk.yellow(`cd ${projectName}\\n`))\n        console.log(chalk.yellow(`cml dev\\n`))\n        // installSpinner.succeed(`Please exec: cd ${projectName}; cml dev`)\n        // console.log(`${install.stderr}${install.stdout}`)\n      } else {\n        installSpinner.color = 'red'\n        installSpinner.fail(chalk.red('install fail, please exec npm install youself'))\n        console.log(`${install.stderr}${install.stdout}`)\n      }\n    })\n\n\n  }\n\n  function initPage() {\n    let questions = [{\n      type: 'input',\n      name: 'pageName',\n      message: 'please input page name:',\n      validate: function (value) {\n        if (!value) {\n          return 'page name can not be empty'\n        }\n\n        if (fs.existsSync(path.join(cml.projectRoot, `src/pages/${value}`))) {\n          return 'There is already a page with the same name in the current project, please change one'\n        }\n        return true;\n      }\n    }]\n\n    inquirer.prompt(questions).then(answers => {\n      let {pageName} = answers;\n      let pagedir = path.join(cml.projectRoot, `src/pages/${pageName}`)\n      let UpperName = exports.toUpperCase(pageName);\n      fs.readdirSync(tpl.pageTpl).forEach(fileName => {\n        let filePath = path.join(tpl.pageTpl, fileName);\n        let newFilePath = path.join(pagedir, fileName.replace('index', pageName));\n        let content = fs.readFileSync(filePath, {encoding: 'utf-8'}).replace(/Replace/ig, UpperName);\n        if (cml.config.get().templateLang === 'vue') {\n          content = content.replace(/<template>/, '<template lang=\"vue\">')\n        }\n        content = exports.contentIgnoreHanle(content, 'cml');\n        fse.outputFile(newFilePath, content);\n\n      })\n      cml.log.notice(`init page ${pageName} success!`)\n    })\n  }\n\n  function initComponent() {\n    let questions = [{\n      type: 'list',\n      name: 'componentType',\n      message: 'please select the type of component',\n      choices: [\n        'Normal component',\n        'Polymorphic component',\n        'Polymorphic function'\n      ]\n    }, {\n      type: 'input',\n      name: 'componentName',\n      message: 'please input component name:',\n      validate: function (value) {\n        if (!value) {\n          return 'component name can not be empty'\n        }\n\n        if (fs.existsSync(path.join(cml.projectRoot, `src/components/${value}`))) {\n          return 'There is already a component with the same name in the current project, please change one'\n        }\n\n        return true;\n      }\n    }]\n\n    inquirer.prompt(questions).then(answers => {\n      let {componentName, componentType} = answers;\n      let comdir = path.join(cml.projectRoot, `src/components/${componentName}`);\n      let comPathMap = {\n        'Normal component': 'component',\n        'Polymorphic component': 'interface-component',\n        'Polymorphic function': 'interface-js'\n      }\n      let tplPath = path.join(tpl.componentTpl, comPathMap[componentType]);\n      let UpperName = exports.toUpperCase(componentName);\n      let { ignoreReg } = exports.getIgnorePlatform();\n      fs.readdirSync(tplPath).forEach(fileName => {\n        if (ignoreReg.test(fileName)) {\n          return;\n        }\n        let filePath = path.join(tplPath, fileName);\n        let newFilePath = path.join(comdir, fileName.replace('index', componentName));\n        let content = fs.readFileSync(filePath, {encoding: 'utf-8'}).replace(/Replace/ig, UpperName);\n        if (cml.config.get().templateLang === 'vue') {\n          content = content.replace(/<template>/, '<template lang=\"vue\">')\n        }\n        if (newFilePath.endsWith('.cml')) {\n          content = exports.contentIgnoreHanle(content, 'cml');\n        }\n        if (newFilePath.endsWith('.interface')) {\n          content = exports.contentIgnoreHanle(content, 'interface');\n        }\n        fse.outputFile(newFilePath, content);\n      })\n      cml.log.notice(`init component ${componentName} success!`)\n    })\n  }\n}\n\nexports.toUpperCase = function (content) {\n  content = content[0].toUpperCase() + content.slice(1);\n  return content.replace(/-(\\w)/ig, function(m, s1) {\n    return s1.toUpperCase()\n  })\n}\n\n\nexports.getIgnorePlatform = function (platforms) {\n  platforms = platforms || cml.config.get().platforms.map(item => item.trim());\n  let platformValues = Object.values(platformMap);\n  let ignorePlatform = platformValues.filter(item => platforms.indexOf(item) === -1);\n  let ignoreReg = new RegExp(`\\\\.(${ignorePlatform.join('|')})\\\\.cml$`);\n  return {\n    ignorePlatform,\n    ignoreReg\n  }\n}\n\n  // 处理文件\nexports.contentIgnoreHanle = function (content, type) {\n  let { ignorePlatform } = exports.getIgnorePlatform();\n  if (type === 'interface') {\n    ignorePlatform.forEach(item => {\n      content = cml.utils.deleteScript({\n        content,\n        cmlType: item\n      });\n    });\n  } else if (type === 'cml') {\n    let splitContent = cml.utils.getScriptPart({content, cmlType: 'json'});\n    if (splitContent) {\n      let jsonObj = JSON.parse(splitContent.content);\n      ignorePlatform.forEach(item => {\n        delete jsonObj[item];\n      });\n      content = content.replace(splitContent.content, `\\n${JSON.stringify(jsonObj, null, 2)}\\n`);\n    }\n  }\n  return content;\n}"
  },
  {
    "path": "packages/chameleon-tool/commanders/init/platform.json",
    "content": "\n{\n  \"h5\": \"web\",\n  \"weex\": \"weex\",\n  \"微信小程序\": \"wx\",\n  \"支付宝小程序\": \"alipay\",\n  \"百度小程序\": \"baidu\",\n  \"qq小程序\": \"qq\"\n}"
  },
  {
    "path": "packages/chameleon-tool/commanders/qq/index.js",
    "content": "exports.name = 'qq';\nexports.usage = '[command] [options]';\nexports.desc = 'tools for the qq miniprogram project';\n\n/* istanbul ignore next */\nexports.register = function (commander) {\n  commander\n    .option('-r, --root [root]', 'specify project root')\n    .option('-n, --nopreview ', \"don't auto open preview\")\n    .action(function (...args) {\n      cml.utils.checkProjectConfig();\n      /* eslint-disable */\n      //提高cml -h命令速度 \n      cml.log.startBuilding();\n\n      const inquirer = require('inquirer');   \n      const utils = require('../utils.js'); \n      /* eslint-disable */  \n\n      \n      // 不能删除\n      var options = args.pop(); // eslint-disable-line  \n\n      var cmd = args.shift();\n      if (cmd) {\n        handlerCmd(cmd);\n      } else {\n        let questions = [{\n          type: 'list',\n          name: 'type',\n          message: 'Which do you want to do?',\n          choices: [\n            'dev',\n            'build'\n          ]\n        }]\n        inquirer.prompt(questions).then(answers => {\n          handlerCmd(answers.type)\n        })\n      }\n\n      function handlerCmd (cmd) {\n        cml.media = cmd;\n        utils.startReleaseOne(cmd, 'qq');\n      }\n\n    })\n\n  commander.on('--help', function() {\n    var cmd = `\n  Commands:\n    dev      develop the project for qq miniprogram\n    build    build the project for qq miniprogram\n  Examples:\n    cml qq dev\n    cml qq build\n    `\n    console.log(cmd)\n  })\n\n}\n\n"
  },
  {
    "path": "packages/chameleon-tool/commanders/server/index.js",
    "content": "\nexports.name = 'server';\nexports.usage = '[command] [options]';\nexports.desc = 'tools for the dev server';\n\n/* istanbul ignore next */\nexports.register = function (commander) {\n  commander\n    .action(function (...args) {\n\n      /* eslint-disable  */    \n      const tpl = require('chameleon-templates');\n      const inquirer = require('inquirer');\n      const fse = require('fs-extra');\n      /* eslint-disable  */  \n\n      // 不能删除\n      var options = args.pop(); // eslint-disable-line  \n      var cmd = args.shift();\n      if (cmd) {\n        handlerCmd(cmd);\n      } else {\n        let questions = [{\n          type: 'list',\n          name: 'type',\n          message: 'Which do you want to do?',\n          choices: [\n            'init',\n            'open'\n          ]\n        }]\n        inquirer.prompt(questions).then(answers => {\n          handlerCmd(answers.type)\n        })\n      }\n\n      function handlerCmd(cmd) {\n        switch (cmd) {\n          case 'open':\n            cml.utils.open(cml.utils.getDevServerPath());\n            break;\n          case 'init':\n            fse.copySync(tpl.serverTpl, cml.utils.getDevServerPath());\n            cml.log.notice(`already init php server to ${cml.utils.getDevServerPath()}`)\n            cml.log.notice(`you can use 'chameleon server open' to open the server workspace`)\n            break;\n          case 'clean':\n            fse.emptyDirSync(cml.utils.getDevServerPath());\n            cml.log.notice(`clean success!`)\n            break;\n          default:\n            break;\n\n        }\n      }\n    })\n  commander.on('--help', function() {\n    var cmd = `\n  Commands:\n    open   open the php server directory\n    init   initialize the php server framework\n    clean  clean server files\n  Examples:\n    cml server open\n    cml server init\n    cml server clean\n    `\n    console.log(cmd)\n  })\n\n}\n"
  },
  {
    "path": "packages/chameleon-tool/commanders/tt/index.js",
    "content": "exports.name = 'tt';\nexports.usage = '[command] [options]';\nexports.desc = 'tools for the bytedance miniprogram project';\n\n/* istanbul ignore next */\nexports.register = function (commander) {\n  commander\n    .option('-r, --root [root]', 'specify project root')\n    .option('-n, --nopreview ', \"don't auto open preview\")\n    .action(function (...args) {\n      cml.utils.checkProjectConfig();\n      /* eslint-disable */\n      cml.log.startBuilding();\n      const inquirer = require('inquirer');\n      const utils = require('../utils.js');\n      /* eslint-disable */\n      // 不能删除\n      var options = args.pop(); // eslint-disable-line\n      var cmd = args.shift();\n      if (cmd) {\n        handlerCmd(cmd);\n      } else {\n        let questions = [{\n          type: 'list',\n          name: 'type',\n          message: 'Which do you want to do?',\n          choices: [\n            'dev',\n            'build'\n          ]\n        }]\n        inquirer.prompt(questions).then(answers => {\n          handlerCmd(answers.type)\n        })\n      }\n\n      function handlerCmd (cmd) {\n        cml.media = cmd;\n        utils.startReleaseOne(cmd, 'tt');\n      }\n\n    })\n\n  commander.on('--help', function() {\n    var cmd = `\n  Commands:\n    dev      develop the project for weixin miniprogram\n    build    build the project for weixin miniprogram\n  Examples:\n    cml tt dev\n    cml tt build\n    `\n    console.log(cmd)\n  })\n\n}\n\n"
  },
  {
    "path": "packages/chameleon-tool/commanders/utils.js",
    "content": "const webpack = require('webpack');\nconst devServer = require('./web/dev-server.js');\nconst getConfig = require('../configs/index.js');\nconst {startServer: startWeexLiveLoad, broadcast} = require('./weex/socket-server.js');\nconst previewSocket = require('./web/web-socket.js');\nconst cmlLinter = require('chameleon-linter');\nconst watch = require('glob-watcher');\nconst fse = require('fs-extra');\nconst path = require('path');\nconst fs = require('fs');\nconst crypto = require('crypto');\nconst cmlUtils = require('chameleon-tool-utils');\nconst {getEntryName} = require('../configs/utils.js');\n\n/**\n * 非web端构建\n * @param {*} media  dev or build ...\n * @param {*} type  wx web weex\n */\nexports.getBuildPromise = async function (media, type) {\n\n  let options = exports.getOptions(media, type);\n  let webpackConfig = await getConfig(options);\n\n  //  非web和weex 并且非增量\n  if (!~['web', 'weex'].indexOf(type) && options.increase !== true) {\n    // 异步删除output目录\n    var outputpath = webpackConfig.output.path;\n    if (outputpath) {\n      await new Promise(function(resolve, reject) {\n        fse.remove(outputpath, function(err) {\n          if (err) {\n            reject(err);\n          }\n          resolve();\n        })\n      })['catch'](e => {\n        let message = `clear file error! please remove direction ${outputpath} by yourself!`\n        cml.log.error(message);\n        throw new Error(e)\n      })\n    }\n\n  }\n  // 工程配置输出\n  let projectConfig = options && options.projectConfig;\n  let destDir = path.resolve(cml.projectRoot, `dist/${type}`);\n  // 支付宝小程序没有工程配置\n  if (['wx', 'qq', 'tt'].includes(type) && projectConfig) {\n    fse.outputJsonSync(path.join(destDir, 'project.config.json'), projectConfig, {spaces: 4})\n  }\n  if (type === 'baidu' && projectConfig) {\n    fse.outputJsonSync(path.join(destDir, 'project.swan.json'), projectConfig, {spaces: 4})\n  }\n  // sitemap配置输出\n  let siteMap = options && options.siteMap;\n  if (type === 'wx' && siteMap) {\n    fse.outputJsonSync(path.join(destDir, 'sitemap.json'), siteMap, {spaces: 4})\n  }\n  return new Promise(function(resolve, reject) {\n    // watch模式\n    if (media === 'dev') {\n      const compiler = webpack(webpackConfig);\n      if (type === 'weex') {\n        startWeexLiveLoad(options);\n      }\n      let optimizeCML = cml.config.get().optimize;\n      let watchOptions = {\n        aggregateTimeout: 300,\n        poll: undefined\n      }\n      if (optimizeCML && !optimizeCML.watchNodeModules) {\n        watchOptions.ignored = /node_modules/;\n      }\n      compiler.watch(watchOptions, (err, stats) => {\n\n        if (type === 'weex') {\n          if (!(stats && stats.compilation && stats.compilation.errors && stats.compilation.errors.length > 0)) {\n            broadcast('weex_refresh');\n          }\n          previewSocket.broadcast('weex_refresh');\n        }\n        if (err) {\n          reject(err);\n        }\n        resolve();\n      });\n    } else {\n      // build模式\n      webpack(webpackConfig, (err, stats) => {\n        if (err) {\n          reject(err);\n        }\n        resolve();\n      });\n    }\n  })\n}\n\n/**\n * 获取webpack配置\n * @param {*} media  dev or build ...\n * @param {*} type  wx web weex\n */\nexports.getOptions = function (media, type) {\n  let chameleonConfig = (cml.config.get() && cml.config.get()[type] && cml.config.get()[type][media]) || {};\n\n  if (!chameleonConfig) {\n    cml.log.error(`在chameleon的config中未找到 ${media}的配置参数`);\n    return;\n  }\n\n  let options = cml.utils.merge(\n    chameleonConfig,\n    {\n      type: type,\n      media,\n      root: cml.projectRoot,\n      buildType: 'weex' // 传递给dev-server，判断启动devserver的类型 暂时固定为weex\n    }\n  )\n\n  return options;\n}\n\n/**\n * web端构建\n * @param {*} type   dev or build or 其他\n * @param {*} isCompile   是否要编译web端 不编译web时也要启动web端服务\n */\nexports.getWebBuildPromise = async function (media, isCompile) {\n  if (media === 'dev') {\n    let options = exports.getOptions(media, 'web');\n    let webpackConfig = await getConfig(options)\n    let compiler;\n    if (isCompile) {\n      compiler = webpack(webpackConfig);\n    }\n    return devServer({webpackConfig, options, compiler});\n  } else {\n    if (isCompile) {\n      return exports.getBuildPromise(media, 'web');\n    } else {\n      return Promise.resolve();\n    }\n  }\n}\n\n/**\n * 构建所有端\n * @param {*} media  dev or build ...\n * @param {*} type  wx web weex\n */\nexports.startReleaseAll = async function (media) {\n  if (media === 'build') {\n    process.env.NODE_ENV = 'production';\n  }\n  let cmlConfig = cml.config.get();\n  let allPlatform = cmlConfig.platforms;\n  let offPlatform = [];\n  let activePlatform = []; // 启动编译的platform\n  if (media === 'dev') {\n    offPlatform = cmlConfig.devOffPlatform;\n  } else if (media === 'build') {\n    offPlatform = cmlConfig.buildOffPlatform;\n  }\n  // 获取激活平台\n  for (let i = 0, j = allPlatform.length; i < j; i++) {\n    let platform = allPlatform[i];\n    if (!~offPlatform.indexOf(platform)) {\n      activePlatform.push(platform)\n    }\n  }\n\n  // 是否编译web端\n  let isCompile = !!~activePlatform.indexOf('web');\n  // 给preview使用\n  cml.activePlatform = activePlatform;\n\n  for (let i = 0, j = activePlatform.length; i < j; i++) {\n    let platform = activePlatform[i];\n    if (platform !== 'web') {\n      await exports.getBuildPromise(media, platform);\n    }\n  }\n\n  await exports.getWebBuildPromise(media, isCompile);\n  if (media === 'build') {\n    exports.createConfigJson()\n  }\n  startCmlLinter(media);\n}\n\nexports.startReleaseOne = async function(media, type) {\n  if (media === 'build') {\n    process.env.NODE_ENV = 'production';\n  }\n  // 给preview使用\n  cml.activePlatform = [type];\n  if (type === 'web') {\n    await exports.getWebBuildPromise(media, true);\n  } else {\n    let build = exports.getBuildPromise(media, type);\n    // 如果dev模式再启动web服务\n    if (media === 'dev') {\n      await build.then(res => {\n        exports.getWebBuildPromise(media, false);\n      })\n    } else {\n      await build;\n    }\n  }\n  if (media === 'build') {\n    exports.createConfigJson()\n  }\n  startCmlLinter(media);\n\n}\n\n// let lastLintTime = null;\nfunction startCmlLinter(media) {\n  if (cml.config.get().enableLinter === true && media === 'dev') {\n    cmlLinter(cml.projectRoot);\n\n    const watcher = watch([cml.projectRoot + '/src/**/**.**']);\n    watcher.on('change', function(path, stat) {\n      cmlLinter(cml.projectRoot);\n    });\n  }\n}\nexports.getMD5 = function(weexjs) {\n  if (!weexjs) {\n    return '';\n  }\n  const weexjsName = weexjs.split('/').pop();\n  const weexjsPath = path.resolve(cml.projectRoot, 'dist/weex/', weexjsName);\n\n  if (cml.utils.isFile(weexjsPath)) {\n    const md5sum = crypto.createHash('md5');\n    const buffer = fs.readFileSync(weexjsPath);\n    md5sum.update(buffer);\n    let md5str = md5sum.digest('hex').toUpperCase();\n    return md5str\n  }\n}\nexports.createConfigJson = function() {\n  let configJsonPath = path.join(cml.projectRoot, 'dist/config.json');\n  let configObj = {};\n  if (cml.utils.isFile(configJsonPath)) {\n    configObj = JSON.parse(fs.readFileSync(configJsonPath, {encoding: 'utf-8'}))\n  }\n  // 获取weex jsbundle地址\n\n  let config = cml.config.get();\n  config.buildInfo = config.buildInfo || {};\n  let {wxAppId = '', baiduAppId = '', alipayAppId = '', qqAppId = '', ttAppId = ''} = config.buildInfo;\n  let extPlatform = config.extPlatform ;\n  let extCommand = (typeof extPlatform === 'object') ? Object.keys(extPlatform)[0] : undefined;\n  let extAppId = ''\n  if (extCommand) { // extCommand 可能值为 tt  quickApp\n    extAppId = config.buildInfo && config.buildInfo[`${extCommand}AppId`]\n  }\n  let {routerConfig, hasError} = cml.utils.getRouterConfig();\n  let entryName = getEntryName();\n  let weexjs = (configObj[entryName] && configObj[entryName].js) || '';\n  let md5str = exports.getMD5(weexjs);\n  let mpa = routerConfig.mpa;\n\n\n  if (hasError) {\n    throw new Error('router.config.json格式不正确')\n  }\n\n  let result = [];\n  if (routerConfig) {\n    if (~cml.activePlatform.indexOf('web') && !routerConfig.domain) {\n      throw new Error('router.config.json 中未设置web端需要的domain字段');\n    }\n    let {domain, mode} = routerConfig;\n    routerConfig.routes.forEach(item => {\n      // 如果配置了weex多页面，那么每个路由都要重新计算对应的weexjs\n      if (mpa && mpa.weexMpa && Array.isArray(mpa.weexMpa)) { // 配置了weex多页面\n        let weexMpa = mpa.weexMpa;\n        for (let i = 0; i < weexMpa.length ; i++) {\n          if (Array.isArray(weexMpa[i].paths) && weexMpa[i].paths.includes(item.path)) {\n            if (typeof weexMpa[i].name === 'string') {\n              weexjs = configObj[`${weexMpa[i].name}`] && configObj[`${weexMpa[i].name}`].js;\n            } else {\n              weexjs = configObj[`${entryName}${i}`] && configObj[`${entryName}${i}`].js;\n            }\n            // weexjs = configObj[`${entryName}${i}`] && configObj[`${entryName}${i}`].js;\n            md5str = exports.getMD5(weexjs);\n          }\n        }\n      }\n      let webUrl = domain;\n      if (mode === 'history') {\n        webUrl += item.url;\n      } else if (mode === 'hash') {\n        webUrl += ('#' + item.url);\n      }\n      let route = {\n        wx: {\n          appId: wxAppId,\n          path: item.path\n        },\n        baidu: {\n          appId: baiduAppId,\n          path: item.path\n        },\n        alipay: {\n          appId: alipayAppId,\n          path: item.path\n        },\n        qq: {\n          appId: qqAppId,\n          path: item.path\n        },\n        tt: {\n          appId: ttAppId,\n          path: item.path\n        },\n        web: {\n          url: webUrl\n        },\n        weex: {\n          url: weexjs,\n          md5: md5str,\n          query: {\n            path: item.path\n          }\n        }\n      }\n      if (item.extra) {\n        route.extra = item.extra;\n      }\n      if (extCommand) {\n        route[extCommand] = {\n          appId: extAppId,\n          path: item.path\n        }\n      }\n      result.push(route);\n    })\n    // 处理subProject配置的npm包中cml项目的页面\n    let subProject = cml.config.get().subProject;\n    if (subProject && subProject.length > 0) {\n      subProject.forEach(function(item) {\n        let npmName = cmlUtils.isString(item) ? item : item.npmName;\n        let npmRouterConfig = cml.utils.readsubProjectRouterConfig(cml.projectRoot, npmName);\n        npmRouterConfig.routes && npmRouterConfig.routes.forEach(item => {\n          let cmlFilePath = path.join(cml.projectRoot, 'node_modules', npmName, 'src', item.path + '.cml');\n          let routePath = cml.utils.getPureEntryName(cmlFilePath, '', cml.projectRoot);\n          routePath = cml.utils.handleSpecialChar(routePath);\n          let webUrl = domain;\n          if (mode === 'history') {\n            webUrl += item.url;\n          } else if (mode === 'hash') {\n            webUrl += ('#' + item.url);\n          }\n          if (routePath[0] !== '/') {\n            routePath = '/' + routePath;\n          }\n          let route = {\n            wx: {\n              appId: wxAppId,\n              path: routePath\n            },\n            baidu: {\n              appId: baiduAppId,\n              path: routePath\n            },\n            alipay: {\n              appId: alipayAppId,\n              path: routePath\n            },\n            qq: {\n              appId: qqAppId,\n              path: routePath\n            },\n            tt: {\n              appId: ttAppId,\n              path: item.path\n            },\n            web: {\n              url: webUrl\n            },\n            weex: {\n              url: weexjs,\n              query: {\n                path: routePath\n              }\n            }\n          }\n          if (item.extra) {\n            route.extra = item.extra;\n          }\n          if (extCommand) {\n            route[extCommand] = {\n              appId: extAppId,\n              path: item.path\n            }\n          }\n          result.push(route);\n        })\n      })\n    }\n  }\n\n  result.forEach(item => {\n    Object.keys(item).forEach(key => {\n      if (!~cml.activePlatform.indexOf(key) && key !== 'extra') {\n        delete item[key]\n      }\n    })\n  })\n\n  cml.event.emit('config-json', result);\n  /* eslint-disable-next-line */\n  fse.outputFileSync(configJsonPath, JSON.stringify(result, '', 4))\n}\n"
  },
  {
    "path": "packages/chameleon-tool/commanders/web/apiMiddleware.js",
    "content": "const glob = require('glob');\nconst path = require('path');\nconst express = require('express');\n\n\nfunction getJsFiles (dir) {\n  return glob.sync('**/*.js', {\n    cwd: dir,\n    nodir: true,\n    realpath: true\n  });\n}\n\n\nmodule.exports = function(app, options) {\n  const controllerFiles = getJsFiles(path.join(options.root, 'mock/api'));\n  const router = express.Router();\n  controllerFiles.forEach(function (file) {\n    var controller = require(file);\n    if (!(controller instanceof Array)) {\n      controller = [controller];\n    }\n    controller.forEach(function (item) {\n      var method = item.method || ['get', 'post'];\n\n      if (typeof method === 'string') {\n        method = [method];\n      }\n\n      method.forEach(function (verb) {\n        router[verb](item.path, item.controller);\n      });\n    });\n  });\n  app.use('/', router);\n}\n"
  },
  {
    "path": "packages/chameleon-tool/commanders/web/dev-client.js",
    "content": "/* eslint-disable */\nrequire('eventsource-polyfill')\nvar hotClient = require('webpack-hot-middleware/client?reload=true')\n\nhotClient.subscribe(function (event) {\n  if (event.action === 'reload') {\n    window.location.reload()\n  }\n})\n"
  },
  {
    "path": "packages/chameleon-tool/commanders/web/dev-server.js",
    "content": "\nvar opn = require('opn')\nvar path = require('path')\nvar express = require('express')\nvar phpIndexMiddleWare = require('./php_cgi_middleware.js');\nvar utils = require('../../configs/utils.js');\nvar config = require('../../configs/config');\nvar dynamicApiMiddleware = require('./dynamicApiMiddleware');\nvar responseTime = require('./responseTime');\nconst liveLoadMiddleware = require('webpack-liveload-middleware');\nconst cmlUtils = require('chameleon-tool-utils');\nconst fse = require('fs-extra');\nconst tpl = require('chameleon-templates');\nconst proxy = require('chameleon-dev-proxy');\nconst url = require('url')\nconst {createRoutesReact} = require('./web-socket.js')\nconst http = require('http');\nconst bodyParser = require('body-parser')\nconst argv = require('minimist')(process.argv);\nconst nopreview = argv.nopreview || argv.n;\nconst {createProxyMiddleware} = require('http-proxy-middleware');\n\n/**\n * webpackConfig webpack的配置对象\n * options media的配置\n * compile  webpack编译对象 如果存在则证明是要编译web端\n *\n */\nmodule.exports = function({webpackConfig, options, compiler}) {\n  // 执行web之前先更新server模板\n  updateServerTpl();\n  var port = utils.getFreePort().webServerPort;\n  var autoOpenBrowser = true;\n  var app = express();\n\n  app.use(bodyParser.json());\n  app.use(bodyParser.urlencoded({ extended: false }));\n  app.use(bodyParser.text({ type: 'text/html' }))\n  app.use(responseTime());\n  dynamicApiMiddleware(app, options);\n  // web端增加跨域自定义配置\n\n  let devProxy = options && options.devProxy || [];\n  if (webpackConfig.name === 'web' && Array.isArray(devProxy)) {\n    devProxy.forEach((proxyConfig) => {\n      app.use(proxyConfig.path, createProxyMiddleware(proxyConfig.options))\n    })\n  }\n  if (compiler) {\n\n    if (options.hot === true) {\n      /* eslint-disable-next-line */\n      var hotMiddleware = require('webpack-hot-middleware')(compiler, {\n        heartbeat: 9000,\n        noInfo: true,\n        quiet: true,\n        log: function() {\n          // 禁止输出\n        }\n      })\n      app.use(hotMiddleware)\n\n    } else {\n      app.use(liveLoadMiddleware(compiler))\n    }\n    if (cml.config.get().templateType === 'html') {\n      // handle fallback for HTML5 history API\n      /* eslint-disable-next-line */\n      const {routerConfig} = cmlUtils.getRouterConfig();\n      let mpa = routerConfig.mpa;\n      if (mpa && mpa.webMpa && Array.isArray(mpa.webMpa) && routerConfig.mode === 'history') {\n        // hash模式在 preview页面进行了兼容，history在这里进行兼容\n        let webMpa = mpa.webMpa;\n        let rewrites = [];\n        routerConfig.routes.forEach((item) => {\n          for (var j = 0; j < webMpa.length ; j++) {\n            if (Array.isArray(webMpa[j].paths) && webMpa[j].paths.includes(item.path)) {\n              if (typeof webMpa[j].name === 'string') {\n                rewrites.push({\n                  from: `${item.url}`,\n                  to: `${webMpa[j].name}.html`\n                })\n              } else {\n                rewrites.push({\n                  from: `${item.url}`,\n                  to: `${utils.getEntryName()}${j}.html`\n                })\n              }\n            }\n          }\n        })\n        app.use(require('connect-history-api-fallback')({\n          rewrites\n        }))\n      } else { // hash和history模式下都是ok的\n        app.use(require('connect-history-api-fallback')({\n          index: `${utils.getEntryName()}.html`\n        }))\n      }\n\n    }\n  }\n\n  // serve pure static assets\n  var staticPath = webpackConfig.output.path;\n  app.use(express['static'](staticPath));\n  let dist = path.join(cml.projectRoot, 'dist');\n  app.use(express['static'](dist));\n\n  if (compiler && cml.config.get().templateType === 'smarty') {\n    // php-cgi\n    app.use(phpIndexMiddleWare(staticPath));\n  }\n\n  var _resolve\n  var readyPromise = new Promise(resolve => {\n    _resolve = resolve\n  })\n  // 创建project.json文件\n  fse.ensureFileSync(path.join(cml.utils.getDevServerPath(), 'json/project.json'))\n  fse.writeJsonSync(path.join(cml.utils.getDevServerPath(), 'json/project.json'), {projectName: cml.config.get().projectName})\n  if (compiler) {\n    let first = true;\n    let optimizeCML = cml.config.get().optimize;\n    let watchOptions = {\n      aggregateTimeout: 300,\n      poll: undefined\n    }\n    if (optimizeCML && !optimizeCML.watchNodeModules) {\n      watchOptions.ignored = /node_modules/;\n    }\n    compiler.watch(watchOptions, (err, stats) => {\n      if (first) {\n        startServer();\n        first = false;\n      }\n      if (err) {\n        throw err;\n      }\n    });\n\n  } else {\n    startServer();\n  }\n\n  function startServer() {\n    fse.copySync(path.join(cml.root, 'configs/preview-assets'), path.join(cml.utils.getDevServerPath(), 'preview-assets'))\n\n    // 保证webpack打包完再启动web服务，否则webpack打包卡住命令行无法关闭\n    // app.listen(port)\n    const server = http.createServer(app).listen(port);\n    var uri = `http://${config.ip}:${port}/`;\n    let subpath = '';\n    // 未启动web端编译\n    if (!compiler) {\n      subpath = 'web_empty.html';\n      fse.copyFileSync(path.join(cml.root, 'configs/web_empty.html'), path.join(cml.utils.getDevServerPath(), 'web_empty.html'))\n    }\n    uri += 'preview.html';\n    var entry = utils.getEntryName();\n    const {routerConfig} = cmlUtils.getRouterConfig();\n    let mpa = routerConfig.mpa;\n    let weexBundles = [];\n    if (mpa && mpa.weexMpa && Array.isArray(mpa.weexMpa)) { // 配置了weex多页面\n      let weexMpa = mpa.weexMpa;\n      for (let i = 0; i < weexMpa.length ; i++) {\n        if (typeof weexMpa[i].name === 'string') {\n          weexBundles.push({\n            bundle: `weex/${weexMpa[i].name}.js`,\n            paths: weexMpa[i].paths\n          })\n        } else {\n          weexBundles.push({\n            bundle: `weex/${entry}${i}.js`,\n            paths: weexMpa[i].paths\n          })\n        }\n      }\n    } else { // 兼容原来的没有配置的情况\n      let allPaths = routerConfig.routes.reduce((result, current) => {\n        result.push(current.path);\n        return result;\n      }, [])\n      weexBundles.push({\n        bundle: `weex/${entry}.js`,\n        paths: allPaths\n      })\n    }\n    // var jsbundle = `weex/${entry}.js`;\n    let staticParams = { entry, weexBundles, subpath, buildType: cml.activePlatform };\n    createRoutesReact({server, staticParams});\n\n    cml.log.notice('Listening at ' + uri);\n    // when env is testing, don't need open it\n    if (autoOpenBrowser && !nopreview) {\n      opn(uri)\n    }\n    let proxyObj = cml.config.get().proxy || {};\n    // 最后启动代理服务\n    if (proxyObj.enable) {\n      // 默认代理weex和web端的js和css文件\n      let defaultMap = [{\n        from: `/weex/${cml.config.get().projectName}_(.+).js`,\n        to: `http://${config.ip}:${port}/weex/${cml.config.get().projectName}.js`\n      }, {\n        from: `/web/static/js/${cml.config.get().projectName}_(.+).js`,\n        to: `http://${config.ip}:${port}/static/js/${cml.config.get().projectName}.js`\n      }, {\n        from: '/web/static/js/manifest_(.+).js',\n        to: `http://${config.ip}:${port}/static/js/manifest.js`\n      }, {\n        from: '/web/static/js/vender_(.+).js',\n        to: `http://${config.ip}:${port}/static/js/vender.js`\n      }, {\n        from: '/web/static/css/vender_(.+).css',\n        to: `http://${config.ip}:${port}/static/css/vender.css`\n      }, {\n        from: `/web/static/css/${cml.config.get().projectName}_(.+).css`,\n        to: `http://${config.ip}:${port}/static/css/${cml.config.get().projectName}.css`\n      }];\n      // 启动代理服务\n      proxy.createProxy({\n        devServer: `http://${config.ip}:${port}/getkey/`,\n        caCertPath: path.join(cml.utils.getDevServerPath(), 'getkey'),\n        sslConnectInterceptor: (req, cltSocket, head) => true,\n        requestInterceptor: (rOptions, req, res, ssl, next) => {\n          var fullUrl = rOptions.protocol + '//' + rOptions.hostname + rOptions.path;\n          var maplist = proxyObj.mapremote || [];\n          maplist = defaultMap.concat(maplist);\n          cml.log.notice(fullUrl + '\\n');\n          if (maplist) {\n            maplist.forEach((item) => {\n              if (new RegExp(item.from).test(fullUrl)) {\n                /* eslint-disable-next-line */\n                var srcObj = url.parse(fullUrl);\n                /* eslint-disable-next-line */\n                var desObj = url.parse(item.to);\n                rOptions.host = desObj.host;\n                rOptions.hostname = desObj.hostname;\n                rOptions.port = desObj.port;\n                rOptions.protocol = desObj.protocol;\n                rOptions.path = desObj.pathname + '?' + (desObj.query || '') + '&' + (srcObj.query || '');\n                rOptions.pathname = desObj.pathname;\n                rOptions.agent = false;\n              }\n            });\n          }\n          next();\n        }\n      });\n    }\n    _resolve()\n  }\n\n  return readyPromise\n\n}\n\nfunction updateServerTpl() {\n  let serverPath = cml.utils.getDevServerPath();\n  let serverVersionFile = path.resolve(serverPath, '.server/server-tpl-verison.json');\n  /* eslint-disable-next-line */\n  let tplVersion = require(tpl['package']).version;\n  if (cml.utils.isFile(serverVersionFile)) {\n    let version = require(serverVersionFile).version;\n    if (version === tplVersion) {\n      return;\n    }\n  }\n  fse.copySync(tpl.serverTpl, serverPath);\n  fse.outputFileSync(serverVersionFile, `{\"version\": \"${tplVersion}\"}`);\n}\n"
  },
  {
    "path": "packages/chameleon-tool/commanders/web/dynamicApiMiddleware.js",
    "content": "const glob = require('glob');\nconst path = require('path');\n\n\nfunction getJsFiles(dir) {\n  return glob.sync('**/*.js', {\n    cwd: dir,\n    nodir: true,\n    realpath: true\n  });\n}\n\n\nmodule.exports = function (app, options) {\n  app.use(function (req, res, next) {\n    const controllerFiles = getJsFiles(path.join(options.root, 'mock/api'));\n    let self = this;\n    let reqPath = req.path;\n    let reqMethod = req.method.toLowerCase();\n    let query = req.query;\n    for (let j = 0; j < controllerFiles.length; j++) {\n      let file = controllerFiles[j];\n      delete require.cache[file];\n      let apis = require(file);\n      let domainKey = query.domainKey;\n      if (!Array.isArray(apis)) {\n        apis = [apis];\n      }\n      let controller = [];\n      apis.forEach(item => {\n        if (!item.domainKey) {\n          if (!domainKey) {\n            controller = controller.concat(item);\n          }\n        } else if (domainKey === item.domainKey) {\n          controller = controller.concat(item.request);\n        }\n      })\n\n      for (let i = 0; i < controller.length; i++) {\n        let item = controller[i];\n\n        let method = item.method || ['get', 'post'];\n\n        if (typeof method === 'string') {\n          method = [method];\n        }\n        if (~method.indexOf(reqMethod) && item.path === reqPath) {\n          return item.controller.call(self, req, res, next);\n        }\n      }\n    }\n    return next();\n  })\n}\n"
  },
  {
    "path": "packages/chameleon-tool/commanders/web/index.js",
    "content": "\nexports.name = 'web';\nexports.usage = '[command] [options]';\nexports.desc = 'tools for the web project';\n\n/* istanbul ignore next */\nexports.register = function (commander) {\n  commander\n    .option('-r, --root [root]', 'specify project root')\n    .option('-n, --nopreview ', \"don't auto open preview\")\n    .action(function (...args) {\n      /* eslint-disable */\n      cml.log.startBuilding();\n      const inquirer = require('inquirer');\n      const utils = require('../utils.js');\n      /* eslint-disable */\n      cml.utils.checkProjectConfig();\n      // 不能删除\n      var options = args.pop(); // eslint-disable-line\n\n      var cmd = args.shift();\n\n      if (cmd) {\n        handlerCmd(cmd);\n      } else {\n        let questions = [{\n          type: 'list',\n          name: 'type',\n          message: 'Which do you want to do?',\n          choices: [\n            'dev',\n            'build'\n          ]\n        }]\n        inquirer.prompt(questions).then(answers => {\n          handlerCmd(answers.type)\n        })\n      }\n\n      function handlerCmd(cmd) {\n        cml.media = cmd;\n        utils.startReleaseOne(cmd, 'web');\n      }\n\n\n    })\n  commander.on('--help', function() {\n    var cmd = `\n  Commands:\n    dev     develop the project for web\n    build   build the project for web\n  Examples:\n    cml web dev\n    cml web build\n    `\n    console.log(cmd)\n  })\n\n\n}\n"
  },
  {
    "path": "packages/chameleon-tool/commanders/web/liveload-dev-client.js",
    "content": "/* eslint-disable */\nrequire('eventsource-polyfill')\nvar hotClient = require('webpack-liveload-middleware/client')\n\n"
  },
  {
    "path": "packages/chameleon-tool/commanders/web/php_cgi_middleware.js",
    "content": "\n\nvar phpcgi = require('node-phpcgi');\n\nmodule.exports = function(root) {\n  return phpcgi({\n    documentRoot: root,\n    entryPoint: '/index.php',\n    includePath: '/',\n    handler: 'php-cgi'\n  })\n}\n"
  },
  {
    "path": "packages/chameleon-tool/commanders/web/responseTime.js",
    "content": "module.exports = function () {\n  return function (req, res, next) {\n    if (~req.originalUrl.indexOf('__webpack')) {\n      cml.log.debug(req.originalUrl + ': start')\n    }\n    req._startTime = new Date() // 获取时间 t1\n\n    var calResponseTime = function () {\n      var now = new Date(); // 获取时间 t2\n      var deltaTime = now - req._startTime;\n      cml.log.debug(req.originalUrl + ':' + deltaTime + 'ms');\n    }\n\n    res.once('finish', calResponseTime);\n    res.once('close', calResponseTime);\n    return next();\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-tool/commanders/web/web-socket.js",
    "content": "var WebSocketServer = require('ws').Server;\n// 连接池\nvar clients = [];\nvar staticParams = {};\n\nexports.broadcast = function broadcast(message) {\n  clients.forEach(function(ws1) {\n    cml.log.debug('[web liveload send] ' + message)\n    try {\n      ws1.send(message);\n    } catch (e) {\n      cml.log.debug('[web liveload] broadcast err')\n      let index = clients.indexOf(ws1);\n      if (index !== -1) {\n        clients.splice(index, 1);\n      }\n    }\n  })\n}\n\n\nexports.startServer = function startServer (options) {\n  const server = options.server;\n  var wss = new WebSocketServer({server});\n  wss.on('connection', function(ws) {\n    clients = [];\n    clients.push(ws);\n    exports.initRouter();\n    ws.on('close', function(message) {\n      cml.log.debug('[web liveload] close');\n    });\n  });\n}\nexports.initRouter = function initRouter() {\n  let routeList = exports.getRouteConfig();\n  exports.broadcast(routeList);\n}\nexports.getRouteConfig = function getRouteConfig() {\n  let {routerConfig, hasError} = cml.utils.getRouterConfig();\n  if (!hasError) {\n    routerConfig.routes = routerConfig.routes.filter((item) => {\n      let usedPlatforms = item.usedPlatforms;\n      return (!usedPlatforms || (usedPlatforms && usedPlatforms.includes('web')) || (usedPlatforms && usedPlatforms.includes('weex')))\n    })\n    routerConfig = Object.assign(routerConfig, staticParams);// {weexBundles,subpath}\n    return JSON.stringify(routerConfig);\n  }\n}\nexports.createRoutesReact = function createRoutesReact(options) {\n  staticParams = options.staticParams;\n  exports.startServer(options);\n  cml.event.removeAllListeners('routerchange');\n  cml.event.on('routerchange', function() {\n    let routeList = exports.getRouteConfig();\n    if (routeList) {\n      exports.broadcast(routeList)\n    }\n  })\n}\n"
  },
  {
    "path": "packages/chameleon-tool/commanders/weex/index.js",
    "content": "\nexports.name = 'weex';\nexports.usage = '[command] [options]';\nexports.desc = 'tools for the weex project';\n\n/* istanbul ignore next */\nexports.register = function (commander) {\n  commander\n    .option('-r, --root [root]', 'specify project root')\n    .option('-n, --nopreview ', \"don't auto open preview\")\n    .action(function (...args) {\n      cml.utils.checkProjectConfig();\n      /* eslint-disable */\n      cml.log.startBuilding();\n      const inquirer = require('inquirer');\n      const utils = require('../utils.js');\n      /* eslint-disable */\n      // 不能删除\n      var options = args.pop(); // eslint-disable-line\n\n      var cmd = args.shift();\n\n      if (cmd) {\n        handlerCmd(cmd);\n      } else {\n        let questions = [{\n          type: 'list',\n          name: 'type',\n          message: 'Which do you want to do?',\n          choices: [\n            'dev',\n            'build',\n            'proxy'\n          ]\n        }]\n        inquirer.prompt(questions).then(answers => {\n          handlerCmd(answers.type)\n        })\n      }\n\n      function handlerCmd(cmd) {\n        cml.media = cmd;\n        utils.startReleaseOne(cmd, 'weex');\n\n      }\n\n\n    })\n  commander.on('--help', function() {\n    var cmd = `\n  Commands:\n    dev     develop the project for weex \n    build   build the project for weex \n  Examples:\n    cml weex dev\n    cml weex build\n    `\n    console.log(cmd)\n  })\n\n}\n\n"
  },
  {
    "path": "packages/chameleon-tool/commanders/weex/socket-server.js",
    "content": "var WebSocketServer = require('ws').Server;\nvar utils = require('../../configs/utils.js');\n\n// 连接池\nvar clients = [];\n\nfunction broadcast(message) {\n  clients.forEach(function(ws1) {\n    cml.log.debug('[weex liveload send] ' + message)\n    try {\n      ws1.send(message);\n    } catch (e) {\n      cml.log.debug('[weex liveload] broadcast err')\n      let index = clients.indexOf(ws1);\n      if (index !== -1) {\n        clients.splice(index, 1);\n      }\n    }\n  })\n}\n\n\nfunction startServer (options) {\n  var port = utils.getFreePort().weexLiveLoadPort;\n  var wss = new WebSocketServer({port: port});\n  cml.log.debug('start weex liveload at port:' + port);\n  wss.on('connection', function(ws) {\n    cml.log.debug('[weex liveload] connection')\n    // 将该连接加入连接池\n    clients.push(ws);\n    ws.on('message', function(message) {\n      cml.log.debug('[weex liveload] message');\n      cml.log.debug(message);\n    });\n\n    ws.on('close', function(message) {\n      cml.log.debug('[weex liveload] close');\n\n      // 连接关闭时，将其移出连接池\n      clients = clients.filter(function(ws1) {\n        return ws1 !== ws\n      })\n    });\n  });\n}\n\nmodule.exports = {\n  startServer,\n  broadcast\n}\n"
  },
  {
    "path": "packages/chameleon-tool/commanders/wx/index.js",
    "content": "exports.name = 'wx';\nexports.usage = '[command] [options]';\nexports.desc = 'tools for the weixin miniprogram project';\n\n/* istanbul ignore next */\nexports.register = function (commander) {\n  commander\n    .option('-r, --root [root]', 'specify project root')\n    .option('-n, --nopreview ', \"don't auto open preview\")\n    .action(function (...args) {\n      cml.utils.checkProjectConfig();\n      /* eslint-disable */\n      cml.log.startBuilding();\n      const inquirer = require('inquirer');\n      const utils = require('../utils.js');\n      /* eslint-disable */\n      // 不能删除\n      var options = args.pop(); // eslint-disable-line\n      var cmd = args.shift();\n      if (cmd) {\n        handlerCmd(cmd);\n      } else {\n        let questions = [{\n          type: 'list',\n          name: 'type',\n          message: 'Which do you want to do?',\n          choices: [\n            'dev',\n            'build'\n          ]\n        }]\n        inquirer.prompt(questions).then(answers => {\n          handlerCmd(answers.type)\n        })\n      }\n\n      function handlerCmd (cmd) {\n        cml.media = cmd;\n        utils.startReleaseOne(cmd, 'wx');\n      }\n\n    })\n\n  commander.on('--help', function() {\n    var cmd = `\n  Commands:\n    dev      develop the project for weixin miniprogram\n    build    build the project for weixin miniprogram\n  Examples:\n    cml wx dev\n    cml wx build\n    `\n    console.log(cmd)\n  })\n\n}\n\n"
  },
  {
    "path": "packages/chameleon-tool/configs/cml-loader.conf.js",
    "content": "var utils = require('./utils')\n\n\nmodule.exports = function ({type, hot, disableExtract, media, mode}) {\n  let extract = hot !== true && disableExtract !== true;\n  return {\n    loaders: utils.cssLoaders({\n      sourceMap: false,\n      extract,\n      type,\n      media,\n      mode\n    })\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/component_export/dependencies.js",
    "content": "\nconst fs = require('fs');\nconst path = require('path');\n\nclass Dependencies {\n  constructor() {\n    this.dependencies = {\n      \"babel-preset-flow\": \"\",\n      \"chameleon-css-loader\": \"\",\n      \"chameleon-mixins\": \"\",\n      \"interface-loader\": \"\"\n    };\n    this.initDependency();\n  }\n\n  initDependency() {\n    let modules = Object.keys(this.dependencies);\n    let packages = fs.readFileSync(`${path.resolve(cml.root, 'package.json')}`);\n    packages = JSON.parse(packages);\n    let dependencies = packages.dependencies\n    modules.forEach(item => {\n      this.dependencies[item] = dependencies[item];\n    })\n  }\n\n  addDependency(name, version) {\n    this.dependencies[name] = version;\n  }\n\n  addDependencyByPath(path) {\n    let pathArr = path.split('node_modules');\n    let npmName = pathArr[1].split('/').filter(item => item !== '');\n    npmName = npmName[0];\n    let json = fs.readFileSync(`${pathArr[0]}node_modules/${npmName}/package.json`);\n    json = JSON.parse(json);\n    this.dependencies[npmName] = json.version;\n  }\n\n  getDependencies() {\n    return JSON.stringify(this.dependencies, null, 2);\n  }\n}\n\nmodule.exports = new Dependencies();\n"
  },
  {
    "path": "packages/chameleon-tool/configs/component_export/export-loader.js",
    "content": "\nconst loaderUtils = require('loader-utils');\nconst { getExportFileName } = require('./utils');\nconst dependencies = require('./dependencies');\nconst cmlCssLoader = require('chameleon-css-loader');\n\nmodule.exports = function(content) {\n  let options = loaderUtils.getOptions(this);\n  if (options.mode === 'production') {\n    // 导出生产环境组件不处理\n    return content;\n  }\n  let modules = this._compiler.options.resolve.modules;\n  if (inNodeModules(this.resourcePath, modules)) {\n    // 不导出node_modules的内容\n    dependencies.addDependencyByPath(this.resourcePath);\n    return content;\n  }\n  //  可能会做替换\n  let exportContent = content;\n  let fileName = getExportFileName(this.resourcePath, this._compiler.options);\n  if (/.vue\\?__export$/.test(fileName)) {\n    exportContent = replaceCmlPath(exportContent, fileName, this._compiler.options);\n    exportContent = replaceCmss(exportContent, {\n      platform: options.platform\n    })\n  }\n  this.emitFile(fileName, exportContent);\n\n  if (options && options.fileType === 'assets') {\n    // 将文件内容置空，避免报错\n    content = \"\";\n  }\n\n  return content;\n}\n\nfunction inNodeModules(target, modules) {\n  return modules.some(item => target.indexOf(item) !== -1 && !(/(chameleon-ui|chameleon-ui-builtin)/.test(target)))\n}\n\n\nfunction replaceCmlPath(content, filename, options) {\n  let filePrefix = filename.replace(/(.+?)\\//g, '../').replace(/[^\\/]{0,}$/, '');\n  // 替换chameleon-ui/chameleon-ui-builtin路径\n  content = content.replace(/import (.+?) from ('|\")(.+?)(chameleon-ui-builtin|chameleon-ui)(.+?)\\.(web|weex)?.cml('|\")/g, `import $1 from $2${filePrefix}$4$5.vue$7`);\n  // 替换子组件路径\n  let components = content.match(/import (.+?) from ('|\")(.+?).cml('|\")/g);\n  if (!components) {\n    return content;\n  }\n  components = components.map(item => {\n    let o = {};\n    o.old = item;\n    o[\"new\"] = componentsPathHandle(item);\n    return o;\n  })\n  components.forEach(item => {\n    content = content.replace(item.old, item[\"new\"]);\n  });\n  return content;\n\n  function componentsPathHandle(oldPath) {\n    let filePath = oldPath.replace(/import (.+?) from ('|\")(.+?).cml('|\")/, \"$3.cml\");\n    let relative = getExportFileName(filePath, options);\n    let relativeArr = relative.split('/');\n    let fileArr = filename.split('/');\n    let prefix = '';\n    let outPath = '';\n    if (relativeArr[0] !== fileArr[0]) {\n      prefix = '../'.repeat(fileArr.length - 1);\n      outPath = prefix + relativeArr.join('/');\n    } else {\n      for (let i = 0, l = fileArr.length - 1, rl = relativeArr.length - 1; i < l && i < rl; i++) {\n        if (relativeArr[i] === fileArr[i]) {\n          relativeArr[i] = '';\n          fileArr[i] = '';\n        } else {\n          break;\n        }\n      }\n      relativeArr = relativeArr.filter(item => item !== '')\n      fileArr = relativeArr.filter(item => item !== '')\n      outPath = (fileArr.length === 1 ? './' : '../'.repeat(fileArr.length - 1)) + relativeArr.join('/');\n    }\n    outPath = outPath.replace('?__export', '');\n    return oldPath.replace(/import (.+?) from ('|\")(.+?).cml('|\")/, `import $1 from \"${outPath}\"`);\n  }\n}\n\nfunction replaceCmss(content, options) {\n  let style = cml.utils.splitParts({\n    content\n  }).style;\n  options = {\n    ...options,\n    ...cml.config.get().cmss\n  }\n  style.forEach(item => {\n    let newContent = cmlCssLoader(item.content, options);\n    content = content.replace(item.content, newContent);\n  })\n  return content;\n}\n\n\n"
  },
  {
    "path": "packages/chameleon-tool/configs/component_export/exportPlugin.js",
    "content": "const fse = require('fs-extra')\nconst path = require('path')\nconst dependencies = require('./dependencies');\n\nclass ExportPlugin {\n  constructor(opts) {\n    this.exportType = opts.exportType;\n    this.mode = opts.mode;\n    this.dependency = {};\n  }\n\n  apply(compiler) {\n    const exportType = this.exportType;\n    if (this.mode === 'production') {\n      if (compiler.hooks) {\n        compiler.hooks.afterEmit.tapAsync('export-plugin', emitCommonFile);\n      } else {\n        compiler.plugin('after-emit', emitCommonFile);\n      }\n    } else if (this.mode === 'develop') {\n      if (compiler.hooks) {\n        compiler.hooks.shouldEmit.tap('export-plugin', shouldEmit);\n      } else {\n        compiler.plugin('should-emit', shouldEmit);\n      }\n    }\n    function emitCommonFile(compilation, cb) {\n      let { options } = compilation;\n      if (exportType === 'web') {\n        fse.copySync(path.resolve(__dirname, '../web_global.css'), path.resolve(options.output.path, \"common/web_global.css\"));\n        fse.copySync(path.resolve(__dirname, '../web_global.js'), path.resolve(options.output.path, \"common/web_global.js\"));\n      }\n      cb && cb();\n    }\n\n    function shouldEmit(compilation) {\n      let { assets, options } = compilation;\n      for (let key in assets) {\n        if (assets.hasOwnProperty(key)) {\n          if (/\\?__export$/.test(key)) {\n            assets[key.replace(/\\?__export$/, '')] = assets[key];\n          }\n          delete assets[key];\n        }\n      }\n      if (exportType === 'web') {\n        fse.copySync(path.resolve(__dirname, '../web_global.css'), path.resolve(options.output.path, \"common/web_global.css\"));\n        fse.copySync(path.resolve(__dirname, '../web_global.js'), path.resolve(options.output.path, \"common/web_global.js\"));\n        fse.copySync(path.resolve(__dirname, './webpack.web.config.js'), path.resolve(options.output.path, \"build/webpack.cml.config.js\"));\n      }\n      if (exportType === 'weex') {\n        fse.copySync(path.resolve(__dirname, './webpack.weex.config.js'), path.resolve(options.output.path, \"build/webpack.cml.config.js\"));\n      }\n      fse.writeFileSync(`${options.output.path}/dependencies.json`, dependencies.getDependencies())\n      return true;\n    }\n  }\n\n}\n\nmodule.exports = ExportPlugin;\n"
  },
  {
    "path": "packages/chameleon-tool/configs/component_export/getMiniAppExportConfig.js",
    "content": "\n\nvar merge = require('webpack-merge');\nconst CleanWebpackPlugin = require('clean-webpack-plugin')\nvar path = require('path');\n\nmodule.exports = function (config, options) {\n  let { type, root, externals } = options;\n  let outputPath = options.outputPath || path.resolve(root, `dist/export/${type}`);\n  if (externals) {\n    Object.keys(externals).forEach(key => {\n      externals[key] = `require('${externals[key]}')`;\n    })\n  }\n  return merge(config, {\n    output: {\n      path: outputPath\n    },\n    externals,\n    plugins: [\n      new CleanWebpackPlugin(['./*'], {root: outputPath, verbose: false})\n    ]\n  })\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/component_export/getWebExportConfig.js",
    "content": "\n\nconst path = require('path');\nconst webpack = require('webpack');\nconst BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;\nconst { getBabelPath, getGlobalCheckWhiteList, styleLoaders, getWebEntry } = require('../utils');\nvar ExtractTextPlugin = require('cml-extract-css-webpack-plugin')\nvar UglifyJsPlugin = require('uglifyjs-webpack-plugin')\nvar OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')\nconst ChameleonWebpackPlugin = require('chameleon-webpack-plugin')\nconst WebpackCheckPlugin = require('webpack-check-plugin')\nconst getCmlLoaderConfig = require('../cml-loader.conf');\nconst ExportPlugin = require('./exportPlugin');\nconst CleanWebpackPlugin = require('clean-webpack-plugin');\n\nmodule.exports = function (options) {\n  let {\n    type,\n    media,\n    root,\n    disableExtract,\n    mode\n  } = options;\n\n  function getstaticPath(filetype) {\n    return options.hash ? `static/${filetype}/[name]_[hash:7].[ext]` : `static/${filetype}/[name].[ext]`;\n  }\n\n  function getJsPath() {\n    return options.hash ? '[name]_[chunkhash].js' : '[name].js'\n  }\n\n\n  // 组件导出路径\n  let outputPath = options.outputPath || path.resolve(root, 'dist/export/web');\n  // 资源公共路径\n  let publicPath;\n  if (mode === 'production' && !options.publicPath) {\n    throw new Error('导出生产环境模式组件必须设置publicPath')\n  }\n  publicPath = options.publicPath || '/';\n\n  var cmlLoaders = [{\n    loader: 'cml-vue-loader',\n    options: Object.assign(getCmlLoaderConfig({ type: 'web', disableExtract, media, mode }), {\n      postcss: {\n        config: {\n          path: path.join(cml.root, './configs/postcss/web/.postcssrc.js')\n        }\n      },\n      compilerModules: [\n        {\n          postTransformNode: el => {\n            // to convert vnode for weex components.\n            require('chameleon-vue-precompiler')()(el)\n          }\n        }\n      ]\n    })\n  },\n  {\n    loader: path.resolve(__dirname, './export-loader.js'),\n    options: {\n      mode\n    }\n  },\n  {\n    loader: 'chameleon-loader',\n    options: {\n      ...getCmlLoaderConfig({ type: 'web', disableExtract }),\n      cmlType: 'web',\n      media,\n      check: cml.config.get().check,\n      postcssMixins: cml.config.get().cmss // 传递给模板编译，处理web端内置style\n    }\n  }\n  ]\n\n  let { entry } = getWebEntry(options);\n  let commonConfig = {\n    context: path.resolve(root),\n    entry,\n    output: {\n      path: outputPath,\n      publicPath,\n      libraryTarget: \"umd\",\n      filename: getJsPath()\n    },\n    resolve: {\n      extensions: ['.cml', '.interface', '.vue', '.js'],\n      alias: {\n        '$ROUTER': path.resolve(root, '.temp/router.js')\n      },\n      modules: [\n        path.join(root, '/node_modules'),\n        path.join(cml.root, '/node_modules')\n      ]\n    },\n    resolveLoader: {\n      modules: [\n        path.join(root, '/node_modules'),\n        path.join(cml.root, '/node_modules')\n      ]\n    },\n    module: {\n      rules: [\n        {\n          test: /\\.js$/,\n          exclude: /(\\.min\\.js)/,\n          // exclude: /(node_modules|bower_components)/,\n          // 不能babel babel-runtime\n          include: getBabelPath(),\n          use: [{\n            loader: 'babel-loader',\n            options: {\n              'filename': path.join(cml.root, 'package.json')\n            }\n          },\n          {\n            loader: path.resolve(__dirname, './export-loader.js'),\n            options: {\n              mode\n            }\n          }\n          ]\n        },\n        {\n          test: /\\.(png|jpe?g|gif|svg)(\\?.*)?$/,\n          use: [\n            {\n              loader: 'chameleon-url-loader',\n              options: {\n                name: getstaticPath('img'),\n                fallback: mode === 'production' ? undefined : path.resolve(__dirname, './export-loader.js'),\n                fileType: 'assets',\n                mode\n              }\n            }\n          ]\n        },\n        {\n          test: /\\.(mp4|webm|ogg|mp3|wav|flac|aac)(\\?.*)?$/,\n          loader: 'file-loader',\n          options: {\n            name: getstaticPath('media'),\n            useRelativePath: mode !== 'production',\n            outputPath: function(url) {\n              return mode === 'production' ? url : url + '?__export';\n            }\n          }\n        },\n        {\n          test: /\\.(woff|woff2?|eot|ttf|otf)(\\?.*)?$/,\n          loader: 'file-loader',\n          options: {\n            name: getstaticPath('fonts'),\n            useRelativePath: mode !== 'production',\n            outputPath: function(url) {\n              return mode === 'production' ? url : url + '?__export';\n            }\n          }\n        },\n        {\n          test: /\\.interface$/,\n          // 不能babel babel-runtime\n          include: getBabelPath(),\n          use: [{\n            loader: 'babel-loader',\n            options: {\n              'filename': path.join(cml.root, 'package.json')\n            }\n          },\n          {\n            loader: 'interface-loader',\n            options: {\n              cmlType: type\n            }\n          },\n          {\n            loader: path.resolve(__dirname, './export-loader.js'),\n            options: {\n              mode\n            }\n          }\n          ]\n        },\n        ...styleLoaders({ type: 'web', extract: false, media }),\n        {\n          test: /\\.cml$/,\n          use: cmlLoaders\n        },\n        {\n          test: /\\.vue$/,\n          use: [{\n            loader: 'cml-vue-loader',\n            options: Object.assign(getCmlLoaderConfig({ type: 'web', disableExtract }), {\n              postcss: {\n                config: {\n                  path: path.join(cml.root, './configs/postcss/web/.postcssrc.js')\n                }\n              },\n              compilerModules: [\n                {\n                  postTransformNode: el => {\n                    require('chameleon-vue-precompiler')()(el)\n                  }\n                }\n              ]\n\n            })\n          }\n\n          ]\n        }\n      ]\n\n    },\n    plugins: [\n      new webpack.DefinePlugin({\n        'process.env.platform': JSON.stringify(type)\n      }),\n      new ExportPlugin({exportType: 'web', mode}),\n      new CleanWebpackPlugin(['./*'], {root: outputPath, verbose: false})\n    ]\n  }\n\n  if (cml.config.get().enableGlobalCheck === true) {\n    commonConfig.plugins.push(\n      new WebpackCheckPlugin({\n        cmlType: type,\n        whiteListFile: getGlobalCheckWhiteList()\n      })\n    )\n  }\n\n  if (options.definePlugin) {\n    commonConfig.plugins.push(new webpack.DefinePlugin(options.definePlugin))\n  }\n  if (options.analysis) {\n    commonConfig.plugins.push(new BundleAnalyzerPlugin())\n  }\n\n  if (options.minimize) {\n    commonConfig.plugins = commonConfig.plugins.concat([\n      new OptimizeCSSPlugin({\n        assetNameRegExp: /\\.css$/,\n        cssProcessorOptions: { safe: true, discardComments: { removeAll: true }, autoprefixer: false }\n      }),\n      new UglifyJsPlugin({})\n    ])\n  }\n\n  let moduleIdType = options.moduleIdType\n  let moduleIdMap = {\n    hash: new webpack.HashedModuleIdsPlugin(),\n    name: new webpack.NamedModulesPlugin(),\n    chameleon: new ChameleonWebpackPlugin({ openModuleHash: true, openChunkHash: true })\n  }\n\n  if (moduleIdType && moduleIdMap[moduleIdType]) {\n    commonConfig.plugins.push(moduleIdMap[moduleIdType])\n  }\n\n  if (disableExtract !== true || mode !== 'production') {\n    commonConfig.plugins.push(\n      new ExtractTextPlugin({\n        filename: options.hash ? 'static/css/[name]_[contenthash].css' : 'static/css/[name].css',\n        allChunks: true\n      })\n    )\n  }\n\n  return commonConfig;\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/component_export/getWebExportConfig_new.js",
    "content": "\nconst merge = require('webpack-merge')\nconst path = require('path');\nconst CleanWebpackPlugin = require('clean-webpack-plugin')\nconst getWebCommonConfig = require('../getWebCommonConfig.js')\nconst getCmlLoaderConfig = require('../cml-loader.conf');\nconst { styleLoaders, getBabelPath } = require('../utils');\nconst ExportPlugin = require('./exportPlugin');\nconst ExtractTextPlugin = require('cml-extract-css-webpack-plugin')\n\n\nmodule.exports = function(options) {\n  let {\n    media,\n    root,\n    disableExtract,\n    mode = 'production',\n    externals\n  } = options;\n\n  function getstaticPath(filetype) {\n    return `static/${filetype}/[name]_[hash:7].[ext]`;\n  }\n\n  function getJsPath() {\n    return options.hash ? '[name]_[chunkhash].js' : '[name].js'\n  }\n\n  // 组件导出路径\n  let outputPath = options.outputPath || path.resolve(root, 'dist/export/web');\n  // 资源公共路径\n  let publicPath = options.publicPath || '/';\n\n  var cmlLoaders = [{\n    loader: 'cml-vue-loader',\n    options: Object.assign(getCmlLoaderConfig({ type: 'web', disableExtract, media, mode }), {\n      postcss: {\n        config: {\n          path: path.join(cml.root, './configs/postcss/web/.postcssrc.js')\n        }\n      },\n      compilerModules: [\n        {\n          postTransformNode: el => {\n            // to convert vnode for weex components.\n            require('chameleon-vue-precompiler')()(el)\n          }\n        }\n      ]\n    })\n  },\n  {\n    loader: path.resolve(__dirname, './export-loader.js'),\n    options: {\n      mode,\n      platform: 'web'\n    }\n  },\n  {\n    loader: 'chameleon-loader',\n    options: {\n      ...getCmlLoaderConfig({ type: 'web', disableExtract }),\n      cmlType: 'web',\n      media,\n      check: cml.config.get().check,\n      cmss: cml.config.get().cmss // 传递给模板编译，处理web端内置style\n    }\n  }]\n\n  var exportConfig = {\n    output: {\n      path: outputPath,\n      publicPath,\n      libraryTarget: \"umd\",\n      filename: getJsPath()\n    },\n    module: {\n      rules: [\n        {\n          test: /\\.js$/,\n          exclude: /(\\.min\\.js)/,\n          // 不能babel babel-runtime\n          include: getBabelPath(),\n          use: [{\n            loader: 'babel-loader',\n            options: {\n              'filename': path.join(cml.root, 'package.json')\n            }\n          },\n          {\n            loader: path.resolve(__dirname, './export-loader.js'),\n            options: {\n              mode\n            }\n          }\n          ]\n        },\n        {\n          test: /\\.(png|jpe?g|gif|svg)(\\?.*)?$/,\n          use: [\n            {\n              loader: 'chameleon-url-loader',\n              options: {\n                name: getstaticPath('img'),\n                fallback: mode === 'production' ? undefined : path.resolve(__dirname, './export-loader.js'),\n                fileType: 'assets',\n                mode\n              }\n            }\n          ]\n        },\n        {\n          test: /\\.(mp4|webm|ogg|mp3|wav|flac|aac)(\\?.*)?$/,\n          loader: 'file-loader',\n          options: {\n            name: getstaticPath('media'),\n            useRelativePath: mode !== 'production',\n            outputPath: function(url) {\n              return mode === 'production' ? url : url + '?__export';\n            }\n          }\n        },\n        {\n          test: /\\.(woff|woff2?|eot|ttf|otf)(\\?.*)?$/,\n          loader: 'file-loader',\n          options: {\n            name: getstaticPath('fonts'),\n            useRelativePath: mode !== 'production',\n            outputPath: function(url) {\n              return mode === 'production' ? url : url + '?__export';\n            }\n          }\n        },\n        {\n          test: /\\.interface$/,\n          // exclude: /(node_modules|bower_components)/,\n          // 不能babel babel-runtime\n          include: getBabelPath(),\n          use: [{\n            loader: 'babel-loader',\n            options: {\n              'filename': path.join(cml.root, 'package.json')\n            }\n          },\n          {\n            loader: 'interface-loader',\n            options: {\n              cmlType: 'web'\n            }\n          },\n          {\n            loader: path.resolve(__dirname, './export-loader.js'),\n            options: {\n              mode\n            }\n          }]\n        },\n        ...styleLoaders({ type: 'web', extract: false, media }),\n        {\n          test: /\\.cml$/,\n          use: cmlLoaders\n        }\n      ]\n    },\n    plugins: [\n      new ExportPlugin({exportType: 'web', mode}),\n      new CleanWebpackPlugin(['./*'], {root: outputPath, verbose: false})\n    ]\n  }\n\n  if (disableExtract !== true) {\n    exportConfig.plugins.push(\n      new ExtractTextPlugin({\n        filename: options.hash ? '[name]_[contenthash].css' : '[name].css',\n        allChunks: true\n      })\n    )\n  }\n\n  if (externals) {\n    exportConfig.externals = externals;\n  }\n\n  return merge.smart(getWebCommonConfig(options), exportConfig);\n\n\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/component_export/getWeexExportConfig.js",
    "content": "\n\nconst path = require('path');\nconst webpack = require('webpack');\nconst {getBabelPath, getGlobalCheckWhiteList, styleLoaders, getWeexEntry} = require('../utils');\nvar UglifyJsPlugin = require('uglifyjs-webpack-plugin')\nvar OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')\nconst ChameleonWebpackPlugin = require('chameleon-webpack-plugin')\nconst BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;\nconst WebpackCheckPlugin = require('webpack-check-plugin')\nconst ExportPlugin = require('./exportPlugin');\nconst CleanWebpackPlugin = require('clean-webpack-plugin');\nconst getCmlLoaderConfig = require('../cml-loader.conf');\n\nmodule.exports = function (options) {\n  let {\n    type,\n    media,\n    root,\n    disableExtract,\n    mode\n  } = options;\n  let cmlLoaderConfig = getCmlLoaderConfig({type: 'weex', media, mode })\n\n  function getstaticPath(filetype) {\n    return options.hash ? `static/${filetype}/[name]_[hash:7].[ext]` : `static/${filetype}/[name].[ext]`;\n  }\n\n  function getJsPath() {\n    return options.hash ? '[name]_[chunkhash].js' : '[name].js'\n  }\n\n  // 组件导出路径\n  let outputPath = options.outputPath || path.resolve(root, 'dist/export/weex');\n  // 资源公共路径\n  let publicPath;\n  if (mode === 'production' && !options.publicPath) {\n    throw new Error('导出生产环境模式组件必须设置publicPath')\n  }\n  publicPath = options.publicPath || '/';\n\n  let cmlLoaders = [{\n    loader: 'chameleon-weex-vue-loader',\n    options: {\n      ...cmlLoaderConfig,\n      esModule: true\n    }\n  },\n  {\n    loader: path.resolve(__dirname, './export-loader.js'),\n    options: {\n      mode\n    }\n  },\n  {\n    loader: 'chameleon-loader',\n    options: { ...cmlLoaderConfig,\n      cmlType: 'weex',\n      media,\n      check: cml.config.get().check\n    }\n  }]\n  let commonConfig = {\n    entry: getWeexEntry(options),\n    context: path.resolve(root),\n    output: {\n      path: outputPath,\n      publicPath,\n      libraryTarget: \"umd\",\n      filename: getJsPath()\n    },\n    resolve: {\n      extensions: ['.cml', '.interface', '.vue', '.js'],\n      alias: {\n      },\n      modules: [\n        path.join(root, '/node_modules'),\n        path.join(cml.root, '/node_modules')\n      ]\n    },\n    resolveLoader: {\n      modules: [\n        path.join(root, '/node_modules'),\n        path.join(cml.root, '/node_modules')\n      ]\n    },\n    module: {\n      rules: [\n        {\n          test: /\\.js$/,\n          exclude: /(\\.min\\.js)/,\n          //不能babel babel-runtime\n          include: getBabelPath(),\n          use: [{\n            loader: 'babel-loader',\n            options: {\n              'filename': path.join(chameleon.root, 'package.json') \n            }\n          },\n          {\n            loader: path.resolve(__dirname, './export-loader.js'),\n            options: {\n              mode\n            }\n          }\n          ]\n        },\n        {\n          test: /\\.(png|jpe?g|gif|svg)(\\?.*)?$/,\n          loader: 'chameleon-url-loader',\n          options: {\n            name: getstaticPath('img'),\n            fallback: mode === 'production' ? undefined :path.resolve(__dirname, './export-loader.js'),\n            fileType: 'assets',\n            mode\n          }\n        },\n        {\n          test: /\\.(png|jpe?g|gif|svg)(\\?.*)?$/,\n          loader: 'chameleon-url-loader',\n          options: {\n            name: getstaticPath('img')\n          }\n        },\n        {\n          test: /\\.(mp4|webm|ogg|mp3|wav|flac|aac)(\\?.*)?$/,\n          loader: 'file-loader',\n          options: {\n            name: getstaticPath('media')\n          }\n        },\n        {\n          test: /\\.(woff|woff2?|eot|ttf|otf)(\\?.*)?$/,\n          loader: 'file-loader',\n          options: {\n            name: getstaticPath('fonts')\n          }\n        },\n        {\n          test: /\\.interface$/,\n          // exclude: /(node_modules|bower_components)/,\n          // 不能babel babel-runtime\n          include: getBabelPath(),\n          use: [{\n            loader: 'babel-loader',\n            options: {\n              name: getstaticPath('media'),\n              useRelativePath: mode === 'production' ? false : true,\n              outputPath: function(url) {\n                return mode === 'production' ? url : url + '?__export';\n              }\n            }\n          }]\n        },\n        {\n          test: /\\.(woff|woff2?|eot|ttf|otf)(\\?.*)?$/,\n          loader: 'file-loader',\n          options: {\n            name: getstaticPath('fonts'),\n            useRelativePath: mode === 'production' ? false : true,\n            outputPath: function(url) {\n              return mode === 'production' ? url : url + '?__export';\n            }\n          }\n        },\n        {\n          test: /\\.interface$/,\n          // exclude: /(node_modules|bower_components)/,\n          //不能babel babel-runtime\n          include: getBabelPath(),\n          use: [{\n            loader: 'babel-loader',\n            options: {\n              'filename': path.join(cml.root, 'package.json')\n            }\n          }]\n        },\n        {\n          loader: path.resolve(__dirname, './export-loader.js'),\n          options: {\n            mode\n          }\n        },\n        {\n          loader: 'interface-loader',\n          options: {\n            cmlType: type,\n            media\n          }\n        },\n        ...styleLoaders({type: 'weex', extract: false, media}),\n        {\n          test: /\\.cml$/,\n          use: cmlLoaders\n        },\n        {\n          test: /\\.vue$/,\n          use: [{\n            loader: 'chameleon-weex-vue-loader',\n            options: cmlLoaderConfig\n          }]\n        }\n      ]\n    },\n    plugins: [\n      new webpack.BannerPlugin({\n        banner: '// { \"framework\": \"Vue\"} \\n',\n        raw: true,\n        exclude: 'Vue'\n      }),\n      new webpack.DefinePlugin({\n        'process.env.platform': JSON.stringify(type)\n      }),\n      new ExportPlugin({exportType: 'weex', mode}),\n      new CleanWebpackPlugin(['./*'], {root: outputPath, verbose: false})\n    ]\n  }\n  if (cml.config.get().enableGlobalCheck === true) {\n    commonConfig.plugins.push(\n      new WebpackCheckPlugin({\n        cmlType: type,\n        whiteListFile: getGlobalCheckWhiteList()\n      })\n    )\n  }\n\n  if (options.definePlugin) {\n    commonConfig.plugins.push(new webpack.DefinePlugin(options.definePlugin))\n  }\n\n  if (options.analysis) {\n    commonConfig.plugins.push(new BundleAnalyzerPlugin())\n  }\n\n  if (options.minimize) {\n    commonConfig.plugins = commonConfig.plugins.concat([\n      new OptimizeCSSPlugin({\n        assetNameRegExp: /\\.css$/,\n        cssProcessorOptions: { safe: true, discardComments: { removeAll: true }, autoprefixer: false }\n      }),\n      new UglifyJsPlugin({})\n    ])\n  }\n\n  let moduleIdType = options.moduleIdType\n  let moduleIdMap = {\n    hash: new webpack.HashedModuleIdsPlugin(),\n    name: new webpack.NamedModulesPlugin(),\n    chameleon: new ChameleonWebpackPlugin({openModuleHash: true, openChunkHash: true})\n  }\n  if (moduleIdType && moduleIdMap[moduleIdType]) {\n    commonConfig.plugins.push(moduleIdMap[moduleIdType])\n  }\n\n  return commonConfig;\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/component_export/getWeexExportConfig_new.js",
    "content": "\nconst merge = require('webpack-merge');\nconst path = require('path');\nconst CleanWebpackPlugin = require('clean-webpack-plugin');\nconst getWeexCommonConfig = require('../getWeexCommonConfig');\nconst { styleLoaders, getBabelPath } = require('../utils');\nconst getCmlLoaderConfig = require('../cml-loader.conf');\nconst ExportPlugin = require('./exportPlugin');\n\nmodule.exports = function(options) {\n  let {\n    media,\n    root,\n    mode = 'production',\n    externals\n  } = options;\n\n\n  function getstaticPath(filetype) {\n    return `static/${filetype}/[name]_[hash:7].[ext]`;\n  }\n\n  function getJsPath() {\n    return options.hash ? '[name]_[chunkhash].js' : '[name].js'\n  }\n\n  // 组件导出路径\n  let outputPath = options.outputPath || path.resolve(root, 'dist/export/weex');\n  // 资源公共路径\n  let publicPath = options.publicPath || '/';\n\n  let cmlLoaderConfig = getCmlLoaderConfig({type: 'weex', media, mode });\n\n  let cmlLoaders = [{\n    loader: 'chameleon-weex-vue-loader',\n    options: {\n      ...cmlLoaderConfig,\n      esModule: true\n    }\n  },\n  {\n    loader: path.resolve(__dirname, './export-loader.js'),\n    options: {\n      mode,\n      platform: 'weex'\n    }\n  },\n  {\n    loader: 'chameleon-loader',\n    options: { ...cmlLoaderConfig,\n      cmlType: 'weex',\n      media,\n      check: cml.config.get().check\n    }\n  }]\n\n  const exportConfig = {\n    output: {\n      path: outputPath,\n      publicPath,\n      libraryTarget: \"umd\",\n      filename: getJsPath()\n    },\n    module: {\n      rules: [\n        {\n          test: /\\.js$/,\n          exclude: /(\\.min\\.js)/,\n          // 不能babel babel-runtime\n          include: getBabelPath(),\n          use: [{\n            loader: 'babel-loader',\n            options: {\n              'filename': path.join(cml.root, 'package.json')\n            }\n          },\n          {\n            loader: path.resolve(__dirname, './export-loader.js'),\n            options: {\n              mode\n            }\n          }\n          ]\n        },\n        {\n          test: /\\.(png|jpe?g|gif|svg)(\\?.*)?$/,\n          use: [\n            {\n              loader: 'chameleon-url-loader',\n              options: {\n                name: getstaticPath('img'),\n                fallback: mode === 'production' ? undefined :path.resolve(__dirname, './export-loader.js'),\n                fileType: 'assets',\n                mode\n              }\n            }\n          ]\n        },\n        {\n          test: /\\.(mp4|webm|ogg|mp3|wav|flac|aac)(\\?.*)?$/,\n          loader: 'file-loader',\n          options: {\n            name: getstaticPath('media'),\n            useRelativePath: mode === 'production' ? false : true,\n            outputPath: function(url) {\n              return mode === 'production' ? url : url + '?__export';\n            }\n          }\n        },\n        {\n          test: /\\.(woff|woff2?|eot|ttf|otf)(\\?.*)?$/,\n          loader: 'file-loader',\n          options: {\n            name: getstaticPath('fonts'),\n            useRelativePath: mode === 'production' ? false : true,\n            outputPath: function(url) {\n              return mode === 'production' ? url : url + '?__export';\n            }\n          }\n        },\n        {\n          test: /\\.interface$/,\n          // 不能babel babel-runtime\n          include: getBabelPath(),\n          use: [{\n            loader: 'babel-loader',\n            options: {\n              'filename': path.join(cml.root, 'package.json')\n            }\n          },\n          {\n            loader: 'interface-loader',\n            options: {\n              cmlType: 'weex'\n            }\n          },\n          {\n            loader: path.resolve(__dirname, './export-loader.js'),\n            options: {\n              mode\n            }\n          }]\n        },\n        ...styleLoaders({ type: 'weex', extract: false, media }),\n        {\n          test: /\\.cml$/,\n          use: cmlLoaders\n        }\n      ]\n    },\n    plugins: [\n      new ExportPlugin({exportType: 'weex', mode}),\n      new CleanWebpackPlugin(['./*'], {root: outputPath, verbose: false})\n    ]\n  }\n\n  if (externals) {\n    exportConfig.externals = externals;\n  }\n\n  return merge.smart(getWeexCommonConfig(options), exportConfig)\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/component_export/postcssPlugin.js",
    "content": "const postcss = require('postcss');\nconst path = require('path');\nconst { getExportFileName } = require('./utils');\nconst fs = require('fs');\n\nmodule.exports = postcss.plugin('postcss-export', function(opts) {\n  return function(root, result) {\n    emitCss(root, result.opts);\n  }\n})\n\nfunction emitCss(root, options) {\n  let { file, webpack } = options;\n  root.walkAtRules(rule => {\n    // slice去掉\"\"\n    if (rule.name === \"import\") {\n      let resourcePath = path.resolve(file.dirname, rule.params.slice(1, -1));\n      let exportFileName = getExportFileName(resourcePath, webpack.options);\n      let content = fs.readFileSync(resourcePath);\n      webpack.emitFile(exportFileName, content);\n      // 递归依赖\n      let cRoot = postcss.parse(content, {});\n      emitCss(cRoot, {\n        file: {\n          extname: path.extname(resourcePath),\n          dirname: path.dirname(resourcePath),\n          basename: path.basename(resourcePath)\n        },\n        webpack\n      })\n    }\n  })\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/component_export/utils.js",
    "content": "\n\nexports.getExportFileName = function(resourcePath, options) {\n\n  if (/node_modules\\/(chameleon-ui|chameleon-ui-builtin)/.test(resourcePath)) {\n    let result = resourcePath.replace(/(.+?)(chameleon-ui|chameleon-ui-builtin)(.+)/, \"$2$3\");\n    result = result.replace(/(\\.(web|weex))?\\.cml$/, '.vue');\n    result = result.replace(/\\.interface$/, `.interface.js`);\n    return result + '?__export';\n  }\n\n\n  let { context, entry} = options;\n  let entryKeys = Object.keys(entry);\n  resourcePath = resourcePath.replace(context + '/', '');\n  let minDepth = 1000;\n  let minFilePath = [];\n  for (let i = 0, l = entryKeys.length; i < l; i++) {\n    let { currentDepth, minPath } = getFileDepth(entry[entryKeys[i]].replace(context + '/', '').split(entryKeys[i])[0], resourcePath.replace(context + '/', ''));\n    if (currentDepth < minDepth) {\n      minFilePath = minPath;\n      minDepth = currentDepth;\n    }\n  }\n  let result = minFilePath.join('/');\n  result = result.replace(/(\\.(web|weex))?\\.cml$/, '.vue');\n  result = result.replace(/\\.interface$/, `.interface.js`);\n  return result + '?__export';\n}\n\nfunction getFileDepth(entryPath, filePath) {\n  let entryPaths = entryPath.split('/');\n  let filePaths = filePath.split('/');\n\n  for (let i = 0, l = filePaths.length; i < l; i++) {\n    if (filePaths[i] === entryPaths[i]) {\n      filePaths[i] = '';\n    }\n  }\n  filePaths = filePaths.filter(item => item !== '');\n  return {\n    currentDepth: filePaths.length,\n    minPath: filePaths\n  };\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/component_export/webpack.web.config.js",
    "content": "\nconst path = require('path');\n\nmodule.exports = {\n  resolve: {\n    extensions: ['.interface']\n  },\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        exclude: /(\\.min\\.js)/,\n        include: [path.resolve(__dirname, '../node_modules')]\n      },\n      {\n        test: /\\.interface$/,\n        include: [path.resolve(__dirname, '../node_modules')],\n        use: [{\n          loader: 'babel-loader'\n        },\n        {\n          loader: 'interface-loader',\n          options: {\n            cmlType: 'web'\n          }\n        }]\n      }\n    ]\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/component_export/webpack.weex.config.js",
    "content": "\nconst path = require('path');\n\nmodule.exports = {\n  resolve: {\n    extensions: ['.interface']\n  },\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        exclude: /(\\.min\\.js)/,\n        include: [path.resolve(__dirname, '../node_modules')]\n      },\n      {\n        test: /\\.interface$/,\n        include: [path.resolve(__dirname, '../node_modules')],\n        use: [{\n          loader: 'babel-loader'\n        },\n        {\n          loader: 'interface-loader',\n          options: {\n            cmlType: 'weex'\n          }\n        }]\n      }\n    ]\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/config.js",
    "content": "module.exports = {\n  nodeConfiguration: {\n    global: false,\n    Buffer: false,\n    __filename: false,\n    __dirname: false,\n    setImmediate: false,\n    clearImmediate: false,\n    // see: https://github.com/webpack/node-libs-browser\n    assert: false,\n    buffer: false,\n    child_process: false, // eslint-disable-line\n    cluster: false,\n    console: false,\n    constants: false,\n    crypto: false,\n    dgram: false,\n    dns: false,\n    domain: false,\n    events: false,\n    fs: false,\n    http: false,\n    https: false,\n    module: false,\n    net: false,\n    os: false,\n    path: false,\n    process: false,\n    punycode: false,\n    querystring: false,\n    readline: false,\n    repl: false,\n    stream: false,\n    string_decoder: false, // eslint-disable-line\n    sys: false,\n    timers: false,\n    tls: false,\n    tty: false,\n    url: false,\n    util: false,\n    vm: false,\n    zlib: false\n  },\n  ip: require('ip').address()\n\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/default/app.cml",
    "content": "<template>\n  <view>\n    <router-view></router-view>\n  <view>\n</template>\n\n<script>\nclass App {\n  created(res) {\n  }\n}\n\nexport default new App();\n</script>\n\n<style scoped>\n\n</style>\n\n<script cml-type=\"json\">\n{}\n</script>"
  },
  {
    "path": "packages/chameleon-tool/configs/default/entry.js",
    "content": "import runtime from 'chameleon-runtime';\nimport app from '$PROJECT/src/app/app.cml';\nimport store from '$PROJECT/src/store/index.js';\nimport router from '$ROUTER';\nimport routerConfig from '$PROJECT/src/router.config.json';\n\nruntime.bootstrap({app, store, router, routerConfig});\n\n"
  },
  {
    "path": "packages/chameleon-tool/configs/default/html_entry.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=no, viewport-fit=cover\">\n  <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n  <title></title>\n  <% if (htmlWebpackPlugin.options.console) { %>\n    <script type=\"text/javascript\" src=\"<%= htmlWebpackPlugin.options.consolejs %>\"></script>\n  <% } %>\n</head>\n<body>\n  <div id=\"root\"></div>\n</body>\n</html>\n"
  },
  {
    "path": "packages/chameleon-tool/configs/default/miniappPolyfill.js",
    "content": "// Object.keys\nif (!Object.keys) {\n  Object.keys = (function () {\n    var hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\n    var hasDontEnumBug = !({toString: null}).propertyIsEnumerable('toString');\n\n\n    var dontEnums = [\n      'toString',\n      'toLocaleString',\n      'valueOf',\n      'hasOwnProperty',\n      'isPrototypeOf',\n      'propertyIsEnumerable',\n      'constructor'\n    ];\n\n\n    var dontEnumsLength = dontEnums.length;\n\n    return function (obj) {\n      if (typeof obj !== 'object' && typeof obj !== 'function' || obj === null) {throw new TypeError('Object.keys called on non-object');}\n\n      var result = [];\n\n      for (var prop in obj) {\n        if (hasOwnProperty.call(obj, prop)) {result.push(prop);}\n      }\n\n      if (hasDontEnumBug) {\n        for (var i = 0; i < dontEnumsLength; i++) {\n          if (hasOwnProperty.call(obj, dontEnums[i])) {result.push(dontEnums[i]);}\n        }\n      }\n      return result;\n    }\n  })()\n}\n\n// Object.assign\nif (typeof Object.assign != 'function') {\n  // Must be writable: true, enumerable: false, configurable: true\n  Object.defineProperty(Object, \"assign\", {\n    value: function assign(target, varArgs) { // .length of function is 2\n      'use strict';\n      if (target == null) { // TypeError if undefined or null\n        throw new TypeError('Cannot convert undefined or null to object');\n      }\n\n      let to = Object(target);\n\n      for (var index = 1; index < arguments.length; index++) {\n        var nextSource = arguments[index];\n\n        if (nextSource != null) { // Skip over if undefined or null\n          for (let nextKey in nextSource) {\n            // Avoid bugs when hasOwnProperty is shadowed\n            if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n              to[nextKey] = nextSource[nextKey];\n            }\n          }\n        }\n      }\n      return to;\n    },\n    writable: true,\n    configurable: true\n  });\n}\n\n// Object.entries\nif (!Object.entries) {\n  Object.entries = function(obj) {\n    var ownProps = Object.keys(obj);\n\n\n    var i = ownProps.length;\n\n\n    var resArray = new Array(i); // preallocate the Array\n    while (i--) {resArray[i] = [ownProps[i], obj[ownProps[i]]];}\n\n    return resArray;\n  };\n}\n\n// Object.values\nif (!Object.values) {\n  Object.values = function(obj) {\n    if (obj !== Object(obj)) {throw new TypeError('Object.values called on a non-object');}\n    var val = []; var key;\n    for (key in obj) {\n      if (Object.prototype.hasOwnProperty.call(obj, key)) {\n        val.push(obj[key]);\n      }\n    }\n    return val;\n  }\n}\n\n\nif (!Number.prototype.toFixed) {\n  Number.prototype.toFixed = function(decimals) {\n    return Math.round(this * Math.pow(10, decimals)) / (Math.pow(10, decimals));\n  }\n}\n\nif (!String.prototype.trim) {\n  String.prototype.trim = function () {\n    return this.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n  };\n}\n// Function.bind\nif (!Function.prototype.bind) {\n  Function.prototype.bind = function(oThis) {\n    if (typeof this !== 'function') {\n      // closest thing possible to the ECMAScript 5\n      // internal IsCallable function\n      throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable')\n    }\n\n    var aArgs = Array.prototype.slice.call(arguments, 1);\n\n\n    var fToBind = this;\n\n\n    var fNOP = function() {};\n\n\n    var fBound = function() {\n      return fToBind.apply(this instanceof fNOP\n        ? this\n        : oThis,\n      aArgs.concat(Array.prototype.slice.call(arguments)))\n    }\n\n    if (this.prototype) {\n      // native functions don't have a prototype\n      fNOP.prototype = this.prototype;\n    }\n    fBound.prototype = new fNOP()\n\n    return fBound\n  }\n}\n\nif (!Array.isArray) {\n  Array.isArray = function(arg) {\n    return Object.prototype.toString.call(arg) === '[object Array]';\n  };\n}\n\n// Production steps of ECMA-262, Edition 6, 22.1.2.1\n// Reference: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from\nif (!Array.from) {\n  Array.from = (function () {\n    var toStr = Object.prototype.toString;\n    var isCallable = function (fn) {\n      return typeof fn === 'function' || toStr.call(fn) === '[object Function]';\n    };\n    var toInteger = function (value) {\n      var number = Number(value);\n      if (isNaN(number)) {return 0;}\n      if (number === 0 || !isFinite(number)) {return number;}\n      return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));\n    };\n    var maxSafeInteger = Math.pow(2, 53) - 1;\n    var toLength = function (value) {\n      var len = toInteger(value);\n      return Math.min(Math.max(len, 0), maxSafeInteger);\n    };\n\n    // The length property of the from method is 1.\n    return function from(arrayLike/* , mapFn, thisArg */) {\n      // 1. Let C be the this value.\n      var C = this;\n\n      // 2. Let items be ToObject(arrayLike).\n      var items = Object(arrayLike);\n\n      // 3. ReturnIfAbrupt(items).\n      if (arrayLike == null) {\n        throw new TypeError(\"Array.from requires an array-like object - not null or undefined\");\n      }\n\n      // 4. If mapfn is undefined, then let mapping be false.\n      var mapFn = arguments.length > 1 ? arguments[1] : void undefined;\n      var T;\n      if (typeof mapFn !== 'undefined') {\n        // 5. else\n        // 5. a If IsCallable(mapfn) is false, throw a TypeError exception.\n        if (!isCallable(mapFn)) {\n          throw new TypeError('Array.from: when provided, the second argument must be a function');\n        }\n\n        // 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined.\n        if (arguments.length > 2) {\n          T = arguments[2];\n        }\n      }\n\n      // 10. Let lenValue be Get(items, \"length\").\n      // 11. Let len be ToLength(lenValue).\n      var len = toLength(items.length);\n\n      // 13. If IsConstructor(C) is true, then\n      // 13. a. Let A be the result of calling the [[Construct]] internal method of C with an argument list containing the single item len.\n      // 14. a. Else, Let A be ArrayCreate(len).\n      var A = isCallable(C) ? Object(new C(len)) : new Array(len);\n\n      // 16. Let k be 0.\n      var k = 0;\n      // 17. Repeat, while k < len… (also steps a - h)\n      var kValue;\n      while (k < len) {\n        kValue = items[k];\n        if (mapFn) {\n          A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k);\n        } else {\n          A[k] = kValue;\n        }\n        k += 1;\n      }\n      // 18. Let putStatus be Put(A, \"length\", len, true).\n      A.length = len;\n      // 20. Return A.\n      return A;\n    };\n  }());\n}\n\nif (!Array.prototype.find) {\n  Array.prototype.find = function(predicate) {\n    if (this === null) {\n      throw new TypeError('Array.prototype.find called on null or undefined')\n    }\n    if (typeof predicate !== 'function') {\n      throw new TypeError('predicate must be a function')\n    }\n    var list = Object(this)\n    var length = list.length >>> 0\n    var thisArg = arguments[1]\n    var value\n\n    for (var i = 0; i < length; i++) {\n      value = list[i]\n      if (predicate.call(thisArg, value, i, list)) {\n        return value\n      }\n    }\n    return undefined\n  }\n}\n\nif (!Array.prototype.findIndex) {\n  Object.defineProperty(Array.prototype, 'findIndex', {\n    value: function(predicate) {\n      'use strict';\n      if (this == null) {\n        throw new TypeError('Array.prototype.findIndex called on null or undefined');\n      }\n      if (typeof predicate !== 'function') {\n        throw new TypeError('predicate must be a function');\n      }\n      var list = Object(this);\n      var length = list.length >>> 0;\n      var thisArg = arguments[1];\n      var value;\n\n      for (var i = 0; i < length; i++) {\n        value = list[i];\n        if (predicate.call(thisArg, value, i, list)) {\n          return i;\n        }\n      }\n      return -1;\n    },\n    enumerable: false,\n    configurable: false,\n    writable: false\n  });\n}\n\n// Production steps of ECMA-262, Edition 5, 15.4.4.17\n// Reference: http://es5.github.io/#x15.4.4.17\nif (!Array.prototype.some) {\n  Array.prototype.some = function(fun/* , thisArg*/) {\n    'use strict';\n\n    if (this == null) {\n      throw new TypeError('Array.prototype.some called on null or undefined');\n    }\n\n    if (typeof fun !== 'function') {\n      throw new TypeError();\n    }\n\n    var t = Object(this);\n    var len = t.length >>> 0;\n\n    var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\n    for (var i = 0; i < len; i++) {\n      if (i in t && fun.call(thisArg, t[i], i, t)) {\n        return true;\n      }\n    }\n\n    return false;\n  };\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/default/rem.js",
    "content": "/* eslint-disable */\n\n(function flexible (window, document) {\n    var docEl = document.documentElement\n    var dpr = window.devicePixelRatio || 1\n  \n    // adjust body font size\n    function setBodyFontSize () {\n      if (document.body) {\n        document.body.style.fontSize = (12 * dpr) + 'px'\n      }\n      else {\n        document.addEventListener('DOMContentLoaded', setBodyFontSize)\n      }\n    }\n    setBodyFontSize();\n  \n    // set 1rem = viewWidth / 10\n    function setRemUnit () {\n      var rem = docEl.clientWidth / 10\n      docEl.style.fontSize = rem + 'px'\n    }\n  \n    setRemUnit()\n  \n    // reset rem unit on page resize\n    window.addEventListener('resize', setRemUnit)\n    window.addEventListener('pageshow', function (e) {\n      if (e.persisted) {\n        setRemUnit()\n      }\n    })\n  \n    // detect 0.5px supports\n    if (dpr >= 2) {\n      var fakeBody = document.createElement('body')\n      var testElement = document.createElement('div')\n      testElement.style.border = '.5px solid transparent'\n      fakeBody.appendChild(testElement)\n      docEl.appendChild(fakeBody)\n      if (testElement.offsetHeight === 1) {\n        docEl.classList.add('hairlines')\n      }\n      docEl.removeChild(fakeBody)\n    }\n  }(window, document))\n\n/* eslint-disable */\n\n"
  },
  {
    "path": "packages/chameleon-tool/configs/default/router.js",
    "content": "\n/*global Vue*/\nimport VueRouter from 'vue-router';\nVue.use(VueRouter);\n\n// 根据配置生成的路由options\nconst routerOptions = '$ROUTER_OPTIONS';\n\nrouterOptions.mode = process.env.platform === 'web' ? routerOptions.mode : 'abstract';\n\nconst Router = new VueRouter(routerOptions)\nexport default Router\n"
  },
  {
    "path": "packages/chameleon-tool/configs/default/smarty_entry.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=no, viewport-fit=cover\"\">\n  <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n  <title></title>\n  <% if (htmlWebpackPlugin.options.console) { %>\n    <script type=\"text/javascript\" src=\"<%= htmlWebpackPlugin.options.consolejs %>\"></script>\n  <% } %>\n</head>\n<body>\n\n  <div id=\"root\"></div>\n  <script>\n  var PAGEDATA = {json_encode($pageData)}\n  var ERRNO = {json_encode($errno)}\n  var ERRMSG = {json_encode($errmsg)}\n  </script>\n</body>\n</html>\n"
  },
  {
    "path": "packages/chameleon-tool/configs/default/weexPolyfill.js",
    "content": "// Object.keys\nif (!Object.keys) {\n  Object.keys = (function () {\n    var hasOwnProperty = Object.prototype.hasOwnProperty;\n\n\n    var hasDontEnumBug = !({toString: null}).propertyIsEnumerable('toString');\n\n\n    var dontEnums = [\n      'toString',\n      'toLocaleString',\n      'valueOf',\n      'hasOwnProperty',\n      'isPrototypeOf',\n      'propertyIsEnumerable',\n      'constructor'\n    ];\n\n\n    var dontEnumsLength = dontEnums.length;\n\n    return function (obj) {\n      if (typeof obj !== 'object' && typeof obj !== 'function' || obj === null) {throw new TypeError('Object.keys called on non-object');}\n\n      var result = [];\n\n      for (var prop in obj) {\n        if (hasOwnProperty.call(obj, prop)) {result.push(prop);}\n      }\n\n      if (hasDontEnumBug) {\n        for (var i = 0; i < dontEnumsLength; i++) {\n          if (hasOwnProperty.call(obj, dontEnums[i])) {result.push(dontEnums[i]);}\n        }\n      }\n      return result;\n    }\n  })()\n}\n\n// Object.assign\nif (typeof Object.assign != 'function') {\n  // Must be writable: true, enumerable: false, configurable: true\n  Object.defineProperty(Object, \"assign\", {\n    value: function assign(target, varArgs) { // .length of function is 2\n      'use strict';\n      if (target == null) { // TypeError if undefined or null\n        throw new TypeError('Cannot convert undefined or null to object');\n      }\n\n      let to = Object(target);\n\n      for (var index = 1; index < arguments.length; index++) {\n        var nextSource = arguments[index];\n\n        if (nextSource != null) { // Skip over if undefined or null\n          for (let nextKey in nextSource) {\n            // Avoid bugs when hasOwnProperty is shadowed\n            if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n              to[nextKey] = nextSource[nextKey];\n            }\n          }\n        }\n      }\n      return to;\n    },\n    writable: true,\n    configurable: true\n  });\n}\n\n// Object.entries\nif (!Object.entries) {\n  Object.entries = function(obj) {\n    var ownProps = Object.keys(obj);\n\n\n    var i = ownProps.length;\n\n\n    var resArray = new Array(i); // preallocate the Array\n    while (i--) {resArray[i] = [ownProps[i], obj[ownProps[i]]];}\n\n    return resArray;\n  };\n}\n\n// Object.values\nif (!Object.values) {\n  Object.values = function(obj) {\n    if (obj !== Object(obj)) {throw new TypeError('Object.values called on a non-object');}\n    var val = []; var key;\n    for (key in obj) {\n      if (Object.prototype.hasOwnProperty.call(obj, key)) {\n        val.push(obj[key]);\n      }\n    }\n    return val;\n  }\n}\n\n\nif (!Number.prototype.toFixed) {\n  Number.prototype.toFixed = function(decimals) {\n    return Math.round(this * Math.pow(10, decimals)) / (Math.pow(10, decimals));\n  }\n}\n\nif (!String.prototype.trim) {\n  String.prototype.trim = function () {\n    return this.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n  };\n}\n// Function.bind\nif (!Function.prototype.bind) {\n  Function.prototype.bind = function(oThis) {\n    if (typeof this !== 'function') {\n      // closest thing possible to the ECMAScript 5\n      // internal IsCallable function\n      throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable')\n    }\n\n    var aArgs = Array.prototype.slice.call(arguments, 1);\n\n\n    var fToBind = this;\n\n\n    var fNOP = function() {};\n\n\n    var fBound = function() {\n      return fToBind.apply(this instanceof fNOP\n        ? this\n        : oThis,\n      aArgs.concat(Array.prototype.slice.call(arguments)))\n    }\n\n    if (this.prototype) {\n      // native functions don't have a prototype\n      fNOP.prototype = this.prototype;\n    }\n    fBound.prototype = new fNOP()\n\n    return fBound\n  }\n}\n\nif (!Array.isArray) {\n  Array.isArray = function(arg) {\n    return Object.prototype.toString.call(arg) === '[object Array]';\n  };\n}\n\n// Production steps of ECMA-262, Edition 6, 22.1.2.1\n// Reference: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from\nif (!Array.from) {\n  Array.from = (function () {\n    var toStr = Object.prototype.toString;\n    var isCallable = function (fn) {\n      return typeof fn === 'function' || toStr.call(fn) === '[object Function]';\n    };\n    var toInteger = function (value) {\n      var number = Number(value);\n      if (isNaN(number)) {return 0;}\n      if (number === 0 || !isFinite(number)) {return number;}\n      return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));\n    };\n    var maxSafeInteger = Math.pow(2, 53) - 1;\n    var toLength = function (value) {\n      var len = toInteger(value);\n      return Math.min(Math.max(len, 0), maxSafeInteger);\n    };\n\n    // The length property of the from method is 1.\n    return function from(arrayLike/* , mapFn, thisArg */) {\n      // 1. Let C be the this value.\n      var C = this;\n\n      // 2. Let items be ToObject(arrayLike).\n      var items = Object(arrayLike);\n\n      // 3. ReturnIfAbrupt(items).\n      if (arrayLike == null) {\n        throw new TypeError(\"Array.from requires an array-like object - not null or undefined\");\n      }\n\n      // 4. If mapfn is undefined, then let mapping be false.\n      var mapFn = arguments.length > 1 ? arguments[1] : void undefined;\n      var T;\n      if (typeof mapFn !== 'undefined') {\n        // 5. else\n        // 5. a If IsCallable(mapfn) is false, throw a TypeError exception.\n        if (!isCallable(mapFn)) {\n          throw new TypeError('Array.from: when provided, the second argument must be a function');\n        }\n\n        // 5. b. If thisArg was supplied, let T be thisArg; else let T be undefined.\n        if (arguments.length > 2) {\n          T = arguments[2];\n        }\n      }\n\n      // 10. Let lenValue be Get(items, \"length\").\n      // 11. Let len be ToLength(lenValue).\n      var len = toLength(items.length);\n\n      // 13. If IsConstructor(C) is true, then\n      // 13. a. Let A be the result of calling the [[Construct]] internal method of C with an argument list containing the single item len.\n      // 14. a. Else, Let A be ArrayCreate(len).\n      var A = isCallable(C) ? Object(new C(len)) : new Array(len);\n\n      // 16. Let k be 0.\n      var k = 0;\n      // 17. Repeat, while k < len… (also steps a - h)\n      var kValue;\n      while (k < len) {\n        kValue = items[k];\n        if (mapFn) {\n          A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k);\n        } else {\n          A[k] = kValue;\n        }\n        k += 1;\n      }\n      // 18. Let putStatus be Put(A, \"length\", len, true).\n      A.length = len;\n      // 20. Return A.\n      return A;\n    };\n  }());\n}\n\nif (!Array.prototype.find) {\n  Array.prototype.find = function(predicate) {\n    if (this === null) {\n      throw new TypeError('Array.prototype.find called on null or undefined')\n    }\n    if (typeof predicate !== 'function') {\n      throw new TypeError('predicate must be a function')\n    }\n    var list = Object(this)\n    var length = list.length >>> 0\n    var thisArg = arguments[1]\n    var value\n\n    for (var i = 0; i < length; i++) {\n      value = list[i]\n      if (predicate.call(thisArg, value, i, list)) {\n        return value\n      }\n    }\n    return undefined\n  }\n}\n\nif (!Array.prototype.findIndex) {\n  Object.defineProperty(Array.prototype, 'findIndex', {\n    value: function(predicate) {\n      'use strict';\n      if (this == null) {\n        throw new TypeError('Array.prototype.findIndex called on null or undefined');\n      }\n      if (typeof predicate !== 'function') {\n        throw new TypeError('predicate must be a function');\n      }\n      var list = Object(this);\n      var length = list.length >>> 0;\n      var thisArg = arguments[1];\n      var value;\n\n      for (var i = 0; i < length; i++) {\n        value = list[i];\n        if (predicate.call(thisArg, value, i, list)) {\n          return i;\n        }\n      }\n      return -1;\n    },\n    enumerable: false,\n    configurable: false,\n    writable: false\n  });\n}\n\n// Production steps of ECMA-262, Edition 5, 15.4.4.17\n// Reference: http://es5.github.io/#x15.4.4.17\nif (!Array.prototype.some) {\n  Array.prototype.some = function(fun/* , thisArg*/) {\n    'use strict';\n\n    if (this == null) {\n      throw new TypeError('Array.prototype.some called on null or undefined');\n    }\n\n    if (typeof fun !== 'function') {\n      throw new TypeError();\n    }\n\n    var t = Object(this);\n    var len = t.length >>> 0;\n\n    var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\n    for (var i = 0; i < len; i++) {\n      if (i in t && fun.call(thisArg, t[i], i, t)) {\n        return true;\n      }\n    }\n\n    return false;\n  };\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/default/weex_liveload_entry.js",
    "content": "\nimport bridge from 'chameleon-bridge';\n\nlet wsAddr = `ws://${process.env.serverIp}:${process.env.liveloadPort}`\n\nlet socketInstance = bridge.initSocket({url: wsAddr});\n\nsocketInstance.onopen(function (e) {\n})\n\nsocketInstance.onmessage(function (e) {\n  if (e.data === 'weex_refresh') {\n    bridge.reload()\n  }\n})\nsocketInstance.onerror(function (e) {\n\n})\nsocketInstance.onclose(function (e) {\n\n})\n"
  },
  {
    "path": "packages/chameleon-tool/configs/entryLoader.js",
    "content": "/*\n将 import router from '$ROUTER 转化为\nimport router from '$ROUTER?query=0'; //'$ROUTER?query=1'之类的\n转化比较简单，可以用正则，该文件源文件在 configs/default/entry.js 中\n*/\n\nmodule.exports = function(content) {\n  this.cacheable(false);\n  const resourceQuery = this.resourceQuery\n  return content.replace('$ROUTER', `$ROUTER${resourceQuery}`)\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/getCommonConfig.js",
    "content": "\nconst path = require('path');\nconst webpack = require('webpack');\nconst BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;\nconst ProgressBarPlugin = require('progress-bar-webpack-plugin');\nconst {getBabelPath, getExcludeBabelPath, getGlobalCheckWhiteList, getFreePort, addCahceLoader} = require('./utils');\nvar UglifyJsPlugin = require('uglifyjs-webpack-plugin')\nvar OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')\nconst ChameleonWebpackPlugin = require('chameleon-webpack-plugin')\nconst WebpackCheckPlugin = require('webpack-check-plugin')\nconst config = require('./config.js');\nconst ChameleonErrorsWebpackPlugin = require('chameleon-errors-webpack-plugin');\nconst fs = require('fs');\nconst cmlUtils = require('chameleon-tool-utils');\nconst ExtraWatchWebpackPlugin = require('extra-watch-webpack-plugin');\nconst DuplicatePackageCheckerPlugin = require('duplicate-package-checker-webpack-plugin');\nconst CircularDependencyPlugin = require('circular-dependency-plugin');\n\nmodule.exports = function (options) {\n  let {\n    type,\n    media,\n    root\n  } = options;\n\n  function getstaticPath(filetype) {\n    let staticPath = `static/${filetype}/[name]_[hash:7].[ext]`;\n    if (options.staticPath) {\n      staticPath = options.staticPath + staticPath;\n    }\n    return staticPath;\n  }\n\n  let webServerPort = getFreePort().webServerPort;\n\n  let publicPath;\n  let defaultPublichPathMap = {\n    'wx': `http://${config.ip}:${webServerPort}/wx/`,\n    'qq': `http://${config.ip}:${webServerPort}/qq/`,\n    'tt': `http://${config.ip}:${webServerPort}/tt/`,\n    'alipay': `http://${config.ip}:${webServerPort}/alipay/`,\n    'baidu': `http://${config.ip}:${webServerPort}/baidu/`, // baidu小程序的publicPath不能设置能/  所以在启动dev服务的时候 也将dist作为静态资源\n    'web': `http://${config.ip}:${webServerPort}/`,\n    'weex': `http://${config.ip}:${webServerPort}/weex/`\n  }\n  publicPath = options.publicPath || defaultPublichPathMap[type];\n  if (!publicPath) {\n    publicPath = `http://${config.ip}:${webServerPort}/${type}/`\n  }\n  let chameleonConfig = cml.config.get();\n  let commonConfig = {\n    stats: cml.logLevel === 'debug' ? 'verbose' : 'none',\n    output: {\n      publicPath: publicPath\n    },\n    resolve: {\n      symlinks: false,\n      extensions: ['.cml', '.interface', '.vue', '.js'],\n      alias: {\n        '$CMLPROJECT': path.resolve(cml.root),\n        '/components': path.resolve(cml.projectRoot, 'src/components'),\n        '$PROJECT': path.resolve(root),\n        '$ROUTER_CONFIG': path.resolve(root, './src/router.config.json')\n      },\n      modules: [\n        'node_modules',\n        path.join(cml.root, '/node_modules')\n      ]\n    },\n    resolveLoader: {\n      modules: [\n        path.join(cml.root, '/node_modules'),\n        'node_modules'\n      ]\n    },\n    module: {\n      rules: [{\n        test: path.resolve(root, 'node_modules/chameleon-runtime/.temp/router.js'),\n        loader: path.join(__dirname, 'routerLoader.js')\n      },\n      {\n        test: /\\.js$/,\n        exclude: getExcludeBabelPath(),\n        // 不能babel babel-runtime\n        include: getBabelPath(),\n        use: [{\n          loader: 'babel-loader',\n          options: {\n            'filename': path.join(cml.root, 'chameleon.js')\n          }\n        }]\n      },\n      {\n        test: /\\.(png|jpe?g|gif|svg)(\\?.*)?$/,\n        loader: 'chameleon-url-loader',\n        options: {\n          limit: false, // 不做limit的base64转换，需要添加?inline参数\n          name: getstaticPath('img'),\n          outputPath: function(output) {\n            // 处理图片中的@符号 改成_ 解决在支付宝小程序中上传失败的问题\n            output = cml.utils.handleSpecialChar(output)\n            return output;\n          }\n        }\n      }, {\n        test: /\\.(mp4|webm|ogg|mp3|wav|flac|aac)(\\?.*)?$/,\n        loader: 'file-loader',\n        options: {\n          name: getstaticPath('media'),\n          outputPath: function(output) {\n            // 处理图片中的@符号 改成_ 解决在支付宝小程序中上传失败的问题\n            output = cml.utils.handleSpecialChar(output)\n            return output;\n          }\n\n        }\n      },\n      {\n        test: /\\.(woff|woff2?|eot|ttf|otf)(\\?.*)?$/,\n        loader: 'file-loader',\n        options: {\n          name: getstaticPath('fonts'),\n          outputPath: function(output) {\n            // 处理图片中的@符号 改成_ 解决在支付宝小程序中上传失败的问题\n            output = cml.utils.handleSpecialChar(output)\n            return output;\n          }\n        }\n      },\n\n      {\n        test: /\\.interface$/,\n        // exclude: /(node_modules|bower_components)/,\n        // 不能babel babel-runtime\n        include: getBabelPath(),\n        use: [{\n          loader: 'babel-loader',\n          options: {\n            'filename': path.join(cml.root, 'chameleon.js')\n          }\n        },\n\n        {\n          loader: 'interface-loader',\n          options: {\n            cmlType: type,\n            media,\n            check: chameleonConfig.check\n          }\n        }\n        ]\n      }\n      ]\n\n    },\n    plugins: [\n      new webpack.DefinePlugin({\n        'process.env.platform': JSON.stringify(type)\n      }),\n      new ChameleonErrorsWebpackPlugin({\n        cmlType: type,\n        showWarning: chameleonConfig.optimize && chameleonConfig.optimize.showWarning\n      })\n    ]\n  }\n  if (options.cache) {\n    addCahceLoader(commonConfig, type);\n  }\n  if (chameleonConfig.enableGlobalCheck === true) {\n    commonConfig.plugins.push(\n      new WebpackCheckPlugin({\n        cmlType: type,\n        whiteListFile: getGlobalCheckWhiteList()\n      })\n    )\n  }\n  if (chameleonConfig.optimize && chameleonConfig.optimize.processBar) {\n    commonConfig.plugins.push(new ProgressBarPlugin())\n  }\n  if (chameleonConfig.optimize && chameleonConfig.optimize.circularDependency) {\n    commonConfig.plugins.push(new ProgressBarPlugin())\n  }\n  if (options.definePlugin) {\n    commonConfig.plugins.push(new webpack.DefinePlugin(options.definePlugin))\n  }\n  if (options.analysis) {\n    commonConfig.plugins.push(new BundleAnalyzerPlugin())\n  }\n  let devApiPrefix = `http://${config.ip}:${webServerPort}`\n  // 兼容旧版api\n  let apiPrefix = options.apiPrefix || devApiPrefix;\n  // 新版api 优先读取domain\n  // 浅拷贝不影响config中的domain\n  let domain = {};\n  if (options.domain) {\n    domain = {\n      ...options.domain\n    }\n  }\n\n\n  if (options.media === 'dev') {\n\n    // dev模式添加domainKey参数\n    Object.keys(domain).forEach(key => {\n      if (domain[key].toLowerCase() === 'localhost') {\n        domain[key] = devApiPrefix;\n      }\n      domain[key] = domain[key] + '__DEV_SPLIT__' + key;\n    })\n    commonConfig.plugins.push(\n      new ExtraWatchWebpackPlugin({\n        dirs: [path.join(cml.projectRoot, 'mock/api')]\n      })\n    );\n    commonConfig.plugins.push(\n      new DuplicatePackageCheckerPlugin({\n        verbose: true\n      })\n    );\n\n    commonConfig.plugins.push(\n      new DuplicatePackageCheckerPlugin({\n        verbose: true\n      })\n    );\n    if (chameleonConfig.optimize && chameleonConfig.optimize.circularDependency) {\n      commonConfig.plugins.push(\n        new CircularDependencyPlugin({\n          // exclude detection of files based on a RegExp\n          exclude: /node_modules/,\n          // include specific files based on a RegExp\n          include: /src/,\n          // add errors to webpack instead of warnings\n          failOnError: true,\n          // allow import cycles that include an asyncronous import,\n          // e.g. via import(/* webpackMode: \"weak\" */ './file.js')\n          allowAsyncCycles: false,\n          // set the current working directory for displaying module paths\n          cwd: process.cwd()\n        })\n      );\n\n\n    }\n\n  }\n  // 兼容旧版api\n  commonConfig.plugins.push(new webpack.DefinePlugin({\n    'process.env.cmlApiPrefix': JSON.stringify(apiPrefix)\n  }))\n  Object.keys(domain).forEach(key => {\n    commonConfig.plugins.push(new webpack.DefinePlugin({\n      ['process.env.domain.' + key]: JSON.stringify(domain[key])\n    }))\n  })\n\n  commonConfig.plugins.push(new webpack.DefinePlugin({\n    'process.env.media': JSON.stringify(options.media)\n  }))\n\n  if (options.minimize) {\n    commonConfig.plugins = commonConfig.plugins.concat([\n      new OptimizeCSSPlugin({\n        assetNameRegExp: /\\.css$/,\n        cssProcessorOptions: { safe: true, discardComments: { removeAll: true }, autoprefixer: false }\n      }),\n      new UglifyJsPlugin({\n        compress: {\n          drop_console: chameleonConfig.optimize && chameleonConfig.optimize.dropConsole\n        }\n      })\n    ])\n  }\n\n  let moduleIdType = options.moduleIdType\n  let moduleIdMap = {\n    hash: new webpack.HashedModuleIdsPlugin(),\n    name: new webpack.NamedModulesPlugin(),\n    chameleon: new ChameleonWebpackPlugin({openModuleHash: true, openChunkHash: true})\n  }\n  if (moduleIdType && moduleIdMap[moduleIdType]) {\n    commonConfig.plugins.push(moduleIdMap[moduleIdType])\n  }\n\n\n  let subProject = chameleonConfig.subProject;\n  if (subProject && subProject.length > 0) {\n    subProject.forEach(item => {\n      let npmName = cmlUtils.isString(item) ? item : item.npmName;\n      let packageJSON = JSON.parse(fs.readFileSync(path.resolve(cml.projectRoot, 'node_modules', npmName, 'package.json'), {encoding: 'utf-8'}));\n      let cmlConfig = packageJSON.cml || {};\n      let definePlugin = cmlConfig.definePlugin;\n      if (definePlugin) {\n        Object.keys(definePlugin).forEach(key => {\n          definePlugin[key] = JSON.stringify(definePlugin[key])\n        })\n        commonConfig.plugins.push(new webpack.DefinePlugin(definePlugin))\n      }\n    })\n  }\n\n\n  return commonConfig;\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/getMiniAppBuildConfig.js",
    "content": "var OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')\nvar webpack = require('webpack');\nvar getMiniAppCommonConfig = require('./getMiniAppCommonConfig.js');\nvar merge = require('webpack-merge')\nvar getMiniAppExportConfig = require('./component_export/getMiniAppExportConfig');\nmodule.exports = function (options) {\n  let {type, media} = options;\n  var commonConfig = getMiniAppCommonConfig(options);\n  var buildConfig = {\n    plugins: [\n      new webpack.HashedModuleIdsPlugin()\n    ]\n  }\n  const miniMap = {\n    wx: {\n      cssReg: /(\\.wxss|\\.css)$/\n    },\n    alipay: {\n      cssReg: /(\\.acss|\\.css)$/\n    },\n    baidu: {\n      cssReg: /\\.css$/\n    },\n    qq: {\n      cssReg: /(\\.qss|\\.css)$/\n    },\n    tt: {\n      cssReg: /(\\.ttss|\\.css)/\n    }\n  }\n  const targetObj = miniMap[type];\n  if (options.minimize) {\n    buildConfig.plugins = [\n      new OptimizeCSSPlugin({\n        assetNameRegExp: targetObj.cssReg,\n        cssProcessorOptions: { safe: true, discardComments: { removeAll: true }, autoprefixer: false }\n      })\n    ]\n  }\n  if (media === 'export') {\n    return getMiniAppExportConfig(merge(commonConfig, buildConfig), options);\n  }\n  return merge(commonConfig, buildConfig)\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/getMiniAppCommonConfig.js",
    "content": "/* eslint-disable */\nvar ExtractTextPlugin = require('cml-extract-css-webpack-plugin')\nvar utils = require('./utils.js');\nvar path = require('path');\nvar webpack = require('webpack')\nvar merge = require('webpack-merge')\nconst getCommonConfig = require('./getCommonConfig');\nconst CopyNpmPlugin = require('./plugins/CopyNpmPLugin.js');\nconst miniAppSubPkg = require('./plugins/miniAppSubPkg.js');\nconst miniAppBaseCssAdd = require('./plugins/miniAppBaseCssAdd.js');\nconst CopyWebpackPlugin = require('copy-webpack-plugin');\nconst cmlUtils = require('chameleon-tool-utils');\nmodule.exports = function (options) {\n  let {\n    type,\n    media,\n    root\n  } = options;\n\n  var cmlLoaderConfig = require('./cml-loader.conf')({type});\n\n  const miniMap = {\n    wx: {\n      css: 'wxss',\n      templateReg: /.wxml/\n    },\n    alipay: {\n      css: 'acss',\n      templateReg: /.axml/\n    },\n    baidu: {\n      css: 'css',\n      templateReg: /.swan/\n    },\n    qq: {\n      css: 'qss',\n      templateReg: /.qml/\n    },\n    tt: {\n      css: 'ttss',\n      templateReg: /.ttml/\n    }\n  }\n\n  const targetObj = miniMap[type];\n  \n\n  var outputPath = path.resolve(root, `dist/${type}`);\n  \n  var cmlLoaders = [\n\n    {\n      loader: 'chameleon-loader',\n      options: { ...cmlLoaderConfig,\n        cmlType: type,\n        media,\n        check: cml.config.get().check,\n        postcss: {\n          config: {\n            path: path.join(cml.root, `./configs/postcss/${type}/.postcssrc.js`)\n          }\n        },\n        isInjectBaseStyle: cml.config.get().baseStyle[type] === true,\n        subProject: cml.config.get().subProject\n      }\n    }];\n\n  var commonConfig =\n  {\n    context: path.resolve(root),\n    entry: utils.getMiniAppEntryFunc(type),\n    target: require('chameleon-miniapp-target'),\n    output: {\n      path: outputPath,\n      filename: 'static/js/[name].js'\n    },\n\n    module: {\n      rules: [\n        ...utils.styleLoaders({type: type, extract: true, media}),\n        {\n          test: /\\.cml$/,\n          use: cmlLoaders\n        },\n        {\n          test: targetObj.templateReg,\n          use: cmlLoaders\n        }\n      ]\n    },\n    plugins: [\n      new ExtractTextPlugin({\n        filename: `[name].${targetObj.css}`,\n        allChunks: true\n      }),\n      new webpack.optimize.CommonsChunkPlugin({\n        name: ['common', 'manifest'],\n        filename: 'static/js/[name].js',\n        minChunks: 2\n      }),\n      new CopyNpmPlugin({\n        cmlType: type,\n        root: outputPath\n      }),\n      // eslint-disable-next-line new-cap\n      new miniAppSubPkg({\n        cmlType: type\n      }),\n      // eslint-disable-next-line new-cap\n      new miniAppBaseCssAdd({\n        cmlType: type,\n        isInjectBaseStyle: cml.config.get().baseStyle[type] === true\n      })\n    ]\n  }\n  let projectConfig = options && options.projectConfig;\n  if(projectConfig){\n    if(projectConfig.pluginRoot){\n      let fromPluginDir = path.resolve(root,'src/',projectConfig.pluginRoot);\n      let toPluginDir = path.resolve(outputPath,projectConfig.pluginRoot)\n      if(cmlUtils.isDir(fromPluginDir)){\n        commonConfig.plugins.push(\n          new CopyWebpackPlugin([\n            {\n              from:fromPluginDir,\n              to:toPluginDir\n            }\n          ])\n        )\n      }\n    }\n    if(projectConfig.cloudfunctionRoot){\n      let fromCloudDir = path.resolve(root,'src/',projectConfig.cloudfunctionRoot);\n      let toCloudDir = path.resolve(outputPath,projectConfig.cloudfunctionRoot)\n      if(cmlUtils.isDir(fromCloudDir)){\n        commonConfig.plugins.push(\n          new CopyWebpackPlugin([\n            {\n              from:fromCloudDir,\n              to:toCloudDir\n            }\n          ])\n        )\n      }\n    }\n  }\n  if (media === 'export') {\n    // 组件导出，修改jsonpFunction\n    commonConfig.output.jsonpFunction = getJsonpFunction(root);\n  }\n  if (options.cache) {\n    utils.addCahceLoader(commonConfig, type);\n  }\n\n\n  return merge(getCommonConfig(options), commonConfig);\n\n}\n\nfunction getJsonpFunction(root) {\n  let roots = root.split('/');\n  let projectName = roots[roots.length - 1];\n  // 保证key可用\n  projectName = projectName.match(/\\w+/g).join('_');\n  return projectName + '_' + Date.now();\n}\n\n\n"
  },
  {
    "path": "packages/chameleon-tool/configs/getMiniAppDevConfig.js",
    "content": "var getMiniAppCommonConfig = require('./getMiniAppCommonConfig.js');\nvar merge = require('webpack-merge')\n\nmodule.exports = function (options) {\n  return merge(getMiniAppCommonConfig(options), {})\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/getWebBuildConfig.js",
    "content": "var path = require('path');\nconst CleanWebpackPlugin = require('clean-webpack-plugin')\nvar getWebCommonConfig = require('./getWebCommonConfig.js');\nvar getWebExportConfig = require('./component_export/getWebExportConfig_new');\n\nvar merge = require('webpack-merge')\n\n\nmodule.exports = function (options) {\n  if (options.media === 'export') {\n    return getWebExportConfig(options);\n  }\n  var outputPath = path.resolve(options.root, 'dist/web');\n  var buildConfig = {\n    output: {\n      path: outputPath\n    },\n    plugins: [\n      new CleanWebpackPlugin(['./*'], {root: outputPath, verbose: false})\n    ]\n  }\n\n  return merge(getWebCommonConfig(options), buildConfig)\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/getWebCommonConfig.js",
    "content": "var ExtractTextPlugin = require('cml-extract-css-webpack-plugin')\nvar utils = require('./utils.js');\nvar getCmlLoaderConfig = require('./cml-loader.conf');\nvar path = require('path');\nvar webpack = require('webpack')\nvar merge = require('webpack-merge')\nconst getCommonConfig = require('./getCommonConfig');\nconst cmlUtils = require('chameleon-tool-utils');\nmodule.exports = function (options) {\n  let {\n    media,\n    root,\n    disableExtract,\n    hot\n  } = options;\n\n  let isWrapComponent = cml.config.get().web[media] && cml.config.get().web[media].isWrapComponent === true\n\n  function getJsPath() {\n    return options.hash ? 'static/js/[name]_[chunkhash].js' : 'static/js/[name].js'\n  }\n\n  let {entry, htmlPlugins} = utils.getWebEntry(options);\n\n  var cmlLoaders = [{\n    loader: 'cml-vue-loader',\n    options: Object.assign(getCmlLoaderConfig({type: 'web', hot: options.hot, disableExtract}), {\n      postcss: {\n        config: {\n          path: path.join(cml.root, './configs/postcss/web/.postcssrc.js')\n        }\n      },\n      compilerModules: [\n        {\n          postTransformNode: el => {\n            require('chameleon-vue-precompiler')()(el)\n          }\n        }\n      ]\n    })\n\n  },\n\n  {\n    loader: 'chameleon-loader',\n    options: { ...getCmlLoaderConfig({type: 'web', disableExtract}),\n      cmlType: 'web',\n      media,\n      check: cml.config.get().check,\n      cmss: cml.config.get().cmss, // 传递给模板编译，处理web端内置style\n      isInjectBaseStyle: cml.config.get().baseStyle.web === true,\n      isWrapComponent,\n      subProject: cml.config.get().subProject\n    }\n  }\n  ]\n  var commonConfig =\n  {\n    name: 'web',\n    context: path.resolve(root),\n    entry,\n    output: {\n      filename: getJsPath(),\n      chunkFilename: getJsPath()\n    },\n    resolve: {\n      alias: {\n        '$ROUTER': path.resolve(root, 'node_modules/chameleon-runtime/.temp/router.js')\n      }\n    },\n    module: {\n      rules: [\n        ...utils.styleLoaders({type: 'web', extract: !hot && !disableExtract}),\n        {\n          test: /\\.cml$/,\n          use: cmlLoaders\n        },\n\n        {\n          test: /\\.vue$/,\n          use: [{\n            loader: 'cml-vue-loader',\n            options: Object.assign(getCmlLoaderConfig({type: 'web', hot: options.hot, disableExtract}), {\n              postcss: {\n                config: {\n                  path: path.join(cml.root, './configs/postcss/web/.postcssrc.js')\n                }\n              },\n              compilerModules: [\n                {\n                  postTransformNode: el => {\n                    require('chameleon-vue-precompiler')()(el)\n                  }\n                }\n              ]\n            })\n          }\n          ]\n        }\n      ]\n    },\n    plugins: []\n\n  }\n\n  if (options.hot !== true && disableExtract !== true && media !== 'export') {\n    commonConfig.plugins.push(\n      new ExtractTextPlugin({\n        filename: options.hash ? 'static/css/[name]_[contenthash].css' : 'static/css/[name].css',\n        allChunks: true\n      })\n    )\n  }\n\n  // 非export模式\n  if (cml.media !== 'export') {\n    commonConfig.plugins = commonConfig.plugins.concat([\n      new webpack.optimize.CommonsChunkPlugin({\n        name: ['vender', 'manifest'],\n        filename: getJsPath(),\n        minChunks: 2\n      }),\n      ...htmlPlugins\n    ])\n  }\n  const {routerConfig} = cmlUtils.getRouterConfig();\n  let mpa = routerConfig.mpa;\n  if (mpa && mpa.weexMpa && Array.isArray(mpa.weexMpa)) { // 配置了weex多页面\n    commonConfig.module.rules.push(\n      {\n        test: path.resolve(cml.projectRoot, 'node_modules/chameleon-runtime/.temp/entry.js'),\n        loader: path.join(__dirname, 'entryLoader.js')\n      }\n    )\n  }\n  if (options.cache) {\n    utils.addCahceLoader(commonConfig, 'web');\n  }\n  return merge(getCommonConfig(options), commonConfig);\n\n}\n\n"
  },
  {
    "path": "packages/chameleon-tool/configs/getWebDevConfig.js",
    "content": "var getWebCommonConfig = require('./getWebCommonConfig.js');\n\nvar merge = require('webpack-merge');\nvar path = require('path');\nvar webpack = require('webpack');\nvar utils = require('./utils.js');\nconst CleanWebpackPlugin = require('clean-webpack-plugin')\nconst CopyWebpackPlugin = require('copy-webpack-plugin')\n\n\nmodule.exports = function (options) {\n  // add hot-reload related code to entry chunks\n  let baseWebpackConfig = getWebCommonConfig(options);\n  let devConfig = {};\n  let outputPath = utils.getDevServerPath();\n  if (cml.config.get().templateType === 'smarty') {\n    devConfig = {\n      output: {\n        path: outputPath\n      },\n      plugins: [\n        new CopyWebpackPlugin([\n          {\n            from: 'mock/template/',\n            to: 'test'\n          }\n        ], {}),\n        new CleanWebpackPlugin(['test', 'template', 'static', 'templates_c', '*.json', '*.js'], {root: outputPath, verbose: false})\n      ]\n    }\n\n    if (cml.utils.isFile(path.join(cml.projectRoot, 'src/router.config.json'))) {\n      devConfig.plugins.push(\n        new CopyWebpackPlugin([\n          {\n            from: 'src/router.config.json',\n            to: 'json'\n          }\n        ], {})\n      )\n    } else {\n      cml.log.debug('项目未配置router.config.json')\n      devConfig.plugins.push(\n        new CleanWebpackPlugin(['json/router.config.json'], {root: outputPath, verbose: false}),\n      )\n    }\n  } else {\n    devConfig = {\n      output: {\n        path: outputPath\n      },\n      plugins: [\n        new CleanWebpackPlugin(['static', '*.json', '*.js'], {root: outputPath, verbose: false})\n      ]\n    }\n  }\n\n  if (options.hot === true) {\n    Object.keys(baseWebpackConfig.entry).forEach(function (name) {\n      baseWebpackConfig.entry[name] = [path.resolve(__dirname, '../commanders/web/dev-client.js')].concat(baseWebpackConfig.entry[name])\n    })\n    devConfig.plugins.push(new webpack.HotModuleReplacementPlugin())\n  } else {\n    Object.keys(baseWebpackConfig.entry).forEach(function (name) {\n      baseWebpackConfig.entry[name] = [path.resolve(__dirname, '../commanders/web/liveload-dev-client.js')].concat(baseWebpackConfig.entry[name])\n    })\n  }\n\n  return merge(baseWebpackConfig, devConfig)\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/getWebExportConfig.js",
    "content": "var utils = require('./utils.js');\nvar getCmlLoaderConfig = require('./cml-loader.conf');\nvar path = require('path');\nvar merge = require('webpack-merge')\nconst getCommonConfig = require('./getCommonConfig');\n\nmodule.exports = function (options) {\n  var cmlLoaders = [{\n    loader: 'chameleon-loader',\n    options: { ...getCmlLoaderConfig({type: 'web'}),\n      cmlType: 'web'\n    }\n  }]\n  let { entry } = utils.getWebEntry(options)\n  var commonConfig =\n  {\n    entry,\n    output: {\n      path: path.resolve(options.root, 'dist/components/web'),\n      filename: '[name].vue'\n    },\n    resolve: {\n      extensions: ['.cml', '.interface', '.vue', '.js'],\n      alias: {\n      },\n      modules: [\n        'node_modules',\n        path.join(cml.root, '/node_modules')\n      ]\n    },\n    resolveLoader: {\n      modules: [\n        'node_modules',\n        path.join(cml.root, '/node_modules')\n      ]\n    },\n    module: {\n      rules: [\n        {\n          test: /\\.cml$/,\n          use: cmlLoaders\n        }\n      ]\n    }\n\n  }\n\n  return merge(getCommonConfig(options), commonConfig);\n\n}\n\n\n"
  },
  {
    "path": "packages/chameleon-tool/configs/getWeexBuildConfig.js",
    "content": "var path = require('path');\nconst CleanWebpackPlugin = require('clean-webpack-plugin')\nconst AssetsPlugin = require('assets-webpack-plugin')\nvar getWeexCommonConfig = require('./getWeexCommonConfig.js');\nvar getWeexExportConfig = require('./component_export/getWeexExportConfig_new');\n\n\nvar merge = require('webpack-merge')\n\nmodule.exports = function (options) {\n  if (options.media === 'export') {\n    return getWeexExportConfig(options);\n  }\n  var outputPath = path.resolve(options.root, 'dist/weex');\n  var buildConfig = {\n    output: {\n      path: outputPath\n    },\n    plugins: [\n      new CleanWebpackPlugin(['./*'], {root: outputPath, verbose: false}),\n      new AssetsPlugin({\n        filename: '/dist/config.json'\n      })\n    ]\n  }\n\n\n  return merge(getWeexCommonConfig(options), buildConfig)\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/getWeexCommonConfig.js",
    "content": "const utils = require('./utils.js');\nconst cmlLoaderConfig = require('./cml-loader.conf')({type: 'weex'})\nconst path = require('path');\nconst webpack = require('webpack')\nconst merge = require('webpack-merge')\nconst config = require('./config')\nconst cmlUtils = require('chameleon-tool-utils');\nconst getCommonConfig = require('./getCommonConfig');\nmodule.exports = function (options) {\n  let {\n    media,\n    root\n  } = options;\n  let isWrapComponent = cml.config.get().web[media] && cml.config.get().web[media].isWrapComponent === true\n\n  let entry = utils.getWeexEntry(options);\n  let outputPath = path.join(utils.getDevServerPath(), 'weex');\n  let cmlLoaders = [{\n    loader: 'chameleon-weex-vue-loader',\n    options: {\n      ...cmlLoaderConfig,\n      esModule: true\n    }\n  },\n\n  {\n    loader: 'chameleon-loader',\n    options: { ...cmlLoaderConfig,\n      cmlType: 'weex',\n      media,\n      check: cml.config.get().check,\n      isInjectBaseStyle: cml.config.get().baseStyle.weex === true,\n      isWrapComponent\n    }\n  }]\n  let commonConfig =\n  {\n    name: 'weex',\n    context: path.resolve(root),\n    entry,\n    output: {\n      path: outputPath,\n      filename: options.hash ? '[name]_[chunkhash].js' : '[name].js'\n    },\n    resolve: {\n      alias: {\n        '$ROUTER': path.resolve(root, 'node_modules/chameleon-runtime/.temp/router.js')\n      }\n    },\n    module: {\n      rules: [\n        ...utils.styleLoaders({type: 'weex'}),\n        {\n          test: /\\.cml$/,\n          use: cmlLoaders\n        },\n        {\n          test: /\\.vue$/,\n          use: [{\n            loader: 'chameleon-weex-vue-loader',\n            options: cmlLoaderConfig\n          }\n\n          ]\n        }\n      ]\n    },\n    plugins: [\n      new webpack.BannerPlugin({\n        banner: '// { \"framework\": \"Vue\"} \\n',\n        raw: true,\n        exclude: 'Vue'\n      })\n\n    ],\n    node: config.nodeConfiguration\n  }\n\n  if (media === 'export') {\n    commonConfig.output.libraryTarget = 'umd';\n  }\n  const {routerConfig} = cmlUtils.getRouterConfig();\n  let mpa = routerConfig.mpa;\n  if (mpa && mpa.weexMpa && Array.isArray(mpa.weexMpa)) { // 配置了weex多页面\n    commonConfig.module.rules.push(\n      {\n        test: path.resolve(cml.projectRoot, 'node_modules/chameleon-runtime/.temp/entry.js'),\n        loader: path.join(__dirname, 'entryLoader.js')\n      }\n    )\n  }\n  if (options.cache) {\n    utils.addCahceLoader(commonConfig, 'weex');\n  }\n  return merge(getCommonConfig(options), commonConfig);\n}\n\n\n"
  },
  {
    "path": "packages/chameleon-tool/configs/getWeexDevConfig.js",
    "content": "var getWeexCommonConfig = require('./getWeexCommonConfig.js');\nvar merge = require('webpack-merge');\nconst config = require('./config.js');\nconst webpack = require('webpack');\nconst utils = require('./utils');\n\nmodule.exports = function (options) {\n  return merge(getWeexCommonConfig(options), {\n    plugins: [\n      new webpack.DefinePlugin({\n        'process.env.serverIp': JSON.stringify(config.ip),\n        'process.env.liveloadPort': JSON.stringify(utils.getFreePort().weexLiveLoadPort)\n      })\n    ]\n  })\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/index.js",
    "content": "\nconst getWebDevConfig = require('./getWebDevConfig.js');\nconst getWebBuildConfig = require('./getWebBuildConfig.js');\nconst getWeexDevConfig = require('./getWeexDevConfig.js');\nconst getWeexBuildConfig = require('./getWeexBuildConfig.js');\nconst getMiniAppDevConfig = require('./getMiniAppDevConfig.js');\nconst getMiniAppBuildConfig = require('./getMiniAppBuildConfig.js');\nconst getExtendConfig = require('./mvvm/getExtendConfig.js');\nconst utils = require('./utils');\n\n/**\n *\n * @param {*} options\n * type wx  weex  web\n * media dev build\n * root 项目的根目录\n *\n */\nmodule.exports = async function (options) {\n  // 获取free端口\n  await utils.setFreePort();\n  let {type, media} = options;\n  let webpackConfig;\n  if (cml.config.get().extPlatform && ~Object.keys(cml.config.get().extPlatform).indexOf(type)) {\n    webpackConfig = getExtendConfig(options);\n  } else {\n    switch (type) {\n      case 'wx':\n      case 'qq':\n      case 'alipay':\n      case 'baidu':\n      case 'tt':\n        if (media == 'dev') {\n          webpackConfig = getMiniAppDevConfig(options);\n        } else {\n          webpackConfig = getMiniAppBuildConfig(options);\n        }\n        break;\n      case 'web':\n        if (media == 'dev') {\n          webpackConfig = getWebDevConfig(options);\n        } else {\n          webpackConfig = getWebBuildConfig(options);\n        }\n        break;\n      case 'weex':\n        if (media == 'dev') {\n          webpackConfig = getWeexDevConfig(options);\n        } else {\n          webpackConfig = getWeexBuildConfig(options);\n        }\n        break;\n      default:\n        break;\n    }\n  }\n\n  cml.utils.applyPlugin('webpackConfig', { type, media, webpackConfig }, function(params) {\n    if (type === params.type && media === params.media) {\n      webpackConfig = params.webpackConfig\n    }\n  })\n  return webpackConfig;\n\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/mvvm/getExtendConfig.js",
    "content": "const merge = require('webpack-merge')\nconst path = require('path');\nconst getCommonConfig = require('../getCommonConfig');\nconst utils = require('../utils.js');\nconst {MvvmGraphPlugin} = require('mvvm-pack');\nconst resolve = require('resolve');\nconst webpack = require('webpack');\nconst originSourceLoader = {\n  loader: path.join(__dirname, './originSourceLoader.js')\n};\n\nmodule.exports = function(options) {\n  let {type, media} = options;\n  let npmName = cml.config.get().extPlatform[type];\n  let PlatformPlugin = require(resolve.sync(npmName, { basedir: cml.projectRoot }));\n  // 用户端扩展插件\n  let platformPlugin = new PlatformPlugin({\n    cmlType: type,\n    media\n  });\n  cml.extPlatformPlugin[type] = platformPlugin; // 扩展新端插件， utils中获取内置组件需要用到\n  // 扩展新端编译默认配置\n  if (platformPlugin.cmlConfig) {\n    cml.config.merge({\n      [type]: {\n        ...platformPlugin.cmlConfig\n      }\n    });\n  }\n\n  function getCmlLoaders() {\n    let loaders = utils.cssLoaders({type, media});\n    loaders.js = [\n      loaders.js,\n      originSourceLoader\n    ]\n    return loaders;\n  }\n  let extendConfig = {\n    entry: {\n      app: path.join(cml.projectRoot, 'src/app/app.cml')\n    },\n    output: {\n      path: path.join(cml.projectRoot, 'dist/' + type)\n    },\n    module: {\n      rules: [\n        ...utils.styleLoaders({type}),\n        {\n          test: /\\.cml$/,\n          use: [{\n            loader: 'mvvm-cml-loader',\n            options: {\n              loaders: getCmlLoaders(),\n              cmlType: type,\n              media,\n              check: cml.config.get().check\n            }\n          }]\n        }\n      ]\n    },\n    plugins: [\n      new MvvmGraphPlugin({\n        cmlType: type,\n        media\n      }, platformPlugin)\n    ]\n  };\n  if(media === 'dev'){ //扩展新端dev模式下注入全局变量 'process.env.NODE_ENV': JSON.stringify('development')\n    extendConfig.plugins.push(new webpack.DefinePlugin({\n      'process.env.NODE_ENV': JSON.stringify('development')\n    }))\n  }else if(media === 'build'){\n    extendConfig.plugins.push(new webpack.DefinePlugin({\n      'process.env.NODE_ENV': JSON.stringify('production')\n    }))\n  }\n  let commonConfig = getCommonConfig(options);\n  commonConfig.module.rules.forEach(item => {\n    // 静态资源的处理\n    if (~['chameleon-url-loader', 'file-loader'].indexOf(item.loader)) {\n      item.loader = 'mvvm-file-loader';\n      item.options.publicPath = commonConfig.output.publicPath\n    }\n\n    if (item.test instanceof RegExp) {\n      // interface获取originSource\n      if (item.test.test('name.interface')) {\n        item.use.splice(1, 0, originSourceLoader)\n      }\n\n      // js获取originSource\n      if (item.test.test('name.js')) {\n        item.use.push(originSourceLoader)\n      }\n    }\n  })\n\n  // 用户可以扩展webpack的rules用于处理特有文件后缀\n  if (platformPlugin.webpackRules && platformPlugin.webpackRules instanceof Array) {\n    platformPlugin.webpackRules.forEach(rule => {\n      if (rule && rule.use && rule.use instanceof Array) {\n        rule.use.forEach(item => {\n          if (item.needDefaultOptions) {\n            item.options = item.options || {};\n            item.options = {\n              loaders: getCmlLoaders(),\n              cmlType: type,\n              media,\n              ...item.options\n            }\n            delete item.needDefaultOptions;\n          }\n        })\n      }\n    });\n\n    extendConfig = merge(extendConfig, {\n      module: {\n        rules: platformPlugin.webpackRules\n      }\n    })\n  }\n\n  if (platformPlugin.miniappExt && platformPlugin.miniappExt.rule) {\n    extendConfig = merge(extendConfig, {\n      module: {\n        rules: [\n          {\n            test: platformPlugin.miniappExt.rule,\n            use: [{\n              loader: 'mvvm-miniapp-loader',\n              options: {\n                loaders: utils.cssLoaders({type, media}),\n                cmlType: type,\n                media,\n                mapping: platformPlugin.miniappExt.mapping\n              }\n            }]\n          }\n        ]\n      }\n    })\n  }\n\n  return merge(commonConfig, extendConfig);\n}"
  },
  {
    "path": "packages/chameleon-tool/configs/mvvm/originSourceLoader.js",
    "content": "/**\n * js 模块获取节点源代码，在interface-loader处理后 babel-loader前\n */\nmodule.exports = function (output) {\n  this._module._cmlOriginSource = output;\n  return output;\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/plugins/CopyNpmPLugin.js",
    "content": "const fs = require('fs');\nconst fse = require('fs-extra');\nconst path = require('path');\nconst glob = require('glob');\nclass CopyNpmPLugin {\n  constructor(options) {\n    this.cmlType = options.cmlType;\n    this.root = options.root;\n  }\n  apply(compiler) {\n    let self = this;\n\n    if (compiler.hooks) {\n      compiler.hooks.afterEmit.tap('CopyNpmPLugin', copyNpm);\n    } else {\n      compiler.plugin('after-emit', copyNpm);\n    }\n\n    function copyNpm(compilation, callback) {\n      let copyNpm = cml.config.get().copyNpm && cml.config.get().copyNpm[self.cmlType];\n      if (copyNpm && copyNpm.length > 0) {\n        copyNpm.forEach(function(npmName) {\n\n          let packageRoot = path.join(cml.projectRoot, 'node_modules', npmName);\n          let packageJson = JSON.parse(fs.readFileSync(path.join(packageRoot, 'package.json'), {encoding: 'utf-8'}));\n          let cmlConfig = packageJson.cml && packageJson.cml[self.cmlType]; \n\n          let copyArray = [];\n          if (cmlConfig.pages && cmlConfig.pages.length > 0) {\n            copyArray = copyArray.concat(cmlConfig.pages)\n          }\n          if (cmlConfig.components && cmlConfig.components.length > 0) {\n            copyArray = copyArray.concat(cmlConfig.components)\n          }\n          copyArray.forEach(copyItem => {\n            let globPath = path.join(packageRoot, `${copyItem}.*`);\n            let copyFiles = glob.sync(globPath);\n            copyFiles.forEach(file => {\n              let dest = path.join(self.root, copyItem + path.extname(file));\n              fse.copySync(file, dest)\n            })\n          })\n\n        })\n      }\n\n      return callback()\n    }\n\n\n  }\n}\n\nmodule.exports = CopyNpmPLugin;\n\n\n"
  },
  {
    "path": "packages/chameleon-tool/configs/plugins/miniAppBaseCssAdd.js",
    "content": "const path = require('path');\nconst cmlUtils = require('chameleon-tool-utils');\nclass miniappBaseCssAdd {\n  constructor(options) {\n    this.cmlType = options.cmlType;\n    this.isInjectBaseStyle = options.isInjectBaseStyle;\n  }\n\n  apply(compiler) {\n    /* eslint-disable-next-line */\n    let self = this;\n    let cssExt = {\n      'wx': '.wxss',\n      'alipay': '.acss',\n      'baidu': '.css',\n      'qq': '.qss',\n      'tt': '.ttss'\n    }\n    if (compiler.hooks) {\n      compiler.hooks.shouldEmit.tap('miniappBaseCssAdd', miniappBaseCssAdd);\n    } else {\n      compiler.plugin('should-emit', miniappBaseCssAdd);\n    }\n\n    function miniappBaseCssAdd(compilation, callback) {\n      let globalStyleConfig = cml.config.get().globalStyleConfig;\n      let hasGlobalCss = globalStyleConfig && globalStyleConfig.globalCssPath && cmlUtils.isFile(globalStyleConfig.globalCssPath)\n      if (hasGlobalCss) {\n        Object.keys(compilation.assets).forEach((assetPath) => {\n          let ext = path.extname(assetPath);\n          let platformCss = cssExt[self.cmlType];\n          let pageCss = cmlUtils.handleWinPath(`static/css/page${platformCss}`);\n          let indexCss = cmlUtils.handleWinPath(`static/css/index${platformCss}`);\n          let globalCss = cmlUtils.handleWinPath(`static/css/global${platformCss}`);\n          let globalCssEntryPath = cmlUtils.handleWinPath('static/js/static/css/global.js');\n          // 删除因为新增 css 入口导致的  js 文件；\n          delete compilation.assets[globalCssEntryPath];\n          if ((ext === platformCss) && ![pageCss, indexCss, globalCss].includes(assetPath)) {\n            // 是对应的css样式，且不能是 static/css/index.wxss static/css/page.wxss static/css/global.wxss 公用样式中不能再导入公用基础样式；\n            let primaryCss = compilation.assets[assetPath].source();\n            let primaryCssSize = compilation.assets[assetPath].size();\n            compilation.assets[assetPath] = {\n              source() {\n                return `@import '/static/css/global${platformCss}'; \\n ${primaryCss}`\n              },\n              size() {\n                return primaryCssSize\n              }\n            }\n          }\n        })\n      }\n      if (self.isInjectBaseStyle) { // 只有配置导入样式的时候，才进行样式的导入\n        Object.keys(compilation.assets).forEach((assetPath) => {\n          let ext = path.extname(assetPath);\n          let platformCss = cssExt[self.cmlType];\n          let pageCss = cmlUtils.handleWinPath(`static/css/page${platformCss}`);\n          let pageCssEntryPath = cmlUtils.handleWinPath('static/js/static/css/page.js');\n          let indexCss = cmlUtils.handleWinPath(`static/css/index${platformCss}`);\n          let indexCssEntryPath = cmlUtils.handleWinPath('static/js/static/css/index.js');\n          let globalCss = ''\n          if (hasGlobalCss) {\n            globalCss = cmlUtils.handleWinPath(`static/css/global${platformCss}`);\n          }\n          // 删除因为新增 css 入口导致的  js 文件；\n          delete compilation.assets[pageCssEntryPath];\n          delete compilation.assets[indexCssEntryPath];\n          if ((ext === platformCss) && ![pageCss, indexCss, globalCss].includes(assetPath)) {\n            // 是对应的css样式，且不能是 static/css/index.wxss static/css/page.wxss 公用样式中不能再导入公用基础样式；\n            let primaryCss = compilation.assets[assetPath].source();\n            let primaryCssSize = compilation.assets[assetPath].size();\n            let assetType = judgeAssetType(assetPath, compilation);\n            // app 不导入基础样式  page 导入 page.css  component 导入 index.css\n            // 注意生成的资源中 static/css/page.wxss 这样的对应平台的后缀影响assetType判断\n            if (assetType === 'page') {\n              compilation.assets[assetPath] = {\n                source() {\n                  if (compilation.assets[pageCss]) { // 如果有page.css ，那么插入page.css\n                    return `@import '/static/css/page${platformCss}'; \\n ${primaryCss}`\n                  } else {\n                    return `@import '/static/css/index${platformCss}'; \\n ${primaryCss}`\n                  }\n                },\n                size() {\n                  return primaryCssSize\n                }\n              }\n            }\n            if (assetType === 'component') {\n              compilation.assets[assetPath] = {\n                source() {\n                  return `@import '/static/css/index${platformCss}'; \\n ${primaryCss}`\n                },\n                size() {\n                  return primaryCssSize\n                }\n              }\n            }\n          }\n\n        })\n      }\n      return true;\n    }\n    function judgeAssetType(assetCssPath, compilation) {\n      let type = 'page';\n      let jsonPath = assetCssPath.replace(cssExt[self.cmlType], '.json');\n      let jsonObject = compilation.assets[jsonPath] && JSON.parse(compilation.assets[jsonPath].source());\n      if (assetCssPath === `app${cssExt[self.cmlType]}`) {\n        type = 'app';\n      } else {\n        if (jsonObject && (jsonObject.component === true)) {\n          type = 'component';\n        }\n      }\n      return type;\n    }\n  }\n}\nmodule.exports = miniappBaseCssAdd;\n\n"
  },
  {
    "path": "packages/chameleon-tool/configs/plugins/miniAppSubPkg.js",
    "content": "const path = require('path');\nconst cmlUtils = require('chameleon-tool-utils');\n\n/*\n小程序分包：1 微信限制主包不能引用分包的组件 2 分包可以引用主包的组件  3 分包不能引用分包的组件\n*/\nclass MiniAppSubPkg {\n  constructor(options) {\n    this.cmlType = options.cmlType;\n    this.root = options.root;\n  }\n\n  apply(compiler) {\n    /* eslint-disable-next-line */\n    let self = this;\n\n    if (compiler.hooks) {\n      compiler.hooks.emit.tap('miniAppSubPkg', miniappsubpkg);\n    } else {\n      // compiler.plugin('emit', miniappsubpkg);\n      compiler.plugin('emit', miniappsubpkg);\n    }\n    function miniappsubpkg(compilation, callback) {\n      // 第一步处理app.json\n      let appJSONString = compilation.assets['app.json'] && compilation.assets['app.json'].source();\n\n      let appJson = (appJSONString && JSON.parse(appJSONString)) || {};\n      let {pages, subPackages} = appJson;\n      if (!subPackages || !Array.isArray(subPackages)) { // 不存在分包配置或者配置不是数组直接执行callback\n        return callback();\n      }\n      let subPagesArr = [];\n      let subPagesRoot = []\n      subPackages.forEach((pkg) => {\n        subPagesRoot.push(pkg.root);\n        if (Array.isArray(pkg.pages)) {\n          pkg.pages.forEach((subpage) => {\n            // subPagesArr.push(path.normalize(`${pkg.root}/${subpage}`))\n            let subPkgPath = path.normalize(`${pkg.root}/${subpage}`)\n            subPagesArr.push(cmlUtils.handleWinPath(subPkgPath))\n          })\n        }\n      });\n      let newPages = pages.filter((item) => !subPagesArr.includes(item));\n      appJson.pages = newPages;\n      /* eslint-disable-next-line */\n      compilation.assets['app.json']._value = JSON.stringify(appJson, '', 4)// 重写app.json文件；\n      // 处理分包的页面js\n      const subCompsArr = self.getSubpkgComp(subPagesRoot, compilation);\n      // 修复重复对于页面的js分离操作，subCompsArr里面会进行分离\n      // self.handleJsContent(subPagesArr,compilation);\n      self.handleJsContent(subCompsArr, compilation);\n      callback();\n    }\n  }\n\n  getSubpkgComp(subPagesRoot, compilation) {\n    let assetsKeys = Object.keys(compilation.assets) || [];\n    let subPageCompKeys = assetsKeys.filter((assetsKey) => subPagesRoot.some((item) => assetsKey.startsWith(item) && assetsKey.endsWith('js')));\n    subPageCompKeys = subPageCompKeys.map((k) => k.replace('\\.js', ''));\n    return subPageCompKeys\n\n  }\n\n  handleJsContent(pathArr, compilation) {\n    // 第二步将subpage中的js文件拷贝到pages/subpage中的js文件中； outputFileSync\n    // 第三步删除static/js 中的subpage的js文件；removeSync\n    let regStatic = /require\\(.*?static\\/js\\/.*?\\)\\(\\)/;\n    let regMainfest = /var.*?require\\(.*?manifest\\.js.*?\\)/;\n    pathArr.forEach((item) => {\n      let subPageJSPath = cmlUtils.handleWinPath(`${item}.js`);\n      let subPageStaticJSPath = cmlUtils.handleWinPath(`static/js/${item}.js`);\n      let content = compilation.assets[subPageJSPath] && compilation.assets[subPageJSPath].source();\n\n      if (content) {\n        content = content.replace(regStatic, '')\n      }\n      let staticContent = compilation.assets[subPageStaticJSPath] && compilation.assets[subPageStaticJSPath].source();\n      if (staticContent) {\n        staticContent = staticContent.replace(regMainfest, '');\n        staticContent = staticContent.replace(/;$/, '()')\n        delete compilation.assets[subPageStaticJSPath];\n        // 注意 assets中的key configurable与否\n      }\n      let finalContent = content + '\\n' + staticContent;\n      // 修复分包依赖的js资源更新，打包结果不更新\n      if (compilation.assets[subPageJSPath]) {\n        compilation.assets[subPageJSPath] = {\n          source() {\n            return finalContent;\n          },\n          size() {\n            return finalContent.length;\n          }\n        }\n      }\n    });\n\n  }\n}\nmodule.exports = MiniAppSubPkg;\n\n"
  },
  {
    "path": "packages/chameleon-tool/configs/postcss/alipay/.postcssrc.js",
    "content": "// https://github.com/michael-ciniawsky/postcss-load-config\n\nlet result = {\n  \"plugins\": {\n    // to edit target browsers: use \"browserslist\" field in package.json\n    \"postcss-import\": {}\n  }\n}\nif(cml.config.get().cmss.enableAutoPrefix === true) {\n  result.plugins.autoprefixer = cml.config.get().cmss.autoprefixOptions\n}\n\nmodule.exports = result;\n"
  },
  {
    "path": "packages/chameleon-tool/configs/postcss/baidu/.postcssrc.js",
    "content": "// https://github.com/michael-ciniawsky/postcss-load-config\n\nlet result = {\n  \"plugins\": {\n    // to edit target browsers: use \"browserslist\" field in package.json\n    \"postcss-import\": {}\n  }\n}\nif(cml.config.get().cmss.enableAutoPrefix === true) {\n  result.plugins.autoprefixer = cml.config.get().cmss.autoprefixOptions\n}\n\nmodule.exports = result;\n"
  },
  {
    "path": "packages/chameleon-tool/configs/postcss/export/.postcssrc.js",
    "content": "module.exports = {\n  \"plugins\": [\n    require('../../component_export/postcssPlugin.js')\n  ]\n}"
  },
  {
    "path": "packages/chameleon-tool/configs/postcss/extend/.postcssrc.js",
    "content": "// https://github.com/michael-ciniawsky/postcss-load-config\nmodule.exports = {\n  \"plugins\": {\n    // to edit target browsers: use \"browserslist\" field in package.json\n    \"postcss-import\": {},\n  }\n}"
  },
  {
    "path": "packages/chameleon-tool/configs/postcss/qq/.postcssrc.js",
    "content": "// https://github.com/michael-ciniawsky/postcss-load-config\n\nlet result = {\n  \"plugins\": {\n    // to edit target browsers: use \"browserslist\" field in package.json\n    \"postcss-import\": {}\n  }\n}\nif(cml.config.get().cmss.enableAutoPrefix === true) {\n  result.plugins.autoprefixer = cml.config.get().cmss.autoprefixOptions\n}\n\nmodule.exports = result;\n"
  },
  {
    "path": "packages/chameleon-tool/configs/postcss/tt/.postcssrc.js",
    "content": "// https://github.com/michael-ciniawsky/postcss-load-config\n\nlet result = {\n  \"plugins\": {\n    // to edit target browsers: use \"browserslist\" field in package.json\n    \"postcss-import\": {}\n  }\n}\nif(cml.config.get().cmss.enableAutoPrefix === true) {\n  result.plugins.autoprefixer = cml.config.get().cmss.autoprefixOptions\n}\n\nmodule.exports = result;\n"
  },
  {
    "path": "packages/chameleon-tool/configs/postcss/web/.postcssrc.js",
    "content": "// https://github.com/michael-ciniawsky/postcss-load-config\n\nlet result = {\n  \"plugins\": {\n    // to edit target browsers: use \"browserslist\" field in package.json\n    \"postcss-import\": {}\n  }\n}\nif(cml.config.get().cmss.enableAutoPrefix === true) {\n  result.plugins.autoprefixer = cml.config.get().cmss.autoprefixOptions\n}\n\nmodule.exports = result;\n"
  },
  {
    "path": "packages/chameleon-tool/configs/postcss/weex/.postcssrc.js",
    "content": "// https://github.com/michael-ciniawsky/postcss-load-config\nmodule.exports = {\n  \"plugins\": {\n    // to edit target browsers: use \"browserslist\" field in package.json\n    \"postcss-import\": {}\n  }\n}"
  },
  {
    "path": "packages/chameleon-tool/configs/postcss/wx/.postcssrc.js",
    "content": "// https://github.com/michael-ciniawsky/postcss-load-config\n\nlet result = {\n  \"plugins\": {\n    // to edit target browsers: use \"browserslist\" field in package.json\n    \"postcss-import\": {}\n  }\n}\nif(cml.config.get().cmss.enableAutoPrefix === true) {\n  result.plugins.autoprefixer = cml.config.get().cmss.autoprefixOptions\n}\n\nmodule.exports = result;\n"
  },
  {
    "path": "packages/chameleon-tool/configs/preview-assets/qrcode.js",
    "content": "//---------------------------------------------------------------------\n//\n// QR Code Generator for JavaScript\n//\n// Copyright (c) 2009 Kazuhiko Arase\n//\n// URL: http://www.d-project.com/\n//\n// Licensed under the MIT license:\n//  http://www.opensource.org/licenses/mit-license.php\n//\n// The word 'QR Code' is registered trademark of\n// DENSO WAVE INCORPORATED\n//  http://www.denso-wave.com/qrcode/faqpatent-e.html\n//\n//---------------------------------------------------------------------\nvar qrcode = function () {\n  //---------------------------------------------------------------------\n  // qrcode\n  //---------------------------------------------------------------------\n  /**\n   * qrcode\n   * @param typeNumber 1 to 40\n   * @param errorCorrectionLevel 'L','M','Q','H'\n   */\n  var qrcode = function (typeNumber, errorCorrectionLevel) {\n    var PAD0 = 0xEC;\n    var PAD1 = 0x11;\n    var _typeNumber = typeNumber;\n    var _errorCorrectionLevel = QRErrorCorrectionLevel[errorCorrectionLevel];\n    var _modules = null;\n    var _moduleCount = 0;\n    var _dataCache = null;\n    var _dataList = [];\n    var _this = {};\n    var makeImpl = function (test, maskPattern) {\n      _moduleCount = _typeNumber * 4 + 17;\n      _modules = function (moduleCount) {\n        var modules = new Array(moduleCount);\n        for (var row = 0; row < moduleCount; row += 1) {\n          modules[row] = new Array(moduleCount);\n          for (var col = 0; col < moduleCount; col += 1) {\n            modules[row][col] = null;\n          }\n        }\n        return modules;\n      }(_moduleCount);\n      setupPositionProbePattern(0, 0);\n      setupPositionProbePattern(_moduleCount - 7, 0);\n      setupPositionProbePattern(0, _moduleCount - 7);\n      setupPositionAdjustPattern();\n      setupTimingPattern();\n      setupTypeInfo(test, maskPattern);\n      if (_typeNumber >= 7) {\n        setupTypeNumber(test);\n      }\n      if (_dataCache == null) {\n        _dataCache = createData(_typeNumber, _errorCorrectionLevel, _dataList);\n      }\n      mapData(_dataCache, maskPattern);\n    };\n    var setupPositionProbePattern = function (row, col) {\n      for (var r = -1; r <= 7; r += 1) {\n        if (row + r <= -1 || _moduleCount <= row + r) continue;\n        for (var c = -1; c <= 7; c += 1) {\n          if (col + c <= -1 || _moduleCount <= col + c) continue;\n          if ((0 <= r && r <= 6 && (c == 0 || c == 6)) || (0 <= c && c <= 6 && (r == 0 || r == 6)) || (2 <= r && r <= 4 && 2 <= c && c <= 4)) {\n            _modules[row + r][col + c] = true;\n          }\n          else {\n            _modules[row + r][col + c] = false;\n          }\n        }\n      }\n    };\n    var getBestMaskPattern = function () {\n      var minLostPoint = 0;\n      var pattern = 0;\n      for (var i = 0; i < 8; i += 1) {\n        makeImpl(true, i);\n        var lostPoint = QRUtil.getLostPoint(_this);\n        if (i == 0 || minLostPoint > lostPoint) {\n          minLostPoint = lostPoint;\n          pattern = i;\n        }\n      }\n      return pattern;\n    };\n    var setupTimingPattern = function () {\n      for (var r = 8; r < _moduleCount - 8; r += 1) {\n        if (_modules[r][6] != null) {\n          continue;\n        }\n        _modules[r][6] = (r % 2 == 0);\n      }\n      for (var c = 8; c < _moduleCount - 8; c += 1) {\n        if (_modules[6][c] != null) {\n          continue;\n        }\n        _modules[6][c] = (c % 2 == 0);\n      }\n    };\n    var setupPositionAdjustPattern = function () {\n      var pos = QRUtil.getPatternPosition(_typeNumber);\n      for (var i = 0; i < pos.length; i += 1) {\n        for (var j = 0; j < pos.length; j += 1) {\n          var row = pos[i];\n          var col = pos[j];\n          if (_modules[row][col] != null) {\n            continue;\n          }\n          for (var r = -2; r <= 2; r += 1) {\n            for (var c = -2; c <= 2; c += 1) {\n              if (r == -2 || r == 2 || c == -2 || c == 2 || (r == 0 && c == 0)) {\n                _modules[row + r][col + c] = true;\n              }\n              else {\n                _modules[row + r][col + c] = false;\n              }\n            }\n          }\n        }\n      }\n    };\n    var setupTypeNumber = function (test) {\n      var bits = QRUtil.getBCHTypeNumber(_typeNumber);\n      for (var i = 0; i < 18; i += 1) {\n        var mod = (!test && ((bits >> i) & 1) == 1);\n        _modules[Math.floor(i / 3)][i % 3 + _moduleCount - 8 - 3] = mod;\n      }\n      for (var i = 0; i < 18; i += 1) {\n        var mod = (!test && ((bits >> i) & 1) == 1);\n        _modules[i % 3 + _moduleCount - 8 - 3][Math.floor(i / 3)] = mod;\n      }\n    };\n    var setupTypeInfo = function (test, maskPattern) {\n      var data = (_errorCorrectionLevel << 3) | maskPattern;\n      var bits = QRUtil.getBCHTypeInfo(data);\n      // vertical\n      for (var i = 0; i < 15; i += 1) {\n        var mod = (!test && ((bits >> i) & 1) == 1);\n        if (i < 6) {\n          _modules[i][8] = mod;\n        }\n        else if (i < 8) {\n          _modules[i + 1][8] = mod;\n        }\n        else {\n          _modules[_moduleCount - 15 + i][8] = mod;\n        }\n      }\n      // horizontal\n      for (var i = 0; i < 15; i += 1) {\n        var mod = (!test && ((bits >> i) & 1) == 1);\n        if (i < 8) {\n          _modules[8][_moduleCount - i - 1] = mod;\n        }\n        else if (i < 9) {\n          _modules[8][15 - i - 1 + 1] = mod;\n        }\n        else {\n          _modules[8][15 - i - 1] = mod;\n        }\n      }\n      // fixed module\n      _modules[_moduleCount - 8][8] = (!test);\n    };\n    var mapData = function (data, maskPattern) {\n      var inc = -1;\n      var row = _moduleCount - 1;\n      var bitIndex = 7;\n      var byteIndex = 0;\n      var maskFunc = QRUtil.getMaskFunction(maskPattern);\n      for (var col = _moduleCount - 1; col > 0; col -= 2) {\n        if (col == 6) col -= 1;\n        while (true) {\n          for (var c = 0; c < 2; c += 1) {\n            if (_modules[row][col - c] == null) {\n              var dark = false;\n              if (byteIndex < data.length) {\n                dark = (((data[byteIndex] >>> bitIndex) & 1) == 1);\n              }\n              var mask = maskFunc(row, col - c);\n              if (mask) {\n                dark = !dark;\n              }\n              _modules[row][col - c] = dark;\n              bitIndex -= 1;\n              if (bitIndex == -1) {\n                byteIndex += 1;\n                bitIndex = 7;\n              }\n            }\n          }\n          row += inc;\n          if (row < 0 || _moduleCount <= row) {\n            row -= inc;\n            inc = -inc;\n            break;\n          }\n        }\n      }\n    };\n    var createBytes = function (buffer, rsBlocks) {\n      var offset = 0;\n      var maxDcCount = 0;\n      var maxEcCount = 0;\n      var dcdata = new Array(rsBlocks.length);\n      var ecdata = new Array(rsBlocks.length);\n      for (var r = 0; r < rsBlocks.length; r += 1) {\n        var dcCount = rsBlocks[r].dataCount;\n        var ecCount = rsBlocks[r].totalCount - dcCount;\n        maxDcCount = Math.max(maxDcCount, dcCount);\n        maxEcCount = Math.max(maxEcCount, ecCount);\n        dcdata[r] = new Array(dcCount);\n        for (var i = 0; i < dcdata[r].length; i += 1) {\n          dcdata[r][i] = 0xff & buffer.getBuffer()[i + offset];\n        }\n        offset += dcCount;\n        var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);\n        var rawPoly = qrPolynomial(dcdata[r], rsPoly.getLength() - 1);\n        var modPoly = rawPoly.mod(rsPoly);\n        ecdata[r] = new Array(rsPoly.getLength() - 1);\n        for (var i = 0; i < ecdata[r].length; i += 1) {\n          var modIndex = i + modPoly.getLength() - ecdata[r].length;\n          ecdata[r][i] = (modIndex >= 0) ? modPoly.getAt(modIndex) : 0;\n        }\n      }\n      var totalCodeCount = 0;\n      for (var i = 0; i < rsBlocks.length; i += 1) {\n        totalCodeCount += rsBlocks[i].totalCount;\n      }\n      var data = new Array(totalCodeCount);\n      var index = 0;\n      for (var i = 0; i < maxDcCount; i += 1) {\n        for (var r = 0; r < rsBlocks.length; r += 1) {\n          if (i < dcdata[r].length) {\n            data[index] = dcdata[r][i];\n            index += 1;\n          }\n        }\n      }\n      for (var i = 0; i < maxEcCount; i += 1) {\n        for (var r = 0; r < rsBlocks.length; r += 1) {\n          if (i < ecdata[r].length) {\n            data[index] = ecdata[r][i];\n            index += 1;\n          }\n        }\n      }\n      return data;\n    };\n    var createData = function (typeNumber, errorCorrectionLevel, dataList) {\n      var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectionLevel);\n      var buffer = qrBitBuffer();\n      for (var i = 0; i < dataList.length; i += 1) {\n        var data = dataList[i];\n        buffer.put(data.getMode(), 4);\n        buffer.put(data.getLength(), QRUtil.getLengthInBits(data.getMode(), typeNumber));\n        data.write(buffer);\n      }\n      // calc num max data.\n      var totalDataCount = 0;\n      for (var i = 0; i < rsBlocks.length; i += 1) {\n        totalDataCount += rsBlocks[i].dataCount;\n      }\n      if (buffer.getLengthInBits() > totalDataCount * 8) {\n        throw 'code length overflow. (' + buffer.getLengthInBits() + '>' + totalDataCount * 8 + ')';\n      }\n      // end code\n      if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) {\n        buffer.put(0, 4);\n      }\n      // padding\n      while (buffer.getLengthInBits() % 8 != 0) {\n        buffer.putBit(false);\n      }\n      // padding\n      while (true) {\n        if (buffer.getLengthInBits() >= totalDataCount * 8) {\n          break;\n        }\n        buffer.put(PAD0, 8);\n        if (buffer.getLengthInBits() >= totalDataCount * 8) {\n          break;\n        }\n        buffer.put(PAD1, 8);\n      }\n      return createBytes(buffer, rsBlocks);\n    };\n    _this.addData = function (data, mode) {\n      mode = mode || 'Byte';\n      var newData = null;\n      switch (mode) {\n        case 'Numeric':\n          newData = qrNumber(data);\n          break;\n        case 'Alphanumeric':\n          newData = qrAlphaNum(data);\n          break;\n        case 'Byte':\n          newData = qr8BitByte(data);\n          break;\n        case 'Kanji':\n          newData = qrKanji(data);\n          break;\n        default:\n          throw 'mode:' + mode;\n      }\n      _dataList.push(newData);\n      _dataCache = null;\n    };\n    _this.isDark = function (row, col) {\n      if (row < 0 || _moduleCount <= row || col < 0 || _moduleCount <= col) {\n        throw row + ',' + col;\n      }\n      return _modules[row][col];\n    };\n    _this.getModuleCount = function () {\n      return _moduleCount;\n    };\n    _this.make = function () {\n      if (_typeNumber < 1) {\n        var typeNumber = 1;\n        for (; typeNumber < 40; typeNumber++) {\n          var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, _errorCorrectionLevel);\n          var buffer = qrBitBuffer();\n          for (var i = 0; i < _dataList.length; i++) {\n            var data = _dataList[i];\n            buffer.put(data.getMode(), 4);\n            buffer.put(data.getLength(), QRUtil.getLengthInBits(data.getMode(), typeNumber));\n            data.write(buffer);\n          }\n          var totalDataCount = 0;\n          for (var i = 0; i < rsBlocks.length; i++) {\n            totalDataCount += rsBlocks[i].dataCount;\n          }\n          if (buffer.getLengthInBits() <= totalDataCount * 8) {\n            break;\n          }\n        }\n        _typeNumber = typeNumber;\n      }\n      makeImpl(false, getBestMaskPattern());\n    };\n    _this.createTableTag = function (cellSize, margin) {\n      cellSize = cellSize || 2;\n      margin = (typeof margin == 'undefined') ? cellSize * 4 : margin;\n      var qrHtml = '';\n      qrHtml += '<table style=\"';\n      qrHtml += ' border-width: 0px; border-style: none;';\n      qrHtml += ' border-collapse: collapse;';\n      qrHtml += ' padding: 0px; margin: ' + margin + 'px;';\n      qrHtml += '\">';\n      qrHtml += '<tbody>';\n      for (var r = 0; r < _this.getModuleCount(); r += 1) {\n        qrHtml += '<tr>';\n        for (var c = 0; c < _this.getModuleCount(); c += 1) {\n          qrHtml += '<td style=\"';\n          qrHtml += ' border-width: 0px; border-style: none;';\n          qrHtml += ' border-collapse: collapse;';\n          qrHtml += ' padding: 0px; margin: 0px;';\n          qrHtml += ' width: ' + cellSize + 'px;';\n          qrHtml += ' height: ' + cellSize + 'px;';\n          qrHtml += ' background-color: ';\n          qrHtml += _this.isDark(r, c) ? '#000000' : '#ffffff';\n          qrHtml += ';';\n          qrHtml += '\"/>';\n        }\n        qrHtml += '</tr>';\n      }\n      qrHtml += '</tbody>';\n      qrHtml += '</table>';\n      return qrHtml;\n    };\n    _this.createSvgTag = function (cellSize, margin) {\n      cellSize = cellSize || 2;\n      margin = (typeof margin == 'undefined') ? cellSize * 4 : margin;\n      var size = _this.getModuleCount() * cellSize + margin * 2;\n      var c, mc, r, mr, qrSvg = '',\n        rect;\n      rect = 'l' + cellSize + ',0 0,' + cellSize + ' -' + cellSize + ',0 0,-' + cellSize + 'z ';\n      qrSvg += '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"';\n      qrSvg += ' width=\"' + size + 'px\"';\n      qrSvg += ' height=\"' + size + 'px\"';\n      qrSvg += ' viewBox=\"0 0 ' + size + ' ' + size + '\" ';\n      qrSvg += ' preserveAspectRatio=\"xMinYMin meet\">';\n      qrSvg += '<rect width=\"100%\" height=\"100%\" fill=\"white\" cx=\"0\" cy=\"0\"/>';\n      qrSvg += '<path d=\"';\n      for (r = 0; r < _this.getModuleCount(); r += 1) {\n        mr = r * cellSize + margin;\n        for (c = 0; c < _this.getModuleCount(); c += 1) {\n          if (_this.isDark(r, c)) {\n            mc = c * cellSize + margin;\n            qrSvg += 'M' + mc + ',' + mr + rect;\n          }\n        }\n      }\n      qrSvg += '\" stroke=\"transparent\" fill=\"black\"/>';\n      qrSvg += '</svg>';\n      return qrSvg;\n    };\n    _this.createImgTag = function (cellSize, margin) {\n      cellSize = cellSize || 2;\n      margin = (typeof margin == 'undefined') ? cellSize * 4 : margin;\n      var size = _this.getModuleCount() * cellSize + margin * 2;\n      var min = margin;\n      var max = size - margin;\n      return createImgTag(size, size, function (x, y) {\n        if (min <= x && x < max && min <= y && y < max) {\n          var c = Math.floor((x - min) / cellSize);\n          var r = Math.floor((y - min) / cellSize);\n          return _this.isDark(r, c) ? 0 : 1;\n        }\n        else {\n          return 1;\n        }\n      });\n    };\n    return _this;\n  };\n  //---------------------------------------------------------------------\n  // qrcode.stringToBytes\n  //---------------------------------------------------------------------\n  qrcode.stringToBytesFuncs = {\n    'default': function (s) {\n      var bytes = [];\n      for (var i = 0; i < s.length; i += 1) {\n        var c = s.charCodeAt(i);\n        bytes.push(c & 0xff);\n      }\n      return bytes;\n    }\n  };\n  qrcode.stringToBytes = qrcode.stringToBytesFuncs['default'];\n  //---------------------------------------------------------------------\n  // qrcode.createStringToBytes\n  //---------------------------------------------------------------------\n  /**\n   * @param unicodeData base64 string of byte array.\n   * [16bit Unicode],[16bit Bytes], ...\n   * @param numChars\n   */\n  qrcode.createStringToBytes = function (unicodeData, numChars) {\n    // create conversion map.\n    var unicodeMap = function () {\n      var bin = base64DecodeInputStream(unicodeData);\n      var read = function () {\n        var b = bin.read();\n        if (b == -1) throw 'eof';\n        return b;\n      };\n      var count = 0;\n      var unicodeMap = {};\n      while (true) {\n        var b0 = bin.read();\n        if (b0 == -1) break;\n        var b1 = read();\n        var b2 = read();\n        var b3 = read();\n        var k = String.fromCharCode((b0 << 8) | b1);\n        var v = (b2 << 8) | b3;\n        unicodeMap[k] = v;\n        count += 1;\n      }\n      if (count != numChars) {\n        throw count + ' != ' + numChars;\n      }\n      return unicodeMap;\n    }();\n    var unknownChar = '?'.charCodeAt(0);\n    return function (s) {\n      var bytes = [];\n      for (var i = 0; i < s.length; i += 1) {\n        var c = s.charCodeAt(i);\n        if (c < 128) {\n          bytes.push(c);\n        }\n        else {\n          var b = unicodeMap[s.charAt(i)];\n          if (typeof b == 'number') {\n            if ((b & 0xff) == b) {\n              // 1byte\n              bytes.push(b);\n            }\n            else {\n              // 2bytes\n              bytes.push(b >>> 8);\n              bytes.push(b & 0xff);\n            }\n          }\n          else {\n            bytes.push(unknownChar);\n          }\n        }\n      }\n      return bytes;\n    };\n  };\n  //---------------------------------------------------------------------\n  // QRMode\n  //---------------------------------------------------------------------\n  var QRMode = {\n    MODE_NUMBER: 1 << 0,\n    MODE_ALPHA_NUM: 1 << 1,\n    MODE_8BIT_BYTE: 1 << 2,\n    MODE_KANJI: 1 << 3\n  };\n  //---------------------------------------------------------------------\n  // QRErrorCorrectionLevel\n  //---------------------------------------------------------------------\n  var QRErrorCorrectionLevel = {\n    L: 1,\n    M: 0,\n    Q: 3,\n    H: 2\n  };\n  //---------------------------------------------------------------------\n  // QRMaskPattern\n  //---------------------------------------------------------------------\n  var QRMaskPattern = {\n    PATTERN000: 0,\n    PATTERN001: 1,\n    PATTERN010: 2,\n    PATTERN011: 3,\n    PATTERN100: 4,\n    PATTERN101: 5,\n    PATTERN110: 6,\n    PATTERN111: 7\n  };\n  //---------------------------------------------------------------------\n  // QRUtil\n  //---------------------------------------------------------------------\n  var QRUtil = function () {\n    var PATTERN_POSITION_TABLE = [\n      [],\n      [6, 18],\n      [6, 22],\n      [6, 26],\n      [6, 30],\n      [6, 34],\n      [6, 22, 38],\n      [6, 24, 42],\n      [6, 26, 46],\n      [6, 28, 50],\n      [6, 30, 54],\n      [6, 32, 58],\n      [6, 34, 62],\n      [6, 26, 46, 66],\n      [6, 26, 48, 70],\n      [6, 26, 50, 74],\n      [6, 30, 54, 78],\n      [6, 30, 56, 82],\n      [6, 30, 58, 86],\n      [6, 34, 62, 90],\n      [6, 28, 50, 72, 94],\n      [6, 26, 50, 74, 98],\n      [6, 30, 54, 78, 102],\n      [6, 28, 54, 80, 106],\n      [6, 32, 58, 84, 110],\n      [6, 30, 58, 86, 114],\n      [6, 34, 62, 90, 118],\n      [6, 26, 50, 74, 98, 122],\n      [6, 30, 54, 78, 102, 126],\n      [6, 26, 52, 78, 104, 130],\n      [6, 30, 56, 82, 108, 134],\n      [6, 34, 60, 86, 112, 138],\n      [6, 30, 58, 86, 114, 142],\n      [6, 34, 62, 90, 118, 146],\n      [6, 30, 54, 78, 102, 126, 150],\n      [6, 24, 50, 76, 102, 128, 154],\n      [6, 28, 54, 80, 106, 132, 158],\n      [6, 32, 58, 84, 110, 136, 162],\n      [6, 26, 54, 82, 110, 138, 166],\n      [6, 30, 58, 86, 114, 142, 170]\n    ];\n    var G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0);\n    var G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0);\n    var G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1);\n    var _this = {};\n    var getBCHDigit = function (data) {\n      var digit = 0;\n      while (data != 0) {\n        digit += 1;\n        data >>>= 1;\n      }\n      return digit;\n    };\n    _this.getBCHTypeInfo = function (data) {\n      var d = data << 10;\n      while (getBCHDigit(d) - getBCHDigit(G15) >= 0) {\n        d ^= (G15 << (getBCHDigit(d) - getBCHDigit(G15)));\n      }\n      return ((data << 10) | d) ^ G15_MASK;\n    };\n    _this.getBCHTypeNumber = function (data) {\n      var d = data << 12;\n      while (getBCHDigit(d) - getBCHDigit(G18) >= 0) {\n        d ^= (G18 << (getBCHDigit(d) - getBCHDigit(G18)));\n      }\n      return (data << 12) | d;\n    };\n    _this.getPatternPosition = function (typeNumber) {\n      return PATTERN_POSITION_TABLE[typeNumber - 1];\n    };\n    _this.getMaskFunction = function (maskPattern) {\n      switch (maskPattern) {\n        case QRMaskPattern.PATTERN000:\n          return function (i, j) {\n            return (i + j) % 2 == 0;\n          };\n        case QRMaskPattern.PATTERN001:\n          return function (i, j) {\n            return i % 2 == 0;\n          };\n        case QRMaskPattern.PATTERN010:\n          return function (i, j) {\n            return j % 3 == 0;\n          };\n        case QRMaskPattern.PATTERN011:\n          return function (i, j) {\n            return (i + j) % 3 == 0;\n          };\n        case QRMaskPattern.PATTERN100:\n          return function (i, j) {\n            return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 == 0;\n          };\n        case QRMaskPattern.PATTERN101:\n          return function (i, j) {\n            return (i * j) % 2 + (i * j) % 3 == 0;\n          };\n        case QRMaskPattern.PATTERN110:\n          return function (i, j) {\n            return ((i * j) % 2 + (i * j) % 3) % 2 == 0;\n          };\n        case QRMaskPattern.PATTERN111:\n          return function (i, j) {\n            return ((i * j) % 3 + (i + j) % 2) % 2 == 0;\n          };\n        default:\n          throw 'bad maskPattern:' + maskPattern;\n      }\n    };\n    _this.getErrorCorrectPolynomial = function (errorCorrectLength) {\n      var a = qrPolynomial([1], 0);\n      for (var i = 0; i < errorCorrectLength; i += 1) {\n        a = a.multiply(qrPolynomial([1, QRMath.gexp(i)], 0));\n      }\n      return a;\n    };\n    _this.getLengthInBits = function (mode, type) {\n      if (1 <= type && type < 10) {\n        // 1 - 9\n        switch (mode) {\n          case QRMode.MODE_NUMBER:\n            return 10;\n          case QRMode.MODE_ALPHA_NUM:\n            return 9;\n          case QRMode.MODE_8BIT_BYTE:\n            return 8;\n          case QRMode.MODE_KANJI:\n            return 8;\n          default:\n            throw 'mode:' + mode;\n        }\n      }\n      else if (type < 27) {\n        // 10 - 26\n        switch (mode) {\n          case QRMode.MODE_NUMBER:\n            return 12;\n          case QRMode.MODE_ALPHA_NUM:\n            return 11;\n          case QRMode.MODE_8BIT_BYTE:\n            return 16;\n          case QRMode.MODE_KANJI:\n            return 10;\n          default:\n            throw 'mode:' + mode;\n        }\n      }\n      else if (type < 41) {\n        // 27 - 40\n        switch (mode) {\n          case QRMode.MODE_NUMBER:\n            return 14;\n          case QRMode.MODE_ALPHA_NUM:\n            return 13;\n          case QRMode.MODE_8BIT_BYTE:\n            return 16;\n          case QRMode.MODE_KANJI:\n            return 12;\n          default:\n            throw 'mode:' + mode;\n        }\n      }\n      else {\n        throw 'type:' + type;\n      }\n    };\n    _this.getLostPoint = function (qrcode) {\n      var moduleCount = qrcode.getModuleCount();\n      var lostPoint = 0;\n      // LEVEL1\n      for (var row = 0; row < moduleCount; row += 1) {\n        for (var col = 0; col < moduleCount; col += 1) {\n          var sameCount = 0;\n          var dark = qrcode.isDark(row, col);\n          for (var r = -1; r <= 1; r += 1) {\n            if (row + r < 0 || moduleCount <= row + r) {\n              continue;\n            }\n            for (var c = -1; c <= 1; c += 1) {\n              if (col + c < 0 || moduleCount <= col + c) {\n                continue;\n              }\n              if (r == 0 && c == 0) {\n                continue;\n              }\n              if (dark == qrcode.isDark(row + r, col + c)) {\n                sameCount += 1;\n              }\n            }\n          }\n          if (sameCount > 5) {\n            lostPoint += (3 + sameCount - 5);\n          }\n        }\n      };\n      // LEVEL2\n      for (var row = 0; row < moduleCount - 1; row += 1) {\n        for (var col = 0; col < moduleCount - 1; col += 1) {\n          var count = 0;\n          if (qrcode.isDark(row, col)) count += 1;\n          if (qrcode.isDark(row + 1, col)) count += 1;\n          if (qrcode.isDark(row, col + 1)) count += 1;\n          if (qrcode.isDark(row + 1, col + 1)) count += 1;\n          if (count == 0 || count == 4) {\n            lostPoint += 3;\n          }\n        }\n      }\n      // LEVEL3\n      for (var row = 0; row < moduleCount; row += 1) {\n        for (var col = 0; col < moduleCount - 6; col += 1) {\n          if (qrcode.isDark(row, col) && !qrcode.isDark(row, col + 1) && qrcode.isDark(row, col + 2) && qrcode.isDark(row, col + 3) && qrcode.isDark(row, col + 4) && !qrcode.isDark(row, col + 5) && qrcode.isDark(row, col + 6)) {\n            lostPoint += 40;\n          }\n        }\n      }\n      for (var col = 0; col < moduleCount; col += 1) {\n        for (var row = 0; row < moduleCount - 6; row += 1) {\n          if (qrcode.isDark(row, col) && !qrcode.isDark(row + 1, col) && qrcode.isDark(row + 2, col) && qrcode.isDark(row + 3, col) && qrcode.isDark(row + 4, col) && !qrcode.isDark(row + 5, col) && qrcode.isDark(row + 6, col)) {\n            lostPoint += 40;\n          }\n        }\n      }\n      // LEVEL4\n      var darkCount = 0;\n      for (var col = 0; col < moduleCount; col += 1) {\n        for (var row = 0; row < moduleCount; row += 1) {\n          if (qrcode.isDark(row, col)) {\n            darkCount += 1;\n          }\n        }\n      }\n      var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;\n      lostPoint += ratio * 10;\n      return lostPoint;\n    };\n    return _this;\n  }();\n  //---------------------------------------------------------------------\n  // QRMath\n  //---------------------------------------------------------------------\n  var QRMath = function () {\n    var EXP_TABLE = new Array(256);\n    var LOG_TABLE = new Array(256);\n    // initialize tables\n    for (var i = 0; i < 8; i += 1) {\n      EXP_TABLE[i] = 1 << i;\n    }\n    for (var i = 8; i < 256; i += 1) {\n      EXP_TABLE[i] = EXP_TABLE[i - 4] ^ EXP_TABLE[i - 5] ^ EXP_TABLE[i - 6] ^ EXP_TABLE[i - 8];\n    }\n    for (var i = 0; i < 255; i += 1) {\n      LOG_TABLE[EXP_TABLE[i]] = i;\n    }\n    var _this = {};\n    _this.glog = function (n) {\n      if (n < 1) {\n        throw 'glog(' + n + ')';\n      }\n      return LOG_TABLE[n];\n    };\n    _this.gexp = function (n) {\n      while (n < 0) {\n        n += 255;\n      }\n      while (n >= 256) {\n        n -= 255;\n      }\n      return EXP_TABLE[n];\n    };\n    return _this;\n  }();\n  //---------------------------------------------------------------------\n  // qrPolynomial\n  //---------------------------------------------------------------------\n  function qrPolynomial(num, shift) {\n    if (typeof num.length == 'undefined') {\n      throw num.length + '/' + shift;\n    }\n    var _num = function () {\n      var offset = 0;\n      while (offset < num.length && num[offset] == 0) {\n        offset += 1;\n      }\n      var _num = new Array(num.length - offset + shift);\n      for (var i = 0; i < num.length - offset; i += 1) {\n        _num[i] = num[i + offset];\n      }\n      return _num;\n    }();\n    var _this = {};\n    _this.getAt = function (index) {\n      return _num[index];\n    };\n    _this.getLength = function () {\n      return _num.length;\n    };\n    _this.multiply = function (e) {\n      var num = new Array(_this.getLength() + e.getLength() - 1);\n      for (var i = 0; i < _this.getLength(); i += 1) {\n        for (var j = 0; j < e.getLength(); j += 1) {\n          num[i + j] ^= QRMath.gexp(QRMath.glog(_this.getAt(i)) + QRMath.glog(e.getAt(j)));\n        }\n      }\n      return qrPolynomial(num, 0);\n    };\n    _this.mod = function (e) {\n      if (_this.getLength() - e.getLength() < 0) {\n        return _this;\n      }\n      var ratio = QRMath.glog(_this.getAt(0)) - QRMath.glog(e.getAt(0));\n      var num = new Array(_this.getLength());\n      for (var i = 0; i < _this.getLength(); i += 1) {\n        num[i] = _this.getAt(i);\n      }\n      for (var i = 0; i < e.getLength(); i += 1) {\n        num[i] ^= QRMath.gexp(QRMath.glog(e.getAt(i)) + ratio);\n      }\n      // recursive call\n      return qrPolynomial(num, 0).mod(e);\n    };\n    return _this;\n  };\n  //---------------------------------------------------------------------\n  // QRRSBlock\n  //---------------------------------------------------------------------\n  var QRRSBlock = function () {\n    var RS_BLOCK_TABLE = [\n      // L\n      // M\n      // Q\n      // H\n      // 1\n      [1, 26, 19],\n      [1, 26, 16],\n      [1, 26, 13],\n      [1, 26, 9],\n      // 2\n      [1, 44, 34],\n      [1, 44, 28],\n      [1, 44, 22],\n      [1, 44, 16],\n      // 3\n      [1, 70, 55],\n      [1, 70, 44],\n      [2, 35, 17],\n      [2, 35, 13],\n      // 4\n      [1, 100, 80],\n      [2, 50, 32],\n      [2, 50, 24],\n      [4, 25, 9],\n      // 5\n      [1, 134, 108],\n      [2, 67, 43],\n      [2, 33, 15, 2, 34, 16],\n      [2, 33, 11, 2, 34, 12],\n      // 6\n      [2, 86, 68],\n      [4, 43, 27],\n      [4, 43, 19],\n      [4, 43, 15],\n      // 7\n      [2, 98, 78],\n      [4, 49, 31],\n      [2, 32, 14, 4, 33, 15],\n      [4, 39, 13, 1, 40, 14],\n      // 8\n      [2, 121, 97],\n      [2, 60, 38, 2, 61, 39],\n      [4, 40, 18, 2, 41, 19],\n      [4, 40, 14, 2, 41, 15],\n      // 9\n      [2, 146, 116],\n      [3, 58, 36, 2, 59, 37],\n      [4, 36, 16, 4, 37, 17],\n      [4, 36, 12, 4, 37, 13],\n      // 10\n      [2, 86, 68, 2, 87, 69],\n      [4, 69, 43, 1, 70, 44],\n      [6, 43, 19, 2, 44, 20],\n      [6, 43, 15, 2, 44, 16],\n      // 11\n      [4, 101, 81],\n      [1, 80, 50, 4, 81, 51],\n      [4, 50, 22, 4, 51, 23],\n      [3, 36, 12, 8, 37, 13],\n      // 12\n      [2, 116, 92, 2, 117, 93],\n      [6, 58, 36, 2, 59, 37],\n      [4, 46, 20, 6, 47, 21],\n      [7, 42, 14, 4, 43, 15],\n      // 13\n      [4, 133, 107],\n      [8, 59, 37, 1, 60, 38],\n      [8, 44, 20, 4, 45, 21],\n      [12, 33, 11, 4, 34, 12],\n      // 14\n      [3, 145, 115, 1, 146, 116],\n      [4, 64, 40, 5, 65, 41],\n      [11, 36, 16, 5, 37, 17],\n      [11, 36, 12, 5, 37, 13],\n      // 15\n      [5, 109, 87, 1, 110, 88],\n      [5, 65, 41, 5, 66, 42],\n      [5, 54, 24, 7, 55, 25],\n      [11, 36, 12, 7, 37, 13],\n      // 16\n      [5, 122, 98, 1, 123, 99],\n      [7, 73, 45, 3, 74, 46],\n      [15, 43, 19, 2, 44, 20],\n      [3, 45, 15, 13, 46, 16],\n      // 17\n      [1, 135, 107, 5, 136, 108],\n      [10, 74, 46, 1, 75, 47],\n      [1, 50, 22, 15, 51, 23],\n      [2, 42, 14, 17, 43, 15],\n      // 18\n      [5, 150, 120, 1, 151, 121],\n      [9, 69, 43, 4, 70, 44],\n      [17, 50, 22, 1, 51, 23],\n      [2, 42, 14, 19, 43, 15],\n      // 19\n      [3, 141, 113, 4, 142, 114],\n      [3, 70, 44, 11, 71, 45],\n      [17, 47, 21, 4, 48, 22],\n      [9, 39, 13, 16, 40, 14],\n      // 20\n      [3, 135, 107, 5, 136, 108],\n      [3, 67, 41, 13, 68, 42],\n      [15, 54, 24, 5, 55, 25],\n      [15, 43, 15, 10, 44, 16],\n      // 21\n      [4, 144, 116, 4, 145, 117],\n      [17, 68, 42],\n      [17, 50, 22, 6, 51, 23],\n      [19, 46, 16, 6, 47, 17],\n      // 22\n      [2, 139, 111, 7, 140, 112],\n      [17, 74, 46],\n      [7, 54, 24, 16, 55, 25],\n      [34, 37, 13],\n      // 23\n      [4, 151, 121, 5, 152, 122],\n      [4, 75, 47, 14, 76, 48],\n      [11, 54, 24, 14, 55, 25],\n      [16, 45, 15, 14, 46, 16],\n      // 24\n      [6, 147, 117, 4, 148, 118],\n      [6, 73, 45, 14, 74, 46],\n      [11, 54, 24, 16, 55, 25],\n      [30, 46, 16, 2, 47, 17],\n      // 25\n      [8, 132, 106, 4, 133, 107],\n      [8, 75, 47, 13, 76, 48],\n      [7, 54, 24, 22, 55, 25],\n      [22, 45, 15, 13, 46, 16],\n      // 26\n      [10, 142, 114, 2, 143, 115],\n      [19, 74, 46, 4, 75, 47],\n      [28, 50, 22, 6, 51, 23],\n      [33, 46, 16, 4, 47, 17],\n      // 27\n      [8, 152, 122, 4, 153, 123],\n      [22, 73, 45, 3, 74, 46],\n      [8, 53, 23, 26, 54, 24],\n      [12, 45, 15, 28, 46, 16],\n      // 28\n      [3, 147, 117, 10, 148, 118],\n      [3, 73, 45, 23, 74, 46],\n      [4, 54, 24, 31, 55, 25],\n      [11, 45, 15, 31, 46, 16],\n      // 29\n      [7, 146, 116, 7, 147, 117],\n      [21, 73, 45, 7, 74, 46],\n      [1, 53, 23, 37, 54, 24],\n      [19, 45, 15, 26, 46, 16],\n      // 30\n      [5, 145, 115, 10, 146, 116],\n      [19, 75, 47, 10, 76, 48],\n      [15, 54, 24, 25, 55, 25],\n      [23, 45, 15, 25, 46, 16],\n      // 31\n      [13, 145, 115, 3, 146, 116],\n      [2, 74, 46, 29, 75, 47],\n      [42, 54, 24, 1, 55, 25],\n      [23, 45, 15, 28, 46, 16],\n      // 32\n      [17, 145, 115],\n      [10, 74, 46, 23, 75, 47],\n      [10, 54, 24, 35, 55, 25],\n      [19, 45, 15, 35, 46, 16],\n      // 33\n      [17, 145, 115, 1, 146, 116],\n      [14, 74, 46, 21, 75, 47],\n      [29, 54, 24, 19, 55, 25],\n      [11, 45, 15, 46, 46, 16],\n      // 34\n      [13, 145, 115, 6, 146, 116],\n      [14, 74, 46, 23, 75, 47],\n      [44, 54, 24, 7, 55, 25],\n      [59, 46, 16, 1, 47, 17],\n      // 35\n      [12, 151, 121, 7, 152, 122],\n      [12, 75, 47, 26, 76, 48],\n      [39, 54, 24, 14, 55, 25],\n      [22, 45, 15, 41, 46, 16],\n      // 36\n      [6, 151, 121, 14, 152, 122],\n      [6, 75, 47, 34, 76, 48],\n      [46, 54, 24, 10, 55, 25],\n      [2, 45, 15, 64, 46, 16],\n      // 37\n      [17, 152, 122, 4, 153, 123],\n      [29, 74, 46, 14, 75, 47],\n      [49, 54, 24, 10, 55, 25],\n      [24, 45, 15, 46, 46, 16],\n      // 38\n      [4, 152, 122, 18, 153, 123],\n      [13, 74, 46, 32, 75, 47],\n      [48, 54, 24, 14, 55, 25],\n      [42, 45, 15, 32, 46, 16],\n      // 39\n      [20, 147, 117, 4, 148, 118],\n      [40, 75, 47, 7, 76, 48],\n      [43, 54, 24, 22, 55, 25],\n      [10, 45, 15, 67, 46, 16],\n      // 40\n      [19, 148, 118, 6, 149, 119],\n      [18, 75, 47, 31, 76, 48],\n      [34, 54, 24, 34, 55, 25],\n      [20, 45, 15, 61, 46, 16]\n    ];\n    var qrRSBlock = function (totalCount, dataCount) {\n      var _this = {};\n      _this.totalCount = totalCount;\n      _this.dataCount = dataCount;\n      return _this;\n    };\n    var _this = {};\n    var getRsBlockTable = function (typeNumber, errorCorrectionLevel) {\n      switch (errorCorrectionLevel) {\n        case QRErrorCorrectionLevel.L:\n          return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0];\n        case QRErrorCorrectionLevel.M:\n          return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1];\n        case QRErrorCorrectionLevel.Q:\n          return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2];\n        case QRErrorCorrectionLevel.H:\n          return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3];\n        default:\n          return undefined;\n      }\n    };\n    _this.getRSBlocks = function (typeNumber, errorCorrectionLevel) {\n      var rsBlock = getRsBlockTable(typeNumber, errorCorrectionLevel);\n      if (typeof rsBlock == 'undefined') {\n        throw 'bad rs block @ typeNumber:' + typeNumber + '/errorCorrectionLevel:' + errorCorrectionLevel;\n      }\n      var length = rsBlock.length / 3;\n      var list = [];\n      for (var i = 0; i < length; i += 1) {\n        var count = rsBlock[i * 3 + 0];\n        var totalCount = rsBlock[i * 3 + 1];\n        var dataCount = rsBlock[i * 3 + 2];\n        for (var j = 0; j < count; j += 1) {\n          list.push(qrRSBlock(totalCount, dataCount));\n        }\n      }\n      return list;\n    };\n    return _this;\n  }();\n  //---------------------------------------------------------------------\n  // qrBitBuffer\n  //---------------------------------------------------------------------\n  var qrBitBuffer = function () {\n    var _buffer = [];\n    var _length = 0;\n    var _this = {};\n    _this.getBuffer = function () {\n      return _buffer;\n    };\n    _this.getAt = function (index) {\n      var bufIndex = Math.floor(index / 8);\n      return ((_buffer[bufIndex] >>> (7 - index % 8)) & 1) == 1;\n    };\n    _this.put = function (num, length) {\n      for (var i = 0; i < length; i += 1) {\n        _this.putBit(((num >>> (length - i - 1)) & 1) == 1);\n      }\n    };\n    _this.getLengthInBits = function () {\n      return _length;\n    };\n    _this.putBit = function (bit) {\n      var bufIndex = Math.floor(_length / 8);\n      if (_buffer.length <= bufIndex) {\n        _buffer.push(0);\n      }\n      if (bit) {\n        _buffer[bufIndex] |= (0x80 >>> (_length % 8));\n      }\n      _length += 1;\n    };\n    return _this;\n  };\n  //---------------------------------------------------------------------\n  // qrNumber\n  //---------------------------------------------------------------------\n  var qrNumber = function (data) {\n    var _mode = QRMode.MODE_NUMBER;\n    var _data = data;\n    var _this = {};\n    _this.getMode = function () {\n      return _mode;\n    };\n    _this.getLength = function (buffer) {\n      return _data.length;\n    };\n    _this.write = function (buffer) {\n      var data = _data;\n      var i = 0;\n      while (i + 2 < data.length) {\n        buffer.put(strToNum(data.substring(i, i + 3)), 10);\n        i += 3;\n      }\n      if (i < data.length) {\n        if (data.length - i == 1) {\n          buffer.put(strToNum(data.substring(i, i + 1)), 4);\n        }\n        else if (data.length - i == 2) {\n          buffer.put(strToNum(data.substring(i, i + 2)), 7);\n        }\n      }\n    };\n    var strToNum = function (s) {\n      var num = 0;\n      for (var i = 0; i < s.length; i += 1) {\n        num = num * 10 + chatToNum(s.charAt(i));\n      }\n      return num;\n    };\n    var chatToNum = function (c) {\n      if ('0' <= c && c <= '9') {\n        return c.charCodeAt(0) - '0'.charCodeAt(0);\n      }\n      throw 'illegal char :' + c;\n    };\n    return _this;\n  };\n  //---------------------------------------------------------------------\n  // qrAlphaNum\n  //---------------------------------------------------------------------\n  var qrAlphaNum = function (data) {\n    var _mode = QRMode.MODE_ALPHA_NUM;\n    var _data = data;\n    var _this = {};\n    _this.getMode = function () {\n      return _mode;\n    };\n    _this.getLength = function (buffer) {\n      return _data.length;\n    };\n    _this.write = function (buffer) {\n      var s = _data;\n      var i = 0;\n      while (i + 1 < s.length) {\n        buffer.put(getCode(s.charAt(i)) * 45 + getCode(s.charAt(i + 1)), 11);\n        i += 2;\n      }\n      if (i < s.length) {\n        buffer.put(getCode(s.charAt(i)), 6);\n      }\n    };\n    var getCode = function (c) {\n      if ('0' <= c && c <= '9') {\n        return c.charCodeAt(0) - '0'.charCodeAt(0);\n      }\n      else if ('A' <= c && c <= 'Z') {\n        return c.charCodeAt(0) - 'A'.charCodeAt(0) + 10;\n      }\n      else {\n        switch (c) {\n          case ' ':\n            return 36;\n          case '$':\n            return 37;\n          case '%':\n            return 38;\n          case '*':\n            return 39;\n          case '+':\n            return 40;\n          case '-':\n            return 41;\n          case '.':\n            return 42;\n          case '/':\n            return 43;\n          case ':':\n            return 44;\n          default:\n            throw 'illegal char :' + c;\n        }\n      }\n    };\n    return _this;\n  };\n  //---------------------------------------------------------------------\n  // qr8BitByte\n  //---------------------------------------------------------------------\n  var qr8BitByte = function (data) {\n    var _mode = QRMode.MODE_8BIT_BYTE;\n    var _data = data;\n    var _bytes = qrcode.stringToBytes(data);\n    var _this = {};\n    _this.getMode = function () {\n      return _mode;\n    };\n    _this.getLength = function (buffer) {\n      return _bytes.length;\n    };\n    _this.write = function (buffer) {\n      for (var i = 0; i < _bytes.length; i += 1) {\n        buffer.put(_bytes[i], 8);\n      }\n    };\n    return _this;\n  };\n  //---------------------------------------------------------------------\n  // qrKanji\n  //---------------------------------------------------------------------\n  var qrKanji = function (data) {\n    var _mode = QRMode.MODE_KANJI;\n    var _data = data;\n    var stringToBytes = qrcode.stringToBytesFuncs['SJIS'];\n    if (!stringToBytes) {\n      throw 'sjis not supported.';\n    }! function (c, code) {\n      // self test for sjis support.\n      var test = stringToBytes(c);\n      if (test.length != 2 || ((test[0] << 8) | test[1]) != code) {\n        throw 'sjis not supported.';\n      }\n    }('\\u53cb', 0x9746);\n    var _bytes = stringToBytes(data);\n    var _this = {};\n    _this.getMode = function () {\n      return _mode;\n    };\n    _this.getLength = function (buffer) {\n      return ~~(_bytes.length / 2);\n    };\n    _this.write = function (buffer) {\n      var data = _bytes;\n      var i = 0;\n      while (i + 1 < data.length) {\n        var c = ((0xff & data[i]) << 8) | (0xff & data[i + 1]);\n        if (0x8140 <= c && c <= 0x9FFC) {\n          c -= 0x8140;\n        }\n        else if (0xE040 <= c && c <= 0xEBBF) {\n          c -= 0xC140;\n        }\n        else {\n          throw 'illegal char at ' + (i + 1) + '/' + c;\n        }\n        c = ((c >>> 8) & 0xff) * 0xC0 + (c & 0xff);\n        buffer.put(c, 13);\n        i += 2;\n      }\n      if (i < data.length) {\n        throw 'illegal char at ' + (i + 1);\n      }\n    };\n    return _this;\n  };\n  //=====================================================================\n  // GIF Support etc.\n  //\n  //---------------------------------------------------------------------\n  // byteArrayOutputStream\n  //---------------------------------------------------------------------\n  var byteArrayOutputStream = function () {\n    var _bytes = [];\n    var _this = {};\n    _this.writeByte = function (b) {\n      _bytes.push(b & 0xff);\n    };\n    _this.writeShort = function (i) {\n      _this.writeByte(i);\n      _this.writeByte(i >>> 8);\n    };\n    _this.writeBytes = function (b, off, len) {\n      off = off || 0;\n      len = len || b.length;\n      for (var i = 0; i < len; i += 1) {\n        _this.writeByte(b[i + off]);\n      }\n    };\n    _this.writeString = function (s) {\n      for (var i = 0; i < s.length; i += 1) {\n        _this.writeByte(s.charCodeAt(i));\n      }\n    };\n    _this.toByteArray = function () {\n      return _bytes;\n    };\n    _this.toString = function () {\n      var s = '';\n      s += '[';\n      for (var i = 0; i < _bytes.length; i += 1) {\n        if (i > 0) {\n          s += ',';\n        }\n        s += _bytes[i];\n      }\n      s += ']';\n      return s;\n    };\n    return _this;\n  };\n  //---------------------------------------------------------------------\n  // base64EncodeOutputStream\n  //---------------------------------------------------------------------\n  var base64EncodeOutputStream = function () {\n    var _buffer = 0;\n    var _buflen = 0;\n    var _length = 0;\n    var _base64 = '';\n    var _this = {};\n    var writeEncoded = function (b) {\n      _base64 += String.fromCharCode(encode(b & 0x3f));\n    };\n    var encode = function (n) {\n      if (n < 0) {\n        // error.\n      }\n      else if (n < 26) {\n        return 0x41 + n;\n      }\n      else if (n < 52) {\n        return 0x61 + (n - 26);\n      }\n      else if (n < 62) {\n        return 0x30 + (n - 52);\n      }\n      else if (n == 62) {\n        return 0x2b;\n      }\n      else if (n == 63) {\n        return 0x2f;\n      }\n      throw 'n:' + n;\n    };\n    _this.writeByte = function (n) {\n      _buffer = (_buffer << 8) | (n & 0xff);\n      _buflen += 8;\n      _length += 1;\n      while (_buflen >= 6) {\n        writeEncoded(_buffer >>> (_buflen - 6));\n        _buflen -= 6;\n      }\n    };\n    _this.flush = function () {\n      if (_buflen > 0) {\n        writeEncoded(_buffer << (6 - _buflen));\n        _buffer = 0;\n        _buflen = 0;\n      }\n      if (_length % 3 != 0) {\n        // padding\n        var padlen = 3 - _length % 3;\n        for (var i = 0; i < padlen; i += 1) {\n          _base64 += '=';\n        }\n      }\n    };\n    _this.toString = function () {\n      return _base64;\n    };\n    return _this;\n  };\n  //---------------------------------------------------------------------\n  // base64DecodeInputStream\n  //---------------------------------------------------------------------\n  var base64DecodeInputStream = function (str) {\n    var _str = str;\n    var _pos = 0;\n    var _buffer = 0;\n    var _buflen = 0;\n    var _this = {};\n    _this.read = function () {\n      while (_buflen < 8) {\n        if (_pos >= _str.length) {\n          if (_buflen == 0) {\n            return -1;\n          }\n          throw 'unexpected end of file./' + _buflen;\n        }\n        var c = _str.charAt(_pos);\n        _pos += 1;\n        if (c == '=') {\n          _buflen = 0;\n          return -1;\n        }\n        else if (c.match(/^\\s$/)) {\n          // ignore if whitespace.\n          continue;\n        }\n        _buffer = (_buffer << 6) | decode(c.charCodeAt(0));\n        _buflen += 6;\n      }\n      var n = (_buffer >>> (_buflen - 8)) & 0xff;\n      _buflen -= 8;\n      return n;\n    };\n    var decode = function (c) {\n      if (0x41 <= c && c <= 0x5a) {\n        return c - 0x41;\n      }\n      else if (0x61 <= c && c <= 0x7a) {\n        return c - 0x61 + 26;\n      }\n      else if (0x30 <= c && c <= 0x39) {\n        return c - 0x30 + 52;\n      }\n      else if (c == 0x2b) {\n        return 62;\n      }\n      else if (c == 0x2f) {\n        return 63;\n      }\n      else {\n        throw 'c:' + c;\n      }\n    };\n    return _this;\n  };\n  //---------------------------------------------------------------------\n  // gifImage (B/W)\n  //---------------------------------------------------------------------\n  var gifImage = function (width, height) {\n    var _width = width;\n    var _height = height;\n    var _data = new Array(width * height);\n    var _this = {};\n    _this.setPixel = function (x, y, pixel) {\n      _data[y * _width + x] = pixel;\n    };\n    _this.write = function (out) {\n      //---------------------------------\n      // GIF Signature\n      out.writeString('GIF87a');\n      //---------------------------------\n      // Screen Descriptor\n      out.writeShort(_width);\n      out.writeShort(_height);\n      out.writeByte(0x80); // 2bit\n      out.writeByte(0);\n      out.writeByte(0);\n      //---------------------------------\n      // Global Color Map\n      // black\n      out.writeByte(0x00);\n      out.writeByte(0x00);\n      out.writeByte(0x00);\n      // white\n      out.writeByte(0xff);\n      out.writeByte(0xff);\n      out.writeByte(0xff);\n      //---------------------------------\n      // Image Descriptor\n      out.writeString(',');\n      out.writeShort(0);\n      out.writeShort(0);\n      out.writeShort(_width);\n      out.writeShort(_height);\n      out.writeByte(0);\n      //---------------------------------\n      // Local Color Map\n      //---------------------------------\n      // Raster Data\n      var lzwMinCodeSize = 2;\n      var raster = getLZWRaster(lzwMinCodeSize);\n      out.writeByte(lzwMinCodeSize);\n      var offset = 0;\n      while (raster.length - offset > 255) {\n        out.writeByte(255);\n        out.writeBytes(raster, offset, 255);\n        offset += 255;\n      }\n      out.writeByte(raster.length - offset);\n      out.writeBytes(raster, offset, raster.length - offset);\n      out.writeByte(0x00);\n      //---------------------------------\n      // GIF Terminator\n      out.writeString(';');\n    };\n    var bitOutputStream = function (out) {\n      var _out = out;\n      var _bitLength = 0;\n      var _bitBuffer = 0;\n      var _this = {};\n      _this.write = function (data, length) {\n        if ((data >>> length) != 0) {\n          throw 'length over';\n        }\n        while (_bitLength + length >= 8) {\n          _out.writeByte(0xff & ((data << _bitLength) | _bitBuffer));\n          length -= (8 - _bitLength);\n          data >>>= (8 - _bitLength);\n          _bitBuffer = 0;\n          _bitLength = 0;\n        }\n        _bitBuffer = (data << _bitLength) | _bitBuffer;\n        _bitLength = _bitLength + length;\n      };\n      _this.flush = function () {\n        if (_bitLength > 0) {\n          _out.writeByte(_bitBuffer);\n        }\n      };\n      return _this;\n    };\n    var getLZWRaster = function (lzwMinCodeSize) {\n      var clearCode = 1 << lzwMinCodeSize;\n      var endCode = (1 << lzwMinCodeSize) + 1;\n      var bitLength = lzwMinCodeSize + 1;\n      // Setup LZWTable\n      var table = lzwTable();\n      for (var i = 0; i < clearCode; i += 1) {\n        table.add(String.fromCharCode(i));\n      }\n      table.add(String.fromCharCode(clearCode));\n      table.add(String.fromCharCode(endCode));\n      var byteOut = byteArrayOutputStream();\n      var bitOut = bitOutputStream(byteOut);\n      // clear code\n      bitOut.write(clearCode, bitLength);\n      var dataIndex = 0;\n      var s = String.fromCharCode(_data[dataIndex]);\n      dataIndex += 1;\n      while (dataIndex < _data.length) {\n        var c = String.fromCharCode(_data[dataIndex]);\n        dataIndex += 1;\n        if (table.contains(s + c)) {\n          s = s + c;\n        }\n        else {\n          bitOut.write(table.indexOf(s), bitLength);\n          if (table.size() < 0xfff) {\n            if (table.size() == (1 << bitLength)) {\n              bitLength += 1;\n            }\n            table.add(s + c);\n          }\n          s = c;\n        }\n      }\n      bitOut.write(table.indexOf(s), bitLength);\n      // end code\n      bitOut.write(endCode, bitLength);\n      bitOut.flush();\n      return byteOut.toByteArray();\n    };\n    var lzwTable = function () {\n      var _map = {};\n      var _size = 0;\n      var _this = {};\n      _this.add = function (key) {\n        if (_this.contains(key)) {\n          throw 'dup key:' + key;\n        }\n        _map[key] = _size;\n        _size += 1;\n      };\n      _this.size = function () {\n        return _size;\n      };\n      _this.indexOf = function (key) {\n        return _map[key];\n      };\n      _this.contains = function (key) {\n        return typeof _map[key] != 'undefined';\n      };\n      return _this;\n    };\n    return _this;\n  };\n  var createImgTag = function (width, height, getPixel, alt) {\n    var gif = gifImage(width, height);\n    for (var y = 0; y < height; y += 1) {\n      for (var x = 0; x < width; x += 1) {\n        gif.setPixel(x, y, getPixel(x, y));\n      }\n    }\n    var b = byteArrayOutputStream();\n    gif.write(b);\n    var base64 = base64EncodeOutputStream();\n    var bytes = b.toByteArray();\n    for (var i = 0; i < bytes.length; i += 1) {\n      base64.writeByte(bytes[i]);\n    }\n    base64.flush();\n    var img = '';\n    img += '<img';\n    img += '\\u0020src=\"';\n    img += 'data:image/gif;base64,';\n    img += base64;\n    img += '\"';\n    img += '\\u0020width=\"';\n    img += width;\n    img += '\"';\n    img += '\\u0020height=\"';\n    img += height;\n    img += '\"';\n    if (alt) {\n      img += '\\u0020alt=\"';\n      img += alt;\n      img += '\"';\n    }\n    img += '/>';\n    return img;\n  };\n  //---------------------------------------------------------------------\n  // returns qrcode function.\n  return qrcode;\n}();\n// multibyte support\n! function () {\n  qrcode.stringToBytesFuncs['UTF-8'] = function (s) {\n    // http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array\n    function toUTF8Array(str) {\n      var utf8 = [];\n      for (var i = 0; i < str.length; i++) {\n        var charcode = str.charCodeAt(i);\n        if (charcode < 0x80) utf8.push(charcode);\n        else if (charcode < 0x800) {\n          utf8.push(0xc0 | (charcode >> 6), 0x80 | (charcode & 0x3f));\n        }\n        else if (charcode < 0xd800 || charcode >= 0xe000) {\n          utf8.push(0xe0 | (charcode >> 12), 0x80 | ((charcode >> 6) & 0x3f), 0x80 | (charcode & 0x3f));\n        }\n        // surrogate pair\n        else {\n          i++;\n          // UTF-16 encodes 0x10000-0x10FFFF by\n          // subtracting 0x10000 and splitting the\n          // 20 bits of 0x0-0xFFFFF into two halves\n          charcode = 0x10000 + (((charcode & 0x3ff) << 10) | (str.charCodeAt(i) & 0x3ff));\n          utf8.push(0xf0 | (charcode >> 18), 0x80 | ((charcode >> 12) & 0x3f), 0x80 | ((charcode >> 6) & 0x3f), 0x80 | (charcode & 0x3f));\n        }\n      }\n      return utf8;\n    }\n    return toUTF8Array(s);\n  };\n}();\n(function (factory) {\n  if (typeof define === 'function' && define.amd) {\n    define([], factory);\n  }\n  else if (typeof exports === 'object') {\n    module.exports = factory();\n  }\n}(function () {\n  return qrcode;\n}));\n"
  },
  {
    "path": "packages/chameleon-tool/configs/preview.html",
    "content": "<!DOCTYPE html>\n<html>\n\n<head>\n  <meta charset=\"utf-8\">\n  <title>Chameleon Preview</title>\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\">\n  <meta name=\"apple-mobile-web-app-capable\" content=\"yes\">\n  <meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\">\n  <meta name=\"apple-touch-fullscreen\" content=\"yes\">\n  <meta name=\"format-detection\" content=\"telephone=no, email=no\">\n  <style>\n    html,\n    body {\n      width: 100%;\n      height: 100%;\n      margin: 0;\n      padding: 0;\n      background-color: #f3f7fd\n    }\n\n    ul,\n    li {\n      padding: 0;\n      margin: 0;\n      list-style: none\n    }\n\n    .center {\n      display: flex;\n      align-items: center;\n      justify-content: center;\n    }\n\n    #preview {\n      width: 750px;\n      height: 1250px;\n      transform: scale(0.29);\n      transform-origin: top left;\n    }\n\n    .phone {\n      align-self: flex-end;\n      background-color: #FFF;\n      /* width: 320px; */\n      width: 260px;\n      height: 610px;\n      position: relative;\n    }\n\n    .mock-phone {\n      position: absolute;\n      left: 50%;\n      transform: translate(-50%);\n      width: 265px;\n      min-width: 265px;\n      height: 520px;\n      background: url('./preview-assets/phone.png') center / cover no-repeat;\n    }\n\n    .mock-phone .inner {\n      position: absolute;\n      top: 65px;\n      z-index: 26;\n      left: 50%;\n      transform: translate(-50%);\n      width: 218px;\n      height: 375px;\n      overflow: hidden;\n    }\n\n    .mock-phone .inner iframe {\n      width: 100%;\n      height: 100%;\n      margin: 0;\n    }\n\n    .mock-phone .camera {\n      position: absolute;\n      width: 4px;\n      height: 4px;\n      border-radius: 4px;\n      background: #2d2d2d;\n      border: 1px solid #a6a8a9;\n      top: 30px;\n      left: 105px;\n    }\n\n    .mock-phone .earpiece {\n      position: absolute;\n      width: 40px;\n      height: 4px;\n      border-radius: 4px;\n      background: #2d2d2d;\n      border: 1px solid #a6a8a9;\n      top: 30px;\n      left: 120px;\n    }\n\n    .mock-phone .home-btn {\n      position: absolute;\n      width: 40px;\n      height: 40px;\n      border-radius: 40px;\n      background: #f3f3f4;\n      border: 1px solid #b7b7b9;\n      bottom: 15px;\n      left: 50%;\n      margin-left: -25px;\n    }\n\n    body {\n      display: flex;\n      flex-direction: column;\n    }\n\n    .header {\n      height: 76px;\n      flex-grow: 0;\n      background-color: #19263E;\n      display: flex;\n      align-items: center;\n      justify-content: space-between;\n    }\n\n    .header .result-preview {\n      font-size: 14px;\n      color: #D8D8D8;\n    }\n\n    .header .header-left {\n      display: flex;\n      align-items: center;\n    }\n\n    .header .cml-logo {\n      margin-left: 30px;\n      width:150px;\n    }\n\n    .header .line {\n      display: inline-block;\n      margin-left: 20px;\n      margin-right: 20px;\n      width: 2px;\n      height: 25px;\n      background-color: #D7D7D7;\n    }\n\n    .header .header-right {\n      display: flex;\n      align-items: center;\n      margin-right: 80px;\n    }\n\n    .header .toggle-route {\n      color: #FFF;\n      font-size: 12px;\n      margin-right: 15px;\n      font-weight: 300;\n    }\n\n    .header .route-input {\n      padding-left: 5px;\n      padding-right: 5px;\n      display: inline-block;\n      width: 230px;\n      height: 32px;\n      line-height: 32px;\n      border-radius: 2px;\n      /* color: #FFF; */\n      font-size: 12px;\n      font-weight: 300;\n      border: 1px solid rgba(255, 255, 255, 0.8);\n      padding-left: 5px;\n      overflow: scroll;\n    }\n\n    .routes-container {\n      width: 350px;\n      background: #FFF;\n      overflow-y: scroll;\n      overflow-x: hidden;\n      border-radius: 5px;\n      position: absolute;\n      right: 30px;\n      top: 70px;\n      z-index: 999;\n      box-shadow: 0 2px 12px 0;\n      padding-right: 15px;\n      height:500px;\n\n    }\n\n    .routes-container-hide {\n      /* display: none;\n      width: 350px;\n      background: #FFF;\n      overflow: scroll;\n      border-radius: 5px;\n      position: absolute;\n      right: 30px;\n      top: 76px;\n      z-index: 999; */\n    }\n\n    .content {\n      flex: 1;\n      overflow: scroll;\n    }\n\n    .main {\n      display: flex;\n      flex-direction: row;\n      justify-content: space-between;\n      min-width: 980px;\n    }\n    .main .right{\n      height:600px;\n      overflow:auto;\n    }\n    .main .qrcode-box {\n      /* width: 400px; */\n      width: 690px;\n      display: flex;\n      flex-direction: row;\n      align-items: stretch;\n      flex-wrap: wrap;\n    }\n    .main .qrcode-box-bottom {\n      margin-top:10px;\n    }\n\n    .main .qrcode-item {\n      width: 220px;\n      height: 200px;\n      background-color: #FFF;\n      margin-left: 10px;\n      position: relative;\n    }\n\n    .qrcode-item .qrcode-content {\n      width: 100%;\n      position: absolute;\n      left: 50%;\n      top: 60%;\n      transform: translate(-50%, -50%)\n    }\n    .qrcode-title img {\n      width:30px;\n      /* height:36px */\n      border-radius:50%;\n    }\n\n    .qrcode-item .qrcode-title {\n      display: flex;\n      height: 40px;\n      align-items: center;\n      justify-content: flex-start;\n    }\n\n    .qrcode-title span {\n      font-family: PingFangSC-Regular;\n      font-size: 14px;\n      color: #19263E;\n      margin-left: 10px;\n    }\n\n    .qrcode {\n      width: 100%;\n    }\n\n    .qrcode>img {\n      display: block;\n      width: 120px;\n      height: 120px;\n      margin: 0 auto;\n    }\n\n    /* .blur-qrcode:hover {\n      -webkit-filter: blur(10px);\n      -moz-filter: blur(10px);\n      -o-filter: blur(10px);\n      -ms-filter: blur(10px);\n      filter: blur(10px);\n    } */\n\n    .qrcode-tips {\n      text-align: center;\n      margin: 5px;\n      font-size: 12px;\n      color: #888F9B;\n    }\n\n    .qrcode-tips a,\n    .qrcode-tips a:link {\n      color: #00B4FF;\n      text-decoration: none;\n    }\n\n    .qrcode-tips a:hover,\n    .qrcode-tips a:active {\n      color: #238FFF;\n    }\n\n    .web-page-link {\n      opacity: 0;\n      cursor: pointer;\n      z-index: 999;\n      display: block;\n      right: 10px;\n      top: 10px;\n      width: 30px;\n      height: 30px;\n      font-size: 14px;\n      border-radius: 50%;\n      background: #f5f5f5;\n      border: 1px solid #ddd;\n      transition: all .2s ease;\n      position: absolute;\n    }\n\n    .web-page-link svg {\n      margin: 5px;\n      opacity: .5;\n    }\n\n    .inner:hover .web-page-link {\n      opacity: 1;\n      transition: all .2s ease;\n    }\n\n    .pages-box {\n      max-height: 330px;\n      overflow-y: auto;\n    }\n\n    .pages-box .page-item {\n      display: inline-block;\n      padding: 5px 8px;\n      text-decoration: none;\n      font-size: 14px;\n      border-radius: 5px;\n      margin: 10px 5px;\n      color: #717171;\n      border: 1px solid #ddd;\n      transition: all .2s ease;\n    }\n\n    .pages-box .page-item:hover {\n      border-color: #0088fb;\n      background: #0088fb;\n      color: #fff;\n    }\n\n    .pages-box .page-item.active {\n      border-color: #0088fb;\n      background: #0088fb;\n      color: #fff;\n    }\n\n    .beatlesqrcode {\n      margin-top: 20px;\n    }\n\n    #routeList {\n      cursor: pointer;\n      list-style-type: none;\n    }\n\n    #routeList li {\n      position: relative;\n    }\n\n    #routeList li span {\n      padding-top:7px;\n      padding-bottom: 3px;\n      padding-left: 25px;\n      font-size:14px;\n    }\n\n    #routeList li img {\n      position: absolute;\n      left: 5px;\n      top: 50%;\n      transform: translate(0, -50%)\n    }\n\n    #routeList li span {\n      display: inline-block;\n      width: 60px;\n      text-overflow: ellipsis;\n      overflow: hidden;\n      white-space: nowrap;\n      width: 100%;\n      box-sizing: border-box;\n    }\n\n    #routeList li:hover {\n      background-color: rgba(25, 38, 62, 0.08);\n    }\n\n    /* 这里的样式控制dev构建的类型的显示和隐藏 */\n    .inner .web-dev {\n      display: none\n    }\n\n    .inner .web-no-dev {\n      height: 100%;\n      display: flex;\n      justify-content: center;\n      align-items: center;\n\n    }\n\n    .weex-dev {\n      display: none;\n    }\n\n    .sfc-dev {\n      display: none;\n    }\n\n    .wx-dev {\n      display: none;\n    }\n\n    .alipay-dev,.tt-dev,.qq-dev {\n      display: none;\n    }\n    .baidu-dev {\n      display: none;\n    }\n    .h5-dev {\n      display: none;\n    }\n\n    .no-dev-content {\n      font-family: PingFangSC-Regular;\n      font-size: 14px;\n      color: #19263E;\n      letter-spacing: 0;\n      text-align: center;\n    }\n\n    .route-input::-webkit-scrollbar {\n      height: 0px;\n      width: 0px;\n      background-color: #19263E;\n      /* border-radius: 5px; */\n    }\n    .right-route{\n      margin-left:10px;\n      width:330px;\n      background: #FFF;\n      height:600px;\n      overflow-y: scroll;\n      overflow-x: hidden;\n    }\n    /* .route-input::-webkit-scrollbar-track {\n  width:5px;\n    background-color: #19263E;\n} */\n  </style>\n</head>\n\n<body>\n  <header class=\"header\">\n    <div class=\"header-left\">\n      <img class=\"cml-logo\" src=\"./preview-assets/cml-logo.png\" alt=\"\">\n      <span class=\"line\"></span>\n      <span class=\"result-preview\">效果预览</span>\n    </div>\n\n    <div class=\"header-right\">\n      <span class=\"toggle-route\">搜索路由地址</span>\n      <input class=\"route-input center\" id=\"routes-select\"\n      ></input>\n\n    </div>\n  </header>\n  </div>\n  <div class=\"content center\" id=\"wrap-content\">\n    <main class=\"main\">\n      <div class=\"phone\">\n        <div class=\"qrcode-title\">\n          <img src=\"./preview-assets/cml-h5.png\" alt=\"\">\n          <span style=\"vertical-align: 10px;\"> H5页面 效果预览</span>\n        </div>\n        <div class=\"mock-phone\">\n          <!-- <div class=\"camera\"></div> -->\n          <!-- <div class=\"earpiece\"></div> -->\n          <div class=\"inner\">\n            <div class=\"web-dev\" id=\"web-dev\">\n              <a class=\"web-page-link\" href=\"\" target=\"_blank\" title=\"Open on new tab\">\n                <svg t=\"1526896599773\" class=\"icon\" style=\"\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"\n                  p-id=\"2499\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"20\" height=\"20\">\n                  <defs>\n                    <style type=\"text/css\"></style>\n                  </defs>\n                  <path d=\"M466 146c41.6 0 82.1 7.9 120.4 23.4 39.7 16.1 75.3 39.7 105.8 70.3 58.2 58.3 91.5 135.7 93.6 218 2.1 82-26.8 160.7-81.4 221.6l-11.9 13.3-13.3 11.9C620.7 757 544.9 786 465.9 786c-41.6 0-82.1-7.9-120.4-23.4-39.7-16.1-75.3-39.7-105.8-70.3-30.6-30.6-54.2-66.2-70.3-105.8-15.6-38.4-23.4-79-23.4-120.5 0-41.6 7.9-82.1 23.4-120.4 16.1-39.7 39.7-75.3 70.3-105.8 30.6-30.6 66.2-54.2 105.8-70.3C383.9 153.8 424.4 146 466 146m0-40c-92.1 0-184.3 35.1-254.6 105.4-140.6 140.6-140.6 368.5 0 509.1C281.7 790.8 373.8 826 465.9 826c85.9 0 171.8-30.6 240-91.7L889.8 918l28.3-28.3L734.3 706C861 564.7 856.4 347.3 720.5 211.4 650.2 141.1 558.1 106 466 106z\"\n                    fill=\"\" p-id=\"2500\"></path>\n                </svg>\n              </a>\n              <iframe id=\"preview\" src=\"/\" frameborder=\"0\"></iframe>\n            </div>\n            <div class=\"web-no-dev\" id=\"web-no-dev\">\n              <div>\n                <div style=\"text-align:center\"><img src=\"./preview-assets/cml-forbidden.png\"\n                    alt=\"\"><br>\n                </div>\n                <p class=\"no-dev-content\">\n                  未启动web端构建\n                </p>\n              </div>\n            </div>\n          </div>\n          <!-- <div class=\"home-btn\"></div> -->\n        </div>\n      </div>\n      <div class=\"right\">\n        <div class=\"qrcode-box\" id=\"qrcodeBox\">\n            <div class='qrcode-item'>\n              <div class=\"qrcode-title\">\n                <img src=\"./preview-assets/cml-chameleon.png\" alt=\"\">\n                <span>Chameleon Playground App 效果预览</span>\n              </div>\n              <div class=\"qrcode-content sfc-dev blur-qrcode\" id=\"sfc-dev\">\n                <a class=\"qrcode beatlesqrcode\" id=\"beatlesqrcode\" target=\"_blank\"></a>\n                <p class=\"qrcode-tips\"> 用 <a href=\"https://beatles-chameleon.github.io/playground/app-release.apk\" target=\"_blank\">Chameleon Playground App</a> 扫码 </p>\n              </div>\n              <div class=\"qrcode-content\" id=\"sfc-no-dev\">\n                <div style=\"text-align:center\">\n                  <img src=\"./preview-assets/cml-forbidden.png\" alt=\"\">\n                </div>\n                <p class=\"no-dev-content\">\n                  未启动weex端构建\n                </p>\n              </div>\n            </div>\n            <div class=\"qrcode-item\">\n              <div class=\"qrcode-title\">\n                <img src=\"./preview-assets/cml-weex.png\" alt=\"\">\n                <span> Weex Playground App 效果预览</span>\n              </div>\n              <div class=\"qrcode-content weex-dev blur-qrcode\" id=\"weex-dev\">\n                <a class=\"qrcode\" id=\"qrcode\" target=\"_blank\"></a>\n                <p class=\"qrcode-tips\">用 <a target=\"_blank\" href=\"https://weex-project.io/playground.html\">Weex Playground App</a> 扫码</p>\n              </div>\n              <div class=\"qrcode-content\" id=\"weex-no-dev\">\n                <div style=\"text-align:center\">\n                  <img src=\"./preview-assets/cml-forbidden.png\" alt=\"\">\n                </div>\n                <p class=\"no-dev-content\">\n                  未启动Weex端构建\n\n                </p>\n              </div>\n            </div>\n            <div class=\"qrcode-item\">\n              <div class=\"qrcode-title\">\n                <img src=\"./preview-assets/cml-h5.png\" alt=\"\">\n                <span> H5端 效果预览</span>\n              </div>\n              <div class=\"qrcode-content h5-dev blur-qrcode\" id=\"h5-dev\">\n                <a class=\"qrcode\" id=\"h5qrcode\" target=\"_blank\"></a>\n                <p class=\"qrcode-tips\">用 智能手机 扫码</p>\n              </div>\n              <div class=\"qrcode-content\" id=\"h5-no-dev\">\n                <div style=\"text-align:center\">\n                  <img src=\"./preview-assets/cml-forbidden.png\" alt=\"\">\n                </div>\n                <p class=\"no-dev-content\">\n                  未启动web端构建\n\n                </p>\n              </div>\n            </div>\n\n\n        </div>\n        <div class=\"qrcode-box qrcode-box-bottom\" id=\"qrcodeBox\">\n          <div class='qrcode-item'>\n            <div class=\"qrcode-title\">\n              <img src=\"./preview-assets/cml-weixin.png\" alt=\"\">\n              <span> 微信小程序 效果预览</span>\n            </div>\n            <div class=\"qrcode-content wx-dev\" id=\"wx-dev\">\n              <p class=\"qrcode-tips\"> 代码产出到：项目根目录 /dist/wx </p>\n              <p class=\"qrcode-tips\"> 下载 <a href=\"https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html\">微信开发者工具</a>\n                进行预览</p>\n            </div>\n            <div class=\"qrcode-content\" id=\"wx-no-dev\">\n              <div style=\"text-align:center\">\n                <img src=\"./preview-assets/cml-forbidden.png\" alt=\"\">\n              </div>\n              <p class=\"no-dev-content\">未启动微信小程序构建</p>\n            </div>\n          </div>\n          <div class='qrcode-item'>\n            <div class=\"qrcode-title\">\n              <img src=\"./preview-assets/cml-alipay.png\" alt=\"\">\n              <span> 支付宝小程序 效果预览</span>\n            </div>\n            <div class=\"qrcode-content alipay-dev\" id=\"alipay-dev\">\n              <p class=\"qrcode-tips\"> 代码产出到：项目根目录 /dist/alipay </p>\n              <p class=\"qrcode-tips\"> 下载 <a href=\"https://docs.alipay.com/mini/developer/getting-started#%E4%B8%8B%E8%BD%BD\">支付宝开发者工具</a>\n                进行预览</p>\n            </div>\n            <div class=\"qrcode-content\" id=\"alipay-no-dev\">\n              <div style=\"text-align:center\">\n                <img src=\"./preview-assets/cml-forbidden.png\" alt=\"\">\n              </div>\n              <p class='no-dev-content'>\n                未启动支付宝小程序构建\n              </p>\n            </div>\n          </div>\n          <div class='qrcode-item'>\n            <div class=\"qrcode-title\">\n              <img src=\"./preview-assets/cml-baidu.png\" alt=\"\">\n              <span> 百度小程序 效果预览</span>\n            </div>\n            <div class=\"qrcode-content baidu-dev\" id=\"baidu-dev\">\n              <p class=\"qrcode-tips\"> 代码产出到：项目根目录 /dist/baidu </p>\n              <p class=\"qrcode-tips\"> 下载 <a href=\"https://smartprogram.baidu.com/developer/index.html\">百度开发者工具</a>\n                进行预览</p>\n            </div>\n            <div class=\"qrcode-content\" id=\"baidu-no-dev\">\n              <div style=\"text-align:center\">\n                <img src=\"./preview-assets/cml-forbidden.png\" alt=\"\">\n              </div>\n              <p class='no-dev-content'>\n                  未启动百度小程序构建\n              </p>\n            </div>\n          </div>\n        </div>\n        <div class=\"qrcode-box qrcode-box-bottom\" id=\"qrcodeBox\">\n            <div class='qrcode-item'>\n              <div class=\"qrcode-title\">\n                <img src=\"./preview-assets/cml-tt.png\" alt=\"\">\n                <span> 字节跳动小程序 效果预览</span>\n              </div>\n              <div class=\"qrcode-content tt-dev\" id=\"tt-dev\">\n                <p class=\"qrcode-tips\"> 代码产出到：项目根目录 /dist/tt </p>\n                <p class=\"qrcode-tips\"> 下载 <a href=\"https://microapp.bytedance.com/docs/devtool/versionUpdate.html\">头条开发者工具</a>\n                  进行预览</p>\n              </div>\n              <div class=\"qrcode-content\" id=\"tt-no-dev\">\n                <div style=\"text-align:center\">\n                  <img src=\"./preview-assets/cml-forbidden.png\" alt=\"\">\n                </div>\n                <p class=\"no-dev-content\">未启动字节跳动小程序构建</p>\n              </div>\n            </div>\n            <div class='qrcode-item'>\n              <div class=\"qrcode-title\">\n                <img src=\"./preview-assets/cml-qq.png\" alt=\"\">\n                <span> QQ小程序 效果预览</span>\n              </div>\n              <div class=\"qrcode-content qq-dev\" id=\"qq-dev\">\n                <p class=\"qrcode-tips\"> 代码产出到：项目根目录 /dist/qq </p>\n                <p class=\"qrcode-tips\"> 下载 <a href=\"https://q.qq.com/wiki/#_3-%E5%88%9B%E5%BB%BA%E5%B0%8F%E7%A8%8B%E5%BA%8F\">QQ开发者工具</a>\n                  进行预览</p>\n              </div>\n              <div class=\"qrcode-content\" id=\"qq-no-dev\">\n                <div style=\"text-align:center\">\n                  <img src=\"./preview-assets/cml-forbidden.png\" alt=\"\">\n                </div>\n                <p class='no-dev-content'>\n                  未启动QQ小程序构建\n                </p>\n              </div>\n            </div>\n          </div>\n      </div>\n      <div class=\"right-route\" id=\"routes-container\"></div>\n    </main>\n  </div>\n  <script src=\"./preview-assets/qrcode.js\"></script>\n  <script>\n    //注意：所有的全局变量声明在最顶部\n    (function () {\n      var subpath = '';\n      var jsbundle = '';\n      var weexBundles = [];//[{bundle,paths},{bundle,paths}]\n      var routerConfig  = {\n        mode: 'history',\n        routes:[]\n      };\n      var activeIndex = 0;\n      var routeListDom;\n      var selectInput = document.getElementById('routes-select');\n      var routesContainer = document.getElementById('routes-container');\n      var wrapContent = document.getElementById('wrap-content');\n      function isType(o, type) {\n        return Object.prototype.toString.call(o).slice(8,-1) === type\n      }\n      //初始化全局参数值\n      function initParams(params){\n        subpath = params.subpath;\n        weexBundles = params.weexBundles || [];\n        jsbundle = params.weexBundles && weexBundles[0].bundle;\n      }\n      function activeBuildType(params){\n        var buildType = params.buildType;\n        if (~buildType.indexOf('weex')) {\n          Array.isArray(buildType) && buildType.push('sfc');\n        };\n        if (~buildType.indexOf('web')) {\n          Array.isArray(buildType) && buildType.push('h5');\n        };\n        buildType.forEach(function (type) {\n          var activeDom = document.getElementById(type + '-dev');\n          var hideDom = document.getElementById(type + '-no-dev');\n          if(activeDom){\n            activeDom.style.display = 'block';\n          }\n          if(hideDom){\n            hideDom.style.display = 'none';\n          }\n        })\n      }\n      //创建weex二维码\n      function createQRCode(url, path) {\n        var $QR = document.querySelector('#qrcode')\n        var QR = qrcode(0, 'L')\n        url += '?path=' + encodeURIComponent(path)\n        $QR.setAttribute('href', url)\n        QR.addData(url)\n        QR.make()\n        $QR.innerHTML = QR.createImgTag(6, 12)\n      }\n      function createH5QRCode(url) {\n        var $QR = document.querySelector('#h5qrcode')\n        var QR = qrcode(0, 'L')\n        $QR.setAttribute('href', url)\n        QR.addData(url)\n        QR.make()\n        $QR.innerHTML = QR.createImgTag(6, 12)\n\n      }\n\n      //创建beatles的二维码\n      function createBeatlesQRCode(url, path,subpath) {\n        var $QR = document.querySelector('#beatlesqrcode')\n        var QR = qrcode(0, 'L')\n        var origin = location.origin;\n        var pageUrl = origin;\n        if(routerConfig.mode === 'history') {\n          pageUrl += subpath\n        }\n        var beatlesUrl = pageUrl + '?wx_addr=' +\n          encodeURIComponent(url + '?t=' + Date.now());\n\n        if (path) {\n          beatlesUrl += '&path=' + encodeURIComponent(path);\n        }\n        if(routerConfig.mode === 'hash') {\n          beatlesUrl += subpath\n        }\n        $QR.setAttribute('href', beatlesUrl)\n        QR.addData(beatlesUrl)\n        QR.make()\n        $QR.innerHTML = QR.createImgTag(6, 12)\n      }\n\n      //设置页面的url\n      function setPageUrl(subpath) {\n        if(!subpath){\n          return\n        }\n        //创建h5链接\n        if (subpath[0] === '/') {\n          subpath = subpath.slice(1);\n        }\n        if (subpath) {\n          var $preview = document.querySelector('#preview')\n          var $webPageLink = document.querySelector('.web-page-link')\n          var origin = location.origin;\n          var pageUrl = origin + '/' + subpath;\n          console.log('subpath',pageUrl);\n          createH5QRCode(pageUrl);\n          $preview.src = pageUrl;\n          $webPageLink.setAttribute('href', pageUrl);\n        }\n      }\n      //设置搜索框事件\n      function setSelectEvent() {\n        selectInput.addEventListener('keyup', function (e) {\n          if(e.keyCode === 13){ //按下enter键进行搜索且存在搜索值\n            console.log(e,this.value);\n            let searchValue = this.value\n            var selectedRoutes = routerConfig.routes.filter(function(item){\n              return item.url && ~item.url.indexOf(searchValue)\n            });\n            setRoutesList(selectedRoutes)\n          }\n        })\n      };\n      //设置点击外部区域隐藏路由列表\n      function setWrapContentEvent() {\n        // wrapContent.addEventListener('click', function (e) {\n        //   routesContainer.className = 'routes-container-hide';\n        // })\n      };\n      function setRouteSelected(index,routeListDom) {\n        var lis = routeListDom.children;\n        for (var i = 0; i < lis.length; i++) {\n          if (i == index) {\n            lis[i].children[0].style.display = 'inline';\n          } else {\n            lis[i].children[0].style.display = 'none'\n          }\n        }\n      }\n      //所点击路由在对应的weexjsbundle里面\n      function updateWeexBundle(routePath){\n        var bundle = location.origin + '/' + jsbundle;\n        for(var i = 0; i < weexBundles.length; i++){\n          if(weexBundles[i].paths.indexOf(routePath) != -1){\n            bundle =location.origin + '/' + weexBundles[i].bundle;\n          }\n        }\n        return bundle;\n      }\n      function setRoutesList(routes) {\n        var bundleurl = location.origin + '/' + jsbundle;\n        routesContainer.innerHTML = '';//先将该元素下面的所有子元素删除\n        if (routes && routes.length > 0) {\n          var fragment = document.createDocumentFragment();\n          routeListDom = document.createElement('ul');\n\n          routeListDom.setAttribute('id','routeList')\n          for (var i = 0; i < routes.length; i++) {\n            let usedPlatforms = routes[i].usedPlatforms;\n            let usedPlatformsString = ''\n            if(usedPlatforms){\n              usedPlatformsString = '-' + usedPlatforms.toString();\n            }\n            console.log('usedPlatformsString',usedPlatformsString)\n            var li = document.createElement('li');\n            li.setAttribute('index', i);\n            li.innerHTML = '<img style=\"display:none;padding-right:5px;\"  src=\"./preview-assets/cml-right.png\" alt=\"\"><span  index=' + i + ' title=' + routes[i].path + usedPlatformsString + ' >' + routes[i].url+ '</span>';\n            routeListDom.appendChild(li);\n          }\n          fragment.appendChild(routeListDom)\n          routesContainer.appendChild(fragment);\n          var  handlClick = function (e) {\n            if (e.target.tagName.toLowerCase() === 'span') {\n              selectInput.innerText = e.target.innerText;\n              selectInput.setAttribute('title', e.target.innerText);\n              var index = e.target.getAttribute('index');\n              activeIndex = index;\n              var subpath;\n              if (routerConfig.mode === 'history') {\n                subpath = routes[index].url;\n              } else if (routerConfig.mode === 'hash') {\n                var mpa = routerConfig.mpa;\n                if(mpa && mpa.webMpa && isType(mpa.webMpa,'Array') ){\n                  var webMpa = mpa.webMpa;\n                  for (var j = 0; j < webMpa.length ; j++){\n                    if(isType(webMpa[j].paths,\"Array\") && webMpa[j].paths.indexOf(routes[index].path) != -1){\n                      if (typeof webMpa[j].name === 'string') {\n                        subpath = webMpa[j].name +'.html'+ '#' + routes[index].url;\n                      } else {\n                        subpath = routerConfig.entry+j +'.html'+ '#' + routes[index].url;\n                      }\n                    }\n                  }\n                  \n                }else{\n                  subpath = '#' + routes[index].url;\n                }\n              }\n              bundleurl = updateWeexBundle(routes[index].path)\n              setRouteSelected(index,routeListDom);\n              setPageUrl(subpath);\n              createQRCode(bundleurl, routes[index].path);\n              createBeatlesQRCode(bundleurl, routes[index].path,subpath)\n            }\n          }\n          routeListDom.addEventListener('click', handlClick);\n          routeListDom.children[0] && routeListDom.children[0].children[1].click();\n        }\n      };\n\n      function createWS() {\n\n        // const ws = new WebSocket(`ws://${location.hostname}:${webport}`);\n        var ws = new WebSocket('ws://' + location.host);\n        ws.onopen = function () {\n          console.log('@open');\n        };\n        ws.onmessage = function (e) {\n          if(e.data == 'weex_refresh') {\n            routeListDom.children[0] && routeListDom.children[activeIndex].children[1].click();\n          } else {\n            routerConfig = JSON.parse(e.data);\n            initParams(routerConfig);\n            activeBuildType(routerConfig);\n            setRoutesList(routerConfig.routes)\n          }\n        };\n        ws.onclose = function () {\n          console.log('@close')\n        };\n        ws.onerror = function () {\n          console.log('@error')\n        }\n      }\n      createWS();\n      setWrapContentEvent()\n      setSelectEvent();\n    })();\n  </script>\n</body>\n\n</html>\n"
  },
  {
    "path": "packages/chameleon-tool/configs/routerLoader.js",
    "content": "const path = require('path');\nconst cmlUtils = require('chameleon-tool-utils');\nconst loaderUtils = require('loader-utils');\n\nconst filterRouter = function(routerConfig, params, type) {\n  let mpa = routerConfig.mpa;\n  let query = params.query;\n  if (mpa && mpa[`${type}Mpa`] && Array.isArray(mpa[`${type}Mpa`])) {\n    // 处理 routerConfig.routes\n    let currentRoute = (mpa[`${type}Mpa`][query] && mpa[`${type}Mpa`][query].paths) || [];\n    routerConfig.routes = routerConfig.routes.filter((route) => currentRoute.includes(route.path))\n  }\n\n}\nmodule.exports = function(content) {\n  this.cacheable(false);\n  let currentType = this.options.name || 'web';\n\n  const context = (\n    this.rootContext ||\n    (this.options && this.options.context) ||\n    process.cwd()\n  )\n  this.addDependency(path.join(context, './src/router.config.json'));\n\n  let {routerConfig, hasError} = cml.utils.getRouterConfig();\n  if (hasError) {\n    throw new Error(`${path.join(context, './src/router.config.json')} json 格式有误`);\n  } else {\n    let mode = routerConfig.mode;\n    let routerList = '';\n    if (['web', 'weex'].includes(currentType) && this.resourceQuery) {\n      let params = loaderUtils.parseQuery(this.resourceQuery);\n      filterRouter(routerConfig, params, currentType)\n    }\n    routerConfig.routes.forEach(item => {\n      let usedPlatforms = item.usedPlatforms;\n      if (!usedPlatforms || (usedPlatforms && usedPlatforms.includes(currentType))) {\n        let {dynamic, chunkName} = item;\n        if (dynamic == '1' && currentType === 'web') {\n          if (chunkName && typeof chunkName === 'string') {\n            routerList += `\n            {\n              path: \"${item.url}\",\n              name: \"${item.name}\",\n              component: () => import(/*  webpackChunkName: '${chunkName}' */\n              \"$PROJECT/src${item.path}.cml\")\n            },\n            `\n          } else {\n            routerList += `\n            {\n              path: \"${item.url}\",\n              name: \"${item.name}\",\n              component: () => import(\"$PROJECT/src${item.path}.cml\")\n            },\n            `\n          }\n        } else {\n          routerList += `\n          {\n            path: \"${item.url}\",\n            name: \"${item.name}\",\n            component: require(\"$PROJECT/src${item.path}.cml\").default\n          },\n          `\n        }\n      }\n    })\n\n    // subProject 中的页面\n    let subProject = cml.config.get().subProject;\n    if (subProject && subProject.length > 0) {\n      subProject.forEach(function(item) {\n        let npmName = cmlUtils.isString(item) ? item : item.npmName;\n        let npmRouterConfig = cml.utils.readsubProjectRouterConfig(cml.projectRoot, npmName);\n        npmRouterConfig.routes && npmRouterConfig.routes.forEach(item => {\n          let cmlFilePath = path.join(cml.projectRoot, 'node_modules', npmName, 'src', item.path + '.cml');\n          let usedPlatforms = item.usedPlatforms;\n          if (!usedPlatforms || (usedPlatforms && usedPlatforms.includes(currentType))) {\n            let {dynamic, chunkName} = item;\n            if (dynamic == 1 && currentType === 'web') {\n              if (chunkName && typeof chunkName === 'string') {\n                routerList += `\n                  {\n                    path: \"${item.url}\",\n                    name: \"${item.name}\",\n                    component: () => import(/*  webpackChunkName: '${chunkName}' */ \"${cmlFilePath}\")\n                  },\n                `\n              } else {\n                routerList += `\n                  {\n                    path: \"${item.url}\",\n                    name: \"${item.name}\",\n                    component: () => import(\"${cmlFilePath}\")\n                  },\n                `\n              }\n            } else {\n              routerList += `\n              {\n                path: \"${item.url}\",\n                name: \"${item.name}\",\n                component: require(\"${cmlFilePath}\").default\n              },\n            `\n            }\n\n          }\n        })\n      })\n    }\n\n    let routerTemplate = `\n    //根据配置生成路由\n    {\n      mode: \"${mode}\",\n      routes: [${routerList}]\n    }    \n    `;\n    content = content.replace('\\'$ROUTER_OPTIONS\\'', routerTemplate)\n  }\n  return content;\n}\n"
  },
  {
    "path": "packages/chameleon-tool/configs/utils.js",
    "content": "var path = require('path')\nvar ExtractTextPlugin = require('cml-extract-css-webpack-plugin')\nvar fs = require('fs');\nconst fse = require('fs-extra');\nconst HtmlWebpackPlugin = require('html-webpack-plugin')\nlet webpostcssLoader = 'postcss-loader';\nconst portfinder = require('portfinder');\nconst analyzeTemplate = require('chameleon-template-parse').analyzeTemplate;\nconst cmlUtils = require('chameleon-tool-utils');\n\nexports.getPostcssrcPath = function (type) {\n  return path.join(__dirname, `./postcss/${type}/.postcssrc.js`);\n}\n\nexports.cssLoaders = function (options) {\n  options = options || {}\n\n  var cssLoader = {\n    loader: 'css-loader',\n    options: {\n      minimize: options.minimize,\n      sourceMap: false\n    }\n  }\n\n  function getPostCssLoader(type) {\n    return {\n      loader: 'postcss-loader',\n      options: {\n        sourceMap: false,\n        config: {\n          path: exports.getPostcssrcPath(type)\n        }\n      }\n    }\n  }\n\n  function getMiniappLoader(type) {\n    // 把chameleon-css-loader需要在postcssloader之后处理，postcssloader先处理@import，否则@import文件中的内容不经过chameleon-css-loader\n    // chameleon-css-loader需要再最后处理，需要标准的css格式\n    return [\n      {\n        loader: 'chameleon-css-loader',\n        options: {\n          platform: 'miniapp',\n          cmlType: type\n        }\n      },\n      getPostCssLoader(type)\n    ]\n  }\n\n  function addMediaLoader(loaders, type) {\n    loaders.push({\n      loader: 'chameleon-css-loader',\n      options: {\n        media: true,\n        cmlType: type\n      }\n    })\n    return loaders\n  }\n\n\n  // generate loader string to be used with extract text plugin\n  function generateLoaders(loader, loaderOptions) {\n\n    // 扩展流程\n    if (cml.config.get().extPlatform && ~Object.keys(cml.config.get().extPlatform).indexOf(options.type)) {\n      let extLoaders = [\n        {\n          loader: 'mvvm-style-loader'\n        },\n        getPostCssLoader('extend')\n      ]\n      if (loader) {\n        extLoaders.push(\n          {\n            loader: loader + '-loader',\n            options: Object.assign({}, loaderOptions, {\n              sourceMap: false\n            })\n          }\n        )\n      }\n      addMediaLoader(extLoaders, options.type);\n      return extLoaders;\n    }\n\n    var loaders = [cssLoader];\n    let result = [];\n\n    if (options.type === 'web') {\n      // 把chameleon-css-loader需要在postcssloader之后处理，postcssloader先处理@import，否则@import文件中的内容不经过chameleon-css-loader\n      // chameleon-css-loader需要再最后处理，需要标准的css格式\n      loaders.push({\n        loader: 'chameleon-css-loader',\n        options: {\n          platform: 'web',\n          ...cml.config.get().cmss\n        }\n      })\n      loaders.push(getPostCssLoader('web'))\n    }\n    if (~['wx', 'alipay', 'baidu', 'qq', 'tt'].indexOf(options.type)) {\n      loaders = loaders.concat(getMiniappLoader(options.type))\n    }\n\n    if (options.type === 'weex') {\n      // 把wchameleon-css-loader需要在postcssloader之后处理，postcssloader先处理@import，否则@import文件中的内容不经过chameleon-css-loader\n      // weex不能使用css-loader css-loader就开始添加module.exports模块化代码，而weex-vue-loader中内部会处理css字符串为对象\n      loaders = [\n        {\n          loader: 'chameleon-css-loader',\n          options: {\n            platform: 'weex'\n          }\n        },\n        getPostCssLoader('weex')\n      ];\n    }\n    if (loader) {\n      loaders.push({\n        loader: loader + '-loader',\n        options: Object.assign({}, loaderOptions, {\n          sourceMap: false\n        })\n      })\n    }\n\n    if (options.media === 'export' && options.type !== 'wx' && options.mode !== 'production') {\n      loaders.push(getPostCssLoader('export'));\n    }\n\n    if (options.type === 'weex') {\n      result = loaders;\n    } else {\n      if (options.extract) {\n        result = ExtractTextPlugin.extract({\n          use: loaders,\n          fallback: 'vue-style-loader'\n        })\n      } else {\n        result = ['vue-style-loader'].concat(loaders)\n      }\n    }\n\n    addMediaLoader(result, options.type);\n    return result;\n  }\n  var result = {\n    css: generateLoaders('less'),\n    postcss: generateLoaders(),\n    less: generateLoaders('less'),\n    // sass: generateLoaders('sass', { indentedSyntax: true }),\n    // scss: generateLoaders('sass'),\n    stylus: generateLoaders('stylus'),\n    styl: generateLoaders('stylus'),\n    js: exports.getJsLoader() // 处理vue-loader weex-vue-loader chameleon-loader中的js\n  }\n  return result;\n}\n\nexports.getJsLoader = function () {\n  return {\n    loader: 'babel-loader',\n    options: {\n      filename: path.join(cml.root, 'chameleon.js')\n    }\n  }\n}\n\n// Generate loaders for standalone style files (outside of .vue)\nexports.styleLoaders = function (options) {\n  var output = []\n  var loaders = exports.cssLoaders(options)\n  delete loaders.js;\n  for (var extension in loaders) {\n    if (loaders.hasOwnProperty(extension)) {\n      var loader = loaders[extension]\n      if (extension === 'css') {\n        output.push({\n          test: new RegExp('\\\\.' + extension + '$'),\n          exclude: new RegExp('min\\\\.' + extension + '$'),\n          use: loader\n        })\n        let minLoader = loader;\n        // min.css 为后缀的css不过postcss-loader\n        minLoader.splice(minLoader.indexOf(webpostcssLoader), 1);\n        output.push({\n          test: new RegExp('min\\\\.' + extension + '$'),\n          use: minLoader\n        })\n      } else {\n        output.push({\n          test: new RegExp('\\\\.' + extension + '$'),\n          use: loader\n        })\n      }\n    }\n\n  }\n  return output\n}\nexports.updateEntry = function (updateEntryConfig) {\n  try {\n    let { entry, cmlType, root, addEntry } = updateEntryConfig;\n    let { components, compileTagMap } = cml.utils.getBuildinComponents(cmlType, root);\n    let options = { buildInComponents: compileTagMap, usedBuildInTagMap: {}, cmlType};\n    let source = '';\n    Object.keys(entry).forEach(key => {\n      if (cml.utils.isFile(entry[key])) {\n        let content = fs.readFileSync(entry[key], 'utf-8');\n        let parts = cml.utils.splitParts({ content });\n        if (parts && parts.template.length) {\n          source = parts.template[0].tagContent;\n          options = analyzeTemplate(source, options)\n        }\n      }\n    });\n    let usedBuildInTagMap = options.usedBuildInTagMap;\n    // 收集用了哪些内置组件 usedBuildInTagMap:{button:'cml-buildin-button',radio:'cml-buildin-radio'}\n    let usedBuildInTagValues = Object.values(usedBuildInTagMap)\n    components = components.filter((component) => ~usedBuildInTagValues.indexOf(component.name));\n    components.forEach(item => {\n      addEntry(item.filePath)\n    });\n  } catch (e) {\n    console.log('updateEntry', e)\n  }\n}\nexports.getMiniAppEntryFunc = function (cmlType) {\n  return function () {\n    return exports.getMiniAppEntry(cmlType);\n  }\n}\n\nexports.getMiniAppEntry = function (cmlType) {\n  let options = cml.config.get()[cmlType][cml.media];\n  let root = cml.projectRoot;\n  let entry = {};\n  entry.common = ['chameleon-runtime/index.js', 'chameleon-store/index.js'];\n  if (cml.config.get().baseStyle[cmlType] === true) {\n    // 将 page.css  index.css 作为入口文件，注意这里会在 compalation.assets 中产生一个 js 文件 一个css文件\n    let pageCssPath = path.join(cml.projectRoot, 'node_modules', `chameleon-runtime/src/platform/${cmlType}/style/page.css`)\n    // 兼容老的chameleon-runtime 版本没有 page.css 这个文件；\n    let hasPageCss = cmlUtils.isFile(pageCssPath);\n    entry['static/css/index'] = `chameleon-runtime/src/platform/${cmlType}/style/index.css`;\n    hasPageCss && (entry['static/css/page'] = `chameleon-runtime/src/platform/${cmlType}/style/page.css`);\n  }\n  let globalStyleConfig = cml.config.get().globalStyleConfig;\n  if (globalStyleConfig && globalStyleConfig.globalCssPath && cmlUtils.isFile(globalStyleConfig.globalCssPath)) {\n    entry['static/css/global'] = globalStyleConfig.globalCssPath\n  }\n  let projectPath = path.resolve(root, 'src');\n\n  // 记录已经添加的入口，防止重复循环添加\n  let hasEntryedPath = [];\n  // 组件导出\n  if (cml.media === 'export') {\n    let entryList = cml.config.get()[cmlType]['export'].entry;\n    let exportEntryFile = cml.utils.getExportEntry(cmlType, root, entryList);\n    exportEntryFile.forEach(item => {\n      addEntry(item);\n    })\n  } else {\n    if (options.babelPolyfill === true) {\n      entry.common.unshift(path.join(__dirname, 'default/miniappPolyfill.js'));\n    }\n    entry.app = path.join(projectPath, 'app/app.cml');\n    let appjson = cml.utils.getJsonFileContent(path.resolve(cml.projectRoot, 'src/app/app.cml'), cmlType)\n    appjson.pages && appjson.pages.forEach(item => {\n      let cmlFilePath = path.resolve(cml.projectRoot, 'src', item + '.cml')\n      addEntry(cmlFilePath)\n    })\n\n    let npmComponents = cml.utils.getNpmComponents(cmlType, root);\n    if (!cml.config.get().isBuildInProject && cml.media !== 'build') {\n\n      let buildInComponens = cml.utils.getBuildinComponents(cmlType, root).components;\n      npmComponents = npmComponents.concat(buildInComponens);\n    }\n    npmComponents.forEach(item => {\n      addEntry(item.filePath)\n    })\n\n    // subProject的入口\n    let subProject = cml.config.get().subProject;\n    if (subProject && subProject.length > 0) {\n      subProject.forEach(function(item) {\n        let npmName = cmlUtils.isString(item) ? item : item.npmName;\n        let npmRouterConfig = JSON.parse(fs.readFileSync(path.join(cml.projectRoot, 'node_modules', npmName, 'src/router.config.json'), {encoding: 'utf-8'}));\n        npmRouterConfig.routes && npmRouterConfig.routes.forEach(item => {\n          let routePath = item.path;\n          let cmlFilePath = path.join(root, 'node_modules', npmName, 'src', routePath + '.cml');\n          if (cml.utils.isFile(cmlFilePath)) {\n            addEntry(cmlFilePath);\n          } else {\n            cml.log.error(`${cmlFilePath} is not find!`);\n          }\n        })\n\n      })\n    }\n  }\n  exports.updateEntry({ entry, cmlType, root, addEntry });\n  return entry;\n\n  function addEntry(chameleonFilePath) {\n    // plugin://\n    if (!chameleonFilePath) {\n      return;\n    }\n    if (!cml.utils.isFile(chameleonFilePath)) {\n      return;\n    }\n    if (~hasEntryedPath.indexOf(chameleonFilePath)) {\n      return;\n    }\n    hasEntryedPath.push(chameleonFilePath);\n    let entryName = cml.utils.getPureEntryName(chameleonFilePath, cmlType, root);\n    // 小程序中有文件夹有@符号无法上传  决定生成样式文件路径\n    entryName = cml.utils.handleSpecialChar(entryName);\n    entry[entryName] = chameleonFilePath;\n\n    // 处理json文件中引用的组件作为入口,wxml文件\n    let targetObject = cml.utils.getJsonFileContent(chameleonFilePath, cmlType)\n    if (targetObject && targetObject.usingComponents) {\n      let usingComponents = targetObject.usingComponents;\n      Object.keys(usingComponents).forEach(key => {\n        let comPath = usingComponents[key];\n        let { filePath } = cml.utils.handleComponentUrl(root, chameleonFilePath, comPath, cmlType);\n        addEntry(filePath);\n      })\n    }\n  }\n}\nexports.getHtmlPluginConfig = function(options) {\n  let {filename, template, chunksort, entryName} = options;\n  var htmlConf = {\n    filename: filename,\n    template,\n    inject: 'body',\n    // hash: true,\n    chunks: ['manifest', 'vender', entryName],\n    chunksSortMode: function (a, b) {\n      var aIndex = chunksort.indexOf(a.names[0]);\n      var bIndex = chunksort.indexOf(b.names[0]);\n      aIndex = aIndex < 0 ? chunksort.length + 1 : aIndex;\n      bIndex = bIndex < 0 ? chunksort.length + 1 : bIndex;\n      return aIndex - bIndex;\n    }\n  }\n  if (options.console === true) {\n    htmlConf.console = true\n    htmlConf.consolejs = '/preview-assets/didiConsole-1.0.7.min.js'\n  }\n  return htmlConf\n}\nexports.getWebEntry = function (options) {\n  if (cml.media === 'export') {\n    return exports.getWebExportEntry();\n  }\n  exports.copyDefaultFile(options.root, 'web', options.media);\n  var entry = {};\n  entry.vender = ['vue', 'vuex', 'vue-router', path.resolve(cml.root, 'configs/web_global.js')];\n  if (options.babelPolyfill === true) {\n    entry.vender.unshift('@babel/polyfill');\n  }\n  // web端插入全局样式\n  if (cml.config.get().baseStyle.web === true) {\n    entry.vender.push('chameleon-runtime/src/platform/web/style/index.css')\n  }\n  // 注入用户全局样式\n  let globalStyleConfig = cml.config.get().globalStyleConfig;\n  if (globalStyleConfig && globalStyleConfig.globalCssPath && cmlUtils.isFile(globalStyleConfig.globalCssPath)) {\n    entry.vender.push(globalStyleConfig.globalCssPath)\n  }\n  if (cml.config.get().cmss.rem === true) {\n    entry.vender.unshift(path.resolve(cml.root, 'configs/default/rem.js'));\n  }\n  var htmlPlugins = [];\n  let entryConfig = cml.config.get().entry;\n\n  // 配置web入口\n  var entryFile;\n  if (entryConfig && entryConfig.web) {\n    if (cml.utils.isFile(entryConfig.web)) {\n      entryFile = entryConfig.web;\n    } else {\n      throw new Error('no such file: ' + entryConfig.web);\n    }\n  } else {\n    entryFile = path.join(cml.projectRoot, 'node_modules/chameleon-runtime/.temp/entry.js');\n  }\n  var entryName = exports.getEntryName();\n  // entry[entryName] = entryFile;\n  var chunksort = ['manifest', 'vender'];\n  let filename = `${entryName}.html`;\n  if (cml.config.get().templateType === 'smarty') {\n    filename = `template/${entryName}.tpl`;\n  }\n  let template;\n  if (entryConfig && entryConfig.template) {\n    if (cml.utils.isFile(entryConfig.template)) {\n      template = entryConfig.template;\n    } else {\n      throw new Error('no such file: ' + entryConfig.template);\n    }\n  } else {\n    if (cml.config.get().templateType === 'smarty') {\n      template = path.resolve(__dirname, './default/smarty_entry.html');\n    } else {\n      template = path.resolve(__dirname, './default/html_entry.html');\n    }\n  }\n\n  // ---->web端多页面构建\n  const {routerConfig} = cmlUtils.getRouterConfig();\n  let mpa = routerConfig.mpa;\n  if (mpa && mpa.webMpa && Array.isArray(mpa.webMpa)) { // 配置了web端多页面\n    let webMpa = mpa.webMpa;\n    for (let i = 0; i < webMpa.length ; i++) {\n      // 多入口增加\n      if (typeof webMpa[i].name === 'string') {\n        entry[`${webMpa[i].name}`] = `${entryFile}?query=${i}`;\n        let htmlConf = exports.getHtmlPluginConfig({\n          filename: cml.config.get().templateType === 'smarty' ? `template/${webMpa[i].name}.tpl` : `${webMpa[i].name}.html`,\n          template,\n          chunksort,\n          entryName: `${webMpa[i].name}`,\n          console: options.console\n        });\n        htmlPlugins.push(new HtmlWebpackPlugin(htmlConf));\n      } else {\n        entry[`${entryName}${i}`] = `${entryFile}?query=${i}`;\n        let htmlConf = exports.getHtmlPluginConfig({\n          filename: cml.config.get().templateType === 'smarty' ? `template/${entryName}${i}.tpl` : `${entryName}${i}.html`,\n          template,\n          chunksort,\n          entryName: `${entryName}${i}`,\n          console: options.console\n        });\n        htmlPlugins.push(new HtmlWebpackPlugin(htmlConf));\n      }\n    }\n  } else { // 没有配置web端多页面，那么还是走原来的逻辑\n    entry[entryName] = entryFile;\n    let htmlConf = exports.getHtmlPluginConfig({\n      filename, template, chunksort, entryName, console: options.console\n    })\n    htmlPlugins.push(new HtmlWebpackPlugin(htmlConf));\n  }\n  // ---->\n  if (options.media === 'dev') {\n    let origin = path.join(__dirname, './preview.html');\n    let target = path.join(cml.utils.getDevServerPath(), 'preview.html')\n    fse.copySync(origin, target, {\n      overwrite: true\n    })\n  }\n  return {\n    entry,\n    htmlPlugins\n  }\n}\n\nexports.getWebExportEntry = function () {\n  var entry = {};\n  let entryList = cml.config.get().web['export'].entry;\n  let exportEntryFile = cml.utils.getExportEntry('web', cml.projectRoot, entryList);\n  // 记录已经添加的入口，防止重复循环添加\n  let hasEntryedPath = [];\n\n  exportEntryFile.forEach(item => {\n    addEntry(item);\n  })\n  function addEntry(chameleonFilePath) {\n    // plugin://\n    if (!chameleonFilePath) {\n      return;\n    }\n    if (~hasEntryedPath.indexOf(chameleonFilePath)) {\n      return;\n    }\n    hasEntryedPath.push(chameleonFilePath);\n    let entryName = cml.utils.getPureEntryName(chameleonFilePath, 'web', cml.projectRoot);\n    entry[entryName] = chameleonFilePath;\n  }\n  return {\n    entry,\n    htmlPlugins: []\n  };\n}\n\nexports.getWeexEntry = function (options) {\n  if (options.media === 'export') {\n    return exports.getWeexExportEntry(options);\n  }\n  exports.copyDefaultFile(options.root, 'weex', options.media);\n  var entry = {};\n  var entryFile = [];\n  let entryConfig = cml.config.get().entry;\n  let entryJS = path.join(cml.projectRoot, 'node_modules/chameleon-runtime/.temp/entry.js');\n  if (entryConfig && entryConfig.weex) {\n    if (cml.utils.isFile(entryConfig.weex)) {\n      entryFile.push(entryConfig.weex)\n    } else {\n      throw new Error('no such file: ' + entryConfig.weex);\n    }\n  } else {\n    entryFile.push(entryJS);\n  }\n  if (options.media === 'dev') {\n    exports.copyWeexLiveLoadFile(options.root, 'weex', options.media);\n    entryFile.push(path.join(cml.projectRoot, 'node_modules/chameleon-runtime/.temp/weex_liveload_entry.js'));\n  }\n  if (options.babelPolyfill === true) {\n    entryFile.unshift(path.join(__dirname, 'default/miniappPolyfill.js'));\n  }\n  var entryName = exports.getEntryName();\n  const {routerConfig} = cmlUtils.getRouterConfig();\n  let mpa = routerConfig.mpa;\n  if (mpa && mpa.weexMpa && Array.isArray(mpa.weexMpa)) { // 配置了weex多页面\n    let weexMpa = mpa.weexMpa;\n    for (let i = 0; i < weexMpa.length ; i++) {\n      let newEntry = entryFile.map((item) => (item === entryJS) ? `${item}?query=${i}` : item);\n      if (typeof weexMpa[i].name === 'string') {\n        entry[`${weexMpa[i].name}`] = newEntry;\n      } else {\n        entry[`${entryName}${i}`] = newEntry;\n      }\n    }\n  } else { // 兼容原来的没有配置的情况\n    entry[`${entryName}`] = entryFile\n  }\n  return entry;\n}\n\nexports.getWeexExportEntry = function () {\n  var entry = {};\n  let entryList = cml.config.get().weex['export'].entry;\n  let exportEntryFile = cml.utils.getExportEntry('weex', cml.projectRoot, entryList);\n  // 记录已经添加的入口，防止重复循环添加\n  let hasEntryedPath = [];\n  exportEntryFile.forEach(item => {\n    addEntry(item);\n  })\n  function addEntry(chameleonFilePath) {\n    // plugin://\n    if (!chameleonFilePath) {\n      return;\n    }\n    if (~hasEntryedPath.indexOf(chameleonFilePath)) {\n      return;\n    }\n    hasEntryedPath.push(chameleonFilePath);\n    let entryName = cml.utils.getPureEntryName(chameleonFilePath, 'weex', cml.projectRoot);\n    entry[entryName] = chameleonFilePath;\n  }\n  return entry;\n}\n\nexports.getEntryName = function () {\n  return cml.config.get().projectName || 'main'\n}\n\n\nexports.getTempPath = function () {\n  return cml.utils.getTempRoot();\n}\n\nexports.getDevServerPath = function () {\n  return cml.utils.getDevServerPath();\n}\n\nlet babelNpm = [\n  'chameleon-ui-builtin',\n  'cml-ui',\n  'chameleon-runtime',\n  'chameleon-store',\n  'chameleon-bridge',\n  'chameleon-scroll',\n  'chameleon-api',\n  'chameleon-tool-utils',\n  'chameleon-css-loader',\n  'chameleon-miniapp-target',\n  'chameleon-mixins',\n  'chameleon-template-parse',\n  'chameleon-templates',\n  'chameleon-vue-precompiler',\n  'chameleon-webpack-plugin',\n  'chameleon-dev-proxy',\n  'chameleon-linter',\n  'interface-loader',\n  'chameleon-url-loader',\n  'webpack-check-plugin',\n  'webpack-liveload-middleware',\n  'chameleon-weex-vue-loader',\n  'babel-plugin-chameleon-import',\n  'mvvm-interface-parser',\n  'chameleon-loader',\n  'mobx'\n];\n\nexports.getBabelPath = function () {\n\n  let babelPath = [\n    path.join(cml.projectRoot, 'src'),\n    path.join(cml.root, 'configs')\n  ]\n  babelNpm.forEach(item => {\n    if (typeof item === 'string') {\n      babelPath.push(path.join(cml.projectRoot, 'node_modules', item))\n      babelPath.push(path.join(cml.root, 'node_modules', item))\n    } else if (item instanceof RegExp) {\n      babelPath.push(item)\n    }\n  })\n  let configBabelPath = cml.config.get().babelPath || [];\n  return configBabelPath.concat(babelPath);\n}\nexports.getExcludeBabelPath = function() {\n  let excludeBablePath = [/(\\.min\\.js)/, /node_modules\\/core-js/];\n  let configExcludePath = cml.config.get().excludeBablePath || [];\n  return excludeBablePath.concat(configExcludePath);\n}\n\nexports.getGlobalCheckWhiteList = function () {\n  return [\n    /node_modules[\\/\\\\](mobx|vuex)/\n  ].concat(cml.config.get().globalCheckWhiteList)\n}\n\nlet hasCopy = false;\nexports.copyDefaultFile = function (dir, platform, media) {\n  // web和weex端同时启动时会拷贝两次，引起重新编译\n  if (hasCopy) {\n    return;\n  }\n  hasCopy = true;\n  // 创建路由文件\n  cml.utils.createRouterFile('web', media);\n  fse.copySync(path.resolve(__dirname, './default/router.js'), path.resolve(dir, 'node_modules/chameleon-runtime/.temp/router.js'), {\n    overwrite: true\n  })\n  fse.copySync(path.resolve(__dirname, './default/entry.js'), path.resolve(dir, 'node_modules/chameleon-runtime/.temp/entry.js'), {\n    overwrite: true\n  })\n\n}\n\nexports.copyWeexLiveLoadFile = function(dir, platform, media) {\n  fse.copySync(path.resolve(__dirname, './default/weex_liveload_entry.js'), path.resolve(dir, 'node_modules/chameleon-runtime/.temp/weex_liveload_entry.js'), {\n    overwrite: true\n  })\n}\n\nlet webServerPort;\nlet weexLiveLoadPort;\nexports.setFreePort = async function () {\n  if (webServerPort && weexLiveLoadPort) {\n    return;\n  }\n  if (cml.utils.is(cml.config.get().devPort, 'Number')) {\n    webServerPort = cml.config.get().devPort;\n  } else {\n    await portfinder.getPortPromise({\n      port: 8000, // minimum port\n      stopPort: 8999 // maximum port\n    })\n      .then((port) => {\n        webServerPort = port;\n      }, (err) => {\n        throw err;\n      });\n  }\n\n  await portfinder.getPortPromise({\n    port: 3000, // minimum port\n    stopPort: 3999 // maximum port\n  })\n    .then((port) => {\n      weexLiveLoadPort = port;\n    }, (err) => {\n      throw err;\n    })\n}\n\nexports.getFreePort = function () {\n  if (webServerPort && weexLiveLoadPort) {\n    return {\n      webServerPort,\n      weexLiveLoadPort\n    }\n  } else {\n    cml.log.error('请先调用setFreePort');\n  }\n}\n\nexports.addCahceLoader = (config, type) => {\n  const cacheUseLoader = {\n    loader: 'cache-loader',\n    options: {\n      cacheDirectory: path.resolve(process.cwd(), `node_modules/.cache/cache-loader/cache_${type}`)\n    }\n  }\n  const testee = ['.interface', '.cml', '.vue', '.js'];\n\n  config.module.rules.forEach(rule => {\n    testee.some(ext => {\n      const isRegExp = Object.prototype.toString.call(rule.test) === '[object RegExp]';\n\n      if (isRegExp && rule.test.test(ext)) {\n        return rule.use && rule.use.unshift(cacheUseLoader);\n      }\n    })\n  })\n}\n\n"
  },
  {
    "path": "packages/chameleon-tool/configs/web_empty.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n  <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n  <link rel=\"icon\" href=\"data:;base64,=\">\n  <title></title>\n  <style>\n    body {\n      text-align: center;\n      font-size: 30px;\n      color: gray;\n      padding-top: 100px;\n    }\n    .logo {\n\n    }\n  </style>\n</head>\n<body>\n  <img class=\"logo\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAMAAABHPGVmAAACT1BMVEVHcEwAnP8Amv8As/8Am/8Ap/8Alv8Ahf8AnP8AqP8A3PMAm/8Bmf8As/sAwvgAn/8Arf8AvPoA1PUAr/wAsP0Axvgcef8An/8Aqv0Amv8ArvwArv0Rhf8Ay/YAxfgAyPcAuPsAvfsAov0Ax/YAmv8AxvgAm/8AwvgGkv8ArP0Apv8AmP8Apf8Amv8As/8Asv4Ap/8Amv8Av/kBkv8obf8kbf8wYv8AnP8AnP8A1vMAmf8As/wAqv8JtPoAqf0AjP8AzfYAvvgDiP8AwvkAsfsAo/8AqP8Ar/wAu/sDmf8Dmv8Dqfw6Xv8AxPoAvvg3Xf8Amv8AoP8Aq/0Aof8ApP8An/8AzfcArf0As/0AtvsAv/oAu/sA2/QAufwAmf8AmP8A0vcAov8A0PcAwPsAyfkAyvcApv4Ar/0AuPwAsv0Aqf8Anf8AsP0A2PUAw/kAqP8Apf8AxvkA3vQAlf8AwvoA4PQA1PYA5fEAj/8Am/8tZ/8Akv8AnP8A6PEAp/8Axfsfc/8lbv8A3vMA4/IAhv8A1vYTev8Ai/8A2fUAzvkadv8AhP8Ajv8A4vMoa/80Yf8Awf0AiP8AyPgAl/8wY/87Wf8A1PUSff8Ki/8Phf8AsP8KgP8ArP8Ugf9GUP8CkP83Xv8icP8ed/8Ze/8AtP8Mf/8Avf4Ay/kXeP8/V/9CVP8Fgf8Ofv85W/8AuP8Bn/1OSf8Az/YAsvsic/8AwvtJTf8qbP8Ax/gCrvsGx/YSqfoGqf0gifwJv/gWlvsLufgte/0XoPo3a/0EhP8B1/WQYqq5AAAAUHRSTlMA+WAEcBsxAS8C+JLiS2xUB9qp3Tnt6taa0fzF5teIkZ7y35mwq5ij5VnWD5dJ8efn6aX76vTsxe35O7nN+/vr8V3241/48fdahXso+/R25VIIWCMAAAcXSURBVHjatdj5U1NXGAZgFNKYCi5VpIxoi9VKpdrqFLVax6W2OtrlEkLIZkKoiZgEEBEhBCyLCCKQyhKCEsCkLtBaiJR13Msf1u/c9SS5SwK57w9AzsA8837ncE8gJcGodn6fIm+A+NBGyE402QhCbgIZhMwEGDIiqZ8goknrRoh8BGcQchG4QchF4AYhA1FHhzUImQhIuJGQA9n0GRA8BpFUoo2LFjOIJBI9WMDAkizi21o8YOBJEtEaEa2TSDayAQhRg1jLJY0vFzIkkUxTZGxgJBD/3Hub5LV2saIzIn2NCQhjMxPTb2/6Sk9LIHvbsZza88v+tbvjFGpC3tnZ6XfLvtIyqSqZPi6HUsmlY+nSgiUwNzE6Ojv5qgIMre28qLG1jMtOek2pOCpBDM+MD05Mjo6+D1NGn3iVPVo2m9lF5VrRrQ42eMcHEfJymTaqK78QnZaNzVns7j0ouNWBloYBL4lMLJlYo3KziJExzyUVW+ff/Jrh5t6GBhrxLmKGwSBS5Xg1m1x8fT2P4A89amlhkbe+CMMoUiX3BhPjGpVIE4s/0NXcjCGvTZHGpXLBKhsNTMqdxDGhPTGPDd951hWBnGiNNvRbBKdlpKOHZ8lubh0/XR7/46E7kcjcYqyhuypQRXVCT0XnJB+EzDL3e1LT/d/Dx3/jCBgvl/kMl0CVszoqLic1ljRqW47Rw+qvv3/v3l8xyLtWXuNKCX+V4y4yJewzMevCfubZZfF03L99LxaZe1MrYKj38d5W50pQHGDgcbsJc019R8d9PiQYFjTUjo08SJoaxR5lgODp7u7gR16aRIwqvirb7ZBoo7/GU98thCz1iBn2a7FV8n/QaDRWNy5Yajwez5gQEnzVJm5osmKnVVRUVIgZ5v4aMISRgE/KsBbFVDlSXOx0s4IFCFHkdau0UZQdZSjWOJ0RhDiyUBeHUVgcVSXN7aYFs8XSL4EMLcZnOLOipkUTYEgi/s44DaczoorCzBjSyFRb3EZjdsS0iLgRfVO8RqObcGNVlIp1/PkgJjsTMQgzXkUZ/5vlhAyzGaokHOWGxAwLXiX+JgkZsMMbV4LEd67cbtroz14JEt/ZBYQAA2X/CpB4DQgIZJUdcCLbaq+b4F18OKy1nTuYnp6Xd/LkyZzMU6cyMzNzc7+CfA3ZdYRGpA1qR9gm61NUO9pIpHO5/WZp2d2nLjO6pzpuPwws1praS+9e/v2PJ//8+WDklnUNjcRjUNOCkEYKKD09GPJ0gUbuBF/xIqeljGLybKGNR0EGqbRex5DLahppbnnDi0gaVBX6IQUGrXRWYEi1mkZ6B5Z4kPPiRmEhKNymgMEq7b6bHFJpZ5DnSzGIKkPUgI/48QIDU8LhsI9F/rWfOXMmEJyZ8/50IqZJhqhBfi5mtv5zzABlc9hm07LIb9vZe+bnmCYihlVjtTJVQAEjSrHZ5ue1DMIqSkVudBMRA77CjjEYMQrM2lDNIE9oRalS5EYhgobmFkKs5LwgYPAoaA6GeRoxcl0ORCJChh19japQCuw5r3ID/byBRi5x+3IgAhEyHFW4AoaAAoj+xQsjhZRjCo7wG1VqB7xEr0kFDCFli7EckAWdgUR03ykZ5UcO2cprOOA1poAhouj1Lxbg+/Uk8gBTOITPUMMCUuyU8qWIgRQoolbb7epyhOAKi/AZsEIqVaQChpSCEI11qgQhD/apGOUog8QaJVdduAKGpLIARaxTU41FLkBGGEWZn00jsYYOyqFVSvlY0kAKFEGI2WIFhFNUNBJtXNHrEeIqoRQw4lF22a2AoL+z+qtGRhxZzMRoJMpwXQJExw4MjDgVMNzoGvbUux2OW5HKukhDB8cQU8CIW5lqhCI1nrHuju7CW9dAwZAow4grsOcJKFAEGd1+//CYRpOViiG4oTcYcAV6JKSgIvXIgJiLMGUdbtww4AoYiSnpqIgfIYHA0LA7fRP7IOOM8spKXAEjYcUzRhmAhEJ+RlEpWMMIF3GlgVU+TdhACjUsZDzrCg7l0YqCNfqqcQWMFSmMEeoKNjfP5FCKgjYMtr55TAFjZUoeOaxQKBQMon8JbSMVBW1obbgCxsoVxph51NLbSyoKyijT4sqhFRtIwY3eBqQokFFZVoYrYKxGycGNhoGC/BQFMkpLAWEVmNUqlWAwCEYLaQx4C/IVTud8uw9XwFi9MjPDGt7xgovO+YplXNm7agMpUGRujjaeDxb0mTpJpYxSkmHAZZVDGg2UMTjeasKVpBioyzZAKINCMAWMpCnksMZRkYnnrZgCZzeJCmtMDtZyyp4kGkjxeiljcqKWVcBIskIboxM9jAJGspVvKAMQWvko6QZSSGN2so1SwJBFQcbsZB2pgCGTAsb0aB1S5DLgd//w7DQgoMhmoC6Hp6dnm+rqwJBZaWoCQ25FdgP25dfEjf8BUtnFLEiI5wsAAAAASUVORK5CYII=\" />\n    <p>未启动web端构建</p>\n</body>\n</html>"
  },
  {
    "path": "packages/chameleon-tool/configs/web_global.css",
    "content": "body {\n  margin: 0px;\n  padding: 0px;\n}\n\n/* 只允许进行滚动和持续缩放操作 */\na,\nbutton,\n[role=\"button\"],\ninput,\nlabel,\nselect,\ntextarea {\n  touch-action: manipulation;\n}\n\np,\nol,\nul,\ndl,\nfigure {\n  margin: 0;\n  padding: 0;\n}\n\nli {\n  list-style: none;\n}"
  },
  {
    "path": "packages/chameleon-tool/configs/web_global.js",
    "content": "\nimport Vue from 'vue';\nrequire('./web_global.css');\nwindow.Vue = Vue;\nwindow.CML = {};\nwindow.CML.Vue = Vue;\n\n"
  },
  {
    "path": "packages/chameleon-tool/configs/weex_liveload/WeexWebSocket.js",
    "content": "/* eslint-disable */\nvar websocket = weex.requireModule('webSocket')\n\nclass WeexWebSocket {\n  constructor(url, protocal) {\n    this.instance = weex.requireModule('webSocket');\n    this.init(url, protocal);\n    this.env = WXEnvironment.platform.toUpperCase()\n  }\n\n  init(url, protocal) {\n    this.instance.WebSocket(url, protocal)\n  }\n\n  onopen(cb) {\n\n    this._adapter('onopen', cb);\n  }\n\n  onmessage(cb) {\n    this._adapter('onmessage', cb);\n  }\n\n  onerror(cb) {\n    this._adapter('onerror', cb);\n  }\n\n  onclose(cb) {\n    this._adapter('onclose', cb);\n  }\n\n  send(...args) {\n    return this.instance.send(...args);\n  }\n\n  close(...args) {\n    return this.instance.close(...args);\n  }\n\n  _adapter(key, cb) {\n    if (this.env === \"ANDROID\") {\n      this.instance[key](cb);\n\n    } else if (this.env === 'IOS') {\n      this.instance[key] = cb;\n    }\n  }\n\n}\n\nmodule.exports = WeexWebSocket;\n"
  },
  {
    "path": "packages/chameleon-tool/configs/weex_liveload/liveLoad.js",
    "content": "/* eslint-disable */\n\nconst WeexWebSocket = require('./WeexWebSocket.js');\n\nlet wsAddr = `ws://${process.env.serverIp}:${process.env.liveloadPort}`\nlet socketInstance = new WeexWebSocket(wsAddr, '');\nconst weexMod = weex.requireModule('weexMod');\nvar modal = weex.requireModule('modal')\n\nsocketInstance.onopen(function (e) {\n})\n\nsocketInstance.onmessage(function (e) {\n\n  if (e.data === 'weex_refresh') {\n    weexMod.reloadPage('')\n  }\n})\nsocketInstance.onerror(function (e) {\n\n})\nsocketInstance.onclose(function (e) {\n\n})\n"
  },
  {
    "path": "packages/chameleon-tool/lib/cli.js",
    "content": "#! /usr/bin/env node\n\n/* eslint-disable */\nconst commander = require('commander');\nconst cmlpackage = require('../package.json');\nconst argv = process.argv;\nmodule.exports.run = function () {\n\n  var first = argv[2];\n  if (first === '-v' || first === '--version' || first === '-V') {\n    cml.log.notice(`current running chameleon(${cml.root})`)\n    version();\n  } else {\n    let extCommand = require('../commanders/ext/index.js').name;\n    commander.usage('[command] [options]')\n    commander.version(`${cmlpackage.name}@${cmlpackage.version}`)\n    let cmdList = ['init', 'dev', 'build', 'server', 'web', 'weex', 'wx', 'baidu', 'alipay', 'qq', 'tt','info'];\n    if (typeof extCommand === 'string') {\n      cmdList.push('ext');\n    }\n    cmdList = cmdList.map(key => ({\n      key,\n          cmd: require(`../commanders/${key}/index.js`) // eslint-disable-line \n    }))\n\n    cmdList.forEach(item => {\n      let cmd = item.cmd;\n      cmd.register(\n        commander\n          .command(cmd.name)\n          .option('-l, --log [debug]', 'logLevel')\n          .usage(cmd.usage)\n          .description(cmd.desc)\n      );\n    })\n    commander.parse(argv);\n  }\n\n  function version() {\n    console.log(`${cmlpackage.name}@${cmlpackage.version}`)\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-tool/lib/config.js",
    "content": "\n/*\nmoduleIdType 决定webpack打包模块的id\n  number，默认的id\n  hash 利用 webpack.HashedModuleIdsPlugin()\n  name 利用webpack.NamedModulesPlugin()\n  chameleon 利用chameleon-webpack-plugin 中开启moduleid的处理\n*/\nfunction clone (value) {\n  if (Array.isArray(value)) {\n    return value.map(clone)\n  } else if (value && typeof value === 'object') {\n    const res = {}\n    // eslint-disable-next-line guard-for-in\n    for (const key in value) {\n      res[key] = clone(value[key])\n    }\n    return res\n  } else {\n    return value\n  }\n}\nvar miniappConfig = {\n  dev: {\n    cache: false,\n    hasMiniAppCustomDataClass: false,\n    moduleIdType: 'name',\n    definePlugin: {\n      'process.env.NODE_ENV': JSON.stringify('development')\n    }\n    //  increase:true, 是否增量部署打包代码\n  },\n  build: {\n    hash: true,\n    cache: false,\n    hasMiniAppCustomDataClass: false,\n    minimize: true,\n    definePlugin: {\n      'process.env.NODE_ENV': JSON.stringify('production')\n    }\n  },\n  export: {\n    hash: true,\n    cache: false,\n    hasMiniAppCustomDataClass: false,\n    minimize: true,\n    definePlugin: {\n      'process.env.NODE_ENV': JSON.stringify('production')\n    },\n    entry: [\n      './src/components'\n    ],\n    publicPath: '../../'\n  }\n};\n\nvar chameleonConfig = {\n  platforms: ['web', 'weex', 'wx', 'baidu', 'alipay'],\n  // devPort: 8000,\n  // projectName: undefined,\n  templateType: 'html', // 模板类型 smarty or html，决定web页面的格式与dev web服务器的类型\n  isBuildInProject: false, // 是否是内置组件项目,该项目不嵌入内置组件\n  devOffPlatform: [], // dev 命令关闭的端\n  buildOffPlatform: [], // build 命令关闭的端\n  builtinNpmName: 'chameleon-ui-builtin', // 内置组件npm包的名称\n  check: {\n    enable: true, // 是否开启接口校验\n    enableTypes: [] // 接口校验支持的类型 可以开启[\"Object\",\"Array\",\"Nullable\"]\n  },\n  cmlComponents: [ // 配置node_modules中cml组件库\n  ],\n  baseStyle: { // 是否插入各端的基础样式\n    wx: true,\n    web: true,\n    weex: true,\n    alipay: true,\n    baidu: true,\n    qq: true,\n    tt: true\n  },\n  proxy: {\n    enable: false,\n    mapremote: []\n  },\n  // entry: {\n  //   template: 'entry_test/entry.html',\n  //   web: 'entry_test/web.js',\n  //   weex: 'entry_test/weex.js'\n  // },\n  buildInfo: { // 打包信息\n    wxAppId: ''\n  },\n  enableLinter: true,\n  enableGlobalCheck: true,\n  globalCheckWhiteList: [ // 全局校验的白名单文件 后缀匹配\n  ],\n  cmss: {\n    rem: true,\n    scale: 0.5,\n    remOptions: {\n      // base on 750px standard.\n      rootValue: {cpx: 75}, // cpx转rem px不处理\n      // to leave 1px alone.\n      minPixelValue: null\n    },\n    autoprefixOptions: {\n      browsers: ['> 0.1%', 'ios >= 8', 'not ie < 12']\n    },\n    // 是否对css开启autoprefix，默认为true  非weex端生效\n    enableAutoPrefix: true\n  },\n  wx: clone(miniappConfig),\n  alipay: clone(miniappConfig),\n  baidu: clone(miniappConfig),\n  qq: clone(miniappConfig),\n  tt: clone(miniappConfig),\n  web: {\n    dev: {\n      cache: false,\n      hasMiniAppCustomDataClass: false,\n      isWrapComponent: true, // 默认对组件进行一层包裹\n      babelPolyfill: false, // 是否添加babel polyfill 只web端有此属性\n      moduleIdType: 'name',\n      hot: false,\n      analysis: false,\n      // apiPrefix: ,\n      // staticPath: '', 静态资源路径前缀\n      definePlugin: {\n        'process.env.NODE_ENV': JSON.stringify('development')\n      }\n    },\n    build: {\n      hash: true,\n      cache: false,\n      hasMiniAppCustomDataClass: false,\n      isWrapComponent: true, // 默认对组件进行一层包裹\n      babelPolyfill: false, // 是否添加babel polyfill 只web端有此属性\n      minimize: true,\n      moduleIdType: 'chameleon',\n      definePlugin: {\n        'process.env.NODE_ENV': JSON.stringify('production')\n      }\n    },\n    export: {\n      hash: true,\n      cache: false,\n      hasMiniAppCustomDataClass: false,\n      isWrapComponent: true, // 默认对组件进行一层包裹\n      minimize: true,\n      moduleIdType: 'chameleon',\n      entry: [\n        './components'\n      ],\n      definePlugin: {\n        'process.env.NODE_ENV': JSON.stringify('production')\n      }\n    }\n  },\n  weex: {\n    dev: {\n      cache: false,\n      hasMiniAppCustomDataClass: false,\n      isWrapComponent: true, // 默认对组件进行一层包裹\n      moduleIdType: 'name',\n      definePlugin: {\n        'process.env.NODE_ENV': JSON.stringify('development')\n      }\n    },\n    build: {\n      hash: true,\n      cache: false,\n      hasMiniAppCustomDataClass: false,\n      isWrapComponent: true, // 默认对组件进行一层包裹\n      minimize: true,\n      moduleIdType: 'chameleon',\n      definePlugin: {\n        'process.env.NODE_ENV': JSON.stringify('production')\n      }\n    },\n    export: {\n      hash: true,\n      cache: false,\n      hasMiniAppCustomDataClass: false,\n      isWrapComponent: true, // 默认对组件进行一层包裹\n      minimize: true,\n      moduleIdType: 'chameleon',\n      entry: [\n        './components'\n      ],\n      definePlugin: {\n        'process.env.NODE_ENV': JSON.stringify('production')\n      }\n    }\n  },\n  optimize: {\n    watchNodeModules: false, // 默认不对node_modules中的文件进行watch,提升编译性能\n    showWarning: false, // 为了兼容原来的配置，默认不开启构建过程中的警告信息，开启之后配合，DuplicatePackageCheckerPlugin 可以在构建过程中检查是否有重复npm包引入\n    dropConsole: true,\n    processBar: true,\n    circularDependency: true// 默认引入自动检测循环引用的插件\n  }\n}\n\nvar utils = require('./utils.js');\n\n\nconst _ = {};\nmodule.exports = _;\n\n_.get = function() {\n  if (chameleonConfig.base) {\n    let baseConfig = chameleonConfig.base;\n    let platforms = chameleonConfig.platforms;\n    let extPlatform = chameleonConfig.extPlatform || {};\n    platforms = platforms.concat(Object.keys(extPlatform));\n    platforms.forEach(platform => {\n      if (chameleonConfig[platform]) {\n        let base = JSON.parse(JSON.stringify(baseConfig));\n        let newConfig = JSON.parse(JSON.stringify(chameleonConfig[platform]));\n        utils.merge(base, newConfig);\n        chameleonConfig[platform] = base;\n      }\n    })\n  }\n  return chameleonConfig;\n}\n\n\n_.merge = function(mergeConfig) {\n  chameleonConfig = utils.merge(chameleonConfig, mergeConfig);\n  return chameleonConfig;\n}\n\n_.assign = function(mergeConfig) {\n  chameleonConfig = Object.assign(chameleonConfig, mergeConfig);\n  return chameleonConfig;\n}\n\n\n"
  },
  {
    "path": "packages/chameleon-tool/lib/index.js",
    "content": "\nconst path = require('path');\nconst cli = require('./cli.js');\nconst utils = require('./utils.js');\nconst config = require('./config.js');\nconst log = require('./log.js');\nconst argv = require('minimist')(process.argv.slice(2));\nconst EventEmitter = require('events');\n\nconst chameleon = {};\nglobal.chameleon = chameleon;\nglobal.cml = chameleon;\ncml.root = path.join(__dirname, '../');\ncml.projectRoot = argv.root || process.cwd();\ncml.utils = utils;\ncml.config = config;\ncml.cli = cli;\ncml.log = log;\ncml.event = new EventEmitter();\ncml.utils.setCli(true); // 标识当前在chameleon-cli环境中\ncml.logLevel = argv.log || 'none'; // 日志输入等级   none  debug\ncml.log.setLogLevel(cml.logLevel);\n\n// 设置projectName为项目根目录文件名称\ncml.config.get().projectName = path.basename(cml.projectRoot)\n\nconst configPath = path.join(cml.projectRoot, 'chameleon.config.js');\nif (cml.utils.isFile(configPath)) {\n  require(configPath);\n  // 标识是否加载了项目中的配置文件。\n  cml.config.loaded = true;\n} else {\n  cml.config.loaded = false;\n}\n// 设置内置组件库名称\ncml.utils.setBuiltinNpmName(cml.config.get().builtinNpmName);\ncml.extPlatformPlugin = {}; // 扩展端的插件对象\ncml.cli.run();\n"
  },
  {
    "path": "packages/chameleon-tool/lib/log.js",
    "content": "const chalk = require('chalk');\n\nconst _ = module.exports = {};\n\nlet logLevel = 'none';\n\n_.setLogLevel = function(level) {\n  logLevel = level;\n}\n\n_.debug = function(msg) {\n  if (logLevel === 'debug') {\n    process.stdout.write('\\n' + chalk.gray('[DEBUG]') + ' ' + msg + '\\n');\n  }\n}\n\n_.notice = function(msg) {\n  process.stdout.write('\\n' + chalk.cyan('[INFO]') + ' ' + msg + '\\n');\n}\n\n_.warn = function(msg) {\n  process.stdout.write('\\n' + chalk.yellow('[WARNI]') + ' ' + msg + '\\n');\n}\n\n_.error = function(msg) {\n  process.stdout.write('\\n' + chalk.red('[ERROR]') + ' ' + msg + '\\n');\n}\n\n_.startBuilding = function(cmlType) {\n  if (cmlType) {\n    _.notice(`${cmlType} Compiling....`)\n  } else {\n    _.notice('start Compiling...')\n  }\n}\n\n\n"
  },
  {
    "path": "packages/chameleon-tool/lib/utils.js",
    "content": "const path = require('path');\n\nconst fse = require('fs-extra');\nconst watch = require('node-watch');\n\nconst utils = require('chameleon-tool-utils');\n// 创建路由文件\n// platform   web端和weex端 现在没有用到，如果要区分，cml weex dev命令要执行两遍， web和weex的要生成两个不同的routerOptions文件\n// media dev模式开启watch  其他情况不监听变化 否则命名行不结束\nutils.createRouterFile = function (platform, media) {\n\n  let routerConfigPath = path.join(cml.projectRoot, 'src/router.config.json');\n\n  if (utils.isFile(routerConfigPath)) {\n    if (media === 'dev') {\n      watch(routerConfigPath, { recursive: true }, function(evt, name) {\n        cml.log.debug(' createRouterFile routerchange')\n        cml.event.emit('routerchange')\n      });\n    }\n  } else {\n    cml.log.error('未找到路由配置文件');\n  }\n\n}\n\nvar TEMP_ROOT;\n\nutils.getTempRoot = function () {\n  if (!TEMP_ROOT) {\n    var tmp = path.join(cml.projectRoot, 'node_modules/.chameleon')\n    if (cml.config.get().serverPath) {\n      tmp = cml.config.get().serverPath\n    }\n    utils.setTempRoot(tmp);\n  }\n  return TEMP_ROOT;\n};\n\nutils.getDevServerPath = function () {\n  return path.resolve(utils.getTempRoot() + '/www');\n}\n\n\nutils.setTempRoot = function (tmp) {\n  try {\n    TEMP_ROOT = tmp;\n    fse.ensureDirSync(tmp);\n  } catch (e) {\n    console.log(e);\n  }\n};\n\n// 生成config.json文件\nmodule.exports = utils;\n\n"
  },
  {
    "path": "packages/chameleon-tool/npm-shrinkwrap.json",
    "content": "{\n  \"name\": \"chameleon-tool\",\n  \"version\": \"1.0.8\",\n  \"lockfileVersion\": 1,\n  \"requires\": true,\n  \"dependencies\": {\n    \"@babel/code-frame\": {\n      \"version\": \"7.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz\",\n      \"integrity\": \"sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==\",\n      \"requires\": {\n        \"@babel/highlight\": \"7.0.0\"\n      }\n    },\n    \"@babel/core\": {\n      \"version\": \"7.12.3\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz\",\n      \"integrity\": \"sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==\",\n      \"requires\": {\n        \"@babel/code-frame\": \"7.10.4\",\n        \"@babel/generator\": \"7.12.1\",\n        \"@babel/helper-module-transforms\": \"7.12.1\",\n        \"@babel/helpers\": \"7.12.1\",\n        \"@babel/parser\": \"7.12.3\",\n        \"@babel/template\": \"7.10.4\",\n        \"@babel/traverse\": \"7.12.1\",\n        \"@babel/types\": \"7.12.1\",\n        \"convert-source-map\": \"1.7.0\",\n        \"debug\": \"4.2.0\",\n        \"gensync\": \"1.0.0-beta.1\",\n        \"json5\": \"2.1.3\",\n        \"lodash\": \"4.17.20\",\n        \"resolve\": \"1.9.0\",\n        \"semver\": \"5.6.0\",\n        \"source-map\": \"0.5.7\"\n      },\n      \"dependencies\": {\n        \"@babel/code-frame\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz\",\n          \"integrity\": \"sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==\",\n          \"requires\": {\n            \"@babel/highlight\": \"7.10.4\"\n          }\n        },\n        \"@babel/generator\": {\n          \"version\": \"7.12.1\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.12.1.tgz\",\n          \"integrity\": \"sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.1\",\n            \"jsesc\": \"2.5.2\",\n            \"source-map\": \"0.5.7\"\n          }\n        },\n        \"@babel/helper-function-name\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz\",\n          \"integrity\": \"sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==\",\n          \"requires\": {\n            \"@babel/helper-get-function-arity\": \"7.10.4\",\n            \"@babel/template\": \"7.10.4\",\n            \"@babel/types\": \"7.12.1\"\n          }\n        },\n        \"@babel/helper-get-function-arity\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz\",\n          \"integrity\": \"sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.1\"\n          }\n        },\n        \"@babel/helper-split-export-declaration\": {\n          \"version\": \"7.11.0\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz\",\n          \"integrity\": \"sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.1\"\n          }\n        },\n        \"@babel/highlight\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz\",\n          \"integrity\": \"sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==\",\n          \"requires\": {\n            \"@babel/helper-validator-identifier\": \"7.10.4\",\n            \"chalk\": \"2.4.2\",\n            \"js-tokens\": \"4.0.0\"\n          }\n        },\n        \"@babel/parser\": {\n          \"version\": \"7.12.3\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz\",\n          \"integrity\": \"sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==\"\n        },\n        \"@babel/template\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz\",\n          \"integrity\": \"sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==\",\n          \"requires\": {\n            \"@babel/code-frame\": \"7.10.4\",\n            \"@babel/parser\": \"7.12.3\",\n            \"@babel/types\": \"7.12.1\"\n          }\n        },\n        \"@babel/traverse\": {\n          \"version\": \"7.12.1\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.1.tgz\",\n          \"integrity\": \"sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw==\",\n          \"requires\": {\n            \"@babel/code-frame\": \"7.10.4\",\n            \"@babel/generator\": \"7.12.1\",\n            \"@babel/helper-function-name\": \"7.10.4\",\n            \"@babel/helper-split-export-declaration\": \"7.11.0\",\n            \"@babel/parser\": \"7.12.3\",\n            \"@babel/types\": \"7.12.1\",\n            \"debug\": \"4.2.0\",\n            \"globals\": \"11.12.0\",\n            \"lodash\": \"4.17.20\"\n          }\n        },\n        \"@babel/types\": {\n          \"version\": \"7.12.1\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz\",\n          \"integrity\": \"sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==\",\n          \"requires\": {\n            \"@babel/helper-validator-identifier\": \"7.10.4\",\n            \"lodash\": \"4.17.20\",\n            \"to-fast-properties\": \"2.0.0\"\n          }\n        },\n        \"convert-source-map\": {\n          \"version\": \"1.7.0\",\n          \"resolved\": \"https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz\",\n          \"integrity\": \"sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==\",\n          \"requires\": {\n            \"safe-buffer\": \"5.1.2\"\n          }\n        },\n        \"debug\": {\n          \"version\": \"4.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.2.0.tgz\",\n          \"integrity\": \"sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==\",\n          \"requires\": {\n            \"ms\": \"2.1.2\"\n          }\n        },\n        \"globals\": {\n          \"version\": \"11.12.0\",\n          \"resolved\": \"https://registry.npmjs.org/globals/-/globals-11.12.0.tgz\",\n          \"integrity\": \"sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==\"\n        },\n        \"js-tokens\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz\",\n          \"integrity\": \"sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==\"\n        },\n        \"jsesc\": {\n          \"version\": \"2.5.2\",\n          \"resolved\": \"https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz\",\n          \"integrity\": \"sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==\"\n        },\n        \"json5\": {\n          \"version\": \"2.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/json5/-/json5-2.1.3.tgz\",\n          \"integrity\": \"sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==\",\n          \"requires\": {\n            \"minimist\": \"1.2.5\"\n          }\n        },\n        \"lodash\": {\n          \"version\": \"4.17.20\",\n          \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz\",\n          \"integrity\": \"sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==\"\n        },\n        \"minimist\": {\n          \"version\": \"1.2.5\",\n          \"resolved\": \"https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz\",\n          \"integrity\": \"sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==\"\n        },\n        \"ms\": {\n          \"version\": \"2.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.2.tgz\",\n          \"integrity\": \"sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==\"\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"to-fast-properties\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz\",\n          \"integrity\": \"sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=\"\n        }\n      }\n    },\n    \"@babel/generator\": {\n      \"version\": \"7.2.2\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.2.2.tgz\",\n      \"integrity\": \"sha512-I4o675J/iS8k+P38dvJ3IBGqObLXyQLTxtrR4u9cSUJOURvafeEWb/pFMOTwtNrmq73mJzyF6ueTbO1BtN0Zeg==\",\n      \"requires\": {\n        \"@babel/types\": \"7.2.2\",\n        \"jsesc\": \"2.5.2\",\n        \"lodash\": \"4.17.11\",\n        \"source-map\": \"0.5.7\",\n        \"trim-right\": \"1.0.1\"\n      },\n      \"dependencies\": {\n        \"jsesc\": {\n          \"version\": \"2.5.2\",\n          \"resolved\": \"https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz\",\n          \"integrity\": \"sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==\"\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        }\n      }\n    },\n    \"@babel/helper-function-name\": {\n      \"version\": \"7.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz\",\n      \"integrity\": \"sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw==\",\n      \"requires\": {\n        \"@babel/helper-get-function-arity\": \"7.0.0\",\n        \"@babel/template\": \"7.2.2\",\n        \"@babel/types\": \"7.2.2\"\n      }\n    },\n    \"@babel/helper-get-function-arity\": {\n      \"version\": \"7.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz\",\n      \"integrity\": \"sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ==\",\n      \"requires\": {\n        \"@babel/types\": \"7.2.2\"\n      }\n    },\n    \"@babel/helper-member-expression-to-functions\": {\n      \"version\": \"7.12.1\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz\",\n      \"integrity\": \"sha512-k0CIe3tXUKTRSoEx1LQEPFU9vRQfqHtl+kf8eNnDqb4AUJEy5pz6aIiog+YWtVm2jpggjS1laH68bPsR+KWWPQ==\",\n      \"requires\": {\n        \"@babel/types\": \"7.12.1\"\n      },\n      \"dependencies\": {\n        \"@babel/types\": {\n          \"version\": \"7.12.1\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz\",\n          \"integrity\": \"sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==\",\n          \"requires\": {\n            \"@babel/helper-validator-identifier\": \"7.10.4\",\n            \"lodash\": \"4.17.20\",\n            \"to-fast-properties\": \"2.0.0\"\n          }\n        },\n        \"lodash\": {\n          \"version\": \"4.17.20\",\n          \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz\",\n          \"integrity\": \"sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==\"\n        },\n        \"to-fast-properties\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz\",\n          \"integrity\": \"sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=\"\n        }\n      }\n    },\n    \"@babel/helper-module-imports\": {\n      \"version\": \"7.12.1\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.1.tgz\",\n      \"integrity\": \"sha512-ZeC1TlMSvikvJNy1v/wPIazCu3NdOwgYZLIkmIyAsGhqkNpiDoQQRmaCK8YP4Pq3GPTLPV9WXaPCJKvx06JxKA==\",\n      \"requires\": {\n        \"@babel/types\": \"7.12.1\"\n      },\n      \"dependencies\": {\n        \"@babel/types\": {\n          \"version\": \"7.12.1\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz\",\n          \"integrity\": \"sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==\",\n          \"requires\": {\n            \"@babel/helper-validator-identifier\": \"7.10.4\",\n            \"lodash\": \"4.17.20\",\n            \"to-fast-properties\": \"2.0.0\"\n          }\n        },\n        \"lodash\": {\n          \"version\": \"4.17.20\",\n          \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz\",\n          \"integrity\": \"sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==\"\n        },\n        \"to-fast-properties\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz\",\n          \"integrity\": \"sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=\"\n        }\n      }\n    },\n    \"@babel/helper-module-transforms\": {\n      \"version\": \"7.12.1\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz\",\n      \"integrity\": \"sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w==\",\n      \"requires\": {\n        \"@babel/helper-module-imports\": \"7.12.1\",\n        \"@babel/helper-replace-supers\": \"7.12.1\",\n        \"@babel/helper-simple-access\": \"7.12.1\",\n        \"@babel/helper-split-export-declaration\": \"7.11.0\",\n        \"@babel/helper-validator-identifier\": \"7.10.4\",\n        \"@babel/template\": \"7.10.4\",\n        \"@babel/traverse\": \"7.12.1\",\n        \"@babel/types\": \"7.12.1\",\n        \"lodash\": \"4.17.20\"\n      },\n      \"dependencies\": {\n        \"@babel/code-frame\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz\",\n          \"integrity\": \"sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==\",\n          \"requires\": {\n            \"@babel/highlight\": \"7.10.4\"\n          }\n        },\n        \"@babel/generator\": {\n          \"version\": \"7.12.1\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.12.1.tgz\",\n          \"integrity\": \"sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.1\",\n            \"jsesc\": \"2.5.2\",\n            \"source-map\": \"0.5.7\"\n          }\n        },\n        \"@babel/helper-function-name\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz\",\n          \"integrity\": \"sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==\",\n          \"requires\": {\n            \"@babel/helper-get-function-arity\": \"7.10.4\",\n            \"@babel/template\": \"7.10.4\",\n            \"@babel/types\": \"7.12.1\"\n          }\n        },\n        \"@babel/helper-get-function-arity\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz\",\n          \"integrity\": \"sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.1\"\n          }\n        },\n        \"@babel/helper-split-export-declaration\": {\n          \"version\": \"7.11.0\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz\",\n          \"integrity\": \"sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.1\"\n          }\n        },\n        \"@babel/highlight\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz\",\n          \"integrity\": \"sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==\",\n          \"requires\": {\n            \"@babel/helper-validator-identifier\": \"7.10.4\",\n            \"chalk\": \"2.4.2\",\n            \"js-tokens\": \"4.0.0\"\n          }\n        },\n        \"@babel/parser\": {\n          \"version\": \"7.12.3\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz\",\n          \"integrity\": \"sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==\"\n        },\n        \"@babel/template\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz\",\n          \"integrity\": \"sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==\",\n          \"requires\": {\n            \"@babel/code-frame\": \"7.10.4\",\n            \"@babel/parser\": \"7.12.3\",\n            \"@babel/types\": \"7.12.1\"\n          }\n        },\n        \"@babel/traverse\": {\n          \"version\": \"7.12.1\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.1.tgz\",\n          \"integrity\": \"sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw==\",\n          \"requires\": {\n            \"@babel/code-frame\": \"7.10.4\",\n            \"@babel/generator\": \"7.12.1\",\n            \"@babel/helper-function-name\": \"7.10.4\",\n            \"@babel/helper-split-export-declaration\": \"7.11.0\",\n            \"@babel/parser\": \"7.12.3\",\n            \"@babel/types\": \"7.12.1\",\n            \"debug\": \"4.2.0\",\n            \"globals\": \"11.12.0\",\n            \"lodash\": \"4.17.20\"\n          }\n        },\n        \"@babel/types\": {\n          \"version\": \"7.12.1\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz\",\n          \"integrity\": \"sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==\",\n          \"requires\": {\n            \"@babel/helper-validator-identifier\": \"7.10.4\",\n            \"lodash\": \"4.17.20\",\n            \"to-fast-properties\": \"2.0.0\"\n          }\n        },\n        \"debug\": {\n          \"version\": \"4.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.2.0.tgz\",\n          \"integrity\": \"sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==\",\n          \"requires\": {\n            \"ms\": \"2.1.2\"\n          }\n        },\n        \"globals\": {\n          \"version\": \"11.12.0\",\n          \"resolved\": \"https://registry.npmjs.org/globals/-/globals-11.12.0.tgz\",\n          \"integrity\": \"sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==\"\n        },\n        \"js-tokens\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz\",\n          \"integrity\": \"sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==\"\n        },\n        \"jsesc\": {\n          \"version\": \"2.5.2\",\n          \"resolved\": \"https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz\",\n          \"integrity\": \"sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==\"\n        },\n        \"lodash\": {\n          \"version\": \"4.17.20\",\n          \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz\",\n          \"integrity\": \"sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==\"\n        },\n        \"ms\": {\n          \"version\": \"2.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.2.tgz\",\n          \"integrity\": \"sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==\"\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"to-fast-properties\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz\",\n          \"integrity\": \"sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=\"\n        }\n      }\n    },\n    \"@babel/helper-optimise-call-expression\": {\n      \"version\": \"7.10.4\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz\",\n      \"integrity\": \"sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==\",\n      \"requires\": {\n        \"@babel/types\": \"7.12.1\"\n      },\n      \"dependencies\": {\n        \"@babel/types\": {\n          \"version\": \"7.12.1\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz\",\n          \"integrity\": \"sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==\",\n          \"requires\": {\n            \"@babel/helper-validator-identifier\": \"7.10.4\",\n            \"lodash\": \"4.17.20\",\n            \"to-fast-properties\": \"2.0.0\"\n          }\n        },\n        \"lodash\": {\n          \"version\": \"4.17.20\",\n          \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz\",\n          \"integrity\": \"sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==\"\n        },\n        \"to-fast-properties\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz\",\n          \"integrity\": \"sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=\"\n        }\n      }\n    },\n    \"@babel/helper-plugin-utils\": {\n      \"version\": \"7.10.4\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz\",\n      \"integrity\": \"sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==\"\n    },\n    \"@babel/helper-replace-supers\": {\n      \"version\": \"7.12.1\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.1.tgz\",\n      \"integrity\": \"sha512-zJjTvtNJnCFsCXVi5rUInstLd/EIVNmIKA1Q9ynESmMBWPWd+7sdR+G4/wdu+Mppfep0XLyG2m7EBPvjCeFyrw==\",\n      \"requires\": {\n        \"@babel/helper-member-expression-to-functions\": \"7.12.1\",\n        \"@babel/helper-optimise-call-expression\": \"7.10.4\",\n        \"@babel/traverse\": \"7.12.1\",\n        \"@babel/types\": \"7.12.1\"\n      },\n      \"dependencies\": {\n        \"@babel/code-frame\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz\",\n          \"integrity\": \"sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==\",\n          \"requires\": {\n            \"@babel/highlight\": \"7.10.4\"\n          }\n        },\n        \"@babel/generator\": {\n          \"version\": \"7.12.1\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.12.1.tgz\",\n          \"integrity\": \"sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.1\",\n            \"jsesc\": \"2.5.2\",\n            \"source-map\": \"0.5.7\"\n          }\n        },\n        \"@babel/helper-function-name\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz\",\n          \"integrity\": \"sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==\",\n          \"requires\": {\n            \"@babel/helper-get-function-arity\": \"7.10.4\",\n            \"@babel/template\": \"7.10.4\",\n            \"@babel/types\": \"7.12.1\"\n          }\n        },\n        \"@babel/helper-get-function-arity\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz\",\n          \"integrity\": \"sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.1\"\n          }\n        },\n        \"@babel/helper-split-export-declaration\": {\n          \"version\": \"7.11.0\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz\",\n          \"integrity\": \"sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.1\"\n          }\n        },\n        \"@babel/highlight\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz\",\n          \"integrity\": \"sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==\",\n          \"requires\": {\n            \"@babel/helper-validator-identifier\": \"7.10.4\",\n            \"chalk\": \"2.4.2\",\n            \"js-tokens\": \"4.0.0\"\n          }\n        },\n        \"@babel/parser\": {\n          \"version\": \"7.12.3\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz\",\n          \"integrity\": \"sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==\"\n        },\n        \"@babel/template\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz\",\n          \"integrity\": \"sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==\",\n          \"requires\": {\n            \"@babel/code-frame\": \"7.10.4\",\n            \"@babel/parser\": \"7.12.3\",\n            \"@babel/types\": \"7.12.1\"\n          }\n        },\n        \"@babel/traverse\": {\n          \"version\": \"7.12.1\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.1.tgz\",\n          \"integrity\": \"sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw==\",\n          \"requires\": {\n            \"@babel/code-frame\": \"7.10.4\",\n            \"@babel/generator\": \"7.12.1\",\n            \"@babel/helper-function-name\": \"7.10.4\",\n            \"@babel/helper-split-export-declaration\": \"7.11.0\",\n            \"@babel/parser\": \"7.12.3\",\n            \"@babel/types\": \"7.12.1\",\n            \"debug\": \"4.2.0\",\n            \"globals\": \"11.12.0\",\n            \"lodash\": \"4.17.20\"\n          }\n        },\n        \"@babel/types\": {\n          \"version\": \"7.12.1\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz\",\n          \"integrity\": \"sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==\",\n          \"requires\": {\n            \"@babel/helper-validator-identifier\": \"7.10.4\",\n            \"lodash\": \"4.17.20\",\n            \"to-fast-properties\": \"2.0.0\"\n          }\n        },\n        \"debug\": {\n          \"version\": \"4.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.2.0.tgz\",\n          \"integrity\": \"sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==\",\n          \"requires\": {\n            \"ms\": \"2.1.2\"\n          }\n        },\n        \"globals\": {\n          \"version\": \"11.12.0\",\n          \"resolved\": \"https://registry.npmjs.org/globals/-/globals-11.12.0.tgz\",\n          \"integrity\": \"sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==\"\n        },\n        \"js-tokens\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz\",\n          \"integrity\": \"sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==\"\n        },\n        \"jsesc\": {\n          \"version\": \"2.5.2\",\n          \"resolved\": \"https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz\",\n          \"integrity\": \"sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==\"\n        },\n        \"lodash\": {\n          \"version\": \"4.17.20\",\n          \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz\",\n          \"integrity\": \"sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==\"\n        },\n        \"ms\": {\n          \"version\": \"2.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.2.tgz\",\n          \"integrity\": \"sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==\"\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"to-fast-properties\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz\",\n          \"integrity\": \"sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=\"\n        }\n      }\n    },\n    \"@babel/helper-simple-access\": {\n      \"version\": \"7.12.1\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz\",\n      \"integrity\": \"sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA==\",\n      \"requires\": {\n        \"@babel/types\": \"7.12.1\"\n      },\n      \"dependencies\": {\n        \"@babel/types\": {\n          \"version\": \"7.12.1\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz\",\n          \"integrity\": \"sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==\",\n          \"requires\": {\n            \"@babel/helper-validator-identifier\": \"7.10.4\",\n            \"lodash\": \"4.17.20\",\n            \"to-fast-properties\": \"2.0.0\"\n          }\n        },\n        \"lodash\": {\n          \"version\": \"4.17.20\",\n          \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz\",\n          \"integrity\": \"sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==\"\n        },\n        \"to-fast-properties\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz\",\n          \"integrity\": \"sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=\"\n        }\n      }\n    },\n    \"@babel/helper-split-export-declaration\": {\n      \"version\": \"7.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz\",\n      \"integrity\": \"sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag==\",\n      \"requires\": {\n        \"@babel/types\": \"7.2.2\"\n      }\n    },\n    \"@babel/helper-validator-identifier\": {\n      \"version\": \"7.10.4\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz\",\n      \"integrity\": \"sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==\"\n    },\n    \"@babel/helpers\": {\n      \"version\": \"7.12.1\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.1.tgz\",\n      \"integrity\": \"sha512-9JoDSBGoWtmbay98efmT2+mySkwjzeFeAL9BuWNoVQpkPFQF8SIIFUfY5os9u8wVzglzoiPRSW7cuJmBDUt43g==\",\n      \"requires\": {\n        \"@babel/template\": \"7.10.4\",\n        \"@babel/traverse\": \"7.12.1\",\n        \"@babel/types\": \"7.12.1\"\n      },\n      \"dependencies\": {\n        \"@babel/code-frame\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz\",\n          \"integrity\": \"sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==\",\n          \"requires\": {\n            \"@babel/highlight\": \"7.10.4\"\n          }\n        },\n        \"@babel/generator\": {\n          \"version\": \"7.12.1\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.12.1.tgz\",\n          \"integrity\": \"sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.1\",\n            \"jsesc\": \"2.5.2\",\n            \"source-map\": \"0.5.7\"\n          }\n        },\n        \"@babel/helper-function-name\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz\",\n          \"integrity\": \"sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==\",\n          \"requires\": {\n            \"@babel/helper-get-function-arity\": \"7.10.4\",\n            \"@babel/template\": \"7.10.4\",\n            \"@babel/types\": \"7.12.1\"\n          }\n        },\n        \"@babel/helper-get-function-arity\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz\",\n          \"integrity\": \"sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.1\"\n          }\n        },\n        \"@babel/helper-split-export-declaration\": {\n          \"version\": \"7.11.0\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz\",\n          \"integrity\": \"sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.1\"\n          }\n        },\n        \"@babel/highlight\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz\",\n          \"integrity\": \"sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==\",\n          \"requires\": {\n            \"@babel/helper-validator-identifier\": \"7.10.4\",\n            \"chalk\": \"2.4.2\",\n            \"js-tokens\": \"4.0.0\"\n          }\n        },\n        \"@babel/parser\": {\n          \"version\": \"7.12.3\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz\",\n          \"integrity\": \"sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==\"\n        },\n        \"@babel/template\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz\",\n          \"integrity\": \"sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==\",\n          \"requires\": {\n            \"@babel/code-frame\": \"7.10.4\",\n            \"@babel/parser\": \"7.12.3\",\n            \"@babel/types\": \"7.12.1\"\n          }\n        },\n        \"@babel/traverse\": {\n          \"version\": \"7.12.1\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.1.tgz\",\n          \"integrity\": \"sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw==\",\n          \"requires\": {\n            \"@babel/code-frame\": \"7.10.4\",\n            \"@babel/generator\": \"7.12.1\",\n            \"@babel/helper-function-name\": \"7.10.4\",\n            \"@babel/helper-split-export-declaration\": \"7.11.0\",\n            \"@babel/parser\": \"7.12.3\",\n            \"@babel/types\": \"7.12.1\",\n            \"debug\": \"4.2.0\",\n            \"globals\": \"11.12.0\",\n            \"lodash\": \"4.17.20\"\n          }\n        },\n        \"@babel/types\": {\n          \"version\": \"7.12.1\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz\",\n          \"integrity\": \"sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==\",\n          \"requires\": {\n            \"@babel/helper-validator-identifier\": \"7.10.4\",\n            \"lodash\": \"4.17.20\",\n            \"to-fast-properties\": \"2.0.0\"\n          }\n        },\n        \"debug\": {\n          \"version\": \"4.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.2.0.tgz\",\n          \"integrity\": \"sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==\",\n          \"requires\": {\n            \"ms\": \"2.1.2\"\n          }\n        },\n        \"globals\": {\n          \"version\": \"11.12.0\",\n          \"resolved\": \"https://registry.npmjs.org/globals/-/globals-11.12.0.tgz\",\n          \"integrity\": \"sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==\"\n        },\n        \"js-tokens\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz\",\n          \"integrity\": \"sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==\"\n        },\n        \"jsesc\": {\n          \"version\": \"2.5.2\",\n          \"resolved\": \"https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz\",\n          \"integrity\": \"sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==\"\n        },\n        \"lodash\": {\n          \"version\": \"4.17.20\",\n          \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz\",\n          \"integrity\": \"sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==\"\n        },\n        \"ms\": {\n          \"version\": \"2.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.2.tgz\",\n          \"integrity\": \"sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==\"\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"to-fast-properties\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz\",\n          \"integrity\": \"sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=\"\n        }\n      }\n    },\n    \"@babel/highlight\": {\n      \"version\": \"7.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz\",\n      \"integrity\": \"sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==\",\n      \"requires\": {\n        \"chalk\": \"2.4.2\",\n        \"esutils\": \"2.0.2\",\n        \"js-tokens\": \"4.0.0\"\n      },\n      \"dependencies\": {\n        \"js-tokens\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz\",\n          \"integrity\": \"sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==\"\n        }\n      }\n    },\n    \"@babel/parser\": {\n      \"version\": \"7.2.3\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.2.3.tgz\",\n      \"integrity\": \"sha512-0LyEcVlfCoFmci8mXx8A5oIkpkOgyo8dRHtxBnK9RRBwxO2+JZPNsqtVEZQ7mJFPxnXF9lfmU24mHOPI0qnlkA==\"\n    },\n    \"@babel/plugin-syntax-jsx\": {\n      \"version\": \"7.12.1\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz\",\n      \"integrity\": \"sha512-1yRi7yAtB0ETgxdY9ti/p2TivUxJkTdhu/ZbF9MshVGqOx1TdB3b7xCXs49Fupgg50N45KcAsRP/ZqWjs9SRjg==\",\n      \"requires\": {\n        \"@babel/helper-plugin-utils\": \"7.10.4\"\n      }\n    },\n    \"@babel/polyfill\": {\n      \"version\": \"7.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.0.0.tgz\",\n      \"integrity\": \"sha512-dnrMRkyyr74CRelJwvgnnSUDh2ge2NCTyHVwpOdvRMHtJUyxLtMAfhBN3s64pY41zdw0kgiLPh6S20eb1NcX6Q==\",\n      \"requires\": {\n        \"core-js\": \"2.6.2\",\n        \"regenerator-runtime\": \"0.11.1\"\n      }\n    },\n    \"@babel/runtime\": {\n      \"version\": \"7.12.1\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.1.tgz\",\n      \"integrity\": \"sha512-J5AIf3vPj3UwXaAzb5j1xM4WAQDX3EMgemF8rjCP3SoW09LfRKAXQKt6CoVYl230P6iWdRcBbnLDDdnqWxZSCA==\",\n      \"requires\": {\n        \"regenerator-runtime\": \"0.13.7\"\n      },\n      \"dependencies\": {\n        \"regenerator-runtime\": {\n          \"version\": \"0.13.7\",\n          \"resolved\": \"https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz\",\n          \"integrity\": \"sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==\"\n        }\n      }\n    },\n    \"@babel/template\": {\n      \"version\": \"7.2.2\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/template/-/template-7.2.2.tgz\",\n      \"integrity\": \"sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g==\",\n      \"requires\": {\n        \"@babel/code-frame\": \"7.0.0\",\n        \"@babel/parser\": \"7.2.3\",\n        \"@babel/types\": \"7.2.2\"\n      }\n    },\n    \"@babel/traverse\": {\n      \"version\": \"7.2.3\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.2.3.tgz\",\n      \"integrity\": \"sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw==\",\n      \"requires\": {\n        \"@babel/code-frame\": \"7.0.0\",\n        \"@babel/generator\": \"7.2.2\",\n        \"@babel/helper-function-name\": \"7.1.0\",\n        \"@babel/helper-split-export-declaration\": \"7.0.0\",\n        \"@babel/parser\": \"7.2.3\",\n        \"@babel/types\": \"7.2.2\",\n        \"debug\": \"4.1.1\",\n        \"globals\": \"11.10.0\",\n        \"lodash\": \"4.17.11\"\n      },\n      \"dependencies\": {\n        \"debug\": {\n          \"version\": \"4.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.1.1.tgz\",\n          \"integrity\": \"sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==\",\n          \"requires\": {\n            \"ms\": \"2.1.1\"\n          }\n        },\n        \"globals\": {\n          \"version\": \"11.10.0\",\n          \"resolved\": \"https://registry.npmjs.org/globals/-/globals-11.10.0.tgz\",\n          \"integrity\": \"sha512-0GZF1RiPKU97IHUO5TORo9w1PwrH/NBPl+fS7oMLdaTRiYmYbwK4NWoZWrAdd0/abG9R2BU+OiwyQpTpE6pdfQ==\"\n        },\n        \"ms\": {\n          \"version\": \"2.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.1.tgz\",\n          \"integrity\": \"sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==\"\n        }\n      }\n    },\n    \"@babel/types\": {\n      \"version\": \"7.2.2\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/types/-/types-7.2.2.tgz\",\n      \"integrity\": \"sha512-fKCuD6UFUMkR541eDWL+2ih/xFZBXPOg/7EQFeTluMDebfqR4jrpaCjLhkWlQS4hT6nRa2PMEgXKbRB5/H2fpg==\",\n      \"requires\": {\n        \"esutils\": \"2.0.2\",\n        \"lodash\": \"4.17.11\",\n        \"to-fast-properties\": \"2.0.0\"\n      },\n      \"dependencies\": {\n        \"to-fast-properties\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz\",\n          \"integrity\": \"sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=\"\n        }\n      }\n    },\n    \"@mrmlnc/readdir-enhanced\": {\n      \"version\": \"2.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz\",\n      \"integrity\": \"sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==\",\n      \"requires\": {\n        \"call-me-maybe\": \"1.0.1\",\n        \"glob-to-regexp\": \"0.3.0\"\n      }\n    },\n    \"@nodelib/fs.stat\": {\n      \"version\": \"1.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz\",\n      \"integrity\": \"sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==\"\n    },\n    \"@types/anymatch\": {\n      \"version\": \"1.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/@types/anymatch/-/anymatch-1.3.0.tgz\",\n      \"integrity\": \"sha512-7WcbyctkE8GTzogDb0ulRAEw7v8oIS54ft9mQTU7PfM0hp5e+8kpa+HeQ7IQrFbKtJXBKcZ4bh+Em9dTw5L6AQ==\"\n    },\n    \"@types/color-name\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz\",\n      \"integrity\": \"sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==\"\n    },\n    \"@types/glob\": {\n      \"version\": \"7.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz\",\n      \"integrity\": \"sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==\",\n      \"requires\": {\n        \"@types/minimatch\": \"3.0.3\",\n        \"@types/node\": \"10.12.18\"\n      }\n    },\n    \"@types/http-proxy\": {\n      \"version\": \"1.17.4\",\n      \"resolved\": \"https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.4.tgz\",\n      \"integrity\": \"sha512-IrSHl2u6AWXduUaDLqYpt45tLVCtYv7o4Z0s1KghBCDgIIS9oW5K1H8mZG/A2CfeLdEa7rTd1ACOiHBc1EMT2Q==\",\n      \"requires\": {\n        \"@types/node\": \"10.12.18\"\n      }\n    },\n    \"@types/json-schema\": {\n      \"version\": \"7.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.6.tgz\",\n      \"integrity\": \"sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==\"\n    },\n    \"@types/minimatch\": {\n      \"version\": \"3.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz\",\n      \"integrity\": \"sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==\"\n    },\n    \"@types/node\": {\n      \"version\": \"10.12.18\",\n      \"resolved\": \"https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz\",\n      \"integrity\": \"sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==\"\n    },\n    \"@types/tapable\": {\n      \"version\": \"1.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/@types/tapable/-/tapable-1.0.4.tgz\",\n      \"integrity\": \"sha512-78AdXtlhpCHT0K3EytMpn4JNxaf5tbqbLcbIRoQIHzpTIyjpxLQKRoxU55ujBXAtg3Nl2h/XWvfDa9dsMOd0pQ==\"\n    },\n    \"@types/uglify-js\": {\n      \"version\": \"3.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.0.4.tgz\",\n      \"integrity\": \"sha512-SudIN9TRJ+v8g5pTG8RRCqfqTMNqgWCKKd3vtynhGzkIIjxaicNAMuY5TRadJ6tzDu3Dotf3ngaMILtmOdmWEQ==\",\n      \"requires\": {\n        \"source-map\": \"0.6.1\"\n      }\n    },\n    \"@types/unist\": {\n      \"version\": \"2.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz\",\n      \"integrity\": \"sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ==\"\n    },\n    \"@types/vfile\": {\n      \"version\": \"3.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/@types/vfile/-/vfile-3.0.2.tgz\",\n      \"integrity\": \"sha512-b3nLFGaGkJ9rzOcuXRfHkZMdjsawuDD0ENL9fzTophtBg8FJHSGbH7daXkEpcwy3v7Xol3pAvsmlYyFhR4pqJw==\",\n      \"requires\": {\n        \"@types/node\": \"10.12.18\",\n        \"@types/unist\": \"2.0.3\",\n        \"@types/vfile-message\": \"2.0.0\"\n      }\n    },\n    \"@types/vfile-message\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/@types/vfile-message/-/vfile-message-2.0.0.tgz\",\n      \"integrity\": \"sha512-GpTIuDpb9u4zIO165fUy9+fXcULdD8HFRNli04GehoMVbeNq7D6OBnqSmg3lxZnC+UvgUhEWKxdKiwYUkGltIw==\",\n      \"requires\": {\n        \"vfile-message\": \"2.0.4\"\n      }\n    },\n    \"@types/webpack\": {\n      \"version\": \"4.4.22\",\n      \"resolved\": \"https://registry.npmjs.org/@types/webpack/-/webpack-4.4.22.tgz\",\n      \"integrity\": \"sha512-PxAAzli3krZX9rCeONSR5Z9v4CR/2HPsKsiVRFNDo9OZefN+dTemteMHZnYkddOu4bqoYqJTJ724gLy0ZySXOw==\",\n      \"requires\": {\n        \"@types/anymatch\": \"1.3.0\",\n        \"@types/node\": \"10.12.18\",\n        \"@types/tapable\": \"1.0.4\",\n        \"@types/uglify-js\": \"3.0.4\",\n        \"source-map\": \"0.6.1\"\n      }\n    },\n    \"@webpack-contrib/schema-utils\": {\n      \"version\": \"1.0.0-beta.0\",\n      \"resolved\": \"https://registry.npmjs.org/@webpack-contrib/schema-utils/-/schema-utils-1.0.0-beta.0.tgz\",\n      \"integrity\": \"sha512-LonryJP+FxQQHsjGBi6W786TQB1Oym+agTpY0c+Kj8alnIw+DLUJb6SI8Y1GHGhLCH1yPRrucjObUmxNICQ1pg==\",\n      \"requires\": {\n        \"ajv\": \"6.6.2\",\n        \"ajv-keywords\": \"3.2.0\",\n        \"chalk\": \"2.4.2\",\n        \"strip-ansi\": \"4.0.0\",\n        \"text-table\": \"0.2.0\",\n        \"webpack-log\": \"1.2.0\"\n      },\n      \"dependencies\": {\n        \"ansi-regex\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz\",\n          \"integrity\": \"sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=\"\n        },\n        \"strip-ansi\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz\",\n          \"integrity\": \"sha1-qEeQIusaw2iocTibY1JixQXuNo8=\",\n          \"requires\": {\n            \"ansi-regex\": \"3.0.0\"\n          }\n        }\n      }\n    },\n    \"abbrev\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz\",\n      \"integrity\": \"sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==\"\n    },\n    \"accepts\": {\n      \"version\": \"1.3.5\",\n      \"resolved\": \"https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz\",\n      \"integrity\": \"sha1-63d99gEXI6OxTopywIBcjoZ0a9I=\",\n      \"requires\": {\n        \"mime-types\": \"2.1.21\",\n        \"negotiator\": \"0.6.1\"\n      }\n    },\n    \"acorn\": {\n      \"version\": \"4.0.13\",\n      \"resolved\": \"https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz\",\n      \"integrity\": \"sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=\"\n    },\n    \"acorn-dynamic-import\": {\n      \"version\": \"2.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz\",\n      \"integrity\": \"sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=\",\n      \"requires\": {\n        \"acorn\": \"4.0.13\"\n      }\n    },\n    \"acorn-jsx\": {\n      \"version\": \"5.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz\",\n      \"integrity\": \"sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==\",\n      \"dev\": true\n    },\n    \"agentkeepalive\": {\n      \"version\": \"2.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-2.2.0.tgz\",\n      \"integrity\": \"sha1-xdG9SxKQCPEWPyNvhuX66iAm4u8=\"\n    },\n    \"ajv\": {\n      \"version\": \"6.6.2\",\n      \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.6.2.tgz\",\n      \"integrity\": \"sha512-FBHEW6Jf5TB9MGBgUUA9XHkTbjXYfAUjY43ACMfmdMRHniyoMHjHjzD50OK8LGDWQwp4rWEsIq5kEqq7rvIM1g==\",\n      \"requires\": {\n        \"fast-deep-equal\": \"2.0.1\",\n        \"fast-json-stable-stringify\": \"2.0.0\",\n        \"json-schema-traverse\": \"0.4.1\",\n        \"uri-js\": \"4.2.2\"\n      }\n    },\n    \"ajv-keywords\": {\n      \"version\": \"3.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz\",\n      \"integrity\": \"sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=\"\n    },\n    \"align-text\": {\n      \"version\": \"0.1.4\",\n      \"resolved\": \"https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz\",\n      \"integrity\": \"sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=\",\n      \"requires\": {\n        \"kind-of\": \"3.2.2\",\n        \"longest\": \"1.0.1\",\n        \"repeat-string\": \"1.6.1\"\n      },\n      \"dependencies\": {\n        \"kind-of\": {\n          \"version\": \"3.2.2\",\n          \"resolved\": \"https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz\",\n          \"integrity\": \"sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=\",\n          \"requires\": {\n            \"is-buffer\": \"1.1.6\"\n          }\n        }\n      }\n    },\n    \"alphanum-sort\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz\",\n      \"integrity\": \"sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=\"\n    },\n    \"amdefine\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz\",\n      \"integrity\": \"sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=\"\n    },\n    \"ansi-escapes\": {\n      \"version\": \"3.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz\",\n      \"integrity\": \"sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==\"\n    },\n    \"ansi-html\": {\n      \"version\": \"0.0.7\",\n      \"resolved\": \"https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz\",\n      \"integrity\": \"sha1-gTWEAhliqenm/QOflA0S9WynhZ4=\"\n    },\n    \"ansi-regex\": {\n      \"version\": \"2.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz\",\n      \"integrity\": \"sha1-w7M6te42DYbg5ijwRorn7yfWVN8=\"\n    },\n    \"ansi-styles\": {\n      \"version\": \"3.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz\",\n      \"integrity\": \"sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==\",\n      \"requires\": {\n        \"color-convert\": \"1.9.3\"\n      }\n    },\n    \"anymatch\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz\",\n      \"integrity\": \"sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==\",\n      \"requires\": {\n        \"micromatch\": \"3.1.10\",\n        \"normalize-path\": \"2.1.1\"\n      }\n    },\n    \"aproba\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz\",\n      \"integrity\": \"sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==\"\n    },\n    \"argparse\": {\n      \"version\": \"1.0.10\",\n      \"resolved\": \"https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz\",\n      \"integrity\": \"sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==\",\n      \"requires\": {\n        \"sprintf-js\": \"1.0.3\"\n      }\n    },\n    \"arr-diff\": {\n      \"version\": \"4.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz\",\n      \"integrity\": \"sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=\"\n    },\n    \"arr-flatten\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz\",\n      \"integrity\": \"sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==\"\n    },\n    \"arr-union\": {\n      \"version\": \"3.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz\",\n      \"integrity\": \"sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=\"\n    },\n    \"array-each\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz\",\n      \"integrity\": \"sha1-p5SvDAWrF1KEbudTofIRoFugxE8=\"\n    },\n    \"array-find-index\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz\",\n      \"integrity\": \"sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=\"\n    },\n    \"array-flatten\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz\",\n      \"integrity\": \"sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=\"\n    },\n    \"array-slice\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz\",\n      \"integrity\": \"sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==\"\n    },\n    \"array-union\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz\",\n      \"integrity\": \"sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=\",\n      \"requires\": {\n        \"array-uniq\": \"1.0.3\"\n      }\n    },\n    \"array-uniq\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz\",\n      \"integrity\": \"sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=\"\n    },\n    \"array-unique\": {\n      \"version\": \"0.3.2\",\n      \"resolved\": \"https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz\",\n      \"integrity\": \"sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=\"\n    },\n    \"arrify\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz\",\n      \"integrity\": \"sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=\"\n    },\n    \"asap\": {\n      \"version\": \"2.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/asap/-/asap-2.0.6.tgz\",\n      \"integrity\": \"sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=\"\n    },\n    \"asn1\": {\n      \"version\": \"0.2.4\",\n      \"resolved\": \"https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz\",\n      \"integrity\": \"sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==\",\n      \"requires\": {\n        \"safer-buffer\": \"2.1.2\"\n      }\n    },\n    \"asn1.js\": {\n      \"version\": \"4.10.1\",\n      \"resolved\": \"https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz\",\n      \"integrity\": \"sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==\",\n      \"requires\": {\n        \"bn.js\": \"4.11.8\",\n        \"inherits\": \"2.0.3\",\n        \"minimalistic-assert\": \"1.0.1\"\n      }\n    },\n    \"assert\": {\n      \"version\": \"1.4.1\",\n      \"resolved\": \"https://registry.npmjs.org/assert/-/assert-1.4.1.tgz\",\n      \"integrity\": \"sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=\",\n      \"requires\": {\n        \"util\": \"0.10.3\"\n      },\n      \"dependencies\": {\n        \"inherits\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz\",\n          \"integrity\": \"sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=\"\n        },\n        \"util\": {\n          \"version\": \"0.10.3\",\n          \"resolved\": \"https://registry.npmjs.org/util/-/util-0.10.3.tgz\",\n          \"integrity\": \"sha1-evsa/lCAUkZInj23/g7TeTNqwPk=\",\n          \"requires\": {\n            \"inherits\": \"2.0.1\"\n          }\n        }\n      }\n    },\n    \"assert-plus\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz\",\n      \"integrity\": \"sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=\"\n    },\n    \"assertion-error\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz\",\n      \"integrity\": \"sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==\"\n    },\n    \"assets-webpack-plugin\": {\n      \"version\": \"3.8.4\",\n      \"resolved\": \"https://registry.npmjs.org/assets-webpack-plugin/-/assets-webpack-plugin-3.8.4.tgz\",\n      \"integrity\": \"sha1-S5ammFBWOrNrVCBnQe83KQFWlZc=\",\n      \"requires\": {\n        \"camelcase\": \"5.0.0\",\n        \"escape-string-regexp\": \"1.0.5\",\n        \"lodash.assign\": \"4.2.0\",\n        \"lodash.merge\": \"4.6.1\",\n        \"mkdirp\": \"0.5.1\"\n      }\n    },\n    \"assign-symbols\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz\",\n      \"integrity\": \"sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=\"\n    },\n    \"ast-types\": {\n      \"version\": \"0.9.6\",\n      \"resolved\": \"https://registry.npmjs.org/ast-types/-/ast-types-0.9.6.tgz\",\n      \"integrity\": \"sha1-ECyenpAF0+fjgpvwxPok7oYu6bk=\"\n    },\n    \"astral-regex\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz\",\n      \"integrity\": \"sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==\"\n    },\n    \"async\": {\n      \"version\": \"2.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/async/-/async-2.6.1.tgz\",\n      \"integrity\": \"sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==\",\n      \"requires\": {\n        \"lodash\": \"4.17.11\"\n      }\n    },\n    \"async-done\": {\n      \"version\": \"1.3.1\",\n      \"resolved\": \"https://registry.npmjs.org/async-done/-/async-done-1.3.1.tgz\",\n      \"integrity\": \"sha512-R1BaUeJ4PMoLNJuk+0tLJgjmEqVsdN118+Z8O+alhnQDQgy0kmD5Mqi0DNEmMx2LM0Ed5yekKu+ZXYvIHceicg==\",\n      \"requires\": {\n        \"end-of-stream\": \"1.4.1\",\n        \"once\": \"1.4.0\",\n        \"process-nextick-args\": \"1.0.7\",\n        \"stream-exhaust\": \"1.0.2\"\n      },\n      \"dependencies\": {\n        \"process-nextick-args\": {\n          \"version\": \"1.0.7\",\n          \"resolved\": \"https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz\",\n          \"integrity\": \"sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=\"\n        }\n      }\n    },\n    \"async-each\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz\",\n      \"integrity\": \"sha1-GdOGodntxufByF04iu28xW0zYC0=\"\n    },\n    \"async-limiter\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz\",\n      \"integrity\": \"sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==\"\n    },\n    \"asynckit\": {\n      \"version\": \"0.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz\",\n      \"integrity\": \"sha1-x57Zf380y48robyXkLzDZkdLS3k=\"\n    },\n    \"atob\": {\n      \"version\": \"2.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/atob/-/atob-2.1.2.tgz\",\n      \"integrity\": \"sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==\"\n    },\n    \"autoprefixer\": {\n      \"version\": \"8.6.4\",\n      \"resolved\": \"https://registry.npmjs.org/autoprefixer/-/autoprefixer-8.6.4.tgz\",\n      \"integrity\": \"sha512-9D0OoxWCqq9Okp9wD+igaCf6ZaNjYNFSCKxgMLAxAGqXwpapaZ+D0PBv265VHQLgam8a7gld4E6KgJJM6SKfQQ==\",\n      \"requires\": {\n        \"browserslist\": \"3.2.8\",\n        \"caniuse-lite\": \"1.0.30000928\",\n        \"normalize-range\": \"0.1.2\",\n        \"num2fraction\": \"1.2.2\",\n        \"postcss\": \"6.0.23\",\n        \"postcss-value-parser\": \"3.3.1\"\n      }\n    },\n    \"aws-sign2\": {\n      \"version\": \"0.7.0\",\n      \"resolved\": \"https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz\",\n      \"integrity\": \"sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=\",\n      \"optional\": true\n    },\n    \"aws4\": {\n      \"version\": \"1.8.0\",\n      \"resolved\": \"https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz\",\n      \"integrity\": \"sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==\"\n    },\n    \"babel-code-frame\": {\n      \"version\": \"6.26.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz\",\n      \"integrity\": \"sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=\",\n      \"requires\": {\n        \"chalk\": \"1.1.3\",\n        \"esutils\": \"2.0.2\",\n        \"js-tokens\": \"3.0.2\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          }\n        },\n        \"supports-color\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n          \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n        }\n      }\n    },\n    \"babel-core\": {\n      \"version\": \"6.26.3\",\n      \"resolved\": \"https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz\",\n      \"integrity\": \"sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==\",\n      \"requires\": {\n        \"babel-code-frame\": \"6.26.0\",\n        \"babel-generator\": \"6.26.1\",\n        \"babel-helpers\": \"6.24.1\",\n        \"babel-messages\": \"6.23.0\",\n        \"babel-register\": \"6.26.0\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-template\": \"6.26.0\",\n        \"babel-traverse\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\",\n        \"babylon\": \"6.18.0\",\n        \"convert-source-map\": \"1.6.0\",\n        \"debug\": \"2.6.9\",\n        \"json5\": \"0.5.1\",\n        \"lodash\": \"4.17.11\",\n        \"minimatch\": \"3.0.4\",\n        \"path-is-absolute\": \"1.0.1\",\n        \"private\": \"0.1.8\",\n        \"slash\": \"1.0.0\",\n        \"source-map\": \"0.5.7\"\n      },\n      \"dependencies\": {\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        }\n      }\n    },\n    \"babel-generator\": {\n      \"version\": \"6.26.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz\",\n      \"integrity\": \"sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==\",\n      \"requires\": {\n        \"babel-messages\": \"6.23.0\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\",\n        \"detect-indent\": \"4.0.0\",\n        \"jsesc\": \"1.3.0\",\n        \"lodash\": \"4.17.11\",\n        \"source-map\": \"0.5.7\",\n        \"trim-right\": \"1.0.1\"\n      },\n      \"dependencies\": {\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        }\n      }\n    },\n    \"babel-helper-bindify-decorators\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz\",\n      \"integrity\": \"sha1-FMGeXxQte0fxmlJDHlKxzLxAozA=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-traverse\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\"\n      }\n    },\n    \"babel-helper-builder-binary-assignment-operator-visitor\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz\",\n      \"integrity\": \"sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=\",\n      \"requires\": {\n        \"babel-helper-explode-assignable-expression\": \"6.24.1\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\"\n      }\n    },\n    \"babel-helper-call-delegate\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz\",\n      \"integrity\": \"sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=\",\n      \"requires\": {\n        \"babel-helper-hoist-variables\": \"6.24.1\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-traverse\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\"\n      }\n    },\n    \"babel-helper-define-map\": {\n      \"version\": \"6.26.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz\",\n      \"integrity\": \"sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=\",\n      \"requires\": {\n        \"babel-helper-function-name\": \"6.24.1\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\",\n        \"lodash\": \"4.17.11\"\n      }\n    },\n    \"babel-helper-explode-assignable-expression\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz\",\n      \"integrity\": \"sha1-8luCz33BBDPFX3BZLVdGQArCLKo=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-traverse\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\"\n      }\n    },\n    \"babel-helper-explode-class\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-helper-explode-class/-/babel-helper-explode-class-6.24.1.tgz\",\n      \"integrity\": \"sha1-fcKjkQ3uAHBW4eMdZAztPVTqqes=\",\n      \"requires\": {\n        \"babel-helper-bindify-decorators\": \"6.24.1\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-traverse\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\"\n      }\n    },\n    \"babel-helper-function-name\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz\",\n      \"integrity\": \"sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=\",\n      \"requires\": {\n        \"babel-helper-get-function-arity\": \"6.24.1\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-template\": \"6.26.0\",\n        \"babel-traverse\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\"\n      }\n    },\n    \"babel-helper-get-function-arity\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz\",\n      \"integrity\": \"sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\"\n      }\n    },\n    \"babel-helper-hoist-variables\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz\",\n      \"integrity\": \"sha1-HssnaJydJVE+rbyZFKc/VAi+enY=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\"\n      }\n    },\n    \"babel-helper-optimise-call-expression\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz\",\n      \"integrity\": \"sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\"\n      }\n    },\n    \"babel-helper-regex\": {\n      \"version\": \"6.26.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz\",\n      \"integrity\": \"sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\",\n        \"lodash\": \"4.17.11\"\n      }\n    },\n    \"babel-helper-remap-async-to-generator\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz\",\n      \"integrity\": \"sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=\",\n      \"requires\": {\n        \"babel-helper-function-name\": \"6.24.1\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-template\": \"6.26.0\",\n        \"babel-traverse\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\"\n      }\n    },\n    \"babel-helper-replace-supers\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz\",\n      \"integrity\": \"sha1-v22/5Dk40XNpohPKiov3S2qQqxo=\",\n      \"requires\": {\n        \"babel-helper-optimise-call-expression\": \"6.24.1\",\n        \"babel-messages\": \"6.23.0\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-template\": \"6.26.0\",\n        \"babel-traverse\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\"\n      }\n    },\n    \"babel-helpers\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz\",\n      \"integrity\": \"sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-template\": \"6.26.0\"\n      }\n    },\n    \"babel-loader\": {\n      \"version\": \"7.1.4\",\n      \"resolved\": \"https://registry.npmjs.org/babel-loader/-/babel-loader-7.1.4.tgz\",\n      \"integrity\": \"sha512-/hbyEvPzBJuGpk9o80R0ZyTej6heEOr59GoEUtn8qFKbnx4cJm9FWES6J/iv644sYgrtVw9JJQkjaLW/bqb5gw==\",\n      \"requires\": {\n        \"find-cache-dir\": \"1.0.0\",\n        \"loader-utils\": \"1.2.3\",\n        \"mkdirp\": \"0.5.1\"\n      }\n    },\n    \"babel-messages\": {\n      \"version\": \"6.23.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz\",\n      \"integrity\": \"sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-chameleon-import\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-chameleon-import/-/babel-plugin-chameleon-import-1.0.8.tgz\",\n      \"integrity\": \"sha512-E3AC9Ye8wj5rFcG2xBwDTLdpoyshHvh/14OJ2liAT/RV6fuu8ak8AssmBIdDB6cUaMBp1KoZcau3n3+wajYadg==\",\n      \"requires\": {\n        \"@babel/helper-module-imports\": \"7.12.1\",\n        \"@babel/runtime\": \"7.12.1\"\n      }\n    },\n    \"babel-plugin-check-es2015-constants\": {\n      \"version\": \"6.22.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz\",\n      \"integrity\": \"sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-syntax-async-functions\": {\n      \"version\": \"6.13.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz\",\n      \"integrity\": \"sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=\"\n    },\n    \"babel-plugin-syntax-async-generators\": {\n      \"version\": \"6.13.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-syntax-async-generators/-/babel-plugin-syntax-async-generators-6.13.0.tgz\",\n      \"integrity\": \"sha1-a8lj67FuzLrmuStZbrfzXDQqi5o=\"\n    },\n    \"babel-plugin-syntax-class-constructor-call\": {\n      \"version\": \"6.18.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-syntax-class-constructor-call/-/babel-plugin-syntax-class-constructor-call-6.18.0.tgz\",\n      \"integrity\": \"sha1-nLnTn+Q8hgC+yBRkVt3L1OGnZBY=\"\n    },\n    \"babel-plugin-syntax-class-properties\": {\n      \"version\": \"6.13.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz\",\n      \"integrity\": \"sha1-1+sjt5oxf4VDlixQW4J8fWysJ94=\"\n    },\n    \"babel-plugin-syntax-decorators\": {\n      \"version\": \"6.13.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-syntax-decorators/-/babel-plugin-syntax-decorators-6.13.0.tgz\",\n      \"integrity\": \"sha1-MSVjtNvePMgGzuPkFszurd0RrAs=\"\n    },\n    \"babel-plugin-syntax-do-expressions\": {\n      \"version\": \"6.13.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-syntax-do-expressions/-/babel-plugin-syntax-do-expressions-6.13.0.tgz\",\n      \"integrity\": \"sha1-V0d1YTmqJtOQ0JQQsDdEugfkeW0=\"\n    },\n    \"babel-plugin-syntax-dynamic-import\": {\n      \"version\": \"6.18.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz\",\n      \"integrity\": \"sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo=\"\n    },\n    \"babel-plugin-syntax-exponentiation-operator\": {\n      \"version\": \"6.13.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz\",\n      \"integrity\": \"sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=\"\n    },\n    \"babel-plugin-syntax-export-extensions\": {\n      \"version\": \"6.13.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-syntax-export-extensions/-/babel-plugin-syntax-export-extensions-6.13.0.tgz\",\n      \"integrity\": \"sha1-cKFITw+QiaToStRLrDU8lbmxJyE=\"\n    },\n    \"babel-plugin-syntax-flow\": {\n      \"version\": \"6.18.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz\",\n      \"integrity\": \"sha1-TDqyCiryaqIM0lmVw5jE63AxDI0=\"\n    },\n    \"babel-plugin-syntax-function-bind\": {\n      \"version\": \"6.13.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-syntax-function-bind/-/babel-plugin-syntax-function-bind-6.13.0.tgz\",\n      \"integrity\": \"sha1-SMSV8Xe98xqYHnMvVa3AvdJgH0Y=\"\n    },\n    \"babel-plugin-syntax-object-rest-spread\": {\n      \"version\": \"6.13.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz\",\n      \"integrity\": \"sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=\"\n    },\n    \"babel-plugin-syntax-trailing-function-commas\": {\n      \"version\": \"6.22.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz\",\n      \"integrity\": \"sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=\"\n    },\n    \"babel-plugin-transform-async-generator-functions\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-async-generator-functions/-/babel-plugin-transform-async-generator-functions-6.24.1.tgz\",\n      \"integrity\": \"sha1-8FiQAUX9PpkHpt3yjaWfIVJYpds=\",\n      \"requires\": {\n        \"babel-helper-remap-async-to-generator\": \"6.24.1\",\n        \"babel-plugin-syntax-async-generators\": \"6.13.0\",\n        \"babel-runtime\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-async-to-generator\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz\",\n      \"integrity\": \"sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=\",\n      \"requires\": {\n        \"babel-helper-remap-async-to-generator\": \"6.24.1\",\n        \"babel-plugin-syntax-async-functions\": \"6.13.0\",\n        \"babel-runtime\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-class-constructor-call\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-class-constructor-call/-/babel-plugin-transform-class-constructor-call-6.24.1.tgz\",\n      \"integrity\": \"sha1-gNwoVQWsBn3LjWxl4vbxGrd2Xvk=\",\n      \"requires\": {\n        \"babel-plugin-syntax-class-constructor-call\": \"6.18.0\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-template\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-class-properties\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz\",\n      \"integrity\": \"sha1-anl2PqYdM9NvN7YRqp3vgagbRqw=\",\n      \"requires\": {\n        \"babel-helper-function-name\": \"6.24.1\",\n        \"babel-plugin-syntax-class-properties\": \"6.13.0\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-template\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-decorators\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-decorators/-/babel-plugin-transform-decorators-6.24.1.tgz\",\n      \"integrity\": \"sha1-eIAT2PjGtSIr33s0Q5Df13Vp4k0=\",\n      \"requires\": {\n        \"babel-helper-explode-class\": \"6.24.1\",\n        \"babel-plugin-syntax-decorators\": \"6.13.0\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-template\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-do-expressions\": {\n      \"version\": \"6.22.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-do-expressions/-/babel-plugin-transform-do-expressions-6.22.0.tgz\",\n      \"integrity\": \"sha1-KMyvkoEtlJws0SgfaQyP3EaK6bs=\",\n      \"requires\": {\n        \"babel-plugin-syntax-do-expressions\": \"6.13.0\",\n        \"babel-runtime\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-es2015-arrow-functions\": {\n      \"version\": \"6.22.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz\",\n      \"integrity\": \"sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-es2015-block-scoped-functions\": {\n      \"version\": \"6.22.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz\",\n      \"integrity\": \"sha1-u8UbSflk1wy42OC5ToICRs46YUE=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-es2015-block-scoping\": {\n      \"version\": \"6.26.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz\",\n      \"integrity\": \"sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-template\": \"6.26.0\",\n        \"babel-traverse\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\",\n        \"lodash\": \"4.17.11\"\n      }\n    },\n    \"babel-plugin-transform-es2015-classes\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz\",\n      \"integrity\": \"sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=\",\n      \"requires\": {\n        \"babel-helper-define-map\": \"6.26.0\",\n        \"babel-helper-function-name\": \"6.24.1\",\n        \"babel-helper-optimise-call-expression\": \"6.24.1\",\n        \"babel-helper-replace-supers\": \"6.24.1\",\n        \"babel-messages\": \"6.23.0\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-template\": \"6.26.0\",\n        \"babel-traverse\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-es2015-computed-properties\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz\",\n      \"integrity\": \"sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-template\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-es2015-destructuring\": {\n      \"version\": \"6.23.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz\",\n      \"integrity\": \"sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-es2015-duplicate-keys\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz\",\n      \"integrity\": \"sha1-c+s9MQypaePvnskcU3QabxV2Qj4=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-es2015-for-of\": {\n      \"version\": \"6.23.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz\",\n      \"integrity\": \"sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-es2015-function-name\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz\",\n      \"integrity\": \"sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=\",\n      \"requires\": {\n        \"babel-helper-function-name\": \"6.24.1\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-es2015-literals\": {\n      \"version\": \"6.22.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz\",\n      \"integrity\": \"sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-es2015-modules-amd\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz\",\n      \"integrity\": \"sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=\",\n      \"requires\": {\n        \"babel-plugin-transform-es2015-modules-commonjs\": \"6.26.2\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-template\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-es2015-modules-commonjs\": {\n      \"version\": \"6.26.2\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz\",\n      \"integrity\": \"sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q==\",\n      \"requires\": {\n        \"babel-plugin-transform-strict-mode\": \"6.24.1\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-template\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-es2015-modules-systemjs\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz\",\n      \"integrity\": \"sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=\",\n      \"requires\": {\n        \"babel-helper-hoist-variables\": \"6.24.1\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-template\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-es2015-modules-umd\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz\",\n      \"integrity\": \"sha1-rJl+YoXNGO1hdq22B9YCNErThGg=\",\n      \"requires\": {\n        \"babel-plugin-transform-es2015-modules-amd\": \"6.24.1\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-template\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-es2015-object-super\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz\",\n      \"integrity\": \"sha1-JM72muIcuDp/hgPa0CH1cusnj40=\",\n      \"requires\": {\n        \"babel-helper-replace-supers\": \"6.24.1\",\n        \"babel-runtime\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-es2015-parameters\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz\",\n      \"integrity\": \"sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=\",\n      \"requires\": {\n        \"babel-helper-call-delegate\": \"6.24.1\",\n        \"babel-helper-get-function-arity\": \"6.24.1\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-template\": \"6.26.0\",\n        \"babel-traverse\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-es2015-shorthand-properties\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz\",\n      \"integrity\": \"sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-es2015-spread\": {\n      \"version\": \"6.22.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz\",\n      \"integrity\": \"sha1-1taKmfia7cRTbIGlQujdnxdG+NE=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-es2015-sticky-regex\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz\",\n      \"integrity\": \"sha1-AMHNsaynERLN8M9hJsLta0V8zbw=\",\n      \"requires\": {\n        \"babel-helper-regex\": \"6.26.0\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-es2015-template-literals\": {\n      \"version\": \"6.22.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz\",\n      \"integrity\": \"sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-es2015-typeof-symbol\": {\n      \"version\": \"6.23.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz\",\n      \"integrity\": \"sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-es2015-unicode-regex\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz\",\n      \"integrity\": \"sha1-04sS9C6nMj9yk4fxinxa4frrNek=\",\n      \"requires\": {\n        \"babel-helper-regex\": \"6.26.0\",\n        \"babel-runtime\": \"6.26.0\",\n        \"regexpu-core\": \"2.0.0\"\n      }\n    },\n    \"babel-plugin-transform-exponentiation-operator\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz\",\n      \"integrity\": \"sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=\",\n      \"requires\": {\n        \"babel-helper-builder-binary-assignment-operator-visitor\": \"6.24.1\",\n        \"babel-plugin-syntax-exponentiation-operator\": \"6.13.0\",\n        \"babel-runtime\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-export-extensions\": {\n      \"version\": \"6.22.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-export-extensions/-/babel-plugin-transform-export-extensions-6.22.0.tgz\",\n      \"integrity\": \"sha1-U3OLR+deghhYnuqUbLvTkQm75lM=\",\n      \"requires\": {\n        \"babel-plugin-syntax-export-extensions\": \"6.13.0\",\n        \"babel-runtime\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-flow-strip-types\": {\n      \"version\": \"6.22.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz\",\n      \"integrity\": \"sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988=\",\n      \"requires\": {\n        \"babel-plugin-syntax-flow\": \"6.18.0\",\n        \"babel-runtime\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-function-bind\": {\n      \"version\": \"6.22.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-function-bind/-/babel-plugin-transform-function-bind-6.22.0.tgz\",\n      \"integrity\": \"sha1-xvuOlqwpajELjPjqQBRiQH3fapc=\",\n      \"requires\": {\n        \"babel-plugin-syntax-function-bind\": \"6.13.0\",\n        \"babel-runtime\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-object-rest-spread\": {\n      \"version\": \"6.26.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz\",\n      \"integrity\": \"sha1-DzZpLVD+9rfi1LOsFHgTepY7ewY=\",\n      \"requires\": {\n        \"babel-plugin-syntax-object-rest-spread\": \"6.13.0\",\n        \"babel-runtime\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-regenerator\": {\n      \"version\": \"6.26.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz\",\n      \"integrity\": \"sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=\",\n      \"requires\": {\n        \"regenerator-transform\": \"0.10.1\"\n      }\n    },\n    \"babel-plugin-transform-remove-strict-mode\": {\n      \"version\": \"0.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-remove-strict-mode/-/babel-plugin-transform-remove-strict-mode-0.0.2.tgz\",\n      \"integrity\": \"sha1-kTaFqrlUOfOg7YjliPvV6ZeJBXk=\"\n    },\n    \"babel-plugin-transform-runtime\": {\n      \"version\": \"6.23.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.23.0.tgz\",\n      \"integrity\": \"sha1-iEkNRGUC6puOfvsP4J7E2ZR5se4=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-transform-strict-mode\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz\",\n      \"integrity\": \"sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\"\n      }\n    },\n    \"babel-polyfill\": {\n      \"version\": \"6.26.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz\",\n      \"integrity\": \"sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\",\n        \"core-js\": \"2.6.2\",\n        \"regenerator-runtime\": \"0.10.5\"\n      },\n      \"dependencies\": {\n        \"regenerator-runtime\": {\n          \"version\": \"0.10.5\",\n          \"resolved\": \"https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz\",\n          \"integrity\": \"sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=\"\n        }\n      }\n    },\n    \"babel-preset-env\": {\n      \"version\": \"1.7.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.7.0.tgz\",\n      \"integrity\": \"sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg==\",\n      \"requires\": {\n        \"babel-plugin-check-es2015-constants\": \"6.22.0\",\n        \"babel-plugin-syntax-trailing-function-commas\": \"6.22.0\",\n        \"babel-plugin-transform-async-to-generator\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-arrow-functions\": \"6.22.0\",\n        \"babel-plugin-transform-es2015-block-scoped-functions\": \"6.22.0\",\n        \"babel-plugin-transform-es2015-block-scoping\": \"6.26.0\",\n        \"babel-plugin-transform-es2015-classes\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-computed-properties\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-destructuring\": \"6.23.0\",\n        \"babel-plugin-transform-es2015-duplicate-keys\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-for-of\": \"6.23.0\",\n        \"babel-plugin-transform-es2015-function-name\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-literals\": \"6.22.0\",\n        \"babel-plugin-transform-es2015-modules-amd\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-modules-commonjs\": \"6.26.2\",\n        \"babel-plugin-transform-es2015-modules-systemjs\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-modules-umd\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-object-super\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-parameters\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-shorthand-properties\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-spread\": \"6.22.0\",\n        \"babel-plugin-transform-es2015-sticky-regex\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-template-literals\": \"6.22.0\",\n        \"babel-plugin-transform-es2015-typeof-symbol\": \"6.23.0\",\n        \"babel-plugin-transform-es2015-unicode-regex\": \"6.24.1\",\n        \"babel-plugin-transform-exponentiation-operator\": \"6.24.1\",\n        \"babel-plugin-transform-regenerator\": \"6.26.0\",\n        \"browserslist\": \"3.2.8\",\n        \"invariant\": \"2.2.4\",\n        \"semver\": \"5.6.0\"\n      }\n    },\n    \"babel-preset-es2015\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz\",\n      \"integrity\": \"sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=\",\n      \"requires\": {\n        \"babel-plugin-check-es2015-constants\": \"6.22.0\",\n        \"babel-plugin-transform-es2015-arrow-functions\": \"6.22.0\",\n        \"babel-plugin-transform-es2015-block-scoped-functions\": \"6.22.0\",\n        \"babel-plugin-transform-es2015-block-scoping\": \"6.26.0\",\n        \"babel-plugin-transform-es2015-classes\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-computed-properties\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-destructuring\": \"6.23.0\",\n        \"babel-plugin-transform-es2015-duplicate-keys\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-for-of\": \"6.23.0\",\n        \"babel-plugin-transform-es2015-function-name\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-literals\": \"6.22.0\",\n        \"babel-plugin-transform-es2015-modules-amd\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-modules-commonjs\": \"6.26.2\",\n        \"babel-plugin-transform-es2015-modules-systemjs\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-modules-umd\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-object-super\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-parameters\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-shorthand-properties\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-spread\": \"6.22.0\",\n        \"babel-plugin-transform-es2015-sticky-regex\": \"6.24.1\",\n        \"babel-plugin-transform-es2015-template-literals\": \"6.22.0\",\n        \"babel-plugin-transform-es2015-typeof-symbol\": \"6.23.0\",\n        \"babel-plugin-transform-es2015-unicode-regex\": \"6.24.1\",\n        \"babel-plugin-transform-regenerator\": \"6.26.0\"\n      }\n    },\n    \"babel-preset-flow\": {\n      \"version\": \"6.23.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz\",\n      \"integrity\": \"sha1-5xIYiHCFrpoktb5Baa/7WZgWxJ0=\",\n      \"requires\": {\n        \"babel-plugin-transform-flow-strip-types\": \"6.22.0\"\n      }\n    },\n    \"babel-preset-stage-0\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-preset-stage-0/-/babel-preset-stage-0-6.24.1.tgz\",\n      \"integrity\": \"sha1-VkLRUEL5E4TX5a+LyIsduVsDnmo=\",\n      \"requires\": {\n        \"babel-plugin-transform-do-expressions\": \"6.22.0\",\n        \"babel-plugin-transform-function-bind\": \"6.22.0\",\n        \"babel-preset-stage-1\": \"6.24.1\"\n      }\n    },\n    \"babel-preset-stage-1\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-preset-stage-1/-/babel-preset-stage-1-6.24.1.tgz\",\n      \"integrity\": \"sha1-dpLNfc1oSZB+auSgqFWJz7niv7A=\",\n      \"requires\": {\n        \"babel-plugin-transform-class-constructor-call\": \"6.24.1\",\n        \"babel-plugin-transform-export-extensions\": \"6.22.0\",\n        \"babel-preset-stage-2\": \"6.24.1\"\n      }\n    },\n    \"babel-preset-stage-2\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-preset-stage-2/-/babel-preset-stage-2-6.24.1.tgz\",\n      \"integrity\": \"sha1-2eKWD7PXEYfw5k7sYrwHdnIZvcE=\",\n      \"requires\": {\n        \"babel-plugin-syntax-dynamic-import\": \"6.18.0\",\n        \"babel-plugin-transform-class-properties\": \"6.24.1\",\n        \"babel-plugin-transform-decorators\": \"6.24.1\",\n        \"babel-preset-stage-3\": \"6.24.1\"\n      }\n    },\n    \"babel-preset-stage-3\": {\n      \"version\": \"6.24.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-preset-stage-3/-/babel-preset-stage-3-6.24.1.tgz\",\n      \"integrity\": \"sha1-g2raCp56f6N8sTj7kyb4eTSkg5U=\",\n      \"requires\": {\n        \"babel-plugin-syntax-trailing-function-commas\": \"6.22.0\",\n        \"babel-plugin-transform-async-generator-functions\": \"6.24.1\",\n        \"babel-plugin-transform-async-to-generator\": \"6.24.1\",\n        \"babel-plugin-transform-exponentiation-operator\": \"6.24.1\",\n        \"babel-plugin-transform-object-rest-spread\": \"6.26.0\"\n      }\n    },\n    \"babel-register\": {\n      \"version\": \"6.26.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz\",\n      \"integrity\": \"sha1-btAhFz4vy0htestFxgCahW9kcHE=\",\n      \"requires\": {\n        \"babel-core\": \"6.26.3\",\n        \"babel-runtime\": \"6.26.0\",\n        \"core-js\": \"2.6.2\",\n        \"home-or-tmp\": \"2.0.0\",\n        \"lodash\": \"4.17.11\",\n        \"mkdirp\": \"0.5.1\",\n        \"source-map-support\": \"0.4.18\"\n      }\n    },\n    \"babel-runtime\": {\n      \"version\": \"6.26.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz\",\n      \"integrity\": \"sha1-llxwWGaOgrVde/4E/yM3vItWR/4=\",\n      \"requires\": {\n        \"core-js\": \"2.6.2\",\n        \"regenerator-runtime\": \"0.11.1\"\n      }\n    },\n    \"babel-template\": {\n      \"version\": \"6.26.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz\",\n      \"integrity\": \"sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-traverse\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\",\n        \"babylon\": \"6.18.0\",\n        \"lodash\": \"4.17.11\"\n      }\n    },\n    \"babel-traverse\": {\n      \"version\": \"6.26.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz\",\n      \"integrity\": \"sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=\",\n      \"requires\": {\n        \"babel-code-frame\": \"6.26.0\",\n        \"babel-messages\": \"6.23.0\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\",\n        \"babylon\": \"6.18.0\",\n        \"debug\": \"2.6.9\",\n        \"globals\": \"9.18.0\",\n        \"invariant\": \"2.2.4\",\n        \"lodash\": \"4.17.11\"\n      }\n    },\n    \"babel-types\": {\n      \"version\": \"6.26.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz\",\n      \"integrity\": \"sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\",\n        \"esutils\": \"2.0.2\",\n        \"lodash\": \"4.17.11\",\n        \"to-fast-properties\": \"1.0.3\"\n      }\n    },\n    \"babylon\": {\n      \"version\": \"6.18.0\",\n      \"resolved\": \"https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz\",\n      \"integrity\": \"sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==\"\n    },\n    \"bail\": {\n      \"version\": \"1.0.5\",\n      \"resolved\": \"https://registry.npmjs.org/bail/-/bail-1.0.5.tgz\",\n      \"integrity\": \"sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==\"\n    },\n    \"balanced-match\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz\",\n      \"integrity\": \"sha1-ibTRmasr7kneFk6gK4nORi1xt2c=\"\n    },\n    \"base\": {\n      \"version\": \"0.11.2\",\n      \"resolved\": \"https://registry.npmjs.org/base/-/base-0.11.2.tgz\",\n      \"integrity\": \"sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==\",\n      \"requires\": {\n        \"cache-base\": \"1.0.1\",\n        \"class-utils\": \"0.3.6\",\n        \"component-emitter\": \"1.2.1\",\n        \"define-property\": \"1.0.0\",\n        \"isobject\": \"3.0.1\",\n        \"mixin-deep\": \"1.3.1\",\n        \"pascalcase\": \"0.1.1\"\n      },\n      \"dependencies\": {\n        \"define-property\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz\",\n          \"integrity\": \"sha1-dp66rz9KY6rTr56NMEybvnm/sOY=\",\n          \"requires\": {\n            \"is-descriptor\": \"1.0.2\"\n          }\n        },\n        \"is-accessor-descriptor\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz\",\n          \"integrity\": \"sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==\",\n          \"requires\": {\n            \"kind-of\": \"6.0.2\"\n          }\n        },\n        \"is-data-descriptor\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz\",\n          \"integrity\": \"sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==\",\n          \"requires\": {\n            \"kind-of\": \"6.0.2\"\n          }\n        },\n        \"is-descriptor\": {\n          \"version\": \"1.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz\",\n          \"integrity\": \"sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==\",\n          \"requires\": {\n            \"is-accessor-descriptor\": \"1.0.0\",\n            \"is-data-descriptor\": \"1.0.0\",\n            \"kind-of\": \"6.0.2\"\n          }\n        }\n      }\n    },\n    \"base64-js\": {\n      \"version\": \"1.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz\",\n      \"integrity\": \"sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==\"\n    },\n    \"bcrypt-pbkdf\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz\",\n      \"integrity\": \"sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=\",\n      \"requires\": {\n        \"tweetnacl\": \"0.14.5\"\n      }\n    },\n    \"bfj-node4\": {\n      \"version\": \"5.3.1\",\n      \"resolved\": \"https://registry.npmjs.org/bfj-node4/-/bfj-node4-5.3.1.tgz\",\n      \"integrity\": \"sha512-SOmOsowQWfXc7ybFARsK3C4MCOWzERaOMV/Fl3Tgjs+5dJWyzo3oa127jL44eMbQiAN17J7SvAs2TRxEScTUmg==\",\n      \"requires\": {\n        \"bluebird\": \"3.5.3\",\n        \"check-types\": \"7.4.0\",\n        \"tryer\": \"1.0.1\"\n      }\n    },\n    \"big.js\": {\n      \"version\": \"5.2.2\",\n      \"resolved\": \"https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz\",\n      \"integrity\": \"sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==\"\n    },\n    \"binary-extensions\": {\n      \"version\": \"1.12.0\",\n      \"resolved\": \"https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.12.0.tgz\",\n      \"integrity\": \"sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg==\"\n    },\n    \"bluebird\": {\n      \"version\": \"3.5.3\",\n      \"resolved\": \"https://registry.npmjs.org/bluebird/-/bluebird-3.5.3.tgz\",\n      \"integrity\": \"sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==\"\n    },\n    \"bn.js\": {\n      \"version\": \"4.11.8\",\n      \"resolved\": \"https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz\",\n      \"integrity\": \"sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==\"\n    },\n    \"body-parser\": {\n      \"version\": \"1.18.3\",\n      \"resolved\": \"https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz\",\n      \"integrity\": \"sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=\",\n      \"requires\": {\n        \"bytes\": \"3.0.0\",\n        \"content-type\": \"1.0.4\",\n        \"debug\": \"2.6.9\",\n        \"depd\": \"1.1.2\",\n        \"http-errors\": \"1.6.3\",\n        \"iconv-lite\": \"0.4.23\",\n        \"on-finished\": \"2.3.0\",\n        \"qs\": \"6.5.2\",\n        \"raw-body\": \"2.3.3\",\n        \"type-is\": \"1.6.16\"\n      }\n    },\n    \"boolbase\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz\",\n      \"integrity\": \"sha1-aN/1++YMUes3cl6p4+0xDcwed24=\"\n    },\n    \"boom\": {\n      \"version\": \"2.10.1\",\n      \"resolved\": \"https://registry.npmjs.org/boom/-/boom-2.10.1.tgz\",\n      \"integrity\": \"sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=\",\n      \"dev\": true,\n      \"requires\": {\n        \"hoek\": \"2.16.3\"\n      }\n    },\n    \"brace-expansion\": {\n      \"version\": \"1.1.11\",\n      \"resolved\": \"https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz\",\n      \"integrity\": \"sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==\",\n      \"requires\": {\n        \"balanced-match\": \"1.0.0\",\n        \"concat-map\": \"0.0.1\"\n      }\n    },\n    \"braces\": {\n      \"version\": \"2.3.2\",\n      \"resolved\": \"https://registry.npmjs.org/braces/-/braces-2.3.2.tgz\",\n      \"integrity\": \"sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==\",\n      \"requires\": {\n        \"arr-flatten\": \"1.1.0\",\n        \"array-unique\": \"0.3.2\",\n        \"extend-shallow\": \"2.0.1\",\n        \"fill-range\": \"4.0.0\",\n        \"isobject\": \"3.0.1\",\n        \"repeat-element\": \"1.1.3\",\n        \"snapdragon\": \"0.8.2\",\n        \"snapdragon-node\": \"2.1.1\",\n        \"split-string\": \"3.1.0\",\n        \"to-regex\": \"3.0.2\"\n      },\n      \"dependencies\": {\n        \"extend-shallow\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz\",\n          \"integrity\": \"sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=\",\n          \"requires\": {\n            \"is-extendable\": \"0.1.1\"\n          }\n        }\n      }\n    },\n    \"brorand\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz\",\n      \"integrity\": \"sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=\"\n    },\n    \"browser-stdout\": {\n      \"version\": \"1.3.1\",\n      \"resolved\": \"https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz\",\n      \"integrity\": \"sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==\",\n      \"dev\": true\n    },\n    \"browserify-aes\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz\",\n      \"integrity\": \"sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==\",\n      \"requires\": {\n        \"buffer-xor\": \"1.0.3\",\n        \"cipher-base\": \"1.0.4\",\n        \"create-hash\": \"1.2.0\",\n        \"evp_bytestokey\": \"1.0.3\",\n        \"inherits\": \"2.0.3\",\n        \"safe-buffer\": \"5.1.2\"\n      }\n    },\n    \"browserify-cipher\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz\",\n      \"integrity\": \"sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==\",\n      \"requires\": {\n        \"browserify-aes\": \"1.2.0\",\n        \"browserify-des\": \"1.0.2\",\n        \"evp_bytestokey\": \"1.0.3\"\n      }\n    },\n    \"browserify-des\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz\",\n      \"integrity\": \"sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==\",\n      \"requires\": {\n        \"cipher-base\": \"1.0.4\",\n        \"des.js\": \"1.0.0\",\n        \"inherits\": \"2.0.3\",\n        \"safe-buffer\": \"5.1.2\"\n      }\n    },\n    \"browserify-rsa\": {\n      \"version\": \"4.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz\",\n      \"integrity\": \"sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=\",\n      \"requires\": {\n        \"bn.js\": \"4.11.8\",\n        \"randombytes\": \"2.0.6\"\n      }\n    },\n    \"browserify-sign\": {\n      \"version\": \"4.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz\",\n      \"integrity\": \"sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=\",\n      \"requires\": {\n        \"bn.js\": \"4.11.8\",\n        \"browserify-rsa\": \"4.0.1\",\n        \"create-hash\": \"1.2.0\",\n        \"create-hmac\": \"1.1.7\",\n        \"elliptic\": \"6.4.1\",\n        \"inherits\": \"2.0.3\",\n        \"parse-asn1\": \"5.1.1\"\n      }\n    },\n    \"browserify-zlib\": {\n      \"version\": \"0.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz\",\n      \"integrity\": \"sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==\",\n      \"requires\": {\n        \"pako\": \"1.0.7\"\n      }\n    },\n    \"browserslist\": {\n      \"version\": \"3.2.8\",\n      \"resolved\": \"https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz\",\n      \"integrity\": \"sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ==\",\n      \"requires\": {\n        \"caniuse-lite\": \"1.0.30000928\",\n        \"electron-to-chromium\": \"1.3.100\"\n      }\n    },\n    \"buffer\": {\n      \"version\": \"4.9.1\",\n      \"resolved\": \"https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz\",\n      \"integrity\": \"sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=\",\n      \"requires\": {\n        \"base64-js\": \"1.3.0\",\n        \"ieee754\": \"1.1.12\",\n        \"isarray\": \"1.0.0\"\n      }\n    },\n    \"buffer-from\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz\",\n      \"integrity\": \"sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==\"\n    },\n    \"buffer-json\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/buffer-json/-/buffer-json-2.0.0.tgz\",\n      \"integrity\": \"sha512-+jjPFVqyfF1esi9fvfUs3NqM0pH1ziZ36VP4hmA/y/Ssfo/5w5xHKfTw9BwQjoJ1w/oVtpLomqwUHKdefGyuHw==\"\n    },\n    \"buffer-xor\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz\",\n      \"integrity\": \"sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=\"\n    },\n    \"builtin-modules\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz\",\n      \"integrity\": \"sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=\"\n    },\n    \"builtin-status-codes\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz\",\n      \"integrity\": \"sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=\"\n    },\n    \"bulk-require\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/bulk-require/-/bulk-require-1.0.1.tgz\",\n      \"integrity\": \"sha1-yz0DnmmBOaRE/FdLJh1rOyz0TIk=\",\n      \"requires\": {\n        \"glob\": \"7.1.2\"\n      }\n    },\n    \"bytes\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz\",\n      \"integrity\": \"sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=\"\n    },\n    \"cacache\": {\n      \"version\": \"10.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz\",\n      \"integrity\": \"sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA==\",\n      \"requires\": {\n        \"bluebird\": \"3.5.3\",\n        \"chownr\": \"1.1.1\",\n        \"glob\": \"7.1.2\",\n        \"graceful-fs\": \"4.1.15\",\n        \"lru-cache\": \"4.1.5\",\n        \"mississippi\": \"2.0.0\",\n        \"mkdirp\": \"0.5.1\",\n        \"move-concurrently\": \"1.0.1\",\n        \"promise-inflight\": \"1.0.1\",\n        \"rimraf\": \"2.6.3\",\n        \"ssri\": \"5.3.0\",\n        \"unique-filename\": \"1.1.1\",\n        \"y18n\": \"4.0.0\"\n      }\n    },\n    \"cache-base\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz\",\n      \"integrity\": \"sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==\",\n      \"requires\": {\n        \"collection-visit\": \"1.0.0\",\n        \"component-emitter\": \"1.2.1\",\n        \"get-value\": \"2.0.6\",\n        \"has-value\": \"1.0.0\",\n        \"isobject\": \"3.0.1\",\n        \"set-value\": \"2.0.0\",\n        \"to-object-path\": \"0.3.0\",\n        \"union-value\": \"1.0.0\",\n        \"unset-value\": \"1.0.0\"\n      }\n    },\n    \"cache-loader\": {\n      \"version\": \"4.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/cache-loader/-/cache-loader-4.1.0.tgz\",\n      \"integrity\": \"sha512-ftOayxve0PwKzBF/GLsZNC9fJBXl8lkZE3TOsjkboHfVHVkL39iUEs1FO07A33mizmci5Dudt38UZrrYXDtbhw==\",\n      \"requires\": {\n        \"buffer-json\": \"2.0.0\",\n        \"find-cache-dir\": \"3.3.1\",\n        \"loader-utils\": \"1.2.3\",\n        \"mkdirp\": \"0.5.1\",\n        \"neo-async\": \"2.6.2\",\n        \"schema-utils\": \"2.7.1\"\n      },\n      \"dependencies\": {\n        \"ajv\": {\n          \"version\": \"6.12.6\",\n          \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz\",\n          \"integrity\": \"sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==\",\n          \"requires\": {\n            \"fast-deep-equal\": \"3.1.3\",\n            \"fast-json-stable-stringify\": \"2.0.0\",\n            \"json-schema-traverse\": \"0.4.1\",\n            \"uri-js\": \"4.2.2\"\n          }\n        },\n        \"ajv-keywords\": {\n          \"version\": \"3.5.2\",\n          \"resolved\": \"https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz\",\n          \"integrity\": \"sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==\"\n        },\n        \"fast-deep-equal\": {\n          \"version\": \"3.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz\",\n          \"integrity\": \"sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==\"\n        },\n        \"find-cache-dir\": {\n          \"version\": \"3.3.1\",\n          \"resolved\": \"https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz\",\n          \"integrity\": \"sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==\",\n          \"requires\": {\n            \"commondir\": \"1.0.1\",\n            \"make-dir\": \"3.1.0\",\n            \"pkg-dir\": \"4.2.0\"\n          }\n        },\n        \"find-up\": {\n          \"version\": \"4.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz\",\n          \"integrity\": \"sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==\",\n          \"requires\": {\n            \"locate-path\": \"5.0.0\",\n            \"path-exists\": \"4.0.0\"\n          }\n        },\n        \"locate-path\": {\n          \"version\": \"5.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz\",\n          \"integrity\": \"sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==\",\n          \"requires\": {\n            \"p-locate\": \"4.1.0\"\n          }\n        },\n        \"make-dir\": {\n          \"version\": \"3.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz\",\n          \"integrity\": \"sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==\",\n          \"requires\": {\n            \"semver\": \"6.3.0\"\n          }\n        },\n        \"neo-async\": {\n          \"version\": \"2.6.2\",\n          \"resolved\": \"https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz\",\n          \"integrity\": \"sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==\"\n        },\n        \"p-limit\": {\n          \"version\": \"2.3.0\",\n          \"resolved\": \"https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz\",\n          \"integrity\": \"sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==\",\n          \"requires\": {\n            \"p-try\": \"2.2.0\"\n          }\n        },\n        \"p-locate\": {\n          \"version\": \"4.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz\",\n          \"integrity\": \"sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==\",\n          \"requires\": {\n            \"p-limit\": \"2.3.0\"\n          }\n        },\n        \"p-try\": {\n          \"version\": \"2.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz\",\n          \"integrity\": \"sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==\"\n        },\n        \"path-exists\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz\",\n          \"integrity\": \"sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==\"\n        },\n        \"pkg-dir\": {\n          \"version\": \"4.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz\",\n          \"integrity\": \"sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==\",\n          \"requires\": {\n            \"find-up\": \"4.1.0\"\n          }\n        },\n        \"schema-utils\": {\n          \"version\": \"2.7.1\",\n          \"resolved\": \"https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz\",\n          \"integrity\": \"sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==\",\n          \"requires\": {\n            \"@types/json-schema\": \"7.0.6\",\n            \"ajv\": \"6.12.6\",\n            \"ajv-keywords\": \"3.5.2\"\n          }\n        },\n        \"semver\": {\n          \"version\": \"6.3.0\",\n          \"resolved\": \"https://registry.npmjs.org/semver/-/semver-6.3.0.tgz\",\n          \"integrity\": \"sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==\"\n        }\n      }\n    },\n    \"call-me-maybe\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz\",\n      \"integrity\": \"sha1-JtII6onje1y95gJQoV8DHBak1ms=\"\n    },\n    \"caller-callsite\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz\",\n      \"integrity\": \"sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=\",\n      \"requires\": {\n        \"callsites\": \"2.0.0\"\n      }\n    },\n    \"caller-path\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz\",\n      \"integrity\": \"sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=\",\n      \"requires\": {\n        \"caller-callsite\": \"2.0.0\"\n      }\n    },\n    \"callsites\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz\",\n      \"integrity\": \"sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=\"\n    },\n    \"camel-case\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz\",\n      \"integrity\": \"sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=\",\n      \"requires\": {\n        \"no-case\": \"2.3.2\",\n        \"upper-case\": \"1.1.3\"\n      }\n    },\n    \"camelcase\": {\n      \"version\": \"5.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz\",\n      \"integrity\": \"sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==\"\n    },\n    \"camelcase-keys\": {\n      \"version\": \"4.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz\",\n      \"integrity\": \"sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=\",\n      \"requires\": {\n        \"camelcase\": \"4.1.0\",\n        \"map-obj\": \"2.0.0\",\n        \"quick-lru\": \"1.1.0\"\n      },\n      \"dependencies\": {\n        \"camelcase\": {\n          \"version\": \"4.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz\",\n          \"integrity\": \"sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=\"\n        }\n      }\n    },\n    \"caniuse-api\": {\n      \"version\": \"1.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/caniuse-api/-/caniuse-api-1.6.1.tgz\",\n      \"integrity\": \"sha1-tTTnxzTE+B7F++isoq0kNUuWLGw=\",\n      \"requires\": {\n        \"browserslist\": \"1.7.7\",\n        \"caniuse-db\": \"1.0.30000928\",\n        \"lodash.memoize\": \"4.1.2\",\n        \"lodash.uniq\": \"4.5.0\"\n      },\n      \"dependencies\": {\n        \"browserslist\": {\n          \"version\": \"1.7.7\",\n          \"resolved\": \"https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz\",\n          \"integrity\": \"sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=\",\n          \"requires\": {\n            \"caniuse-db\": \"1.0.30000928\",\n            \"electron-to-chromium\": \"1.3.100\"\n          }\n        }\n      }\n    },\n    \"caniuse-db\": {\n      \"version\": \"1.0.30000928\",\n      \"resolved\": \"https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000928.tgz\",\n      \"integrity\": \"sha512-nAoeTspAEzLjqGSeibzM09WojORi08faeOOI5GBmFWC3/brydovb9lYJWM+p48rEQsdevfpufK58gPiDtwOWKw==\"\n    },\n    \"caniuse-lite\": {\n      \"version\": \"1.0.30000928\",\n      \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000928.tgz\",\n      \"integrity\": \"sha512-aSpMWRXL6ZXNnzm8hgE4QDLibG5pVJ2Ujzsuj3icazlIkxXkPXtL+BWnMx6FBkWmkZgBHGUxPZQvrbRw2ZTxhg==\"\n    },\n    \"caseless\": {\n      \"version\": \"0.12.0\",\n      \"resolved\": \"https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz\",\n      \"integrity\": \"sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=\",\n      \"optional\": true\n    },\n    \"ccount\": {\n      \"version\": \"1.0.5\",\n      \"resolved\": \"https://registry.npmjs.org/ccount/-/ccount-1.0.5.tgz\",\n      \"integrity\": \"sha512-MOli1W+nfbPLlKEhInaxhRdp7KVLFxLN5ykwzHgLsLI3H3gs5jjFAK4Eoj3OzzcxCtumDaI8onoVDeQyWaNTkw==\"\n    },\n    \"center-align\": {\n      \"version\": \"0.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz\",\n      \"integrity\": \"sha1-qg0yYptu6XIgBBHL1EYckHvCt60=\",\n      \"requires\": {\n        \"align-text\": \"0.1.4\",\n        \"lazy-cache\": \"1.0.4\"\n      }\n    },\n    \"chai\": {\n      \"version\": \"4.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/chai/-/chai-4.2.0.tgz\",\n      \"integrity\": \"sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==\",\n      \"requires\": {\n        \"assertion-error\": \"1.1.0\",\n        \"check-error\": \"1.0.2\",\n        \"deep-eql\": \"3.0.1\",\n        \"get-func-name\": \"2.0.0\",\n        \"pathval\": \"1.1.0\",\n        \"type-detect\": \"4.0.8\"\n      }\n    },\n    \"chalk\": {\n      \"version\": \"2.4.2\",\n      \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz\",\n      \"integrity\": \"sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==\",\n      \"requires\": {\n        \"ansi-styles\": \"3.2.1\",\n        \"escape-string-regexp\": \"1.0.5\",\n        \"supports-color\": \"5.5.0\"\n      }\n    },\n    \"chameleon-css-loader\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-css-loader/-/chameleon-css-loader-1.0.8.tgz\",\n      \"integrity\": \"sha512-LPrXf7FMF7kymlt4t0xQPO7vFUz7KmRvzxnJo3m5topUiDZLMp87vreiOt/P8jp7yuTab9F+U5rpOMqYJ7jZOQ==\",\n      \"requires\": {\n        \"autoprefixer\": \"9.8.6\",\n        \"hash-sum\": \"1.0.2\",\n        \"loader-utils\": \"1.2.3\",\n        \"postcss\": \"7.0.35\",\n        \"postcss-plugin-px2rem\": \"0.7.0\",\n        \"rework\": \"1.0.1\"\n      },\n      \"dependencies\": {\n        \"autoprefixer\": {\n          \"version\": \"9.8.6\",\n          \"resolved\": \"https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.6.tgz\",\n          \"integrity\": \"sha512-XrvP4VVHdRBCdX1S3WXVD8+RyG9qeb1D5Sn1DeLiG2xfSpzellk5k54xbUERJ3M5DggQxes39UGOTP8CFrEGbg==\",\n          \"requires\": {\n            \"browserslist\": \"4.14.7\",\n            \"caniuse-lite\": \"1.0.30001157\",\n            \"colorette\": \"1.2.1\",\n            \"normalize-range\": \"0.1.2\",\n            \"num2fraction\": \"1.2.2\",\n            \"postcss\": \"7.0.35\",\n            \"postcss-value-parser\": \"4.1.0\"\n          }\n        },\n        \"browserslist\": {\n          \"version\": \"4.14.7\",\n          \"resolved\": \"https://registry.npmjs.org/browserslist/-/browserslist-4.14.7.tgz\",\n          \"integrity\": \"sha512-BSVRLCeG3Xt/j/1cCGj1019Wbty0H+Yvu2AOuZSuoaUWn3RatbL33Cxk+Q4jRMRAbOm0p7SLravLjpnT6s0vzQ==\",\n          \"requires\": {\n            \"caniuse-lite\": \"1.0.30001157\",\n            \"colorette\": \"1.2.1\",\n            \"electron-to-chromium\": \"1.3.595\",\n            \"escalade\": \"3.1.1\",\n            \"node-releases\": \"1.1.66\"\n          }\n        },\n        \"caniuse-lite\": {\n          \"version\": \"1.0.30001157\",\n          \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001157.tgz\",\n          \"integrity\": \"sha512-gOerH9Wz2IRZ2ZPdMfBvyOi3cjaz4O4dgNwPGzx8EhqAs4+2IL/O+fJsbt+znSigujoZG8bVcIAUM/I/E5K3MA==\"\n        },\n        \"electron-to-chromium\": {\n          \"version\": \"1.3.595\",\n          \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.595.tgz\",\n          \"integrity\": \"sha512-JpaBIhdBkF9FLG7x06ONfe0f5bxPrxRcq0X+Sc8vsCt+OPWIzxOD+qM71NEHLGbDfN9Q6hbtHRv4/dnvcOxo6g==\"\n        },\n        \"node-releases\": {\n          \"version\": \"1.1.66\",\n          \"resolved\": \"https://registry.npmjs.org/node-releases/-/node-releases-1.1.66.tgz\",\n          \"integrity\": \"sha512-JHEQ1iWPGK+38VLB2H9ef2otU4l8s3yAMt9Xf934r6+ojCYDMHPMqvCc9TnzfeFSP1QEOeU6YZEd3+De0LTCgg==\"\n        },\n        \"postcss\": {\n          \"version\": \"7.0.35\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz\",\n          \"integrity\": \"sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==\",\n          \"requires\": {\n            \"chalk\": \"2.4.2\",\n            \"source-map\": \"0.6.1\",\n            \"supports-color\": \"6.1.0\"\n          }\n        },\n        \"postcss-value-parser\": {\n          \"version\": \"4.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz\",\n          \"integrity\": \"sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==\"\n        },\n        \"supports-color\": {\n          \"version\": \"6.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz\",\n          \"integrity\": \"sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==\",\n          \"requires\": {\n            \"has-flag\": \"3.0.0\"\n          }\n        }\n      }\n    },\n    \"chameleon-dev-proxy\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-dev-proxy/-/chameleon-dev-proxy-1.0.8.tgz\",\n      \"integrity\": \"sha512-pVF99gQwkcIRluIhtiMcYmpHNOP3p++ivFFx91Wz6vChdvPURTieXUqnuShMTrKs0KqWgUD8Q7aNmgso9d3hqg==\",\n      \"requires\": {\n        \"babel-polyfill\": \"6.26.0\",\n        \"node-mitmproxy\": \"3.1.1\",\n        \"qrcode-terminal\": \"0.12.0\"\n      }\n    },\n    \"chameleon-errors-webpack-plugin\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-errors-webpack-plugin/-/chameleon-errors-webpack-plugin-1.0.8.tgz\",\n      \"integrity\": \"sha512-koWOBln1XUGn2fDZ/Z3vtF0Acy3sBA1C9rFKP61M24+pjolvbNPjIPn+Rc9mFIZyx1ZHYPvKAuWgzJK6kUUsyw==\",\n      \"requires\": {\n        \"chalk\": \"1.1.3\",\n        \"error-stack-parser\": \"2.0.6\",\n        \"string-width\": \"2.1.1\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          }\n        },\n        \"supports-color\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n          \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n        }\n      }\n    },\n    \"chameleon-linter\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-linter/-/chameleon-linter-1.0.8.tgz\",\n      \"integrity\": \"sha512-OIfnPvKbpfqI+T/dL0yj22IAaiF9EIfm1qBQh+JrxPm7Q+L7MdLaZLPzx9ZL8uUblpBCNwaRYCnsOtLgS/n/pg==\",\n      \"requires\": {\n        \"@babel/parser\": \"7.2.3\",\n        \"@babel/traverse\": \"7.2.3\",\n        \"bulk-require\": \"1.0.1\",\n        \"chalk\": \"2.4.2\",\n        \"chameleon-tool-utils\": \"1.0.8\",\n        \"cml-component-parser\": \"1.0.8\",\n        \"cml-htmllint\": \"1.0.8\",\n        \"cml-js-parser\": \"1.0.8\",\n        \"commander\": \"2.20.3\",\n        \"glob\": \"7.1.6\",\n        \"json-lint\": \"0.1.0\",\n        \"lodash.filter\": \"4.6.0\",\n        \"lodash.groupby\": \"4.6.0\",\n        \"lodash.map\": \"4.6.0\",\n        \"lodash.uniq\": \"4.5.0\",\n        \"postcss\": \"7.0.35\",\n        \"stylelint\": \"9.10.1\",\n        \"stylus\": \"0.54.5\",\n        \"stylus-converter\": \"0.8.1\",\n        \"traverse\": \"0.6.6\"\n      },\n      \"dependencies\": {\n        \"cml-component-parser\": {\n          \"version\": \"1.0.8\",\n          \"resolved\": \"https://registry.npmjs.org/cml-component-parser/-/cml-component-parser-1.0.8.tgz\",\n          \"integrity\": \"sha512-5GQm+X2pDwWYDt82QK4/9j7ipSd+jMaPtOLBtrSsFhPZq01HzM8yr8Tu7W0PzTNBfHPDr22MaCUZtv/9atPzqA==\",\n          \"requires\": {\n            \"@babel/parser\": \"7.2.3\",\n            \"@babel/traverse\": \"7.2.3\",\n            \"chameleon-tool-utils\": \"1.0.8\",\n            \"cml-interface-parser\": \"1.0.8\",\n            \"cml-js-parser\": \"1.0.8\",\n            \"commander\": \"2.20.3\"\n          }\n        },\n        \"cml-htmllint\": {\n          \"version\": \"1.0.8\",\n          \"resolved\": \"https://registry.npmjs.org/cml-htmllint/-/cml-htmllint-1.0.8.tgz\",\n          \"integrity\": \"sha512-9ckQPufiWZ2+0/qvNU27bDLY7yRaK/2qm5/WcT9Xuhk/XxV7afHBULUohU+PIrlrMjf2MTb7Gym/uaIGvTSbLg==\",\n          \"requires\": {\n            \"bulk-require\": \"1.0.1\",\n            \"htmlparser2\": \"3.10.1\",\n            \"lodash\": \"4.17.11\",\n            \"promise\": \"8.1.0\"\n          }\n        },\n        \"cml-interface-parser\": {\n          \"version\": \"1.0.8\",\n          \"resolved\": \"https://registry.npmjs.org/cml-interface-parser/-/cml-interface-parser-1.0.8.tgz\",\n          \"integrity\": \"sha512-aK7RrEnGIjRTvj4CtyUwQZ9s60czOigjMyPIp7d6EqtQMQTs2iaRWLwxxj4BmN+sDeEexEdegp0ZzSqChQSXnw==\",\n          \"requires\": {\n            \"@babel/parser\": \"7.2.3\",\n            \"@babel/traverse\": \"7.2.3\",\n            \"chameleon-tool-utils\": \"1.0.8\",\n            \"commander\": \"2.20.3\"\n          }\n        },\n        \"cml-js-parser\": {\n          \"version\": \"1.0.8\",\n          \"resolved\": \"https://registry.npmjs.org/cml-js-parser/-/cml-js-parser-1.0.8.tgz\",\n          \"integrity\": \"sha512-QpulgvSlBepE9+6CV9/NYVCsQfjvHzI+7zkZxsdmFCM5qlUPS3uzSx/Qqypagf+WyPE1d81Jw+K6en1WYpOnyA==\",\n          \"requires\": {\n            \"@babel/parser\": \"7.2.3\",\n            \"@babel/traverse\": \"7.2.3\",\n            \"bulk-require\": \"1.0.1\",\n            \"chameleon-tool-utils\": \"1.0.8\"\n          }\n        },\n        \"commander\": {\n          \"version\": \"2.20.3\",\n          \"resolved\": \"https://registry.npmjs.org/commander/-/commander-2.20.3.tgz\",\n          \"integrity\": \"sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==\"\n        },\n        \"glob\": {\n          \"version\": \"7.1.6\",\n          \"resolved\": \"https://registry.npmjs.org/glob/-/glob-7.1.6.tgz\",\n          \"integrity\": \"sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==\",\n          \"requires\": {\n            \"fs.realpath\": \"1.0.0\",\n            \"inflight\": \"1.0.6\",\n            \"inherits\": \"2.0.3\",\n            \"minimatch\": \"3.0.4\",\n            \"once\": \"1.4.0\",\n            \"path-is-absolute\": \"1.0.1\"\n          }\n        },\n        \"postcss\": {\n          \"version\": \"7.0.35\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz\",\n          \"integrity\": \"sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==\",\n          \"requires\": {\n            \"chalk\": \"2.4.2\",\n            \"source-map\": \"0.6.1\",\n            \"supports-color\": \"6.1.0\"\n          }\n        },\n        \"supports-color\": {\n          \"version\": \"6.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz\",\n          \"integrity\": \"sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==\",\n          \"requires\": {\n            \"has-flag\": \"3.0.0\"\n          }\n        }\n      }\n    },\n    \"chameleon-loader\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-loader/-/chameleon-loader-1.0.8.tgz\",\n      \"integrity\": \"sha512-I6jwMFeAmrKuctNMEDJJkL5OAyUOx7opssxVWtuf7QJVQuUl4ny+Cic5qabfDzphSlRQPZCPznb7cVrDZo0W2w==\",\n      \"requires\": {\n        \"@babel/parser\": \"7.1.2\",\n        \"@babel/types\": \"7.12.6\",\n        \"babel-generator\": \"6.26.1\",\n        \"babel-traverse\": \"6.26.0\",\n        \"chameleon-template-parse\": \"1.0.8\",\n        \"chameleon-tool-utils\": \"1.0.8\",\n        \"consolidate\": \"0.14.0\",\n        \"de-indent\": \"1.0.2\",\n        \"fs-extra\": \"7.0.1\",\n        \"hash-sum\": \"1.0.2\",\n        \"he\": \"1.1.0\",\n        \"loader-utils\": \"1.1.0\",\n        \"lru-cache\": \"4.1.1\",\n        \"mvvm-interface-parser\": \"1.0.8\",\n        \"resolve\": \"1.4.0\",\n        \"runtime-check\": \"1.0.8\",\n        \"source-map\": \"0.6.1\",\n        \"vue-style-loader\": \"4.0.1\"\n      },\n      \"dependencies\": {\n        \"@babel/code-frame\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz\",\n          \"integrity\": \"sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==\",\n          \"requires\": {\n            \"@babel/highlight\": \"7.10.4\"\n          }\n        },\n        \"@babel/generator\": {\n          \"version\": \"7.12.5\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz\",\n          \"integrity\": \"sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.6\",\n            \"jsesc\": \"2.5.2\",\n            \"source-map\": \"0.5.7\"\n          },\n          \"dependencies\": {\n            \"source-map\": {\n              \"version\": \"0.5.7\",\n              \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n              \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n            }\n          }\n        },\n        \"@babel/helper-function-name\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz\",\n          \"integrity\": \"sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==\",\n          \"requires\": {\n            \"@babel/helper-get-function-arity\": \"7.10.4\",\n            \"@babel/template\": \"7.10.4\",\n            \"@babel/types\": \"7.12.6\"\n          }\n        },\n        \"@babel/helper-get-function-arity\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz\",\n          \"integrity\": \"sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.6\"\n          }\n        },\n        \"@babel/helper-split-export-declaration\": {\n          \"version\": \"7.11.0\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz\",\n          \"integrity\": \"sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.6\"\n          }\n        },\n        \"@babel/highlight\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz\",\n          \"integrity\": \"sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==\",\n          \"requires\": {\n            \"@babel/helper-validator-identifier\": \"7.10.4\",\n            \"chalk\": \"2.4.2\",\n            \"js-tokens\": \"4.0.0\"\n          }\n        },\n        \"@babel/parser\": {\n          \"version\": \"7.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.1.2.tgz\",\n          \"integrity\": \"sha512-x5HFsW+E/nQalGMw7hu+fvPqnBeBaIr0lWJ2SG0PPL2j+Pm9lYvCrsZJGIgauPIENx0v10INIyFjmSNUD/gSqQ==\"\n        },\n        \"@babel/template\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz\",\n          \"integrity\": \"sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==\",\n          \"requires\": {\n            \"@babel/code-frame\": \"7.10.4\",\n            \"@babel/parser\": \"7.12.5\",\n            \"@babel/types\": \"7.12.6\"\n          },\n          \"dependencies\": {\n            \"@babel/parser\": {\n              \"version\": \"7.12.5\",\n              \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz\",\n              \"integrity\": \"sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==\"\n            }\n          }\n        },\n        \"@babel/traverse\": {\n          \"version\": \"7.12.5\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.5.tgz\",\n          \"integrity\": \"sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA==\",\n          \"requires\": {\n            \"@babel/code-frame\": \"7.10.4\",\n            \"@babel/generator\": \"7.12.5\",\n            \"@babel/helper-function-name\": \"7.10.4\",\n            \"@babel/helper-split-export-declaration\": \"7.11.0\",\n            \"@babel/parser\": \"7.12.5\",\n            \"@babel/types\": \"7.12.6\",\n            \"debug\": \"4.2.0\",\n            \"globals\": \"11.12.0\",\n            \"lodash\": \"4.17.20\"\n          },\n          \"dependencies\": {\n            \"@babel/parser\": {\n              \"version\": \"7.12.5\",\n              \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz\",\n              \"integrity\": \"sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==\"\n            }\n          }\n        },\n        \"@babel/types\": {\n          \"version\": \"7.12.6\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz\",\n          \"integrity\": \"sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==\",\n          \"requires\": {\n            \"@babel/helper-validator-identifier\": \"7.10.4\",\n            \"lodash\": \"4.17.20\",\n            \"to-fast-properties\": \"2.0.0\"\n          }\n        },\n        \"big.js\": {\n          \"version\": \"3.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz\",\n          \"integrity\": \"sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==\"\n        },\n        \"debug\": {\n          \"version\": \"4.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.2.0.tgz\",\n          \"integrity\": \"sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==\",\n          \"requires\": {\n            \"ms\": \"2.1.2\"\n          }\n        },\n        \"fs-extra\": {\n          \"version\": \"7.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz\",\n          \"integrity\": \"sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==\",\n          \"requires\": {\n            \"graceful-fs\": \"4.1.15\",\n            \"jsonfile\": \"4.0.0\",\n            \"universalify\": \"0.1.2\"\n          }\n        },\n        \"globals\": {\n          \"version\": \"11.12.0\",\n          \"resolved\": \"https://registry.npmjs.org/globals/-/globals-11.12.0.tgz\",\n          \"integrity\": \"sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==\"\n        },\n        \"he\": {\n          \"version\": \"1.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/he/-/he-1.1.0.tgz\",\n          \"integrity\": \"sha1-KTGdSb7sE6mx88T5sqbd5IWbsqc=\"\n        },\n        \"js-tokens\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz\",\n          \"integrity\": \"sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==\"\n        },\n        \"jsesc\": {\n          \"version\": \"2.5.2\",\n          \"resolved\": \"https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz\",\n          \"integrity\": \"sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==\"\n        },\n        \"loader-utils\": {\n          \"version\": \"1.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz\",\n          \"integrity\": \"sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=\",\n          \"requires\": {\n            \"big.js\": \"3.2.0\",\n            \"emojis-list\": \"2.1.0\",\n            \"json5\": \"0.5.1\"\n          }\n        },\n        \"lodash\": {\n          \"version\": \"4.17.20\",\n          \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz\",\n          \"integrity\": \"sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==\"\n        },\n        \"lru-cache\": {\n          \"version\": \"4.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz\",\n          \"integrity\": \"sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==\",\n          \"requires\": {\n            \"pseudomap\": \"1.0.2\",\n            \"yallist\": \"2.1.2\"\n          }\n        },\n        \"ms\": {\n          \"version\": \"2.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.2.tgz\",\n          \"integrity\": \"sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==\"\n        },\n        \"mvvm-interface-parser\": {\n          \"version\": \"1.0.8\",\n          \"resolved\": \"https://registry.npmjs.org/mvvm-interface-parser/-/mvvm-interface-parser-1.0.8.tgz\",\n          \"integrity\": \"sha512-hVrQ3E/oTNU2dBhBbOREA/Zlfm6qjyzO8Q2oGAOp/hVGZ27/WwHMRVsITQgyqO7HMfHoMnWWfvLPtGdnE9QqRQ==\",\n          \"requires\": {\n            \"@babel/generator\": \"7.12.5\",\n            \"@babel/parser\": \"7.12.5\",\n            \"@babel/traverse\": \"7.12.5\",\n            \"@babel/types\": \"7.12.6\",\n            \"chameleon-tool-utils\": \"1.0.8\",\n            \"runtime-check\": \"1.0.8\"\n          },\n          \"dependencies\": {\n            \"@babel/parser\": {\n              \"version\": \"7.12.5\",\n              \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz\",\n              \"integrity\": \"sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==\"\n            }\n          }\n        },\n        \"resolve\": {\n          \"version\": \"1.4.0\",\n          \"resolved\": \"https://registry.npmjs.org/resolve/-/resolve-1.4.0.tgz\",\n          \"integrity\": \"sha512-aW7sVKPufyHqOmyyLzg/J+8606v5nevBgaliIlV7nUpVMsDnoBGV/cbSLNjZAg9q0Cfd/+easKVKQ8vOu8fn1Q==\",\n          \"requires\": {\n            \"path-parse\": \"1.0.6\"\n          }\n        },\n        \"runtime-check\": {\n          \"version\": \"1.0.8\",\n          \"resolved\": \"https://registry.npmjs.org/runtime-check/-/runtime-check-1.0.8.tgz\",\n          \"integrity\": \"sha512-SNEIbwoI2+hVsVWK146bTY+TRQ+CNz5edPf0Be9/hWR8zk4j+jq7ASG455c/6iGrhmiz+LTZEg8ZcPaFoWsILA==\",\n          \"requires\": {\n            \"@babel/parser\": \"7.1.0\",\n            \"babel-generator\": \"6.26.1\",\n            \"babel-traverse\": \"6.26.0\"\n          },\n          \"dependencies\": {\n            \"@babel/parser\": {\n              \"version\": \"7.1.0\",\n              \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.1.0.tgz\",\n              \"integrity\": \"sha512-SmjnXCuPAlai75AFtzv+KCBcJ3sDDWbIn+WytKw1k+wAtEy6phqI2RqKh/zAnw53i1NR8su3Ep/UoqaKcimuLg==\"\n            }\n          }\n        },\n        \"to-fast-properties\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz\",\n          \"integrity\": \"sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=\"\n        }\n      }\n    },\n    \"chameleon-miniapp-target\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-miniapp-target/-/chameleon-miniapp-target-1.0.8.tgz\",\n      \"integrity\": \"sha512-Z6TCpfiyWXQ1YY4m+rHFhgznoQ7Yob2qZkifsQnDwcjO7zVe03p9m0veKupv77w78SEQgQluE5ldblmCRzXCqg==\",\n      \"requires\": {\n        \"chameleon-tool-utils\": \"1.0.8\"\n      }\n    },\n    \"chameleon-mixins\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-mixins/-/chameleon-mixins-1.0.8.tgz\",\n      \"integrity\": \"sha512-qTCWH5UY6ndFunxPcpZlTEiOSmTJ5oN8SLOTWy92rdariZoGSOTfJbVQ8Gc+4SLM6jmFkU4MqtvT3cMfZwbh9w==\"\n    },\n    \"chameleon-template-parse\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-template-parse/-/chameleon-template-parse-1.0.8.tgz\",\n      \"integrity\": \"sha512-lKmYCE5Jcue9AFX5995VNVgOBBcvmuFx2IMBj3xegHJ56TcyldwlySA2Rex/sbwlvjHfnqBo/HuwsEXedK9WhQ==\",\n      \"requires\": {\n        \"@babel/generator\": \"7.2.2\",\n        \"@babel/parser\": \"7.12.5\",\n        \"@babel/plugin-syntax-jsx\": \"7.12.1\",\n        \"@babel/traverse\": \"7.2.3\",\n        \"@babel/types\": \"7.2.2\",\n        \"babylon\": \"6.18.0\",\n        \"hash-sum\": \"1.0.2\",\n        \"tapable\": \"1.1.3\"\n      },\n      \"dependencies\": {\n        \"@babel/parser\": {\n          \"version\": \"7.12.5\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz\",\n          \"integrity\": \"sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==\"\n        }\n      }\n    },\n    \"chameleon-templates\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-templates/-/chameleon-templates-1.0.8.tgz\",\n      \"integrity\": \"sha512-ivEo9j3yK5iceV+mFltR/Dwg2us/doSgcx6S9s+eS7BxKoeFybCFllN5Qtdn9OrBePShGRIFIYoDyK2vTg+Xhg==\"\n    },\n    \"chameleon-tool-utils\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-tool-utils/-/chameleon-tool-utils-1.0.8.tgz\",\n      \"integrity\": \"sha512-OgVgD1L0z+h2v+UYJrAS6VXJS0XbIU/bQDAf+AOygoZ2Exn0KwGAhBnRNkvJS/H9EwELCEAF2bjt0Zj/UT+lwg==\",\n      \"requires\": {\n        \"chalk\": \"2.4.2\",\n        \"colors\": \"1.4.0\",\n        \"de-indent\": \"1.0.2\",\n        \"fs-extra\": \"6.0.1\",\n        \"glob\": \"7.1.2\",\n        \"hash-sum\": \"1.0.2\",\n        \"he\": \"1.2.0\",\n        \"lru-cache\": \"4.1.5\",\n        \"resolve\": \"1.19.0\"\n      },\n      \"dependencies\": {\n        \"is-core-module\": {\n          \"version\": \"2.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-core-module/-/is-core-module-2.1.0.tgz\",\n          \"integrity\": \"sha512-YcV7BgVMRFRua2FqQzKtTDMz8iCuLEyGKjr70q8Zm1yy2qKcurbFEd79PAdHV77oL3NrAaOVQIbMmiHQCHB7ZA==\",\n          \"requires\": {\n            \"has\": \"1.0.3\"\n          }\n        },\n        \"resolve\": {\n          \"version\": \"1.19.0\",\n          \"resolved\": \"https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz\",\n          \"integrity\": \"sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==\",\n          \"requires\": {\n            \"is-core-module\": \"2.1.0\",\n            \"path-parse\": \"1.0.6\"\n          }\n        }\n      }\n    },\n    \"chameleon-url-loader\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-url-loader/-/chameleon-url-loader-1.0.8.tgz\",\n      \"integrity\": \"sha512-40BTSmzWyM33aI2CSwyFFny1DraZN5sNfOnmL3+9JHPe+QMHMKnweSnx8Nu570qgB8/S+rJLIlwbT7rX5zQgXg==\",\n      \"requires\": {\n        \"@webpack-contrib/schema-utils\": \"1.0.0-beta.0\",\n        \"loader-utils\": \"1.2.3\",\n        \"mime\": \"2.4.6\"\n      }\n    },\n    \"chameleon-vue-precompiler\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-vue-precompiler/-/chameleon-vue-precompiler-1.0.8.tgz\",\n      \"integrity\": \"sha512-iEUkaeCMAZRJyX10GG4ZjTlYqMD0E1qbQid0FoYfamJtIq/OWbbxkfakElIFUN2EoX0ru8up/iB3IhgPjTE1/A==\",\n      \"requires\": {\n        \"esprima\": \"4.0.1\"\n      }\n    },\n    \"chameleon-webpack-plugin\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-webpack-plugin/-/chameleon-webpack-plugin-1.0.8.tgz\",\n      \"integrity\": \"sha512-lM1GQB+dwPEBOW/HHMRiHP7gjRiK8vuKaEsWYyIfCjeqWY5deEWyVyQKM9lMn779HjQthuekqoeFlXJk+KkSzw==\"\n    },\n    \"chameleon-weex-vue-loader\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-weex-vue-loader/-/chameleon-weex-vue-loader-1.0.8.tgz\",\n      \"integrity\": \"sha512-i4QCUuTLAYE/DJEa5Rzipcln/7gpAHhlizwYbpWNlVkT1X1poVlBTxvzg4nXhzWleo+TGnwZY01/SEKY9DUVEQ==\",\n      \"requires\": {\n        \"consolidate\": \"0.14.0\",\n        \"hash-sum\": \"1.0.2\",\n        \"he\": \"1.2.0\",\n        \"js-beautify\": \"1.13.0\",\n        \"loader-utils\": \"1.2.3\",\n        \"lru-cache\": \"4.1.5\",\n        \"object-assign\": \"4.1.1\",\n        \"postcss\": \"6.0.23\",\n        \"postcss-selector-parser\": \"2.2.3\",\n        \"source-map\": \"0.5.7\",\n        \"vue-hot-reload-api\": \"2.3.4\",\n        \"vue-style-loader\": \"3.1.2\",\n        \"vue-template-compiler\": \"2.5.16\",\n        \"vue-template-es2015-compiler\": \"1.9.1\",\n        \"weex-styler\": \"0.3.1\",\n        \"weex-template-compiler\": \"2.5.16-weex.1\"\n      },\n      \"dependencies\": {\n        \"postcss-selector-parser\": {\n          \"version\": \"2.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz\",\n          \"integrity\": \"sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A=\",\n          \"requires\": {\n            \"flatten\": \"1.0.2\",\n            \"indexes-of\": \"1.0.1\",\n            \"uniq\": \"1.0.1\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"vue-style-loader\": {\n          \"version\": \"3.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-3.1.2.tgz\",\n          \"integrity\": \"sha512-ICtVdK/p+qXWpdSs2alWtsXt9YnDoYjQe0w5616j9+/EhjoxZkbun34uWgsMFnC1MhrMMwaWiImz3K2jK1Yp2Q==\",\n          \"requires\": {\n            \"hash-sum\": \"1.0.2\",\n            \"loader-utils\": \"1.2.3\"\n          }\n        }\n      }\n    },\n    \"character-entities\": {\n      \"version\": \"1.2.4\",\n      \"resolved\": \"https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz\",\n      \"integrity\": \"sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==\"\n    },\n    \"character-entities-html4\": {\n      \"version\": \"1.1.4\",\n      \"resolved\": \"https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-1.1.4.tgz\",\n      \"integrity\": \"sha512-HRcDxZuZqMx3/a+qrzxdBKBPUpxWEq9xw2OPZ3a/174ihfrQKVsFhqtthBInFy1zZ9GgZyFXOatNujm8M+El3g==\"\n    },\n    \"character-entities-legacy\": {\n      \"version\": \"1.1.4\",\n      \"resolved\": \"https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz\",\n      \"integrity\": \"sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==\"\n    },\n    \"character-reference-invalid\": {\n      \"version\": \"1.1.4\",\n      \"resolved\": \"https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz\",\n      \"integrity\": \"sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==\"\n    },\n    \"chardet\": {\n      \"version\": \"0.7.0\",\n      \"resolved\": \"https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz\",\n      \"integrity\": \"sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==\"\n    },\n    \"charset\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/charset/-/charset-1.0.1.tgz\",\n      \"integrity\": \"sha512-6dVyOOYjpfFcL1Y4qChrAoQLRHvj2ziyhcm0QJlhOcAhykL/k1kTUPbeo+87MNRTRdk2OIIsIXbuF3x2wi5EXg==\"\n    },\n    \"check-error\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz\",\n      \"integrity\": \"sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=\"\n    },\n    \"check-types\": {\n      \"version\": \"7.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/check-types/-/check-types-7.4.0.tgz\",\n      \"integrity\": \"sha512-YbulWHdfP99UfZ73NcUDlNJhEIDgm9Doq9GhpyXbF+7Aegi3CVV7qqMCKTTqJxlvEvnQBp9IA+dxsGN6xK/nSg==\"\n    },\n    \"chokidar\": {\n      \"version\": \"2.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz\",\n      \"integrity\": \"sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==\",\n      \"requires\": {\n        \"anymatch\": \"2.0.0\",\n        \"async-each\": \"1.0.1\",\n        \"braces\": \"2.3.2\",\n        \"fsevents\": \"1.2.4\",\n        \"glob-parent\": \"3.1.0\",\n        \"inherits\": \"2.0.3\",\n        \"is-binary-path\": \"1.0.1\",\n        \"is-glob\": \"4.0.0\",\n        \"lodash.debounce\": \"4.0.8\",\n        \"normalize-path\": \"2.1.1\",\n        \"path-is-absolute\": \"1.0.1\",\n        \"readdirp\": \"2.2.1\",\n        \"upath\": \"1.1.0\"\n      }\n    },\n    \"chownr\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz\",\n      \"integrity\": \"sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==\"\n    },\n    \"cipher-base\": {\n      \"version\": \"1.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz\",\n      \"integrity\": \"sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==\",\n      \"requires\": {\n        \"inherits\": \"2.0.3\",\n        \"safe-buffer\": \"5.1.2\"\n      }\n    },\n    \"circular-dependency-plugin\": {\n      \"version\": \"4.4.0\",\n      \"resolved\": \"http://registry.npm.xiaojukeji.com/circular-dependency-plugin/download/circular-dependency-plugin-4.4.0.tgz\",\n      \"integrity\": \"sha1-+KGnRqP2yOV/Ta6bVNmRzSpYL10=\"\n    },\n    \"circular-json\": {\n      \"version\": \"0.3.3\",\n      \"resolved\": \"https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz\",\n      \"integrity\": \"sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==\",\n      \"dev\": true\n    },\n    \"clap\": {\n      \"version\": \"1.2.3\",\n      \"resolved\": \"https://registry.npmjs.org/clap/-/clap-1.2.3.tgz\",\n      \"integrity\": \"sha512-4CoL/A3hf90V3VIEjeuhSvlGFEHKzOz+Wfc2IVZc+FaUgU0ZQafJTP49fvnULipOPcAfqhyI2duwQyns6xqjYA==\",\n      \"requires\": {\n        \"chalk\": \"1.1.3\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          }\n        },\n        \"supports-color\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n          \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n        }\n      }\n    },\n    \"class-utils\": {\n      \"version\": \"0.3.6\",\n      \"resolved\": \"https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz\",\n      \"integrity\": \"sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==\",\n      \"requires\": {\n        \"arr-union\": \"3.1.0\",\n        \"define-property\": \"0.2.5\",\n        \"isobject\": \"3.0.1\",\n        \"static-extend\": \"0.1.2\"\n      },\n      \"dependencies\": {\n        \"define-property\": {\n          \"version\": \"0.2.5\",\n          \"resolved\": \"https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz\",\n          \"integrity\": \"sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=\",\n          \"requires\": {\n            \"is-descriptor\": \"0.1.6\"\n          }\n        }\n      }\n    },\n    \"clean-css\": {\n      \"version\": \"4.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz\",\n      \"integrity\": \"sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==\",\n      \"requires\": {\n        \"source-map\": \"0.6.1\"\n      }\n    },\n    \"clean-webpack-plugin\": {\n      \"version\": \"0.1.19\",\n      \"resolved\": \"https://registry.npmjs.org/clean-webpack-plugin/-/clean-webpack-plugin-0.1.19.tgz\",\n      \"integrity\": \"sha512-M1Li5yLHECcN2MahoreuODul5LkjohJGFxLPTjl3j1ttKrF5rgjZET1SJduuqxLAuT1gAPOdkhg03qcaaU1KeA==\",\n      \"requires\": {\n        \"rimraf\": \"2.6.3\"\n      }\n    },\n    \"cli-cursor\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz\",\n      \"integrity\": \"sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=\",\n      \"requires\": {\n        \"restore-cursor\": \"2.0.0\"\n      }\n    },\n    \"cli-spinners\": {\n      \"version\": \"1.3.1\",\n      \"resolved\": \"https://registry.npmjs.org/cli-spinners/-/cli-spinners-1.3.1.tgz\",\n      \"integrity\": \"sha512-1QL4544moEsDVH9T/l6Cemov/37iv1RtoKf7NJ04A60+4MREXNfx/QvavbH6QoGdsD4N4Mwy49cmaINR/o2mdg==\"\n    },\n    \"cli-width\": {\n      \"version\": \"2.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz\",\n      \"integrity\": \"sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=\"\n    },\n    \"cliui\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz\",\n      \"integrity\": \"sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=\",\n      \"requires\": {\n        \"center-align\": \"0.1.3\",\n        \"right-align\": \"0.1.3\",\n        \"wordwrap\": \"0.0.2\"\n      },\n      \"dependencies\": {\n        \"wordwrap\": {\n          \"version\": \"0.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz\",\n          \"integrity\": \"sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=\"\n        }\n      }\n    },\n    \"clone\": {\n      \"version\": \"1.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/clone/-/clone-1.0.4.tgz\",\n      \"integrity\": \"sha1-2jCcwmPfFZlMaIypAheco8fNfH4=\"\n    },\n    \"clone-regexp\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/clone-regexp/-/clone-regexp-1.0.1.tgz\",\n      \"integrity\": \"sha512-Fcij9IwRW27XedRIJnSOEupS7RVcXtObJXbcUOX93UCLqqOdRpkvzKywOOSizmEK/Is3S/RHX9dLdfo6R1Q1mw==\",\n      \"requires\": {\n        \"is-regexp\": \"1.0.0\",\n        \"is-supported-regexp-flag\": \"1.0.1\"\n      }\n    },\n    \"cml-extract-css-webpack-plugin\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/cml-extract-css-webpack-plugin/-/cml-extract-css-webpack-plugin-1.0.8.tgz\",\n      \"integrity\": \"sha512-wbZrEJYqQgeyntWzoISUh+Vlb9YwTilq+7W/yl8wzOcAkW/2DFEQR0jkoxzQO4r2Ribpw6rubElg/D6zjATuqg==\",\n      \"requires\": {\n        \"async\": \"2.6.1\",\n        \"loader-utils\": \"1.2.3\",\n        \"schema-utils\": \"0.3.0\",\n        \"webpack-sources\": \"1.3.0\"\n      }\n    },\n    \"cml-vue-loader\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/cml-vue-loader/-/cml-vue-loader-1.0.8.tgz\",\n      \"integrity\": \"sha512-mjqnmg1XEZC/6xj1bjrYRj8Obi+KKSfIMp+IzQXIsZeYHlhuPjxXk+ML+9uKk22keoubAJajCDRQw1PfaDCVUg==\",\n      \"requires\": {\n        \"consolidate\": \"0.14.0\",\n        \"hash-sum\": \"1.0.2\",\n        \"loader-utils\": \"1.2.3\",\n        \"lru-cache\": \"4.1.5\",\n        \"postcss\": \"6.0.23\",\n        \"postcss-load-config\": \"1.2.0\",\n        \"postcss-selector-parser\": \"2.2.3\",\n        \"prettier\": \"1.15.3\",\n        \"resolve\": \"1.9.0\",\n        \"source-map\": \"0.6.1\",\n        \"vue-hot-reload-api\": \"2.3.4\",\n        \"vue-style-loader\": \"4.0.1\",\n        \"vue-template-es2015-compiler\": \"1.9.1\"\n      },\n      \"dependencies\": {\n        \"postcss-selector-parser\": {\n          \"version\": \"2.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz\",\n          \"integrity\": \"sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A=\",\n          \"requires\": {\n            \"flatten\": \"1.0.2\",\n            \"indexes-of\": \"1.0.1\",\n            \"uniq\": \"1.0.1\"\n          }\n        }\n      }\n    },\n    \"co\": {\n      \"version\": \"4.6.0\",\n      \"resolved\": \"https://registry.npmjs.org/co/-/co-4.6.0.tgz\",\n      \"integrity\": \"sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=\"\n    },\n    \"coa\": {\n      \"version\": \"1.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/coa/-/coa-1.0.4.tgz\",\n      \"integrity\": \"sha1-qe8VNmDWqGqL3sAomlxoTSF0Mv0=\",\n      \"requires\": {\n        \"q\": \"1.5.1\"\n      }\n    },\n    \"code-point-at\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz\",\n      \"integrity\": \"sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=\"\n    },\n    \"collapse-white-space\": {\n      \"version\": \"1.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.6.tgz\",\n      \"integrity\": \"sha512-jEovNnrhMuqyCcjfEJA56v0Xq8SkIoPKDyaHahwo3POf4qcSXqMYuwNcOTzp74vTsR9Tn08z4MxWqAhcekogkQ==\"\n    },\n    \"collection-visit\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz\",\n      \"integrity\": \"sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=\",\n      \"requires\": {\n        \"map-visit\": \"1.0.0\",\n        \"object-visit\": \"1.0.1\"\n      }\n    },\n    \"color\": {\n      \"version\": \"0.11.4\",\n      \"resolved\": \"https://registry.npmjs.org/color/-/color-0.11.4.tgz\",\n      \"integrity\": \"sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=\",\n      \"requires\": {\n        \"clone\": \"1.0.4\",\n        \"color-convert\": \"1.9.3\",\n        \"color-string\": \"0.3.0\"\n      }\n    },\n    \"color-convert\": {\n      \"version\": \"1.9.3\",\n      \"resolved\": \"https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz\",\n      \"integrity\": \"sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==\",\n      \"requires\": {\n        \"color-name\": \"1.1.3\"\n      }\n    },\n    \"color-name\": {\n      \"version\": \"1.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz\",\n      \"integrity\": \"sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=\"\n    },\n    \"color-string\": {\n      \"version\": \"0.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/color-string/-/color-string-0.3.0.tgz\",\n      \"integrity\": \"sha1-J9RvtnAlxcL6JZk7+/V55HhBuZE=\",\n      \"requires\": {\n        \"color-name\": \"1.1.3\"\n      }\n    },\n    \"colorette\": {\n      \"version\": \"1.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz\",\n      \"integrity\": \"sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==\"\n    },\n    \"colormin\": {\n      \"version\": \"1.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/colormin/-/colormin-1.1.2.tgz\",\n      \"integrity\": \"sha1-6i90IKcrlogaOKrlnsEkpvcpgTM=\",\n      \"requires\": {\n        \"color\": \"0.11.4\",\n        \"css-color-names\": \"0.0.4\",\n        \"has\": \"1.0.3\"\n      }\n    },\n    \"colors\": {\n      \"version\": \"1.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/colors/-/colors-1.4.0.tgz\",\n      \"integrity\": \"sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==\"\n    },\n    \"combined-stream\": {\n      \"version\": \"1.0.7\",\n      \"resolved\": \"https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz\",\n      \"integrity\": \"sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==\",\n      \"requires\": {\n        \"delayed-stream\": \"1.0.0\"\n      }\n    },\n    \"commander\": {\n      \"version\": \"2.16.0\",\n      \"resolved\": \"https://registry.npmjs.org/commander/-/commander-2.16.0.tgz\",\n      \"integrity\": \"sha512-sVXqklSaotK9at437sFlFpyOcJonxe0yST/AG9DkQKUdIE6IqGIMv4SfAQSKaJbSdVEJYItASCrBiVQHq1HQew==\"\n    },\n    \"commondir\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz\",\n      \"integrity\": \"sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=\"\n    },\n    \"component-emitter\": {\n      \"version\": \"1.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz\",\n      \"integrity\": \"sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=\"\n    },\n    \"concat-map\": {\n      \"version\": \"0.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz\",\n      \"integrity\": \"sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=\"\n    },\n    \"concat-stream\": {\n      \"version\": \"1.6.2\",\n      \"resolved\": \"https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz\",\n      \"integrity\": \"sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==\",\n      \"requires\": {\n        \"buffer-from\": \"1.1.1\",\n        \"inherits\": \"2.0.3\",\n        \"readable-stream\": \"2.3.6\",\n        \"typedarray\": \"0.0.6\"\n      }\n    },\n    \"config-chain\": {\n      \"version\": \"1.1.12\",\n      \"resolved\": \"https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz\",\n      \"integrity\": \"sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==\",\n      \"requires\": {\n        \"ini\": \"1.3.5\",\n        \"proto-list\": \"1.2.4\"\n      }\n    },\n    \"connect-history-api-fallback\": {\n      \"version\": \"1.6.0\",\n      \"resolved\": \"https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz\",\n      \"integrity\": \"sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==\"\n    },\n    \"console-browserify\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz\",\n      \"integrity\": \"sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=\",\n      \"requires\": {\n        \"date-now\": \"0.1.4\"\n      }\n    },\n    \"consolidate\": {\n      \"version\": \"0.14.0\",\n      \"resolved\": \"https://registry.npmjs.org/consolidate/-/consolidate-0.14.0.tgz\",\n      \"integrity\": \"sha1-sDrNVmolZcqW6Z9E/RQXSGtN+I0=\",\n      \"requires\": {\n        \"bluebird\": \"3.5.3\"\n      }\n    },\n    \"constants-browserify\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz\",\n      \"integrity\": \"sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=\"\n    },\n    \"content-disposition\": {\n      \"version\": \"0.5.2\",\n      \"resolved\": \"https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz\",\n      \"integrity\": \"sha1-DPaLud318r55YcOoUXjLhdunjLQ=\"\n    },\n    \"content-type\": {\n      \"version\": \"1.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz\",\n      \"integrity\": \"sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==\"\n    },\n    \"convert-source-map\": {\n      \"version\": \"1.6.0\",\n      \"resolved\": \"https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz\",\n      \"integrity\": \"sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==\",\n      \"requires\": {\n        \"safe-buffer\": \"5.1.2\"\n      }\n    },\n    \"cookie\": {\n      \"version\": \"0.3.1\",\n      \"resolved\": \"https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz\",\n      \"integrity\": \"sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=\"\n    },\n    \"cookie-signature\": {\n      \"version\": \"1.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz\",\n      \"integrity\": \"sha1-4wOogrNCzD7oylE6eZmXNNqzriw=\"\n    },\n    \"copy-concurrently\": {\n      \"version\": \"1.0.5\",\n      \"resolved\": \"https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz\",\n      \"integrity\": \"sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==\",\n      \"requires\": {\n        \"aproba\": \"1.2.0\",\n        \"fs-write-stream-atomic\": \"1.0.10\",\n        \"iferr\": \"0.1.5\",\n        \"mkdirp\": \"0.5.1\",\n        \"rimraf\": \"2.6.3\",\n        \"run-queue\": \"1.0.3\"\n      }\n    },\n    \"copy-descriptor\": {\n      \"version\": \"0.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz\",\n      \"integrity\": \"sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=\"\n    },\n    \"copy-webpack-plugin\": {\n      \"version\": \"4.5.2\",\n      \"resolved\": \"https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.5.2.tgz\",\n      \"integrity\": \"sha512-zmC33E8FFSq3AbflTvqvPvBo621H36Afsxlui91d+QyZxPIuXghfnTsa1CuqiAaCPgJoSUWfTFbKJnadZpKEbQ==\",\n      \"requires\": {\n        \"cacache\": \"10.0.4\",\n        \"find-cache-dir\": \"1.0.0\",\n        \"globby\": \"7.1.1\",\n        \"is-glob\": \"4.0.0\",\n        \"loader-utils\": \"1.2.3\",\n        \"minimatch\": \"3.0.4\",\n        \"p-limit\": \"1.3.0\",\n        \"serialize-javascript\": \"1.6.1\"\n      },\n      \"dependencies\": {\n        \"globby\": {\n          \"version\": \"7.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/globby/-/globby-7.1.1.tgz\",\n          \"integrity\": \"sha1-+yzP+UAfhgCUXfral0QMypcrhoA=\",\n          \"requires\": {\n            \"array-union\": \"1.0.2\",\n            \"dir-glob\": \"2.0.0\",\n            \"glob\": \"7.1.2\",\n            \"ignore\": \"3.3.10\",\n            \"pify\": \"3.0.0\",\n            \"slash\": \"1.0.0\"\n          }\n        },\n        \"ignore\": {\n          \"version\": \"3.3.10\",\n          \"resolved\": \"https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz\",\n          \"integrity\": \"sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==\"\n        }\n      }\n    },\n    \"core-js\": {\n      \"version\": \"2.6.2\",\n      \"resolved\": \"https://registry.npmjs.org/core-js/-/core-js-2.6.2.tgz\",\n      \"integrity\": \"sha512-NdBPF/RVwPW6jr0NCILuyN9RiqLo2b1mddWHkUL+VnvcB7dzlnBJ1bXYntjpTGOgkZiiLWj2JxmOr7eGE3qK6g==\"\n    },\n    \"core-util-is\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz\",\n      \"integrity\": \"sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=\"\n    },\n    \"cosmiconfig\": {\n      \"version\": \"5.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz\",\n      \"integrity\": \"sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==\",\n      \"requires\": {\n        \"import-fresh\": \"2.0.0\",\n        \"is-directory\": \"0.3.1\",\n        \"js-yaml\": \"3.14.0\",\n        \"parse-json\": \"4.0.0\"\n      },\n      \"dependencies\": {\n        \"js-yaml\": {\n          \"version\": \"3.14.0\",\n          \"resolved\": \"https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz\",\n          \"integrity\": \"sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==\",\n          \"requires\": {\n            \"argparse\": \"1.0.10\",\n            \"esprima\": \"4.0.1\"\n          }\n        }\n      }\n    },\n    \"coveralls\": {\n      \"version\": \"2.13.3\",\n      \"resolved\": \"https://registry.npmjs.org/coveralls/-/coveralls-2.13.3.tgz\",\n      \"integrity\": \"sha512-iiAmn+l1XqRwNLXhW8Rs5qHZRFMYp9ZIPjEOVRpC/c4so6Y/f4/lFi0FfR5B9cCqgyhkJ5cZmbvcVRfP8MHchw==\",\n      \"dev\": true,\n      \"requires\": {\n        \"js-yaml\": \"3.6.1\",\n        \"lcov-parse\": \"0.0.10\",\n        \"log-driver\": \"1.2.5\",\n        \"minimist\": \"1.2.0\",\n        \"request\": \"2.79.0\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\",\n          \"dev\": true\n        },\n        \"assert-plus\": {\n          \"version\": \"0.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz\",\n          \"integrity\": \"sha1-104bh+ev/A24qttwIfP+SBAasjQ=\",\n          \"dev\": true\n        },\n        \"aws-sign2\": {\n          \"version\": \"0.6.0\",\n          \"resolved\": \"https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz\",\n          \"integrity\": \"sha1-FDQt0428yU0OW4fXY81jYSwOeU8=\",\n          \"dev\": true\n        },\n        \"caseless\": {\n          \"version\": \"0.11.0\",\n          \"resolved\": \"https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz\",\n          \"integrity\": \"sha1-cVuW6phBWTzDMGeSP17GDr2k99c=\",\n          \"dev\": true\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"dev\": true,\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          }\n        },\n        \"esprima\": {\n          \"version\": \"2.7.3\",\n          \"resolved\": \"https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz\",\n          \"integrity\": \"sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=\",\n          \"dev\": true\n        },\n        \"form-data\": {\n          \"version\": \"2.1.4\",\n          \"resolved\": \"https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz\",\n          \"integrity\": \"sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=\",\n          \"dev\": true,\n          \"requires\": {\n            \"asynckit\": \"0.4.0\",\n            \"combined-stream\": \"1.0.7\",\n            \"mime-types\": \"2.1.21\"\n          }\n        },\n        \"har-validator\": {\n          \"version\": \"2.0.6\",\n          \"resolved\": \"https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz\",\n          \"integrity\": \"sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=\",\n          \"dev\": true,\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"commander\": \"2.16.0\",\n            \"is-my-json-valid\": \"2.19.0\",\n            \"pinkie-promise\": \"2.0.1\"\n          }\n        },\n        \"http-signature\": {\n          \"version\": \"1.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz\",\n          \"integrity\": \"sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=\",\n          \"dev\": true,\n          \"requires\": {\n            \"assert-plus\": \"0.2.0\",\n            \"jsprim\": \"1.4.1\",\n            \"sshpk\": \"1.16.0\"\n          }\n        },\n        \"js-yaml\": {\n          \"version\": \"3.6.1\",\n          \"resolved\": \"https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.1.tgz\",\n          \"integrity\": \"sha1-bl/mfYsgXOTSL60Ft3geja3MSzA=\",\n          \"dev\": true,\n          \"requires\": {\n            \"argparse\": \"1.0.10\",\n            \"esprima\": \"2.7.3\"\n          }\n        },\n        \"oauth-sign\": {\n          \"version\": \"0.8.2\",\n          \"resolved\": \"https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz\",\n          \"integrity\": \"sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=\",\n          \"dev\": true\n        },\n        \"punycode\": {\n          \"version\": \"1.4.1\",\n          \"resolved\": \"https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz\",\n          \"integrity\": \"sha1-wNWmOycYgArY4esPpSachN1BhF4=\",\n          \"dev\": true\n        },\n        \"qs\": {\n          \"version\": \"6.3.2\",\n          \"resolved\": \"https://registry.npmjs.org/qs/-/qs-6.3.2.tgz\",\n          \"integrity\": \"sha1-51vV9uJoEioqDgvaYwslUMFmUCw=\",\n          \"dev\": true\n        },\n        \"request\": {\n          \"version\": \"2.79.0\",\n          \"resolved\": \"https://registry.npmjs.org/request/-/request-2.79.0.tgz\",\n          \"integrity\": \"sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=\",\n          \"dev\": true,\n          \"requires\": {\n            \"aws-sign2\": \"0.6.0\",\n            \"aws4\": \"1.8.0\",\n            \"caseless\": \"0.11.0\",\n            \"combined-stream\": \"1.0.7\",\n            \"extend\": \"3.0.2\",\n            \"forever-agent\": \"0.6.1\",\n            \"form-data\": \"2.1.4\",\n            \"har-validator\": \"2.0.6\",\n            \"hawk\": \"3.1.3\",\n            \"http-signature\": \"1.1.1\",\n            \"is-typedarray\": \"1.0.0\",\n            \"isstream\": \"0.1.2\",\n            \"json-stringify-safe\": \"5.0.1\",\n            \"mime-types\": \"2.1.21\",\n            \"oauth-sign\": \"0.8.2\",\n            \"qs\": \"6.3.2\",\n            \"stringstream\": \"0.0.6\",\n            \"tough-cookie\": \"2.3.4\",\n            \"tunnel-agent\": \"0.4.3\",\n            \"uuid\": \"3.3.2\"\n          }\n        },\n        \"supports-color\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n          \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\",\n          \"dev\": true\n        },\n        \"tough-cookie\": {\n          \"version\": \"2.3.4\",\n          \"resolved\": \"https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz\",\n          \"integrity\": \"sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==\",\n          \"dev\": true,\n          \"requires\": {\n            \"punycode\": \"1.4.1\"\n          }\n        }\n      }\n    },\n    \"create-ecdh\": {\n      \"version\": \"4.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz\",\n      \"integrity\": \"sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==\",\n      \"requires\": {\n        \"bn.js\": \"4.11.8\",\n        \"elliptic\": \"6.4.1\"\n      }\n    },\n    \"create-hash\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz\",\n      \"integrity\": \"sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==\",\n      \"requires\": {\n        \"cipher-base\": \"1.0.4\",\n        \"inherits\": \"2.0.3\",\n        \"md5.js\": \"1.3.5\",\n        \"ripemd160\": \"2.0.2\",\n        \"sha.js\": \"2.4.11\"\n      }\n    },\n    \"create-hmac\": {\n      \"version\": \"1.1.7\",\n      \"resolved\": \"https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz\",\n      \"integrity\": \"sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==\",\n      \"requires\": {\n        \"cipher-base\": \"1.0.4\",\n        \"create-hash\": \"1.2.0\",\n        \"inherits\": \"2.0.3\",\n        \"ripemd160\": \"2.0.2\",\n        \"safe-buffer\": \"5.1.2\",\n        \"sha.js\": \"2.4.11\"\n      }\n    },\n    \"cross-spawn\": {\n      \"version\": \"5.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz\",\n      \"integrity\": \"sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=\",\n      \"requires\": {\n        \"lru-cache\": \"4.1.5\",\n        \"shebang-command\": \"1.2.0\",\n        \"which\": \"1.3.1\"\n      }\n    },\n    \"cryptiles\": {\n      \"version\": \"2.0.5\",\n      \"resolved\": \"https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz\",\n      \"integrity\": \"sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=\",\n      \"dev\": true,\n      \"requires\": {\n        \"boom\": \"2.10.1\"\n      }\n    },\n    \"crypto-browserify\": {\n      \"version\": \"3.12.0\",\n      \"resolved\": \"https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz\",\n      \"integrity\": \"sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==\",\n      \"requires\": {\n        \"browserify-cipher\": \"1.0.1\",\n        \"browserify-sign\": \"4.0.4\",\n        \"create-ecdh\": \"4.0.3\",\n        \"create-hash\": \"1.2.0\",\n        \"create-hmac\": \"1.1.7\",\n        \"diffie-hellman\": \"5.0.3\",\n        \"inherits\": \"2.0.3\",\n        \"pbkdf2\": \"3.0.17\",\n        \"public-encrypt\": \"4.0.3\",\n        \"randombytes\": \"2.0.6\",\n        \"randomfill\": \"1.0.4\"\n      }\n    },\n    \"css\": {\n      \"version\": \"2.2.4\",\n      \"resolved\": \"https://registry.npmjs.org/css/-/css-2.2.4.tgz\",\n      \"integrity\": \"sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==\",\n      \"requires\": {\n        \"inherits\": \"2.0.3\",\n        \"source-map\": \"0.6.1\",\n        \"source-map-resolve\": \"0.5.2\",\n        \"urix\": \"0.1.0\"\n      }\n    },\n    \"css-color-names\": {\n      \"version\": \"0.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz\",\n      \"integrity\": \"sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=\"\n    },\n    \"css-hot-loader\": {\n      \"version\": \"1.3.9\",\n      \"resolved\": \"https://registry.npmjs.org/css-hot-loader/-/css-hot-loader-1.3.9.tgz\",\n      \"integrity\": \"sha512-W3RoM3mqIhZyMr2sYJr7Q49gQa6C+W6IjXOcGg/bOcm5Fsbn4ElbMqSVwcCbZZhrSBfL5ZGGA6skJQVrXpbRnQ==\",\n      \"requires\": {\n        \"loader-utils\": \"1.2.3\",\n        \"lodash\": \"4.17.11\",\n        \"normalize-url\": \"1.9.1\"\n      }\n    },\n    \"css-loader\": {\n      \"version\": \"0.28.11\",\n      \"resolved\": \"https://registry.npmjs.org/css-loader/-/css-loader-0.28.11.tgz\",\n      \"integrity\": \"sha512-wovHgjAx8ZIMGSL8pTys7edA1ClmzxHeY6n/d97gg5odgsxEgKjULPR0viqyC+FWMCL9sfqoC/QCUBo62tLvPg==\",\n      \"requires\": {\n        \"babel-code-frame\": \"6.26.0\",\n        \"css-selector-tokenizer\": \"0.7.1\",\n        \"cssnano\": \"3.10.0\",\n        \"icss-utils\": \"2.1.0\",\n        \"loader-utils\": \"1.2.3\",\n        \"lodash.camelcase\": \"4.3.0\",\n        \"object-assign\": \"4.1.1\",\n        \"postcss\": \"5.2.18\",\n        \"postcss-modules-extract-imports\": \"1.2.1\",\n        \"postcss-modules-local-by-default\": \"1.2.0\",\n        \"postcss-modules-scope\": \"1.1.0\",\n        \"postcss-modules-values\": \"1.3.0\",\n        \"postcss-value-parser\": \"3.3.1\",\n        \"source-list-map\": \"2.0.1\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"css-parse\": {\n      \"version\": \"1.7.0\",\n      \"resolved\": \"https://registry.npmjs.org/css-parse/-/css-parse-1.7.0.tgz\",\n      \"integrity\": \"sha1-Mh9s9zeCpv91ERE5D8BeLGV9jJs=\"\n    },\n    \"css-select\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz\",\n      \"integrity\": \"sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=\",\n      \"requires\": {\n        \"boolbase\": \"1.0.0\",\n        \"css-what\": \"2.1.2\",\n        \"domutils\": \"1.5.1\",\n        \"nth-check\": \"1.0.2\"\n      },\n      \"dependencies\": {\n        \"domutils\": {\n          \"version\": \"1.5.1\",\n          \"resolved\": \"https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz\",\n          \"integrity\": \"sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=\",\n          \"requires\": {\n            \"dom-serializer\": \"0.1.0\",\n            \"domelementtype\": \"1.3.1\"\n          }\n        }\n      }\n    },\n    \"css-selector-tokenizer\": {\n      \"version\": \"0.7.1\",\n      \"resolved\": \"https://registry.npmjs.org/css-selector-tokenizer/-/css-selector-tokenizer-0.7.1.tgz\",\n      \"integrity\": \"sha512-xYL0AMZJ4gFzJQsHUKa5jiWWi2vH77WVNg7JYRyewwj6oPh4yb/y6Y9ZCw9dsj/9UauMhtuxR+ogQd//EdEVNA==\",\n      \"requires\": {\n        \"cssesc\": \"0.1.0\",\n        \"fastparse\": \"1.1.2\",\n        \"regexpu-core\": \"1.0.0\"\n      },\n      \"dependencies\": {\n        \"regexpu-core\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz\",\n          \"integrity\": \"sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=\",\n          \"requires\": {\n            \"regenerate\": \"1.4.0\",\n            \"regjsgen\": \"0.2.0\",\n            \"regjsparser\": \"0.1.5\"\n          }\n        }\n      }\n    },\n    \"css-tree\": {\n      \"version\": \"1.0.0-alpha.29\",\n      \"resolved\": \"https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.29.tgz\",\n      \"integrity\": \"sha512-sRNb1XydwkW9IOci6iB2xmy8IGCj6r/fr+JWitvJ2JxQRPzN3T4AGGVWCMlVmVwM1gtgALJRmGIlWv5ppnGGkg==\",\n      \"requires\": {\n        \"mdn-data\": \"1.1.4\",\n        \"source-map\": \"0.5.7\"\n      },\n      \"dependencies\": {\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        }\n      }\n    },\n    \"css-what\": {\n      \"version\": \"2.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/css-what/-/css-what-2.1.2.tgz\",\n      \"integrity\": \"sha512-wan8dMWQ0GUeF7DGEPVjhHemVW/vy6xUYmFzRY8RYqgA0JtXC9rJmbScBjqSu6dg9q0lwPQy6ZAmJVr3PPTvqQ==\"\n    },\n    \"cssesc\": {\n      \"version\": \"0.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/cssesc/-/cssesc-0.1.0.tgz\",\n      \"integrity\": \"sha1-yBSQPkViM3GgR3tAEJqq++6t27Q=\"\n    },\n    \"cssnano\": {\n      \"version\": \"3.10.0\",\n      \"resolved\": \"https://registry.npmjs.org/cssnano/-/cssnano-3.10.0.tgz\",\n      \"integrity\": \"sha1-Tzj2zqK5sX+gFJDyPx3GjqZcHDg=\",\n      \"requires\": {\n        \"autoprefixer\": \"6.7.7\",\n        \"decamelize\": \"1.2.0\",\n        \"defined\": \"1.0.0\",\n        \"has\": \"1.0.3\",\n        \"object-assign\": \"4.1.1\",\n        \"postcss\": \"5.2.18\",\n        \"postcss-calc\": \"5.3.1\",\n        \"postcss-colormin\": \"2.2.2\",\n        \"postcss-convert-values\": \"2.6.1\",\n        \"postcss-discard-comments\": \"2.0.4\",\n        \"postcss-discard-duplicates\": \"2.1.0\",\n        \"postcss-discard-empty\": \"2.1.0\",\n        \"postcss-discard-overridden\": \"0.1.1\",\n        \"postcss-discard-unused\": \"2.2.3\",\n        \"postcss-filter-plugins\": \"2.0.3\",\n        \"postcss-merge-idents\": \"2.1.7\",\n        \"postcss-merge-longhand\": \"2.0.2\",\n        \"postcss-merge-rules\": \"2.1.2\",\n        \"postcss-minify-font-values\": \"1.0.5\",\n        \"postcss-minify-gradients\": \"1.0.5\",\n        \"postcss-minify-params\": \"1.2.2\",\n        \"postcss-minify-selectors\": \"2.1.1\",\n        \"postcss-normalize-charset\": \"1.1.1\",\n        \"postcss-normalize-url\": \"3.0.8\",\n        \"postcss-ordered-values\": \"2.2.3\",\n        \"postcss-reduce-idents\": \"2.4.0\",\n        \"postcss-reduce-initial\": \"1.0.1\",\n        \"postcss-reduce-transforms\": \"1.0.4\",\n        \"postcss-svgo\": \"2.1.6\",\n        \"postcss-unique-selectors\": \"2.0.2\",\n        \"postcss-value-parser\": \"3.3.1\",\n        \"postcss-zindex\": \"2.2.0\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"autoprefixer\": {\n          \"version\": \"6.7.7\",\n          \"resolved\": \"https://registry.npmjs.org/autoprefixer/-/autoprefixer-6.7.7.tgz\",\n          \"integrity\": \"sha1-Hb0cg1ZY41zj+ZhAmdsAWFx4IBQ=\",\n          \"requires\": {\n            \"browserslist\": \"1.7.7\",\n            \"caniuse-db\": \"1.0.30000928\",\n            \"normalize-range\": \"0.1.2\",\n            \"num2fraction\": \"1.2.2\",\n            \"postcss\": \"5.2.18\",\n            \"postcss-value-parser\": \"3.3.1\"\n          }\n        },\n        \"browserslist\": {\n          \"version\": \"1.7.7\",\n          \"resolved\": \"https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz\",\n          \"integrity\": \"sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=\",\n          \"requires\": {\n            \"caniuse-db\": \"1.0.30000928\",\n            \"electron-to-chromium\": \"1.3.100\"\n          }\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"csso\": {\n      \"version\": \"2.3.2\",\n      \"resolved\": \"https://registry.npmjs.org/csso/-/csso-2.3.2.tgz\",\n      \"integrity\": \"sha1-3dUsWHAz9J6Utx/FVWnyUuj/X4U=\",\n      \"requires\": {\n        \"clap\": \"1.2.3\",\n        \"source-map\": \"0.5.7\"\n      },\n      \"dependencies\": {\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        }\n      }\n    },\n    \"currently-unhandled\": {\n      \"version\": \"0.4.1\",\n      \"resolved\": \"https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz\",\n      \"integrity\": \"sha1-mI3zP+qxke95mmE2nddsF635V+o=\",\n      \"requires\": {\n        \"array-find-index\": \"1.0.2\"\n      }\n    },\n    \"cyclist\": {\n      \"version\": \"0.2.2\",\n      \"resolved\": \"https://registry.npmjs.org/cyclist/-/cyclist-0.2.2.tgz\",\n      \"integrity\": \"sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=\"\n    },\n    \"d\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/d/-/d-1.0.0.tgz\",\n      \"integrity\": \"sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=\",\n      \"requires\": {\n        \"es5-ext\": \"0.10.46\"\n      }\n    },\n    \"dashdash\": {\n      \"version\": \"1.14.1\",\n      \"resolved\": \"https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz\",\n      \"integrity\": \"sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=\",\n      \"requires\": {\n        \"assert-plus\": \"1.0.0\"\n      }\n    },\n    \"date-now\": {\n      \"version\": \"0.1.4\",\n      \"resolved\": \"https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz\",\n      \"integrity\": \"sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=\"\n    },\n    \"de-indent\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz\",\n      \"integrity\": \"sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=\"\n    },\n    \"debug\": {\n      \"version\": \"2.6.9\",\n      \"resolved\": \"https://registry.npmjs.org/debug/-/debug-2.6.9.tgz\",\n      \"integrity\": \"sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==\",\n      \"requires\": {\n        \"ms\": \"2.0.0\"\n      }\n    },\n    \"decamelize\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz\",\n      \"integrity\": \"sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=\"\n    },\n    \"decamelize-keys\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz\",\n      \"integrity\": \"sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=\",\n      \"requires\": {\n        \"decamelize\": \"1.2.0\",\n        \"map-obj\": \"1.0.1\"\n      },\n      \"dependencies\": {\n        \"map-obj\": {\n          \"version\": \"1.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz\",\n          \"integrity\": \"sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=\"\n        }\n      }\n    },\n    \"decode-uri-component\": {\n      \"version\": \"0.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz\",\n      \"integrity\": \"sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=\"\n    },\n    \"deep-eql\": {\n      \"version\": \"3.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz\",\n      \"integrity\": \"sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==\",\n      \"requires\": {\n        \"type-detect\": \"4.0.8\"\n      }\n    },\n    \"deep-is\": {\n      \"version\": \"0.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz\",\n      \"integrity\": \"sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=\"\n    },\n    \"defaults\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz\",\n      \"integrity\": \"sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=\",\n      \"requires\": {\n        \"clone\": \"1.0.4\"\n      }\n    },\n    \"define-properties\": {\n      \"version\": \"1.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz\",\n      \"integrity\": \"sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==\",\n      \"requires\": {\n        \"object-keys\": \"1.1.1\"\n      }\n    },\n    \"define-property\": {\n      \"version\": \"2.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz\",\n      \"integrity\": \"sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==\",\n      \"requires\": {\n        \"is-descriptor\": \"1.0.2\",\n        \"isobject\": \"3.0.1\"\n      },\n      \"dependencies\": {\n        \"is-accessor-descriptor\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz\",\n          \"integrity\": \"sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==\",\n          \"requires\": {\n            \"kind-of\": \"6.0.2\"\n          }\n        },\n        \"is-data-descriptor\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz\",\n          \"integrity\": \"sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==\",\n          \"requires\": {\n            \"kind-of\": \"6.0.2\"\n          }\n        },\n        \"is-descriptor\": {\n          \"version\": \"1.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz\",\n          \"integrity\": \"sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==\",\n          \"requires\": {\n            \"is-accessor-descriptor\": \"1.0.0\",\n            \"is-data-descriptor\": \"1.0.0\",\n            \"kind-of\": \"6.0.2\"\n          }\n        }\n      }\n    },\n    \"defined\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/defined/-/defined-1.0.0.tgz\",\n      \"integrity\": \"sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=\"\n    },\n    \"delayed-stream\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz\",\n      \"integrity\": \"sha1-3zrhmayt+31ECqrgsp4icrJOxhk=\"\n    },\n    \"depd\": {\n      \"version\": \"1.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/depd/-/depd-1.1.2.tgz\",\n      \"integrity\": \"sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=\"\n    },\n    \"des.js\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz\",\n      \"integrity\": \"sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=\",\n      \"requires\": {\n        \"inherits\": \"2.0.3\",\n        \"minimalistic-assert\": \"1.0.1\"\n      }\n    },\n    \"destroy\": {\n      \"version\": \"1.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz\",\n      \"integrity\": \"sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=\"\n    },\n    \"detect-indent\": {\n      \"version\": \"4.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz\",\n      \"integrity\": \"sha1-920GQ1LN9Docts5hnE7jqUdd4gg=\",\n      \"requires\": {\n        \"repeating\": \"2.0.1\"\n      }\n    },\n    \"diff\": {\n      \"version\": \"3.5.0\",\n      \"resolved\": \"https://registry.npmjs.org/diff/-/diff-3.5.0.tgz\",\n      \"integrity\": \"sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==\",\n      \"dev\": true\n    },\n    \"diffie-hellman\": {\n      \"version\": \"5.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz\",\n      \"integrity\": \"sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==\",\n      \"requires\": {\n        \"bn.js\": \"4.11.8\",\n        \"miller-rabin\": \"4.0.1\",\n        \"randombytes\": \"2.0.6\"\n      }\n    },\n    \"dir-glob\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz\",\n      \"integrity\": \"sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==\",\n      \"requires\": {\n        \"arrify\": \"1.0.1\",\n        \"path-type\": \"3.0.0\"\n      }\n    },\n    \"doctrine\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz\",\n      \"integrity\": \"sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==\",\n      \"dev\": true,\n      \"requires\": {\n        \"esutils\": \"2.0.2\"\n      }\n    },\n    \"dom-converter\": {\n      \"version\": \"0.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz\",\n      \"integrity\": \"sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==\",\n      \"requires\": {\n        \"utila\": \"0.4.0\"\n      }\n    },\n    \"dom-serializer\": {\n      \"version\": \"0.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz\",\n      \"integrity\": \"sha1-BzxpdUbOB4DOI75KKOKT5AvDDII=\",\n      \"requires\": {\n        \"domelementtype\": \"1.1.3\",\n        \"entities\": \"1.1.2\"\n      },\n      \"dependencies\": {\n        \"domelementtype\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/domelementtype/-/domelementtype-1.1.3.tgz\",\n          \"integrity\": \"sha1-vSh3PiZCiBrsUVRJJCmcXNgiGFs=\"\n        }\n      }\n    },\n    \"domain-browser\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz\",\n      \"integrity\": \"sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==\"\n    },\n    \"domelementtype\": {\n      \"version\": \"1.3.1\",\n      \"resolved\": \"https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz\",\n      \"integrity\": \"sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==\"\n    },\n    \"domhandler\": {\n      \"version\": \"2.4.2\",\n      \"resolved\": \"https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz\",\n      \"integrity\": \"sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==\",\n      \"requires\": {\n        \"domelementtype\": \"1.3.1\"\n      }\n    },\n    \"domutils\": {\n      \"version\": \"1.7.0\",\n      \"resolved\": \"https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz\",\n      \"integrity\": \"sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==\",\n      \"requires\": {\n        \"dom-serializer\": \"0.1.0\",\n        \"domelementtype\": \"1.3.1\"\n      }\n    },\n    \"dot-prop\": {\n      \"version\": \"5.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz\",\n      \"integrity\": \"sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==\",\n      \"requires\": {\n        \"is-obj\": \"2.0.0\"\n      }\n    },\n    \"duplexer\": {\n      \"version\": \"0.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz\",\n      \"integrity\": \"sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=\"\n    },\n    \"duplexify\": {\n      \"version\": \"3.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/duplexify/-/duplexify-3.6.1.tgz\",\n      \"integrity\": \"sha512-vM58DwdnKmty+FSPzT14K9JXb90H+j5emaR4KYbr2KTIz00WHGbWOe5ghQTx233ZCLZtrGDALzKwcjEtSt35mA==\",\n      \"requires\": {\n        \"end-of-stream\": \"1.4.1\",\n        \"inherits\": \"2.0.3\",\n        \"readable-stream\": \"2.3.6\",\n        \"stream-shift\": \"1.0.0\"\n      }\n    },\n    \"duplicate-package-checker-webpack-plugin\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/duplicate-package-checker-webpack-plugin/-/duplicate-package-checker-webpack-plugin-2.1.0.tgz\",\n      \"integrity\": \"sha512-Blok+Cb8zDavYQyeTtSkmNp/aiyRn5+JV/4EhDDH5VJChnyIzPhq+S5MyWnFpqpv8jNKmD3cXmXFEVU509pzXQ==\",\n      \"requires\": {\n        \"chalk\": \"2.4.2\",\n        \"find-root\": \"1.1.0\",\n        \"lodash\": \"4.17.11\",\n        \"semver\": \"5.6.0\"\n      }\n    },\n    \"ecc-jsbn\": {\n      \"version\": \"0.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz\",\n      \"integrity\": \"sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=\",\n      \"requires\": {\n        \"jsbn\": \"0.1.1\",\n        \"safer-buffer\": \"2.1.2\"\n      }\n    },\n    \"editorconfig\": {\n      \"version\": \"0.15.3\",\n      \"resolved\": \"https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.3.tgz\",\n      \"integrity\": \"sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==\",\n      \"requires\": {\n        \"commander\": \"2.20.3\",\n        \"lru-cache\": \"4.1.5\",\n        \"semver\": \"5.6.0\",\n        \"sigmund\": \"1.0.1\"\n      },\n      \"dependencies\": {\n        \"commander\": {\n          \"version\": \"2.20.3\",\n          \"resolved\": \"https://registry.npmjs.org/commander/-/commander-2.20.3.tgz\",\n          \"integrity\": \"sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==\"\n        }\n      }\n    },\n    \"ee-first\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz\",\n      \"integrity\": \"sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=\"\n    },\n    \"ejs\": {\n      \"version\": \"2.6.2\",\n      \"resolved\": \"https://registry.npmjs.org/ejs/-/ejs-2.6.2.tgz\",\n      \"integrity\": \"sha512-PcW2a0tyTuPHz3tWyYqtK6r1fZ3gp+3Sop8Ph+ZYN81Ob5rwmbHEzaqs10N3BEsaGTkh/ooniXK+WwszGlc2+Q==\"\n    },\n    \"electron-to-chromium\": {\n      \"version\": \"1.3.100\",\n      \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.100.tgz\",\n      \"integrity\": \"sha512-cEUzis2g/RatrVf8x26L8lK5VEls1AGnLHk6msluBUg/NTB4wcXzExTsGscFq+Vs4WBBU2zbLLySvD4C0C3hwg==\"\n    },\n    \"elliptic\": {\n      \"version\": \"6.4.1\",\n      \"resolved\": \"https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz\",\n      \"integrity\": \"sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==\",\n      \"requires\": {\n        \"bn.js\": \"4.11.8\",\n        \"brorand\": \"1.1.0\",\n        \"hash.js\": \"1.1.7\",\n        \"hmac-drbg\": \"1.0.1\",\n        \"inherits\": \"2.0.3\",\n        \"minimalistic-assert\": \"1.0.1\",\n        \"minimalistic-crypto-utils\": \"1.0.1\"\n      }\n    },\n    \"emoji-regex\": {\n      \"version\": \"7.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz\",\n      \"integrity\": \"sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==\"\n    },\n    \"emojis-list\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz\",\n      \"integrity\": \"sha1-TapNnbAPmBmIDHn6RXrlsJof04k=\"\n    },\n    \"encodeurl\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz\",\n      \"integrity\": \"sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=\"\n    },\n    \"end-of-stream\": {\n      \"version\": \"1.4.1\",\n      \"resolved\": \"https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz\",\n      \"integrity\": \"sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==\",\n      \"requires\": {\n        \"once\": \"1.4.0\"\n      }\n    },\n    \"enhanced-resolve\": {\n      \"version\": \"3.4.1\",\n      \"resolved\": \"https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz\",\n      \"integrity\": \"sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=\",\n      \"requires\": {\n        \"graceful-fs\": \"4.1.15\",\n        \"memory-fs\": \"0.4.1\",\n        \"object-assign\": \"4.1.1\",\n        \"tapable\": \"0.2.9\"\n      },\n      \"dependencies\": {\n        \"tapable\": {\n          \"version\": \"0.2.9\",\n          \"resolved\": \"https://registry.npmjs.org/tapable/-/tapable-0.2.9.tgz\",\n          \"integrity\": \"sha512-2wsvQ+4GwBvLPLWsNfLCDYGsW6xb7aeC6utq2Qh0PFwgEy7K7dsma9Jsmb2zSQj7GvYAyUGSntLtsv++GmgL1A==\"\n        }\n      }\n    },\n    \"entities\": {\n      \"version\": \"1.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/entities/-/entities-1.1.2.tgz\",\n      \"integrity\": \"sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==\"\n    },\n    \"envinfo\": {\n      \"version\": \"7.5.1\",\n      \"resolved\": \"https://registry.npmjs.org/envinfo/-/envinfo-7.5.1.tgz\",\n      \"integrity\": \"sha512-hQBkDf2iO4Nv0CNHpCuSBeaSrveU6nThVxFGTrq/eDlV716UQk09zChaJae4mZRsos1x4YLY2TaH3LHUae3ZmQ==\"\n    },\n    \"errno\": {\n      \"version\": \"0.1.7\",\n      \"resolved\": \"https://registry.npmjs.org/errno/-/errno-0.1.7.tgz\",\n      \"integrity\": \"sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==\",\n      \"requires\": {\n        \"prr\": \"1.0.1\"\n      }\n    },\n    \"error-ex\": {\n      \"version\": \"1.3.2\",\n      \"resolved\": \"https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz\",\n      \"integrity\": \"sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==\",\n      \"requires\": {\n        \"is-arrayish\": \"0.2.1\"\n      }\n    },\n    \"error-stack-parser\": {\n      \"version\": \"2.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.0.6.tgz\",\n      \"integrity\": \"sha512-d51brTeqC+BHlwF0BhPtcYgF5nlzf9ZZ0ZIUQNZpc9ZB9qw5IJ2diTrBY9jlCJkTLITYPjmiX6OWCwH+fuyNgQ==\",\n      \"requires\": {\n        \"stackframe\": \"1.2.0\"\n      }\n    },\n    \"es-abstract\": {\n      \"version\": \"1.18.0-next.1\",\n      \"resolved\": \"https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz\",\n      \"integrity\": \"sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==\",\n      \"requires\": {\n        \"es-to-primitive\": \"1.2.1\",\n        \"function-bind\": \"1.1.1\",\n        \"has\": \"1.0.3\",\n        \"has-symbols\": \"1.0.1\",\n        \"is-callable\": \"1.2.2\",\n        \"is-negative-zero\": \"2.0.0\",\n        \"is-regex\": \"1.1.1\",\n        \"object-inspect\": \"1.8.0\",\n        \"object-keys\": \"1.1.1\",\n        \"object.assign\": \"4.1.1\",\n        \"string.prototype.trimend\": \"1.0.2\",\n        \"string.prototype.trimstart\": \"1.0.2\"\n      }\n    },\n    \"es-to-primitive\": {\n      \"version\": \"1.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz\",\n      \"integrity\": \"sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==\",\n      \"requires\": {\n        \"is-callable\": \"1.2.2\",\n        \"is-date-object\": \"1.0.2\",\n        \"is-symbol\": \"1.0.3\"\n      }\n    },\n    \"es5-ext\": {\n      \"version\": \"0.10.46\",\n      \"resolved\": \"https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.46.tgz\",\n      \"integrity\": \"sha512-24XxRvJXNFwEMpJb3nOkiRJKRoupmjYmOPVlI65Qy2SrtxwOTB+g6ODjBKOtwEHbYrhWRty9xxOWLNdClT2djw==\",\n      \"requires\": {\n        \"es6-iterator\": \"2.0.3\",\n        \"es6-symbol\": \"3.1.1\",\n        \"next-tick\": \"1.0.0\"\n      }\n    },\n    \"es6-iterator\": {\n      \"version\": \"2.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz\",\n      \"integrity\": \"sha1-p96IkUGgWpSwhUQDstCg+/qY87c=\",\n      \"requires\": {\n        \"d\": \"1.0.0\",\n        \"es5-ext\": \"0.10.46\",\n        \"es6-symbol\": \"3.1.1\"\n      }\n    },\n    \"es6-map\": {\n      \"version\": \"0.1.5\",\n      \"resolved\": \"https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz\",\n      \"integrity\": \"sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=\",\n      \"requires\": {\n        \"d\": \"1.0.0\",\n        \"es5-ext\": \"0.10.46\",\n        \"es6-iterator\": \"2.0.3\",\n        \"es6-set\": \"0.1.5\",\n        \"es6-symbol\": \"3.1.1\",\n        \"event-emitter\": \"0.3.5\"\n      }\n    },\n    \"es6-set\": {\n      \"version\": \"0.1.5\",\n      \"resolved\": \"https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz\",\n      \"integrity\": \"sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=\",\n      \"requires\": {\n        \"d\": \"1.0.0\",\n        \"es5-ext\": \"0.10.46\",\n        \"es6-iterator\": \"2.0.3\",\n        \"es6-symbol\": \"3.1.1\",\n        \"event-emitter\": \"0.3.5\"\n      }\n    },\n    \"es6-symbol\": {\n      \"version\": \"3.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz\",\n      \"integrity\": \"sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=\",\n      \"requires\": {\n        \"d\": \"1.0.0\",\n        \"es5-ext\": \"0.10.46\"\n      }\n    },\n    \"es6-templates\": {\n      \"version\": \"0.2.3\",\n      \"resolved\": \"https://registry.npmjs.org/es6-templates/-/es6-templates-0.2.3.tgz\",\n      \"integrity\": \"sha1-XLmsn7He1usSOTQrgdeSu7QHjuQ=\",\n      \"requires\": {\n        \"recast\": \"0.11.23\",\n        \"through\": \"2.3.8\"\n      }\n    },\n    \"es6-weak-map\": {\n      \"version\": \"2.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz\",\n      \"integrity\": \"sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=\",\n      \"requires\": {\n        \"d\": \"1.0.0\",\n        \"es5-ext\": \"0.10.46\",\n        \"es6-iterator\": \"2.0.3\",\n        \"es6-symbol\": \"3.1.1\"\n      }\n    },\n    \"escalade\": {\n      \"version\": \"3.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz\",\n      \"integrity\": \"sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==\"\n    },\n    \"escape-html\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz\",\n      \"integrity\": \"sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=\"\n    },\n    \"escape-string-regexp\": {\n      \"version\": \"1.0.5\",\n      \"resolved\": \"https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz\",\n      \"integrity\": \"sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=\"\n    },\n    \"escodegen\": {\n      \"version\": \"1.14.3\",\n      \"resolved\": \"https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz\",\n      \"integrity\": \"sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==\",\n      \"requires\": {\n        \"esprima\": \"4.0.1\",\n        \"estraverse\": \"4.2.0\",\n        \"esutils\": \"2.0.2\",\n        \"optionator\": \"0.8.2\",\n        \"source-map\": \"0.6.1\"\n      }\n    },\n    \"escope\": {\n      \"version\": \"3.6.0\",\n      \"resolved\": \"https://registry.npmjs.org/escope/-/escope-3.6.0.tgz\",\n      \"integrity\": \"sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=\",\n      \"requires\": {\n        \"es6-map\": \"0.1.5\",\n        \"es6-weak-map\": \"2.0.2\",\n        \"esrecurse\": \"4.2.1\",\n        \"estraverse\": \"4.2.0\"\n      }\n    },\n    \"eslint\": {\n      \"version\": \"5.12.0\",\n      \"resolved\": \"https://registry.npmjs.org/eslint/-/eslint-5.12.0.tgz\",\n      \"integrity\": \"sha512-LntwyPxtOHrsJdcSwyQKVtHofPHdv+4+mFwEe91r2V13vqpM8yLr7b1sW+Oo/yheOPkWYsYlYJCkzlFAt8KV7g==\",\n      \"dev\": true,\n      \"requires\": {\n        \"@babel/code-frame\": \"7.0.0\",\n        \"ajv\": \"6.6.2\",\n        \"chalk\": \"2.4.2\",\n        \"cross-spawn\": \"6.0.5\",\n        \"debug\": \"4.1.1\",\n        \"doctrine\": \"2.1.0\",\n        \"eslint-scope\": \"4.0.0\",\n        \"eslint-utils\": \"1.3.1\",\n        \"eslint-visitor-keys\": \"1.0.0\",\n        \"espree\": \"5.0.0\",\n        \"esquery\": \"1.0.1\",\n        \"esutils\": \"2.0.2\",\n        \"file-entry-cache\": \"2.0.0\",\n        \"functional-red-black-tree\": \"1.0.1\",\n        \"glob\": \"7.1.2\",\n        \"globals\": \"11.10.0\",\n        \"ignore\": \"4.0.6\",\n        \"import-fresh\": \"3.0.0\",\n        \"imurmurhash\": \"0.1.4\",\n        \"inquirer\": \"6.2.1\",\n        \"js-yaml\": \"3.12.1\",\n        \"json-stable-stringify-without-jsonify\": \"1.0.1\",\n        \"levn\": \"0.3.0\",\n        \"lodash\": \"4.17.11\",\n        \"minimatch\": \"3.0.4\",\n        \"mkdirp\": \"0.5.1\",\n        \"natural-compare\": \"1.4.0\",\n        \"optionator\": \"0.8.2\",\n        \"path-is-inside\": \"1.0.2\",\n        \"pluralize\": \"7.0.0\",\n        \"progress\": \"2.0.3\",\n        \"regexpp\": \"2.0.1\",\n        \"semver\": \"5.6.0\",\n        \"strip-ansi\": \"4.0.0\",\n        \"strip-json-comments\": \"2.0.1\",\n        \"table\": \"5.1.1\",\n        \"text-table\": \"0.2.0\"\n      },\n      \"dependencies\": {\n        \"ansi-regex\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz\",\n          \"integrity\": \"sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==\",\n          \"dev\": true\n        },\n        \"cross-spawn\": {\n          \"version\": \"6.0.5\",\n          \"resolved\": \"https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz\",\n          \"integrity\": \"sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==\",\n          \"dev\": true,\n          \"requires\": {\n            \"nice-try\": \"1.0.5\",\n            \"path-key\": \"2.0.1\",\n            \"semver\": \"5.6.0\",\n            \"shebang-command\": \"1.2.0\",\n            \"which\": \"1.3.1\"\n          }\n        },\n        \"debug\": {\n          \"version\": \"4.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.1.1.tgz\",\n          \"integrity\": \"sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==\",\n          \"dev\": true,\n          \"requires\": {\n            \"ms\": \"2.1.1\"\n          }\n        },\n        \"globals\": {\n          \"version\": \"11.10.0\",\n          \"resolved\": \"https://registry.npmjs.org/globals/-/globals-11.10.0.tgz\",\n          \"integrity\": \"sha512-0GZF1RiPKU97IHUO5TORo9w1PwrH/NBPl+fS7oMLdaTRiYmYbwK4NWoZWrAdd0/abG9R2BU+OiwyQpTpE6pdfQ==\",\n          \"dev\": true\n        },\n        \"ignore\": {\n          \"version\": \"4.0.6\",\n          \"resolved\": \"https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz\",\n          \"integrity\": \"sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==\",\n          \"dev\": true\n        },\n        \"import-fresh\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz\",\n          \"integrity\": \"sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==\",\n          \"dev\": true,\n          \"requires\": {\n            \"parent-module\": \"1.0.0\",\n            \"resolve-from\": \"4.0.0\"\n          }\n        },\n        \"inquirer\": {\n          \"version\": \"6.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/inquirer/-/inquirer-6.2.1.tgz\",\n          \"integrity\": \"sha512-088kl3DRT2dLU5riVMKKr1DlImd6X7smDhpXUCkJDCKvTEJeRiXh0G132HG9u5a+6Ylw9plFRY7RuTnwohYSpg==\",\n          \"dev\": true,\n          \"requires\": {\n            \"ansi-escapes\": \"3.1.0\",\n            \"chalk\": \"2.4.2\",\n            \"cli-cursor\": \"2.1.0\",\n            \"cli-width\": \"2.2.0\",\n            \"external-editor\": \"3.0.3\",\n            \"figures\": \"2.0.0\",\n            \"lodash\": \"4.17.11\",\n            \"mute-stream\": \"0.0.7\",\n            \"run-async\": \"2.3.0\",\n            \"rxjs\": \"6.3.3\",\n            \"string-width\": \"2.1.1\",\n            \"strip-ansi\": \"5.0.0\",\n            \"through\": \"2.3.8\"\n          },\n          \"dependencies\": {\n            \"strip-ansi\": {\n              \"version\": \"5.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.0.0.tgz\",\n              \"integrity\": \"sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow==\",\n              \"dev\": true,\n              \"requires\": {\n                \"ansi-regex\": \"4.0.0\"\n              }\n            }\n          }\n        },\n        \"ms\": {\n          \"version\": \"2.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.1.tgz\",\n          \"integrity\": \"sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==\",\n          \"dev\": true\n        },\n        \"strip-ansi\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz\",\n          \"integrity\": \"sha1-qEeQIusaw2iocTibY1JixQXuNo8=\",\n          \"dev\": true,\n          \"requires\": {\n            \"ansi-regex\": \"3.0.0\"\n          },\n          \"dependencies\": {\n            \"ansi-regex\": {\n              \"version\": \"3.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz\",\n              \"integrity\": \"sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=\",\n              \"dev\": true\n            }\n          }\n        }\n      }\n    },\n    \"eslint-scope\": {\n      \"version\": \"4.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz\",\n      \"integrity\": \"sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==\",\n      \"dev\": true,\n      \"requires\": {\n        \"esrecurse\": \"4.2.1\",\n        \"estraverse\": \"4.2.0\"\n      }\n    },\n    \"eslint-utils\": {\n      \"version\": \"1.3.1\",\n      \"resolved\": \"https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz\",\n      \"integrity\": \"sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==\",\n      \"dev\": true\n    },\n    \"eslint-visitor-keys\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz\",\n      \"integrity\": \"sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==\",\n      \"dev\": true\n    },\n    \"espree\": {\n      \"version\": \"5.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/espree/-/espree-5.0.0.tgz\",\n      \"integrity\": \"sha512-1MpUfwsdS9MMoN7ZXqAr9e9UKdVHDcvrJpyx7mm1WuQlx/ygErEQBzgi5Nh5qBHIoYweprhtMkTCb9GhcAIcsA==\",\n      \"dev\": true,\n      \"requires\": {\n        \"acorn\": \"6.0.5\",\n        \"acorn-jsx\": \"5.0.1\",\n        \"eslint-visitor-keys\": \"1.0.0\"\n      },\n      \"dependencies\": {\n        \"acorn\": {\n          \"version\": \"6.0.5\",\n          \"resolved\": \"https://registry.npmjs.org/acorn/-/acorn-6.0.5.tgz\",\n          \"integrity\": \"sha512-i33Zgp3XWtmZBMNvCr4azvOFeWVw1Rk6p3hfi3LUDvIFraOMywb1kAtrbi+med14m4Xfpqm3zRZMT+c0FNE7kg==\",\n          \"dev\": true\n        }\n      }\n    },\n    \"esprima\": {\n      \"version\": \"4.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz\",\n      \"integrity\": \"sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==\"\n    },\n    \"esquery\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz\",\n      \"integrity\": \"sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==\",\n      \"dev\": true,\n      \"requires\": {\n        \"estraverse\": \"4.2.0\"\n      }\n    },\n    \"esrecurse\": {\n      \"version\": \"4.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz\",\n      \"integrity\": \"sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==\",\n      \"requires\": {\n        \"estraverse\": \"4.2.0\"\n      }\n    },\n    \"estraverse\": {\n      \"version\": \"4.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz\",\n      \"integrity\": \"sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=\"\n    },\n    \"esutils\": {\n      \"version\": \"2.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz\",\n      \"integrity\": \"sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=\"\n    },\n    \"etag\": {\n      \"version\": \"1.8.1\",\n      \"resolved\": \"https://registry.npmjs.org/etag/-/etag-1.8.1.tgz\",\n      \"integrity\": \"sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=\"\n    },\n    \"event-emitter\": {\n      \"version\": \"0.3.5\",\n      \"resolved\": \"https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz\",\n      \"integrity\": \"sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=\",\n      \"requires\": {\n        \"d\": \"1.0.0\",\n        \"es5-ext\": \"0.10.46\"\n      }\n    },\n    \"eventemitter3\": {\n      \"version\": \"4.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz\",\n      \"integrity\": \"sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==\"\n    },\n    \"events\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/events/-/events-1.1.1.tgz\",\n      \"integrity\": \"sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=\"\n    },\n    \"eventsource-polyfill\": {\n      \"version\": \"0.9.6\",\n      \"resolved\": \"https://registry.npmjs.org/eventsource-polyfill/-/eventsource-polyfill-0.9.6.tgz\",\n      \"integrity\": \"sha1-EODRh/ERsWfyj9q5GIQ859gY8Tw=\"\n    },\n    \"evp_bytestokey\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz\",\n      \"integrity\": \"sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==\",\n      \"requires\": {\n        \"md5.js\": \"1.3.5\",\n        \"safe-buffer\": \"5.1.2\"\n      }\n    },\n    \"execa\": {\n      \"version\": \"0.7.0\",\n      \"resolved\": \"https://registry.npmjs.org/execa/-/execa-0.7.0.tgz\",\n      \"integrity\": \"sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=\",\n      \"requires\": {\n        \"cross-spawn\": \"5.1.0\",\n        \"get-stream\": \"3.0.0\",\n        \"is-stream\": \"1.1.0\",\n        \"npm-run-path\": \"2.0.2\",\n        \"p-finally\": \"1.0.0\",\n        \"signal-exit\": \"3.0.2\",\n        \"strip-eof\": \"1.0.0\"\n      }\n    },\n    \"execall\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/execall/-/execall-1.0.0.tgz\",\n      \"integrity\": \"sha1-c9CQTjlbPKsGWLCNCewlMH8pu3M=\",\n      \"requires\": {\n        \"clone-regexp\": \"1.0.1\"\n      }\n    },\n    \"expand-brackets\": {\n      \"version\": \"2.1.4\",\n      \"resolved\": \"https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz\",\n      \"integrity\": \"sha1-t3c14xXOMPa27/D4OwQVGiJEliI=\",\n      \"requires\": {\n        \"debug\": \"2.6.9\",\n        \"define-property\": \"0.2.5\",\n        \"extend-shallow\": \"2.0.1\",\n        \"posix-character-classes\": \"0.1.1\",\n        \"regex-not\": \"1.0.2\",\n        \"snapdragon\": \"0.8.2\",\n        \"to-regex\": \"3.0.2\"\n      },\n      \"dependencies\": {\n        \"define-property\": {\n          \"version\": \"0.2.5\",\n          \"resolved\": \"https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz\",\n          \"integrity\": \"sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=\",\n          \"requires\": {\n            \"is-descriptor\": \"0.1.6\"\n          }\n        },\n        \"extend-shallow\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz\",\n          \"integrity\": \"sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=\",\n          \"requires\": {\n            \"is-extendable\": \"0.1.1\"\n          }\n        }\n      }\n    },\n    \"express\": {\n      \"version\": \"4.16.3\",\n      \"resolved\": \"https://registry.npmjs.org/express/-/express-4.16.3.tgz\",\n      \"integrity\": \"sha1-avilAjUNsyRuzEvs9rWjTSL37VM=\",\n      \"requires\": {\n        \"accepts\": \"1.3.5\",\n        \"array-flatten\": \"1.1.1\",\n        \"body-parser\": \"1.18.2\",\n        \"content-disposition\": \"0.5.2\",\n        \"content-type\": \"1.0.4\",\n        \"cookie\": \"0.3.1\",\n        \"cookie-signature\": \"1.0.6\",\n        \"debug\": \"2.6.9\",\n        \"depd\": \"1.1.2\",\n        \"encodeurl\": \"1.0.2\",\n        \"escape-html\": \"1.0.3\",\n        \"etag\": \"1.8.1\",\n        \"finalhandler\": \"1.1.1\",\n        \"fresh\": \"0.5.2\",\n        \"merge-descriptors\": \"1.0.1\",\n        \"methods\": \"1.1.2\",\n        \"on-finished\": \"2.3.0\",\n        \"parseurl\": \"1.3.2\",\n        \"path-to-regexp\": \"0.1.7\",\n        \"proxy-addr\": \"2.0.4\",\n        \"qs\": \"6.5.1\",\n        \"range-parser\": \"1.2.0\",\n        \"safe-buffer\": \"5.1.1\",\n        \"send\": \"0.16.2\",\n        \"serve-static\": \"1.13.2\",\n        \"setprototypeof\": \"1.1.0\",\n        \"statuses\": \"1.4.0\",\n        \"type-is\": \"1.6.16\",\n        \"utils-merge\": \"1.0.1\",\n        \"vary\": \"1.1.2\"\n      },\n      \"dependencies\": {\n        \"body-parser\": {\n          \"version\": \"1.18.2\",\n          \"resolved\": \"https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz\",\n          \"integrity\": \"sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=\",\n          \"requires\": {\n            \"bytes\": \"3.0.0\",\n            \"content-type\": \"1.0.4\",\n            \"debug\": \"2.6.9\",\n            \"depd\": \"1.1.2\",\n            \"http-errors\": \"1.6.3\",\n            \"iconv-lite\": \"0.4.19\",\n            \"on-finished\": \"2.3.0\",\n            \"qs\": \"6.5.1\",\n            \"raw-body\": \"2.3.2\",\n            \"type-is\": \"1.6.16\"\n          }\n        },\n        \"iconv-lite\": {\n          \"version\": \"0.4.19\",\n          \"resolved\": \"https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz\",\n          \"integrity\": \"sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==\"\n        },\n        \"qs\": {\n          \"version\": \"6.5.1\",\n          \"resolved\": \"https://registry.npmjs.org/qs/-/qs-6.5.1.tgz\",\n          \"integrity\": \"sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==\"\n        },\n        \"raw-body\": {\n          \"version\": \"2.3.2\",\n          \"resolved\": \"https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz\",\n          \"integrity\": \"sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=\",\n          \"requires\": {\n            \"bytes\": \"3.0.0\",\n            \"http-errors\": \"1.6.2\",\n            \"iconv-lite\": \"0.4.19\",\n            \"unpipe\": \"1.0.0\"\n          },\n          \"dependencies\": {\n            \"depd\": {\n              \"version\": \"1.1.1\",\n              \"resolved\": \"https://registry.npmjs.org/depd/-/depd-1.1.1.tgz\",\n              \"integrity\": \"sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=\"\n            },\n            \"http-errors\": {\n              \"version\": \"1.6.2\",\n              \"resolved\": \"https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz\",\n              \"integrity\": \"sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=\",\n              \"requires\": {\n                \"depd\": \"1.1.1\",\n                \"inherits\": \"2.0.3\",\n                \"setprototypeof\": \"1.0.3\",\n                \"statuses\": \"1.4.0\"\n              }\n            },\n            \"setprototypeof\": {\n              \"version\": \"1.0.3\",\n              \"resolved\": \"https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz\",\n              \"integrity\": \"sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=\"\n            }\n          }\n        },\n        \"safe-buffer\": {\n          \"version\": \"5.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz\",\n          \"integrity\": \"sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==\"\n        },\n        \"statuses\": {\n          \"version\": \"1.4.0\",\n          \"resolved\": \"https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz\",\n          \"integrity\": \"sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==\"\n        }\n      }\n    },\n    \"extend\": {\n      \"version\": \"3.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/extend/-/extend-3.0.2.tgz\",\n      \"integrity\": \"sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==\"\n    },\n    \"extend-shallow\": {\n      \"version\": \"3.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz\",\n      \"integrity\": \"sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=\",\n      \"requires\": {\n        \"assign-symbols\": \"1.0.0\",\n        \"is-extendable\": \"1.0.1\"\n      },\n      \"dependencies\": {\n        \"is-extendable\": {\n          \"version\": \"1.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz\",\n          \"integrity\": \"sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==\",\n          \"requires\": {\n            \"is-plain-object\": \"2.0.4\"\n          }\n        }\n      }\n    },\n    \"external-editor\": {\n      \"version\": \"3.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz\",\n      \"integrity\": \"sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==\",\n      \"requires\": {\n        \"chardet\": \"0.7.0\",\n        \"iconv-lite\": \"0.4.24\",\n        \"tmp\": \"0.0.33\"\n      },\n      \"dependencies\": {\n        \"iconv-lite\": {\n          \"version\": \"0.4.24\",\n          \"resolved\": \"https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz\",\n          \"integrity\": \"sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==\",\n          \"requires\": {\n            \"safer-buffer\": \"2.1.2\"\n          }\n        }\n      }\n    },\n    \"extglob\": {\n      \"version\": \"2.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz\",\n      \"integrity\": \"sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==\",\n      \"requires\": {\n        \"array-unique\": \"0.3.2\",\n        \"define-property\": \"1.0.0\",\n        \"expand-brackets\": \"2.1.4\",\n        \"extend-shallow\": \"2.0.1\",\n        \"fragment-cache\": \"0.2.1\",\n        \"regex-not\": \"1.0.2\",\n        \"snapdragon\": \"0.8.2\",\n        \"to-regex\": \"3.0.2\"\n      },\n      \"dependencies\": {\n        \"define-property\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz\",\n          \"integrity\": \"sha1-dp66rz9KY6rTr56NMEybvnm/sOY=\",\n          \"requires\": {\n            \"is-descriptor\": \"1.0.2\"\n          }\n        },\n        \"extend-shallow\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz\",\n          \"integrity\": \"sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=\",\n          \"requires\": {\n            \"is-extendable\": \"0.1.1\"\n          }\n        },\n        \"is-accessor-descriptor\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz\",\n          \"integrity\": \"sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==\",\n          \"requires\": {\n            \"kind-of\": \"6.0.2\"\n          }\n        },\n        \"is-data-descriptor\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz\",\n          \"integrity\": \"sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==\",\n          \"requires\": {\n            \"kind-of\": \"6.0.2\"\n          }\n        },\n        \"is-descriptor\": {\n          \"version\": \"1.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz\",\n          \"integrity\": \"sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==\",\n          \"requires\": {\n            \"is-accessor-descriptor\": \"1.0.0\",\n            \"is-data-descriptor\": \"1.0.0\",\n            \"kind-of\": \"6.0.2\"\n          }\n        }\n      }\n    },\n    \"extra-watch-webpack-plugin\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/extra-watch-webpack-plugin/-/extra-watch-webpack-plugin-1.0.3.tgz\",\n      \"integrity\": \"sha512-ZScQdMH6hNofRRN6QMQFg+aa5vqimfBgnPXmRDhdaLpttT6hrzpY9Oyren3Gh/FySPrgsvKCNbx/NFA7XNdIsg==\",\n      \"requires\": {\n        \"glob\": \"7.1.2\",\n        \"is-glob\": \"4.0.0\",\n        \"lodash.uniq\": \"4.5.0\",\n        \"schema-utils\": \"0.4.7\"\n      },\n      \"dependencies\": {\n        \"schema-utils\": {\n          \"version\": \"0.4.7\",\n          \"resolved\": \"https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz\",\n          \"integrity\": \"sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==\",\n          \"requires\": {\n            \"ajv\": \"6.6.2\",\n            \"ajv-keywords\": \"3.2.0\"\n          }\n        }\n      }\n    },\n    \"extsprintf\": {\n      \"version\": \"1.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz\",\n      \"integrity\": \"sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=\"\n    },\n    \"fast-deep-equal\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz\",\n      \"integrity\": \"sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=\"\n    },\n    \"fast-glob\": {\n      \"version\": \"2.2.7\",\n      \"resolved\": \"https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz\",\n      \"integrity\": \"sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==\",\n      \"requires\": {\n        \"@mrmlnc/readdir-enhanced\": \"2.2.1\",\n        \"@nodelib/fs.stat\": \"1.1.3\",\n        \"glob-parent\": \"3.1.0\",\n        \"is-glob\": \"4.0.0\",\n        \"merge2\": \"1.4.1\",\n        \"micromatch\": \"3.1.10\"\n      }\n    },\n    \"fast-json-stable-stringify\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz\",\n      \"integrity\": \"sha1-1RQsDK7msRifh9OnYREGT4bIu/I=\"\n    },\n    \"fast-levenshtein\": {\n      \"version\": \"2.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz\",\n      \"integrity\": \"sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=\"\n    },\n    \"fastparse\": {\n      \"version\": \"1.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/fastparse/-/fastparse-1.1.2.tgz\",\n      \"integrity\": \"sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ==\"\n    },\n    \"figures\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/figures/-/figures-2.0.0.tgz\",\n      \"integrity\": \"sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=\",\n      \"requires\": {\n        \"escape-string-regexp\": \"1.0.5\"\n      }\n    },\n    \"file-entry-cache\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz\",\n      \"integrity\": \"sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=\",\n      \"dev\": true,\n      \"requires\": {\n        \"flat-cache\": \"1.3.4\",\n        \"object-assign\": \"4.1.1\"\n      }\n    },\n    \"file-loader\": {\n      \"version\": \"1.1.11\",\n      \"resolved\": \"https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz\",\n      \"integrity\": \"sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==\",\n      \"requires\": {\n        \"loader-utils\": \"1.2.3\",\n        \"schema-utils\": \"0.4.7\"\n      },\n      \"dependencies\": {\n        \"schema-utils\": {\n          \"version\": \"0.4.7\",\n          \"resolved\": \"https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz\",\n          \"integrity\": \"sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==\",\n          \"requires\": {\n            \"ajv\": \"6.6.2\",\n            \"ajv-keywords\": \"3.2.0\"\n          }\n        }\n      }\n    },\n    \"filesize\": {\n      \"version\": \"3.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz\",\n      \"integrity\": \"sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==\"\n    },\n    \"fill-range\": {\n      \"version\": \"4.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz\",\n      \"integrity\": \"sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=\",\n      \"requires\": {\n        \"extend-shallow\": \"2.0.1\",\n        \"is-number\": \"3.0.0\",\n        \"repeat-string\": \"1.6.1\",\n        \"to-regex-range\": \"2.1.1\"\n      },\n      \"dependencies\": {\n        \"extend-shallow\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz\",\n          \"integrity\": \"sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=\",\n          \"requires\": {\n            \"is-extendable\": \"0.1.1\"\n          }\n        }\n      }\n    },\n    \"finalhandler\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz\",\n      \"integrity\": \"sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==\",\n      \"requires\": {\n        \"debug\": \"2.6.9\",\n        \"encodeurl\": \"1.0.2\",\n        \"escape-html\": \"1.0.3\",\n        \"on-finished\": \"2.3.0\",\n        \"parseurl\": \"1.3.2\",\n        \"statuses\": \"1.4.0\",\n        \"unpipe\": \"1.0.0\"\n      },\n      \"dependencies\": {\n        \"statuses\": {\n          \"version\": \"1.4.0\",\n          \"resolved\": \"https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz\",\n          \"integrity\": \"sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==\"\n        }\n      }\n    },\n    \"find-cache-dir\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz\",\n      \"integrity\": \"sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=\",\n      \"requires\": {\n        \"commondir\": \"1.0.1\",\n        \"make-dir\": \"1.3.0\",\n        \"pkg-dir\": \"2.0.0\"\n      }\n    },\n    \"find-root\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz\",\n      \"integrity\": \"sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==\"\n    },\n    \"find-up\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz\",\n      \"integrity\": \"sha1-RdG35QbHF93UgndaK3eSCjwMV6c=\",\n      \"requires\": {\n        \"locate-path\": \"2.0.0\"\n      }\n    },\n    \"flat-cache\": {\n      \"version\": \"1.3.4\",\n      \"resolved\": \"https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.4.tgz\",\n      \"integrity\": \"sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==\",\n      \"dev\": true,\n      \"requires\": {\n        \"circular-json\": \"0.3.3\",\n        \"graceful-fs\": \"4.1.15\",\n        \"rimraf\": \"2.6.3\",\n        \"write\": \"0.2.1\"\n      }\n    },\n    \"flatted\": {\n      \"version\": \"2.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz\",\n      \"integrity\": \"sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==\"\n    },\n    \"flatten\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz\",\n      \"integrity\": \"sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=\"\n    },\n    \"flush-write-stream\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.3.tgz\",\n      \"integrity\": \"sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw==\",\n      \"requires\": {\n        \"inherits\": \"2.0.3\",\n        \"readable-stream\": \"2.3.6\"\n      }\n    },\n    \"follow-redirects\": {\n      \"version\": \"1.11.0\",\n      \"resolved\": \"https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.11.0.tgz\",\n      \"integrity\": \"sha512-KZm0V+ll8PfBrKwMzdo5D13b1bur9Iq9Zd/RMmAoQQcl2PxxFml8cxXPaaPYVbV0RjNjq1CU7zIzAOqtUPudmA==\",\n      \"requires\": {\n        \"debug\": \"3.2.6\"\n      },\n      \"dependencies\": {\n        \"debug\": {\n          \"version\": \"3.2.6\",\n          \"resolved\": \"https://registry.npmjs.org/debug/-/debug-3.2.6.tgz\",\n          \"integrity\": \"sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==\",\n          \"requires\": {\n            \"ms\": \"2.1.2\"\n          }\n        },\n        \"ms\": {\n          \"version\": \"2.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.2.tgz\",\n          \"integrity\": \"sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==\"\n        }\n      }\n    },\n    \"for-in\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz\",\n      \"integrity\": \"sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=\"\n    },\n    \"for-own\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz\",\n      \"integrity\": \"sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=\",\n      \"requires\": {\n        \"for-in\": \"1.0.2\"\n      }\n    },\n    \"forever-agent\": {\n      \"version\": \"0.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz\",\n      \"integrity\": \"sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=\"\n    },\n    \"form-data\": {\n      \"version\": \"2.3.3\",\n      \"resolved\": \"https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz\",\n      \"integrity\": \"sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==\",\n      \"optional\": true,\n      \"requires\": {\n        \"asynckit\": \"0.4.0\",\n        \"combined-stream\": \"1.0.7\",\n        \"mime-types\": \"2.1.21\"\n      }\n    },\n    \"forwarded\": {\n      \"version\": \"0.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz\",\n      \"integrity\": \"sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=\"\n    },\n    \"fragment-cache\": {\n      \"version\": \"0.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz\",\n      \"integrity\": \"sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=\",\n      \"requires\": {\n        \"map-cache\": \"0.2.2\"\n      }\n    },\n    \"fresh\": {\n      \"version\": \"0.5.2\",\n      \"resolved\": \"https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz\",\n      \"integrity\": \"sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=\"\n    },\n    \"from2\": {\n      \"version\": \"2.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/from2/-/from2-2.3.0.tgz\",\n      \"integrity\": \"sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=\",\n      \"requires\": {\n        \"inherits\": \"2.0.3\",\n        \"readable-stream\": \"2.3.6\"\n      }\n    },\n    \"fs-extra\": {\n      \"version\": \"6.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz\",\n      \"integrity\": \"sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==\",\n      \"requires\": {\n        \"graceful-fs\": \"4.1.15\",\n        \"jsonfile\": \"4.0.0\",\n        \"universalify\": \"0.1.2\"\n      }\n    },\n    \"fs-write-stream-atomic\": {\n      \"version\": \"1.0.10\",\n      \"resolved\": \"https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz\",\n      \"integrity\": \"sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=\",\n      \"requires\": {\n        \"graceful-fs\": \"4.1.15\",\n        \"iferr\": \"0.1.5\",\n        \"imurmurhash\": \"0.1.4\",\n        \"readable-stream\": \"2.3.6\"\n      }\n    },\n    \"fs.realpath\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz\",\n      \"integrity\": \"sha1-FQStJSMVjKpA20onh8sBQRmU6k8=\"\n    },\n    \"fsevents\": {\n      \"version\": \"1.2.4\",\n      \"resolved\": \"https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz\",\n      \"integrity\": \"sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==\",\n      \"optional\": true,\n      \"requires\": {\n        \"nan\": \"2.13.2\",\n        \"node-pre-gyp\": \"0.10.0\"\n      },\n      \"dependencies\": {\n        \"abbrev\": {\n          \"version\": \"1.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz\",\n          \"integrity\": \"sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==\",\n          \"optional\": true\n        },\n        \"ansi-regex\": {\n          \"version\": \"2.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz\",\n          \"integrity\": \"sha1-w7M6te42DYbg5ijwRorn7yfWVN8=\"\n        },\n        \"aproba\": {\n          \"version\": \"1.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz\",\n          \"integrity\": \"sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==\",\n          \"optional\": true\n        },\n        \"are-we-there-yet\": {\n          \"version\": \"1.1.4\",\n          \"resolved\": \"https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz\",\n          \"integrity\": \"sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=\",\n          \"optional\": true,\n          \"requires\": {\n            \"delegates\": \"1.0.0\",\n            \"readable-stream\": \"2.3.6\"\n          }\n        },\n        \"balanced-match\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz\",\n          \"integrity\": \"sha1-ibTRmasr7kneFk6gK4nORi1xt2c=\"\n        },\n        \"brace-expansion\": {\n          \"version\": \"1.1.11\",\n          \"resolved\": \"https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz\",\n          \"integrity\": \"sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==\",\n          \"requires\": {\n            \"balanced-match\": \"1.0.0\",\n            \"concat-map\": \"0.0.1\"\n          }\n        },\n        \"chownr\": {\n          \"version\": \"1.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz\",\n          \"integrity\": \"sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=\",\n          \"optional\": true\n        },\n        \"code-point-at\": {\n          \"version\": \"1.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz\",\n          \"integrity\": \"sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=\"\n        },\n        \"concat-map\": {\n          \"version\": \"0.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz\",\n          \"integrity\": \"sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=\"\n        },\n        \"console-control-strings\": {\n          \"version\": \"1.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz\",\n          \"integrity\": \"sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=\"\n        },\n        \"core-util-is\": {\n          \"version\": \"1.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz\",\n          \"integrity\": \"sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=\",\n          \"optional\": true\n        },\n        \"debug\": {\n          \"version\": \"2.6.9\",\n          \"resolved\": \"https://registry.npmjs.org/debug/-/debug-2.6.9.tgz\",\n          \"integrity\": \"sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==\",\n          \"optional\": true,\n          \"requires\": {\n            \"ms\": \"2.0.0\"\n          }\n        },\n        \"deep-extend\": {\n          \"version\": \"0.5.1\",\n          \"resolved\": \"https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz\",\n          \"integrity\": \"sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==\",\n          \"optional\": true\n        },\n        \"delegates\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz\",\n          \"integrity\": \"sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=\",\n          \"optional\": true\n        },\n        \"detect-libc\": {\n          \"version\": \"1.0.3\",\n          \"resolved\": \"https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz\",\n          \"integrity\": \"sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=\",\n          \"optional\": true\n        },\n        \"fs-minipass\": {\n          \"version\": \"1.2.5\",\n          \"resolved\": \"https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz\",\n          \"integrity\": \"sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==\",\n          \"optional\": true,\n          \"requires\": {\n            \"minipass\": \"2.2.4\"\n          }\n        },\n        \"fs.realpath\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz\",\n          \"integrity\": \"sha1-FQStJSMVjKpA20onh8sBQRmU6k8=\",\n          \"optional\": true\n        },\n        \"gauge\": {\n          \"version\": \"2.7.4\",\n          \"resolved\": \"https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz\",\n          \"integrity\": \"sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=\",\n          \"optional\": true,\n          \"requires\": {\n            \"aproba\": \"1.2.0\",\n            \"console-control-strings\": \"1.1.0\",\n            \"has-unicode\": \"2.0.1\",\n            \"object-assign\": \"4.1.1\",\n            \"signal-exit\": \"3.0.2\",\n            \"string-width\": \"1.0.2\",\n            \"strip-ansi\": \"3.0.1\",\n            \"wide-align\": \"1.1.2\"\n          }\n        },\n        \"glob\": {\n          \"version\": \"7.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/glob/-/glob-7.1.2.tgz\",\n          \"integrity\": \"sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==\",\n          \"optional\": true,\n          \"requires\": {\n            \"fs.realpath\": \"1.0.0\",\n            \"inflight\": \"1.0.6\",\n            \"inherits\": \"2.0.3\",\n            \"minimatch\": \"3.0.4\",\n            \"once\": \"1.4.0\",\n            \"path-is-absolute\": \"1.0.1\"\n          }\n        },\n        \"has-unicode\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz\",\n          \"integrity\": \"sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=\",\n          \"optional\": true\n        },\n        \"iconv-lite\": {\n          \"version\": \"0.4.21\",\n          \"resolved\": \"https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.21.tgz\",\n          \"integrity\": \"sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==\",\n          \"optional\": true,\n          \"requires\": {\n            \"safer-buffer\": \"2.1.2\"\n          }\n        },\n        \"ignore-walk\": {\n          \"version\": \"3.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz\",\n          \"integrity\": \"sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==\",\n          \"optional\": true,\n          \"requires\": {\n            \"minimatch\": \"3.0.4\"\n          }\n        },\n        \"inflight\": {\n          \"version\": \"1.0.6\",\n          \"resolved\": \"https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz\",\n          \"integrity\": \"sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=\",\n          \"optional\": true,\n          \"requires\": {\n            \"once\": \"1.4.0\",\n            \"wrappy\": \"1.0.2\"\n          }\n        },\n        \"inherits\": {\n          \"version\": \"2.0.3\",\n          \"resolved\": \"https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz\",\n          \"integrity\": \"sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=\"\n        },\n        \"ini\": {\n          \"version\": \"1.3.5\",\n          \"resolved\": \"https://registry.npmjs.org/ini/-/ini-1.3.5.tgz\",\n          \"integrity\": \"sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==\",\n          \"optional\": true\n        },\n        \"is-fullwidth-code-point\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz\",\n          \"integrity\": \"sha1-754xOG8DGn8NZDr4L95QxFfvAMs=\",\n          \"requires\": {\n            \"number-is-nan\": \"1.0.1\"\n          }\n        },\n        \"isarray\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz\",\n          \"integrity\": \"sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=\",\n          \"optional\": true\n        },\n        \"minimatch\": {\n          \"version\": \"3.0.4\",\n          \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz\",\n          \"integrity\": \"sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==\",\n          \"requires\": {\n            \"brace-expansion\": \"1.1.11\"\n          }\n        },\n        \"minimist\": {\n          \"version\": \"0.0.8\",\n          \"resolved\": \"https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz\",\n          \"integrity\": \"sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=\"\n        },\n        \"minipass\": {\n          \"version\": \"2.2.4\",\n          \"resolved\": \"https://registry.npmjs.org/minipass/-/minipass-2.2.4.tgz\",\n          \"integrity\": \"sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==\",\n          \"requires\": {\n            \"safe-buffer\": \"5.1.1\",\n            \"yallist\": \"3.0.2\"\n          }\n        },\n        \"minizlib\": {\n          \"version\": \"1.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz\",\n          \"integrity\": \"sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==\",\n          \"optional\": true,\n          \"requires\": {\n            \"minipass\": \"2.2.4\"\n          }\n        },\n        \"mkdirp\": {\n          \"version\": \"0.5.1\",\n          \"resolved\": \"https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz\",\n          \"integrity\": \"sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=\",\n          \"requires\": {\n            \"minimist\": \"0.0.8\"\n          }\n        },\n        \"ms\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.0.0.tgz\",\n          \"integrity\": \"sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=\",\n          \"optional\": true\n        },\n        \"needle\": {\n          \"version\": \"2.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/needle/-/needle-2.2.0.tgz\",\n          \"integrity\": \"sha512-eFagy6c+TYayorXw/qtAdSvaUpEbBsDwDyxYFgLZ0lTojfH7K+OdBqAF7TAFwDokJaGpubpSGG0wO3iC0XPi8w==\",\n          \"optional\": true,\n          \"requires\": {\n            \"debug\": \"2.6.9\",\n            \"iconv-lite\": \"0.4.21\",\n            \"sax\": \"1.2.4\"\n          }\n        },\n        \"node-pre-gyp\": {\n          \"version\": \"0.10.0\",\n          \"resolved\": \"https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.10.0.tgz\",\n          \"integrity\": \"sha512-G7kEonQLRbcA/mOoFoxvlMrw6Q6dPf92+t/l0DFSMuSlDoWaI9JWIyPwK0jyE1bph//CUEL65/Fz1m2vJbmjQQ==\",\n          \"optional\": true,\n          \"requires\": {\n            \"detect-libc\": \"1.0.3\",\n            \"mkdirp\": \"0.5.1\",\n            \"needle\": \"2.2.0\",\n            \"nopt\": \"4.0.1\",\n            \"npm-packlist\": \"1.1.10\",\n            \"npmlog\": \"4.1.2\",\n            \"rc\": \"1.2.7\",\n            \"rimraf\": \"2.6.2\",\n            \"semver\": \"5.5.0\",\n            \"tar\": \"4.4.1\"\n          }\n        },\n        \"nopt\": {\n          \"version\": \"4.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz\",\n          \"integrity\": \"sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=\",\n          \"optional\": true,\n          \"requires\": {\n            \"abbrev\": \"1.1.1\",\n            \"osenv\": \"0.1.5\"\n          }\n        },\n        \"npm-bundled\": {\n          \"version\": \"1.0.3\",\n          \"resolved\": \"https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.3.tgz\",\n          \"integrity\": \"sha512-ByQ3oJ/5ETLyglU2+8dBObvhfWXX8dtPZDMePCahptliFX2iIuhyEszyFk401PZUNQH20vvdW5MLjJxkwU80Ow==\",\n          \"optional\": true\n        },\n        \"npm-packlist\": {\n          \"version\": \"1.1.10\",\n          \"resolved\": \"https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.1.10.tgz\",\n          \"integrity\": \"sha512-AQC0Dyhzn4EiYEfIUjCdMl0JJ61I2ER9ukf/sLxJUcZHfo+VyEfz2rMJgLZSS1v30OxPQe1cN0LZA1xbcaVfWA==\",\n          \"optional\": true,\n          \"requires\": {\n            \"ignore-walk\": \"3.0.1\",\n            \"npm-bundled\": \"1.0.3\"\n          }\n        },\n        \"npmlog\": {\n          \"version\": \"4.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz\",\n          \"integrity\": \"sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==\",\n          \"optional\": true,\n          \"requires\": {\n            \"are-we-there-yet\": \"1.1.4\",\n            \"console-control-strings\": \"1.1.0\",\n            \"gauge\": \"2.7.4\",\n            \"set-blocking\": \"2.0.0\"\n          }\n        },\n        \"number-is-nan\": {\n          \"version\": \"1.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz\",\n          \"integrity\": \"sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=\"\n        },\n        \"object-assign\": {\n          \"version\": \"4.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz\",\n          \"integrity\": \"sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=\",\n          \"optional\": true\n        },\n        \"once\": {\n          \"version\": \"1.4.0\",\n          \"resolved\": \"https://registry.npmjs.org/once/-/once-1.4.0.tgz\",\n          \"integrity\": \"sha1-WDsap3WWHUsROsF9nFC6753Xa9E=\",\n          \"requires\": {\n            \"wrappy\": \"1.0.2\"\n          }\n        },\n        \"os-homedir\": {\n          \"version\": \"1.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz\",\n          \"integrity\": \"sha1-/7xJiDNuDoM94MFox+8VISGqf7M=\",\n          \"optional\": true\n        },\n        \"os-tmpdir\": {\n          \"version\": \"1.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz\",\n          \"integrity\": \"sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=\",\n          \"optional\": true\n        },\n        \"osenv\": {\n          \"version\": \"0.1.5\",\n          \"resolved\": \"https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz\",\n          \"integrity\": \"sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==\",\n          \"optional\": true,\n          \"requires\": {\n            \"os-homedir\": \"1.0.2\",\n            \"os-tmpdir\": \"1.0.2\"\n          }\n        },\n        \"path-is-absolute\": {\n          \"version\": \"1.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz\",\n          \"integrity\": \"sha1-F0uSaHNVNP+8es5r9TpanhtcX18=\",\n          \"optional\": true\n        },\n        \"process-nextick-args\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz\",\n          \"integrity\": \"sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==\",\n          \"optional\": true\n        },\n        \"rc\": {\n          \"version\": \"1.2.7\",\n          \"resolved\": \"https://registry.npmjs.org/rc/-/rc-1.2.7.tgz\",\n          \"integrity\": \"sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==\",\n          \"optional\": true,\n          \"requires\": {\n            \"deep-extend\": \"0.5.1\",\n            \"ini\": \"1.3.5\",\n            \"minimist\": \"1.2.0\",\n            \"strip-json-comments\": \"2.0.1\"\n          },\n          \"dependencies\": {\n            \"minimist\": {\n              \"version\": \"1.2.0\",\n              \"resolved\": \"https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz\",\n              \"integrity\": \"sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=\",\n              \"optional\": true\n            }\n          }\n        },\n        \"readable-stream\": {\n          \"version\": \"2.3.6\",\n          \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz\",\n          \"integrity\": \"sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==\",\n          \"optional\": true,\n          \"requires\": {\n            \"core-util-is\": \"1.0.2\",\n            \"inherits\": \"2.0.3\",\n            \"isarray\": \"1.0.0\",\n            \"process-nextick-args\": \"2.0.0\",\n            \"safe-buffer\": \"5.1.1\",\n            \"string_decoder\": \"1.1.1\",\n            \"util-deprecate\": \"1.0.2\"\n          }\n        },\n        \"rimraf\": {\n          \"version\": \"2.6.2\",\n          \"resolved\": \"https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz\",\n          \"integrity\": \"sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==\",\n          \"optional\": true,\n          \"requires\": {\n            \"glob\": \"7.1.2\"\n          }\n        },\n        \"safe-buffer\": {\n          \"version\": \"5.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz\",\n          \"integrity\": \"sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==\"\n        },\n        \"safer-buffer\": {\n          \"version\": \"2.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz\",\n          \"integrity\": \"sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==\",\n          \"optional\": true\n        },\n        \"sax\": {\n          \"version\": \"1.2.4\",\n          \"resolved\": \"https://registry.npmjs.org/sax/-/sax-1.2.4.tgz\",\n          \"integrity\": \"sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==\",\n          \"optional\": true\n        },\n        \"semver\": {\n          \"version\": \"5.5.0\",\n          \"resolved\": \"https://registry.npmjs.org/semver/-/semver-5.5.0.tgz\",\n          \"integrity\": \"sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==\",\n          \"optional\": true\n        },\n        \"set-blocking\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz\",\n          \"integrity\": \"sha1-BF+XgtARrppoA93TgrJDkrPYkPc=\",\n          \"optional\": true\n        },\n        \"signal-exit\": {\n          \"version\": \"3.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz\",\n          \"integrity\": \"sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=\",\n          \"optional\": true\n        },\n        \"string-width\": {\n          \"version\": \"1.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz\",\n          \"integrity\": \"sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=\",\n          \"requires\": {\n            \"code-point-at\": \"1.1.0\",\n            \"is-fullwidth-code-point\": \"1.0.0\",\n            \"strip-ansi\": \"3.0.1\"\n          }\n        },\n        \"string_decoder\": {\n          \"version\": \"1.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz\",\n          \"integrity\": \"sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==\",\n          \"optional\": true,\n          \"requires\": {\n            \"safe-buffer\": \"5.1.1\"\n          }\n        },\n        \"strip-ansi\": {\n          \"version\": \"3.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz\",\n          \"integrity\": \"sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=\",\n          \"requires\": {\n            \"ansi-regex\": \"2.1.1\"\n          }\n        },\n        \"strip-json-comments\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz\",\n          \"integrity\": \"sha1-PFMZQukIwml8DsNEhYwobHygpgo=\",\n          \"optional\": true\n        },\n        \"tar\": {\n          \"version\": \"4.4.1\",\n          \"resolved\": \"https://registry.npmjs.org/tar/-/tar-4.4.1.tgz\",\n          \"integrity\": \"sha512-O+v1r9yN4tOsvl90p5HAP4AEqbYhx4036AGMm075fH9F8Qwi3oJ+v4u50FkT/KkvywNGtwkk0zRI+8eYm1X/xg==\",\n          \"optional\": true,\n          \"requires\": {\n            \"chownr\": \"1.0.1\",\n            \"fs-minipass\": \"1.2.5\",\n            \"minipass\": \"2.2.4\",\n            \"minizlib\": \"1.1.0\",\n            \"mkdirp\": \"0.5.1\",\n            \"safe-buffer\": \"5.1.1\",\n            \"yallist\": \"3.0.2\"\n          }\n        },\n        \"util-deprecate\": {\n          \"version\": \"1.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz\",\n          \"integrity\": \"sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=\",\n          \"optional\": true\n        },\n        \"wide-align\": {\n          \"version\": \"1.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz\",\n          \"integrity\": \"sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==\",\n          \"optional\": true,\n          \"requires\": {\n            \"string-width\": \"1.0.2\"\n          }\n        },\n        \"wrappy\": {\n          \"version\": \"1.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz\",\n          \"integrity\": \"sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=\"\n        },\n        \"yallist\": {\n          \"version\": \"3.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz\",\n          \"integrity\": \"sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=\"\n        }\n      }\n    },\n    \"function-bind\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz\",\n      \"integrity\": \"sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==\"\n    },\n    \"functional-red-black-tree\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz\",\n      \"integrity\": \"sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=\",\n      \"dev\": true\n    },\n    \"generate-function\": {\n      \"version\": \"2.3.1\",\n      \"resolved\": \"https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz\",\n      \"integrity\": \"sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==\",\n      \"dev\": true,\n      \"requires\": {\n        \"is-property\": \"1.0.2\"\n      }\n    },\n    \"generate-object-property\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz\",\n      \"integrity\": \"sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=\",\n      \"dev\": true,\n      \"requires\": {\n        \"is-property\": \"1.0.2\"\n      }\n    },\n    \"gensync\": {\n      \"version\": \"1.0.0-beta.1\",\n      \"resolved\": \"https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz\",\n      \"integrity\": \"sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==\"\n    },\n    \"get-caller-file\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz\",\n      \"integrity\": \"sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==\"\n    },\n    \"get-func-name\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz\",\n      \"integrity\": \"sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=\"\n    },\n    \"get-stdin\": {\n      \"version\": \"6.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz\",\n      \"integrity\": \"sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==\"\n    },\n    \"get-stream\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz\",\n      \"integrity\": \"sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=\"\n    },\n    \"get-value\": {\n      \"version\": \"2.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz\",\n      \"integrity\": \"sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=\"\n    },\n    \"getpass\": {\n      \"version\": \"0.1.7\",\n      \"resolved\": \"https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz\",\n      \"integrity\": \"sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=\",\n      \"requires\": {\n        \"assert-plus\": \"1.0.0\"\n      }\n    },\n    \"glob\": {\n      \"version\": \"7.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/glob/-/glob-7.1.2.tgz\",\n      \"integrity\": \"sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==\",\n      \"requires\": {\n        \"fs.realpath\": \"1.0.0\",\n        \"inflight\": \"1.0.6\",\n        \"inherits\": \"2.0.3\",\n        \"minimatch\": \"3.0.4\",\n        \"once\": \"1.4.0\",\n        \"path-is-absolute\": \"1.0.1\"\n      }\n    },\n    \"glob-parent\": {\n      \"version\": \"3.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz\",\n      \"integrity\": \"sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=\",\n      \"requires\": {\n        \"is-glob\": \"3.1.0\",\n        \"path-dirname\": \"1.0.2\"\n      },\n      \"dependencies\": {\n        \"is-glob\": {\n          \"version\": \"3.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz\",\n          \"integrity\": \"sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=\",\n          \"requires\": {\n            \"is-extglob\": \"2.1.1\"\n          }\n        }\n      }\n    },\n    \"glob-to-regexp\": {\n      \"version\": \"0.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz\",\n      \"integrity\": \"sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=\"\n    },\n    \"glob-watcher\": {\n      \"version\": \"5.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.3.tgz\",\n      \"integrity\": \"sha512-8tWsULNEPHKQ2MR4zXuzSmqbdyV5PtwwCaWSGQ1WwHsJ07ilNeN1JB8ntxhckbnpSHaf9dXFUHzIWvm1I13dsg==\",\n      \"requires\": {\n        \"anymatch\": \"2.0.0\",\n        \"async-done\": \"1.3.1\",\n        \"chokidar\": \"2.0.4\",\n        \"is-negated-glob\": \"1.0.0\",\n        \"just-debounce\": \"1.0.0\",\n        \"object.defaults\": \"1.1.0\"\n      }\n    },\n    \"global-modules\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz\",\n      \"integrity\": \"sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==\",\n      \"requires\": {\n        \"global-prefix\": \"3.0.0\"\n      }\n    },\n    \"global-prefix\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz\",\n      \"integrity\": \"sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==\",\n      \"requires\": {\n        \"ini\": \"1.3.5\",\n        \"kind-of\": \"6.0.2\",\n        \"which\": \"1.3.1\"\n      }\n    },\n    \"globals\": {\n      \"version\": \"9.18.0\",\n      \"resolved\": \"https://registry.npmjs.org/globals/-/globals-9.18.0.tgz\",\n      \"integrity\": \"sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==\"\n    },\n    \"globby\": {\n      \"version\": \"9.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/globby/-/globby-9.2.0.tgz\",\n      \"integrity\": \"sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==\",\n      \"requires\": {\n        \"@types/glob\": \"7.1.3\",\n        \"array-union\": \"1.0.2\",\n        \"dir-glob\": \"2.2.2\",\n        \"fast-glob\": \"2.2.7\",\n        \"glob\": \"7.1.6\",\n        \"ignore\": \"4.0.6\",\n        \"pify\": \"4.0.1\",\n        \"slash\": \"2.0.0\"\n      },\n      \"dependencies\": {\n        \"dir-glob\": {\n          \"version\": \"2.2.2\",\n          \"resolved\": \"https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz\",\n          \"integrity\": \"sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==\",\n          \"requires\": {\n            \"path-type\": \"3.0.0\"\n          }\n        },\n        \"glob\": {\n          \"version\": \"7.1.6\",\n          \"resolved\": \"https://registry.npmjs.org/glob/-/glob-7.1.6.tgz\",\n          \"integrity\": \"sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==\",\n          \"requires\": {\n            \"fs.realpath\": \"1.0.0\",\n            \"inflight\": \"1.0.6\",\n            \"inherits\": \"2.0.3\",\n            \"minimatch\": \"3.0.4\",\n            \"once\": \"1.4.0\",\n            \"path-is-absolute\": \"1.0.1\"\n          }\n        },\n        \"ignore\": {\n          \"version\": \"4.0.6\",\n          \"resolved\": \"https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz\",\n          \"integrity\": \"sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==\"\n        },\n        \"pify\": {\n          \"version\": \"4.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/pify/-/pify-4.0.1.tgz\",\n          \"integrity\": \"sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==\"\n        },\n        \"slash\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/slash/-/slash-2.0.0.tgz\",\n          \"integrity\": \"sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==\"\n        }\n      }\n    },\n    \"globjoin\": {\n      \"version\": \"0.1.4\",\n      \"resolved\": \"https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz\",\n      \"integrity\": \"sha1-L0SUrIkZ43Z8XLtpHp9GMyQoXUM=\"\n    },\n    \"gonzales-pe\": {\n      \"version\": \"4.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/gonzales-pe/-/gonzales-pe-4.3.0.tgz\",\n      \"integrity\": \"sha512-otgSPpUmdWJ43VXyiNgEYE4luzHCL2pz4wQ0OnDluC6Eg4Ko3Vexy/SrSynglw/eR+OhkzmqFCZa/OFa/RgAOQ==\",\n      \"requires\": {\n        \"minimist\": \"1.2.5\"\n      },\n      \"dependencies\": {\n        \"minimist\": {\n          \"version\": \"1.2.5\",\n          \"resolved\": \"https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz\",\n          \"integrity\": \"sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==\"\n        }\n      }\n    },\n    \"graceful-fs\": {\n      \"version\": \"4.1.15\",\n      \"resolved\": \"https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz\",\n      \"integrity\": \"sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==\"\n    },\n    \"growl\": {\n      \"version\": \"1.10.5\",\n      \"resolved\": \"https://registry.npmjs.org/growl/-/growl-1.10.5.tgz\",\n      \"integrity\": \"sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==\",\n      \"dev\": true\n    },\n    \"gzip-size\": {\n      \"version\": \"4.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/gzip-size/-/gzip-size-4.1.0.tgz\",\n      \"integrity\": \"sha1-iuCWJX6r59acRb4rZ8RIEk/7UXw=\",\n      \"requires\": {\n        \"duplexer\": \"0.1.1\",\n        \"pify\": \"3.0.0\"\n      }\n    },\n    \"handlebars\": {\n      \"version\": \"4.0.12\",\n      \"resolved\": \"https://registry.npmjs.org/handlebars/-/handlebars-4.0.12.tgz\",\n      \"integrity\": \"sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA==\",\n      \"dev\": true,\n      \"requires\": {\n        \"async\": \"2.6.1\",\n        \"optimist\": \"0.6.1\",\n        \"source-map\": \"0.6.1\",\n        \"uglify-js\": \"3.4.9\"\n      }\n    },\n    \"har-schema\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz\",\n      \"integrity\": \"sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=\",\n      \"optional\": true\n    },\n    \"har-validator\": {\n      \"version\": \"5.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz\",\n      \"integrity\": \"sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==\",\n      \"optional\": true,\n      \"requires\": {\n        \"ajv\": \"6.6.2\",\n        \"har-schema\": \"2.0.0\"\n      }\n    },\n    \"has\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/has/-/has-1.0.3.tgz\",\n      \"integrity\": \"sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==\",\n      \"requires\": {\n        \"function-bind\": \"1.1.1\"\n      }\n    },\n    \"has-ansi\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz\",\n      \"integrity\": \"sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=\",\n      \"requires\": {\n        \"ansi-regex\": \"2.1.1\"\n      }\n    },\n    \"has-flag\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz\",\n      \"integrity\": \"sha1-tdRU3CGZriJWmfNGfloH87lVuv0=\"\n    },\n    \"has-symbols\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz\",\n      \"integrity\": \"sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==\"\n    },\n    \"has-value\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz\",\n      \"integrity\": \"sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=\",\n      \"requires\": {\n        \"get-value\": \"2.0.6\",\n        \"has-values\": \"1.0.0\",\n        \"isobject\": \"3.0.1\"\n      }\n    },\n    \"has-values\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz\",\n      \"integrity\": \"sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=\",\n      \"requires\": {\n        \"is-number\": \"3.0.0\",\n        \"kind-of\": \"4.0.0\"\n      },\n      \"dependencies\": {\n        \"kind-of\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz\",\n          \"integrity\": \"sha1-IIE989cSkosgc3hpGkUGb65y3Vc=\",\n          \"requires\": {\n            \"is-buffer\": \"1.1.6\"\n          }\n        }\n      }\n    },\n    \"hash-base\": {\n      \"version\": \"3.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz\",\n      \"integrity\": \"sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=\",\n      \"requires\": {\n        \"inherits\": \"2.0.3\",\n        \"safe-buffer\": \"5.1.2\"\n      }\n    },\n    \"hash-sum\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz\",\n      \"integrity\": \"sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=\"\n    },\n    \"hash.js\": {\n      \"version\": \"1.1.7\",\n      \"resolved\": \"https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz\",\n      \"integrity\": \"sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==\",\n      \"requires\": {\n        \"inherits\": \"2.0.3\",\n        \"minimalistic-assert\": \"1.0.1\"\n      }\n    },\n    \"hawk\": {\n      \"version\": \"3.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz\",\n      \"integrity\": \"sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=\",\n      \"dev\": true,\n      \"requires\": {\n        \"boom\": \"2.10.1\",\n        \"cryptiles\": \"2.0.5\",\n        \"hoek\": \"2.16.3\",\n        \"sntp\": \"1.0.9\"\n      }\n    },\n    \"he\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/he/-/he-1.2.0.tgz\",\n      \"integrity\": \"sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==\"\n    },\n    \"hmac-drbg\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz\",\n      \"integrity\": \"sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=\",\n      \"requires\": {\n        \"hash.js\": \"1.1.7\",\n        \"minimalistic-assert\": \"1.0.1\",\n        \"minimalistic-crypto-utils\": \"1.0.1\"\n      }\n    },\n    \"hoek\": {\n      \"version\": \"2.16.3\",\n      \"resolved\": \"https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz\",\n      \"integrity\": \"sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=\",\n      \"dev\": true\n    },\n    \"home-or-tmp\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz\",\n      \"integrity\": \"sha1-42w/LSyufXRqhX440Y1fMqeILbg=\",\n      \"requires\": {\n        \"os-homedir\": \"1.0.2\",\n        \"os-tmpdir\": \"1.0.2\"\n      }\n    },\n    \"hosted-git-info\": {\n      \"version\": \"2.7.1\",\n      \"resolved\": \"https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz\",\n      \"integrity\": \"sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==\"\n    },\n    \"html-comment-regex\": {\n      \"version\": \"1.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.2.tgz\",\n      \"integrity\": \"sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==\"\n    },\n    \"html-entities\": {\n      \"version\": \"1.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz\",\n      \"integrity\": \"sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=\"\n    },\n    \"html-loader\": {\n      \"version\": \"0.5.5\",\n      \"resolved\": \"https://registry.npmjs.org/html-loader/-/html-loader-0.5.5.tgz\",\n      \"integrity\": \"sha512-7hIW7YinOYUpo//kSYcPB6dCKoceKLmOwjEMmhIobHuWGDVl0Nwe4l68mdG/Ru0wcUxQjVMEoZpkalZ/SE7zog==\",\n      \"requires\": {\n        \"es6-templates\": \"0.2.3\",\n        \"fastparse\": \"1.1.2\",\n        \"html-minifier\": \"3.5.21\",\n        \"loader-utils\": \"1.2.3\",\n        \"object-assign\": \"4.1.1\"\n      }\n    },\n    \"html-minifier\": {\n      \"version\": \"3.5.21\",\n      \"resolved\": \"https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.21.tgz\",\n      \"integrity\": \"sha512-LKUKwuJDhxNa3uf/LPR/KVjm/l3rBqtYeCOAekvG8F1vItxMUpueGd94i/asDDr8/1u7InxzFA5EeGjhhG5mMA==\",\n      \"requires\": {\n        \"camel-case\": \"3.0.0\",\n        \"clean-css\": \"4.2.1\",\n        \"commander\": \"2.17.1\",\n        \"he\": \"1.2.0\",\n        \"param-case\": \"2.1.1\",\n        \"relateurl\": \"0.2.7\",\n        \"uglify-js\": \"3.4.9\"\n      },\n      \"dependencies\": {\n        \"commander\": {\n          \"version\": \"2.17.1\",\n          \"resolved\": \"https://registry.npmjs.org/commander/-/commander-2.17.1.tgz\",\n          \"integrity\": \"sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==\"\n        }\n      }\n    },\n    \"html-tags\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/html-tags/-/html-tags-2.0.0.tgz\",\n      \"integrity\": \"sha1-ELMKOGCF9Dzt41PMj6fLDe7qZos=\"\n    },\n    \"html-webpack-plugin\": {\n      \"version\": \"2.30.1\",\n      \"resolved\": \"https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-2.30.1.tgz\",\n      \"integrity\": \"sha1-f5xCG36pHsRg9WUn1430hO51N9U=\",\n      \"requires\": {\n        \"bluebird\": \"3.5.3\",\n        \"html-minifier\": \"3.5.21\",\n        \"loader-utils\": \"0.2.17\",\n        \"lodash\": \"4.17.11\",\n        \"pretty-error\": \"2.1.1\",\n        \"toposort\": \"1.0.7\"\n      },\n      \"dependencies\": {\n        \"big.js\": {\n          \"version\": \"3.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz\",\n          \"integrity\": \"sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==\"\n        },\n        \"loader-utils\": {\n          \"version\": \"0.2.17\",\n          \"resolved\": \"https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz\",\n          \"integrity\": \"sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=\",\n          \"requires\": {\n            \"big.js\": \"3.2.0\",\n            \"emojis-list\": \"2.1.0\",\n            \"json5\": \"0.5.1\",\n            \"object-assign\": \"4.1.1\"\n          }\n        }\n      }\n    },\n    \"htmlparser2\": {\n      \"version\": \"3.10.1\",\n      \"resolved\": \"https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz\",\n      \"integrity\": \"sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==\",\n      \"requires\": {\n        \"domelementtype\": \"1.3.1\",\n        \"domhandler\": \"2.4.2\",\n        \"domutils\": \"1.7.0\",\n        \"entities\": \"1.1.2\",\n        \"inherits\": \"2.0.3\",\n        \"readable-stream\": \"3.6.0\"\n      },\n      \"dependencies\": {\n        \"readable-stream\": {\n          \"version\": \"3.6.0\",\n          \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz\",\n          \"integrity\": \"sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==\",\n          \"requires\": {\n            \"inherits\": \"2.0.3\",\n            \"string_decoder\": \"1.1.1\",\n            \"util-deprecate\": \"1.0.2\"\n          }\n        }\n      }\n    },\n    \"http-errors\": {\n      \"version\": \"1.6.3\",\n      \"resolved\": \"https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz\",\n      \"integrity\": \"sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=\",\n      \"requires\": {\n        \"depd\": \"1.1.2\",\n        \"inherits\": \"2.0.3\",\n        \"setprototypeof\": \"1.1.0\",\n        \"statuses\": \"1.5.0\"\n      }\n    },\n    \"http-proxy\": {\n      \"version\": \"1.18.1\",\n      \"resolved\": \"https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz\",\n      \"integrity\": \"sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==\",\n      \"requires\": {\n        \"eventemitter3\": \"4.0.4\",\n        \"follow-redirects\": \"1.11.0\",\n        \"requires-port\": \"1.0.0\"\n      }\n    },\n    \"http-proxy-middleware\": {\n      \"version\": \"1.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-1.0.4.tgz\",\n      \"integrity\": \"sha512-8wiqujNWlsZNbeTSSWMLUl/u70xbJ5VYRwPR8RcAbvsNxzAZbgwLzRvT96btbm3fAitZUmo5i8LY6WKGyHDgvA==\",\n      \"requires\": {\n        \"@types/http-proxy\": \"1.17.4\",\n        \"http-proxy\": \"1.18.1\",\n        \"is-glob\": \"4.0.1\",\n        \"lodash\": \"4.17.15\",\n        \"micromatch\": \"4.0.2\"\n      },\n      \"dependencies\": {\n        \"braces\": {\n          \"version\": \"3.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/braces/-/braces-3.0.2.tgz\",\n          \"integrity\": \"sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==\",\n          \"requires\": {\n            \"fill-range\": \"7.0.1\"\n          }\n        },\n        \"fill-range\": {\n          \"version\": \"7.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz\",\n          \"integrity\": \"sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==\",\n          \"requires\": {\n            \"to-regex-range\": \"5.0.1\"\n          }\n        },\n        \"is-glob\": {\n          \"version\": \"4.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz\",\n          \"integrity\": \"sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==\",\n          \"requires\": {\n            \"is-extglob\": \"2.1.1\"\n          }\n        },\n        \"is-number\": {\n          \"version\": \"7.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz\",\n          \"integrity\": \"sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==\"\n        },\n        \"lodash\": {\n          \"version\": \"4.17.15\",\n          \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz\",\n          \"integrity\": \"sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==\"\n        },\n        \"micromatch\": {\n          \"version\": \"4.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz\",\n          \"integrity\": \"sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==\",\n          \"requires\": {\n            \"braces\": \"3.0.2\",\n            \"picomatch\": \"2.2.2\"\n          }\n        },\n        \"to-regex-range\": {\n          \"version\": \"5.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz\",\n          \"integrity\": \"sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==\",\n          \"requires\": {\n            \"is-number\": \"7.0.0\"\n          }\n        }\n      }\n    },\n    \"http-signature\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz\",\n      \"integrity\": \"sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=\",\n      \"optional\": true,\n      \"requires\": {\n        \"assert-plus\": \"1.0.0\",\n        \"jsprim\": \"1.4.1\",\n        \"sshpk\": \"1.16.0\"\n      }\n    },\n    \"https-browserify\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz\",\n      \"integrity\": \"sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=\"\n    },\n    \"iconv-lite\": {\n      \"version\": \"0.4.23\",\n      \"resolved\": \"https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz\",\n      \"integrity\": \"sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==\",\n      \"requires\": {\n        \"safer-buffer\": \"2.1.2\"\n      }\n    },\n    \"icss-replace-symbols\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz\",\n      \"integrity\": \"sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=\"\n    },\n    \"icss-utils\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/icss-utils/-/icss-utils-2.1.0.tgz\",\n      \"integrity\": \"sha1-g/Cg7DeL8yRheLbCrZE28TWxyWI=\",\n      \"requires\": {\n        \"postcss\": \"6.0.23\"\n      }\n    },\n    \"ieee754\": {\n      \"version\": \"1.1.12\",\n      \"resolved\": \"https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz\",\n      \"integrity\": \"sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==\"\n    },\n    \"iferr\": {\n      \"version\": \"0.1.5\",\n      \"resolved\": \"https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz\",\n      \"integrity\": \"sha1-xg7taebY/bazEEofy8ocGS3FtQE=\"\n    },\n    \"ignore\": {\n      \"version\": \"5.1.8\",\n      \"resolved\": \"https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz\",\n      \"integrity\": \"sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==\"\n    },\n    \"image-size\": {\n      \"version\": \"0.5.5\",\n      \"resolved\": \"https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz\",\n      \"integrity\": \"sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=\",\n      \"optional\": true\n    },\n    \"import-fresh\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz\",\n      \"integrity\": \"sha1-2BNVwVYS04bGH53dOSLUMEgipUY=\",\n      \"requires\": {\n        \"caller-path\": \"2.0.0\",\n        \"resolve-from\": \"3.0.0\"\n      },\n      \"dependencies\": {\n        \"resolve-from\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz\",\n          \"integrity\": \"sha1-six699nWiBvItuZTM17rywoYh0g=\"\n        }\n      }\n    },\n    \"import-lazy\": {\n      \"version\": \"3.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/import-lazy/-/import-lazy-3.1.0.tgz\",\n      \"integrity\": \"sha512-8/gvXvX2JMn0F+CDlSC4l6kOmVaLOO3XLkksI7CI3Ud95KDYJuYur2b9P/PUt/i/pDAMd/DulQsNbbbmRRsDIQ==\"\n    },\n    \"imurmurhash\": {\n      \"version\": \"0.1.4\",\n      \"resolved\": \"https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz\",\n      \"integrity\": \"sha1-khi5srkoojixPcT7a21XbyMUU+o=\"\n    },\n    \"indent-string\": {\n      \"version\": \"3.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz\",\n      \"integrity\": \"sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=\"\n    },\n    \"indexes-of\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz\",\n      \"integrity\": \"sha1-8w9xbI4r00bHtn0985FVZqfAVgc=\"\n    },\n    \"indexof\": {\n      \"version\": \"0.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz\",\n      \"integrity\": \"sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=\"\n    },\n    \"inflight\": {\n      \"version\": \"1.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz\",\n      \"integrity\": \"sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=\",\n      \"requires\": {\n        \"once\": \"1.4.0\",\n        \"wrappy\": \"1.0.2\"\n      }\n    },\n    \"inherits\": {\n      \"version\": \"2.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz\",\n      \"integrity\": \"sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=\"\n    },\n    \"ini\": {\n      \"version\": \"1.3.5\",\n      \"resolved\": \"https://registry.npmjs.org/ini/-/ini-1.3.5.tgz\",\n      \"integrity\": \"sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==\"\n    },\n    \"inquirer\": {\n      \"version\": \"6.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/inquirer/-/inquirer-6.0.0.tgz\",\n      \"integrity\": \"sha512-tISQWRwtcAgrz+SHPhTH7d3e73k31gsOy6i1csonLc0u1dVK/wYvuOnFeiWqC5OXFIYbmrIFInef31wbT8MEJg==\",\n      \"requires\": {\n        \"ansi-escapes\": \"3.1.0\",\n        \"chalk\": \"2.4.2\",\n        \"cli-cursor\": \"2.1.0\",\n        \"cli-width\": \"2.2.0\",\n        \"external-editor\": \"3.0.3\",\n        \"figures\": \"2.0.0\",\n        \"lodash\": \"4.17.11\",\n        \"mute-stream\": \"0.0.7\",\n        \"run-async\": \"2.3.0\",\n        \"rxjs\": \"6.3.3\",\n        \"string-width\": \"2.1.1\",\n        \"strip-ansi\": \"4.0.0\",\n        \"through\": \"2.3.8\"\n      },\n      \"dependencies\": {\n        \"ansi-regex\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz\",\n          \"integrity\": \"sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=\"\n        },\n        \"strip-ansi\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz\",\n          \"integrity\": \"sha1-qEeQIusaw2iocTibY1JixQXuNo8=\",\n          \"requires\": {\n            \"ansi-regex\": \"3.0.0\"\n          }\n        }\n      }\n    },\n    \"interface-loader\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/interface-loader/-/interface-loader-1.0.8.tgz\",\n      \"integrity\": \"sha512-TMS3Nx0h7msFzNNn+FftWVNSdRjFrkBHWHFbUSeCxPu6lpqNzAOwcAd2+vhOxb5wkgPgX54gufzm3SkVY/g3+w==\",\n      \"requires\": {\n        \"@babel/parser\": \"7.1.0\",\n        \"babel-generator\": \"6.26.1\",\n        \"babel-traverse\": \"6.26.0\",\n        \"chameleon-tool-utils\": \"1.0.8\",\n        \"loader-utils\": \"1.1.0\",\n        \"mvvm-interface-parser\": \"1.0.8\",\n        \"runtime-check\": \"1.0.8\"\n      },\n      \"dependencies\": {\n        \"@babel/code-frame\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz\",\n          \"integrity\": \"sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==\",\n          \"requires\": {\n            \"@babel/highlight\": \"7.10.4\"\n          }\n        },\n        \"@babel/generator\": {\n          \"version\": \"7.12.5\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz\",\n          \"integrity\": \"sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.6\",\n            \"jsesc\": \"2.5.2\",\n            \"source-map\": \"0.5.7\"\n          }\n        },\n        \"@babel/helper-function-name\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz\",\n          \"integrity\": \"sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==\",\n          \"requires\": {\n            \"@babel/helper-get-function-arity\": \"7.10.4\",\n            \"@babel/template\": \"7.10.4\",\n            \"@babel/types\": \"7.12.6\"\n          }\n        },\n        \"@babel/helper-get-function-arity\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz\",\n          \"integrity\": \"sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.6\"\n          }\n        },\n        \"@babel/helper-split-export-declaration\": {\n          \"version\": \"7.11.0\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz\",\n          \"integrity\": \"sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.6\"\n          }\n        },\n        \"@babel/highlight\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz\",\n          \"integrity\": \"sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==\",\n          \"requires\": {\n            \"@babel/helper-validator-identifier\": \"7.10.4\",\n            \"chalk\": \"2.4.2\",\n            \"js-tokens\": \"4.0.0\"\n          }\n        },\n        \"@babel/parser\": {\n          \"version\": \"7.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.1.0.tgz\",\n          \"integrity\": \"sha512-SmjnXCuPAlai75AFtzv+KCBcJ3sDDWbIn+WytKw1k+wAtEy6phqI2RqKh/zAnw53i1NR8su3Ep/UoqaKcimuLg==\"\n        },\n        \"@babel/template\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz\",\n          \"integrity\": \"sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==\",\n          \"requires\": {\n            \"@babel/code-frame\": \"7.10.4\",\n            \"@babel/parser\": \"7.12.5\",\n            \"@babel/types\": \"7.12.6\"\n          },\n          \"dependencies\": {\n            \"@babel/parser\": {\n              \"version\": \"7.12.5\",\n              \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz\",\n              \"integrity\": \"sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==\"\n            }\n          }\n        },\n        \"@babel/traverse\": {\n          \"version\": \"7.12.5\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.5.tgz\",\n          \"integrity\": \"sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA==\",\n          \"requires\": {\n            \"@babel/code-frame\": \"7.10.4\",\n            \"@babel/generator\": \"7.12.5\",\n            \"@babel/helper-function-name\": \"7.10.4\",\n            \"@babel/helper-split-export-declaration\": \"7.11.0\",\n            \"@babel/parser\": \"7.12.5\",\n            \"@babel/types\": \"7.12.6\",\n            \"debug\": \"4.2.0\",\n            \"globals\": \"11.12.0\",\n            \"lodash\": \"4.17.20\"\n          },\n          \"dependencies\": {\n            \"@babel/parser\": {\n              \"version\": \"7.12.5\",\n              \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz\",\n              \"integrity\": \"sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==\"\n            }\n          }\n        },\n        \"@babel/types\": {\n          \"version\": \"7.12.6\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz\",\n          \"integrity\": \"sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==\",\n          \"requires\": {\n            \"@babel/helper-validator-identifier\": \"7.10.4\",\n            \"lodash\": \"4.17.20\",\n            \"to-fast-properties\": \"2.0.0\"\n          }\n        },\n        \"big.js\": {\n          \"version\": \"3.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz\",\n          \"integrity\": \"sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==\"\n        },\n        \"debug\": {\n          \"version\": \"4.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.2.0.tgz\",\n          \"integrity\": \"sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==\",\n          \"requires\": {\n            \"ms\": \"2.1.2\"\n          }\n        },\n        \"globals\": {\n          \"version\": \"11.12.0\",\n          \"resolved\": \"https://registry.npmjs.org/globals/-/globals-11.12.0.tgz\",\n          \"integrity\": \"sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==\"\n        },\n        \"js-tokens\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz\",\n          \"integrity\": \"sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==\"\n        },\n        \"jsesc\": {\n          \"version\": \"2.5.2\",\n          \"resolved\": \"https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz\",\n          \"integrity\": \"sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==\"\n        },\n        \"loader-utils\": {\n          \"version\": \"1.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz\",\n          \"integrity\": \"sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=\",\n          \"requires\": {\n            \"big.js\": \"3.2.0\",\n            \"emojis-list\": \"2.1.0\",\n            \"json5\": \"0.5.1\"\n          }\n        },\n        \"lodash\": {\n          \"version\": \"4.17.20\",\n          \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz\",\n          \"integrity\": \"sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==\"\n        },\n        \"ms\": {\n          \"version\": \"2.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.2.tgz\",\n          \"integrity\": \"sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==\"\n        },\n        \"mvvm-interface-parser\": {\n          \"version\": \"1.0.8\",\n          \"resolved\": \"https://registry.npmjs.org/mvvm-interface-parser/-/mvvm-interface-parser-1.0.8.tgz\",\n          \"integrity\": \"sha512-hVrQ3E/oTNU2dBhBbOREA/Zlfm6qjyzO8Q2oGAOp/hVGZ27/WwHMRVsITQgyqO7HMfHoMnWWfvLPtGdnE9QqRQ==\",\n          \"requires\": {\n            \"@babel/generator\": \"7.12.5\",\n            \"@babel/parser\": \"7.12.5\",\n            \"@babel/traverse\": \"7.12.5\",\n            \"@babel/types\": \"7.12.6\",\n            \"chameleon-tool-utils\": \"1.0.8\",\n            \"runtime-check\": \"1.0.8\"\n          },\n          \"dependencies\": {\n            \"@babel/parser\": {\n              \"version\": \"7.12.5\",\n              \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz\",\n              \"integrity\": \"sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==\"\n            }\n          }\n        },\n        \"runtime-check\": {\n          \"version\": \"1.0.8\",\n          \"resolved\": \"https://registry.npmjs.org/runtime-check/-/runtime-check-1.0.8.tgz\",\n          \"integrity\": \"sha512-SNEIbwoI2+hVsVWK146bTY+TRQ+CNz5edPf0Be9/hWR8zk4j+jq7ASG455c/6iGrhmiz+LTZEg8ZcPaFoWsILA==\",\n          \"requires\": {\n            \"@babel/parser\": \"7.1.0\",\n            \"babel-generator\": \"6.26.1\",\n            \"babel-traverse\": \"6.26.0\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"to-fast-properties\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz\",\n          \"integrity\": \"sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=\"\n        }\n      }\n    },\n    \"interpret\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz\",\n      \"integrity\": \"sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==\"\n    },\n    \"invariant\": {\n      \"version\": \"2.2.4\",\n      \"resolved\": \"https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz\",\n      \"integrity\": \"sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==\",\n      \"requires\": {\n        \"loose-envify\": \"1.4.0\"\n      }\n    },\n    \"invert-kv\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz\",\n      \"integrity\": \"sha1-EEqOSqym09jNFXqO+L+rLXo//bY=\"\n    },\n    \"ip\": {\n      \"version\": \"1.1.5\",\n      \"resolved\": \"https://registry.npmjs.org/ip/-/ip-1.1.5.tgz\",\n      \"integrity\": \"sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=\"\n    },\n    \"ipaddr.js\": {\n      \"version\": \"1.8.0\",\n      \"resolved\": \"https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz\",\n      \"integrity\": \"sha1-6qM9bd16zo9/b+DJygRA5wZzix4=\"\n    },\n    \"is-absolute-url\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz\",\n      \"integrity\": \"sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=\"\n    },\n    \"is-accessor-descriptor\": {\n      \"version\": \"0.1.6\",\n      \"resolved\": \"https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz\",\n      \"integrity\": \"sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=\",\n      \"requires\": {\n        \"kind-of\": \"3.2.2\"\n      },\n      \"dependencies\": {\n        \"kind-of\": {\n          \"version\": \"3.2.2\",\n          \"resolved\": \"https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz\",\n          \"integrity\": \"sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=\",\n          \"requires\": {\n            \"is-buffer\": \"1.1.6\"\n          }\n        }\n      }\n    },\n    \"is-alphabetical\": {\n      \"version\": \"1.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz\",\n      \"integrity\": \"sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==\"\n    },\n    \"is-alphanumeric\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-alphanumeric/-/is-alphanumeric-1.0.0.tgz\",\n      \"integrity\": \"sha1-Spzvcdr0wAHB2B1j0UDPU/1oifQ=\"\n    },\n    \"is-alphanumerical\": {\n      \"version\": \"1.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz\",\n      \"integrity\": \"sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==\",\n      \"requires\": {\n        \"is-alphabetical\": \"1.0.4\",\n        \"is-decimal\": \"1.0.4\"\n      }\n    },\n    \"is-arrayish\": {\n      \"version\": \"0.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz\",\n      \"integrity\": \"sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=\"\n    },\n    \"is-binary-path\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz\",\n      \"integrity\": \"sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=\",\n      \"requires\": {\n        \"binary-extensions\": \"1.12.0\"\n      }\n    },\n    \"is-buffer\": {\n      \"version\": \"1.1.6\",\n      \"resolved\": \"https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz\",\n      \"integrity\": \"sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==\"\n    },\n    \"is-builtin-module\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz\",\n      \"integrity\": \"sha1-VAVy0096wxGfj3bDDLwbHgN6/74=\",\n      \"requires\": {\n        \"builtin-modules\": \"1.1.1\"\n      }\n    },\n    \"is-callable\": {\n      \"version\": \"1.2.2\",\n      \"resolved\": \"https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz\",\n      \"integrity\": \"sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==\"\n    },\n    \"is-data-descriptor\": {\n      \"version\": \"0.1.4\",\n      \"resolved\": \"https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz\",\n      \"integrity\": \"sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=\",\n      \"requires\": {\n        \"kind-of\": \"3.2.2\"\n      },\n      \"dependencies\": {\n        \"kind-of\": {\n          \"version\": \"3.2.2\",\n          \"resolved\": \"https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz\",\n          \"integrity\": \"sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=\",\n          \"requires\": {\n            \"is-buffer\": \"1.1.6\"\n          }\n        }\n      }\n    },\n    \"is-date-object\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz\",\n      \"integrity\": \"sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==\"\n    },\n    \"is-decimal\": {\n      \"version\": \"1.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz\",\n      \"integrity\": \"sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==\"\n    },\n    \"is-descriptor\": {\n      \"version\": \"0.1.6\",\n      \"resolved\": \"https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz\",\n      \"integrity\": \"sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==\",\n      \"requires\": {\n        \"is-accessor-descriptor\": \"0.1.6\",\n        \"is-data-descriptor\": \"0.1.4\",\n        \"kind-of\": \"5.1.0\"\n      },\n      \"dependencies\": {\n        \"kind-of\": {\n          \"version\": \"5.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz\",\n          \"integrity\": \"sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==\"\n        }\n      }\n    },\n    \"is-directory\": {\n      \"version\": \"0.3.1\",\n      \"resolved\": \"https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz\",\n      \"integrity\": \"sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=\"\n    },\n    \"is-extendable\": {\n      \"version\": \"0.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz\",\n      \"integrity\": \"sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=\"\n    },\n    \"is-extglob\": {\n      \"version\": \"2.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz\",\n      \"integrity\": \"sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=\"\n    },\n    \"is-finite\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz\",\n      \"integrity\": \"sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=\",\n      \"requires\": {\n        \"number-is-nan\": \"1.0.1\"\n      }\n    },\n    \"is-fullwidth-code-point\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz\",\n      \"integrity\": \"sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=\"\n    },\n    \"is-glob\": {\n      \"version\": \"4.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz\",\n      \"integrity\": \"sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=\",\n      \"requires\": {\n        \"is-extglob\": \"2.1.1\"\n      }\n    },\n    \"is-hexadecimal\": {\n      \"version\": \"1.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz\",\n      \"integrity\": \"sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==\"\n    },\n    \"is-my-ip-valid\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz\",\n      \"integrity\": \"sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==\",\n      \"dev\": true\n    },\n    \"is-my-json-valid\": {\n      \"version\": \"2.19.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.19.0.tgz\",\n      \"integrity\": \"sha512-mG0f/unGX1HZ5ep4uhRaPOS8EkAY8/j6mDRMJrutq4CqhoJWYp7qAlonIPy3TV7p3ju4TK9fo/PbnoksWmsp5Q==\",\n      \"dev\": true,\n      \"requires\": {\n        \"generate-function\": \"2.3.1\",\n        \"generate-object-property\": \"1.2.0\",\n        \"is-my-ip-valid\": \"1.0.0\",\n        \"jsonpointer\": \"4.0.1\",\n        \"xtend\": \"4.0.1\"\n      }\n    },\n    \"is-negated-glob\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz\",\n      \"integrity\": \"sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=\"\n    },\n    \"is-negative-zero\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.0.tgz\",\n      \"integrity\": \"sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE=\"\n    },\n    \"is-number\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz\",\n      \"integrity\": \"sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=\",\n      \"requires\": {\n        \"kind-of\": \"3.2.2\"\n      },\n      \"dependencies\": {\n        \"kind-of\": {\n          \"version\": \"3.2.2\",\n          \"resolved\": \"https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz\",\n          \"integrity\": \"sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=\",\n          \"requires\": {\n            \"is-buffer\": \"1.1.6\"\n          }\n        }\n      }\n    },\n    \"is-obj\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz\",\n      \"integrity\": \"sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==\"\n    },\n    \"is-plain-obj\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz\",\n      \"integrity\": \"sha1-caUMhCnfync8kqOQpKA7OfzVHT4=\"\n    },\n    \"is-plain-object\": {\n      \"version\": \"2.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz\",\n      \"integrity\": \"sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==\",\n      \"requires\": {\n        \"isobject\": \"3.0.1\"\n      }\n    },\n    \"is-promise\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz\",\n      \"integrity\": \"sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=\"\n    },\n    \"is-property\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz\",\n      \"integrity\": \"sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=\",\n      \"dev\": true\n    },\n    \"is-regex\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz\",\n      \"integrity\": \"sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==\",\n      \"requires\": {\n        \"has-symbols\": \"1.0.1\"\n      }\n    },\n    \"is-regexp\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz\",\n      \"integrity\": \"sha1-/S2INUXEa6xaYz57mgnof6LLUGk=\"\n    },\n    \"is-stream\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz\",\n      \"integrity\": \"sha1-EtSj3U5o4Lec6428hBc66A2RykQ=\"\n    },\n    \"is-supported-regexp-flag\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/is-supported-regexp-flag/-/is-supported-regexp-flag-1.0.1.tgz\",\n      \"integrity\": \"sha512-3vcJecUUrpgCqc/ca0aWeNu64UGgxcvO60K/Fkr1N6RSvfGCTU60UKN68JDmKokgba0rFFJs12EnzOQa14ubKQ==\"\n    },\n    \"is-svg\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-svg/-/is-svg-2.1.0.tgz\",\n      \"integrity\": \"sha1-z2EJDaDZ77yrhyLeum8DIgjbsOk=\",\n      \"requires\": {\n        \"html-comment-regex\": \"1.1.2\"\n      }\n    },\n    \"is-symbol\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz\",\n      \"integrity\": \"sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==\",\n      \"requires\": {\n        \"has-symbols\": \"1.0.1\"\n      }\n    },\n    \"is-typedarray\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz\",\n      \"integrity\": \"sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=\"\n    },\n    \"is-whitespace-character\": {\n      \"version\": \"1.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz\",\n      \"integrity\": \"sha512-SDweEzfIZM0SJV0EUga669UTKlmL0Pq8Lno0QDQsPnvECB3IM2aP0gdx5TrU0A01MAPfViaZiI2V1QMZLaKK5w==\"\n    },\n    \"is-windows\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz\",\n      \"integrity\": \"sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==\"\n    },\n    \"is-word-character\": {\n      \"version\": \"1.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.4.tgz\",\n      \"integrity\": \"sha512-5SMO8RVennx3nZrqtKwCGyyetPE9VDba5ugvKLaD4KopPG5kR4mQ7tNt/r7feL5yt5h3lpuBbIUmCOG2eSzXHA==\"\n    },\n    \"is-wsl\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz\",\n      \"integrity\": \"sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=\"\n    },\n    \"isarray\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz\",\n      \"integrity\": \"sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=\"\n    },\n    \"isexe\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz\",\n      \"integrity\": \"sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=\"\n    },\n    \"isobject\": {\n      \"version\": \"3.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz\",\n      \"integrity\": \"sha1-TkMekrEalzFjaqH5yNHMvP2reN8=\"\n    },\n    \"isstream\": {\n      \"version\": \"0.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz\",\n      \"integrity\": \"sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=\"\n    },\n    \"istanbul\": {\n      \"version\": \"0.4.5\",\n      \"resolved\": \"https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz\",\n      \"integrity\": \"sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=\",\n      \"dev\": true,\n      \"requires\": {\n        \"abbrev\": \"1.0.9\",\n        \"async\": \"1.5.2\",\n        \"escodegen\": \"1.8.1\",\n        \"esprima\": \"2.7.3\",\n        \"glob\": \"5.0.15\",\n        \"handlebars\": \"4.0.12\",\n        \"js-yaml\": \"3.12.1\",\n        \"mkdirp\": \"0.5.1\",\n        \"nopt\": \"3.0.6\",\n        \"once\": \"1.4.0\",\n        \"resolve\": \"1.1.7\",\n        \"supports-color\": \"3.2.3\",\n        \"which\": \"1.3.1\",\n        \"wordwrap\": \"1.0.0\"\n      },\n      \"dependencies\": {\n        \"abbrev\": {\n          \"version\": \"1.0.9\",\n          \"resolved\": \"https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz\",\n          \"integrity\": \"sha1-kbR5JYinc4wl813W9jdSovh3YTU=\",\n          \"dev\": true\n        },\n        \"async\": {\n          \"version\": \"1.5.2\",\n          \"resolved\": \"https://registry.npmjs.org/async/-/async-1.5.2.tgz\",\n          \"integrity\": \"sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=\",\n          \"dev\": true\n        },\n        \"escodegen\": {\n          \"version\": \"1.8.1\",\n          \"resolved\": \"https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz\",\n          \"integrity\": \"sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=\",\n          \"dev\": true,\n          \"requires\": {\n            \"esprima\": \"2.7.3\",\n            \"estraverse\": \"1.9.3\",\n            \"esutils\": \"2.0.2\",\n            \"optionator\": \"0.8.2\",\n            \"source-map\": \"0.2.0\"\n          }\n        },\n        \"esprima\": {\n          \"version\": \"2.7.3\",\n          \"resolved\": \"https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz\",\n          \"integrity\": \"sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=\",\n          \"dev\": true\n        },\n        \"estraverse\": {\n          \"version\": \"1.9.3\",\n          \"resolved\": \"https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz\",\n          \"integrity\": \"sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=\",\n          \"dev\": true\n        },\n        \"glob\": {\n          \"version\": \"5.0.15\",\n          \"resolved\": \"https://registry.npmjs.org/glob/-/glob-5.0.15.tgz\",\n          \"integrity\": \"sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=\",\n          \"dev\": true,\n          \"requires\": {\n            \"inflight\": \"1.0.6\",\n            \"inherits\": \"2.0.3\",\n            \"minimatch\": \"3.0.4\",\n            \"once\": \"1.4.0\",\n            \"path-is-absolute\": \"1.0.1\"\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\",\n          \"dev\": true\n        },\n        \"nopt\": {\n          \"version\": \"3.0.6\",\n          \"resolved\": \"https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz\",\n          \"integrity\": \"sha1-xkZdvwirzU2zWTF/eaxopkayj/k=\",\n          \"dev\": true,\n          \"requires\": {\n            \"abbrev\": \"1.0.9\"\n          }\n        },\n        \"resolve\": {\n          \"version\": \"1.1.7\",\n          \"resolved\": \"https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz\",\n          \"integrity\": \"sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=\",\n          \"dev\": true\n        },\n        \"source-map\": {\n          \"version\": \"0.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz\",\n          \"integrity\": \"sha1-2rc/vPwrqBm03gO9b26qSBZLP50=\",\n          \"dev\": true,\n          \"optional\": true,\n          \"requires\": {\n            \"amdefine\": \"1.0.1\"\n          }\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"dev\": true,\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"istanbul-lib-coverage\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz\",\n      \"integrity\": \"sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==\",\n      \"dev\": true\n    },\n    \"istanbul-lib-instrument\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.0.0.tgz\",\n      \"integrity\": \"sha512-eQY9vN9elYjdgN9Iv6NS/00bptm02EBBk70lRMaVjeA6QYocQgenVrSgC28TJurdnZa80AGO3ASdFN+w/njGiQ==\",\n      \"dev\": true,\n      \"requires\": {\n        \"@babel/generator\": \"7.2.2\",\n        \"@babel/parser\": \"7.2.3\",\n        \"@babel/template\": \"7.2.2\",\n        \"@babel/traverse\": \"7.2.3\",\n        \"@babel/types\": \"7.2.2\",\n        \"istanbul-lib-coverage\": \"2.0.1\",\n        \"semver\": \"5.6.0\"\n      }\n    },\n    \"js-base64\": {\n      \"version\": \"2.5.0\",\n      \"resolved\": \"https://registry.npmjs.org/js-base64/-/js-base64-2.5.0.tgz\",\n      \"integrity\": \"sha512-wlEBIZ5LP8usDylWbDNhKPEFVFdI5hCHpnVoT/Ysvoi/PRhJENm/Rlh9TvjYB38HFfKZN7OzEbRjmjvLkFw11g==\"\n    },\n    \"js-beautify\": {\n      \"version\": \"1.13.0\",\n      \"resolved\": \"https://registry.npmjs.org/js-beautify/-/js-beautify-1.13.0.tgz\",\n      \"integrity\": \"sha512-/Tbp1OVzZjbwzwJQFIlYLm9eWQ+3aYbBXLSaqb1mEJzhcQAfrqMMQYtjb6io+U6KpD0ID4F+Id3/xcjH3l/sqA==\",\n      \"requires\": {\n        \"config-chain\": \"1.1.12\",\n        \"editorconfig\": \"0.15.3\",\n        \"glob\": \"7.1.6\",\n        \"mkdirp\": \"1.0.4\",\n        \"nopt\": \"5.0.0\"\n      },\n      \"dependencies\": {\n        \"glob\": {\n          \"version\": \"7.1.6\",\n          \"resolved\": \"https://registry.npmjs.org/glob/-/glob-7.1.6.tgz\",\n          \"integrity\": \"sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==\",\n          \"requires\": {\n            \"fs.realpath\": \"1.0.0\",\n            \"inflight\": \"1.0.6\",\n            \"inherits\": \"2.0.3\",\n            \"minimatch\": \"3.0.4\",\n            \"once\": \"1.4.0\",\n            \"path-is-absolute\": \"1.0.1\"\n          }\n        },\n        \"mkdirp\": {\n          \"version\": \"1.0.4\",\n          \"resolved\": \"https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz\",\n          \"integrity\": \"sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==\"\n        }\n      }\n    },\n    \"js-tokens\": {\n      \"version\": \"3.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz\",\n      \"integrity\": \"sha1-mGbfOVECEw449/mWvOtlRDIJwls=\"\n    },\n    \"js-yaml\": {\n      \"version\": \"3.12.1\",\n      \"resolved\": \"https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.1.tgz\",\n      \"integrity\": \"sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA==\",\n      \"requires\": {\n        \"argparse\": \"1.0.10\",\n        \"esprima\": \"4.0.1\"\n      }\n    },\n    \"jsbn\": {\n      \"version\": \"0.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz\",\n      \"integrity\": \"sha1-peZUwuWi3rXyAdls77yoDA7y9RM=\"\n    },\n    \"jschardet\": {\n      \"version\": \"1.6.0\",\n      \"resolved\": \"https://registry.npmjs.org/jschardet/-/jschardet-1.6.0.tgz\",\n      \"integrity\": \"sha512-xYuhvQ7I9PDJIGBWev9xm0+SMSed3ZDBAmvVjbFR1ZRLAF+vlXcQu6cRI9uAlj81rzikElRVteehwV7DuX2ZmQ==\"\n    },\n    \"jsesc\": {\n      \"version\": \"1.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz\",\n      \"integrity\": \"sha1-RsP+yMGJKxKwgz25vHYiF226s0s=\"\n    },\n    \"json-lint\": {\n      \"version\": \"0.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/json-lint/-/json-lint-0.1.0.tgz\",\n      \"integrity\": \"sha1-RbA/uobE8w8sbnCqc6kNP+GPmAM=\"\n    },\n    \"json-loader\": {\n      \"version\": \"0.5.7\",\n      \"resolved\": \"https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz\",\n      \"integrity\": \"sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==\"\n    },\n    \"json-parse-better-errors\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz\",\n      \"integrity\": \"sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==\"\n    },\n    \"json-schema\": {\n      \"version\": \"0.2.3\",\n      \"resolved\": \"https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz\",\n      \"integrity\": \"sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=\"\n    },\n    \"json-schema-traverse\": {\n      \"version\": \"0.4.1\",\n      \"resolved\": \"https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz\",\n      \"integrity\": \"sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==\"\n    },\n    \"json-stable-stringify-without-jsonify\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz\",\n      \"integrity\": \"sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=\",\n      \"dev\": true\n    },\n    \"json-stringify-safe\": {\n      \"version\": \"5.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz\",\n      \"integrity\": \"sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=\"\n    },\n    \"json5\": {\n      \"version\": \"0.5.1\",\n      \"resolved\": \"https://registry.npmjs.org/json5/-/json5-0.5.1.tgz\",\n      \"integrity\": \"sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=\"\n    },\n    \"jsonfile\": {\n      \"version\": \"4.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz\",\n      \"integrity\": \"sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=\",\n      \"requires\": {\n        \"graceful-fs\": \"4.1.15\"\n      }\n    },\n    \"jsonpointer\": {\n      \"version\": \"4.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz\",\n      \"integrity\": \"sha1-T9kss04OnbPInIYi7PUfm5eMbLk=\",\n      \"dev\": true\n    },\n    \"jsprim\": {\n      \"version\": \"1.4.1\",\n      \"resolved\": \"https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz\",\n      \"integrity\": \"sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=\",\n      \"requires\": {\n        \"assert-plus\": \"1.0.0\",\n        \"extsprintf\": \"1.3.0\",\n        \"json-schema\": \"0.2.3\",\n        \"verror\": \"1.10.0\"\n      }\n    },\n    \"just-debounce\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/just-debounce/-/just-debounce-1.0.0.tgz\",\n      \"integrity\": \"sha1-h/zPrv/AtozRnVX2cilD+SnqNeo=\"\n    },\n    \"kind-of\": {\n      \"version\": \"6.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz\",\n      \"integrity\": \"sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==\"\n    },\n    \"known-css-properties\": {\n      \"version\": \"0.11.0\",\n      \"resolved\": \"https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.11.0.tgz\",\n      \"integrity\": \"sha512-bEZlJzXo5V/ApNNa5z375mJC6Nrz4vG43UgcSCrg2OHC+yuB6j0iDSrY7RQ/+PRofFB03wNIIt9iXIVLr4wc7w==\"\n    },\n    \"last-call-webpack-plugin\": {\n      \"version\": \"2.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/last-call-webpack-plugin/-/last-call-webpack-plugin-2.1.2.tgz\",\n      \"integrity\": \"sha512-CZc+m2xZm51J8qSwdODeiiNeqh8CYkKEq6Rw8IkE4i/4yqf2cJhjQPsA6BtAV970ePRNhwEOXhy2U5xc5Jwh9Q==\",\n      \"requires\": {\n        \"lodash\": \"4.17.11\",\n        \"webpack-sources\": \"1.3.0\"\n      }\n    },\n    \"lazy-cache\": {\n      \"version\": \"1.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz\",\n      \"integrity\": \"sha1-odePw6UEdMuAhF07O24dpJpEbo4=\"\n    },\n    \"lcid\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz\",\n      \"integrity\": \"sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=\",\n      \"requires\": {\n        \"invert-kv\": \"1.0.0\"\n      }\n    },\n    \"lcov-parse\": {\n      \"version\": \"0.0.10\",\n      \"resolved\": \"https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz\",\n      \"integrity\": \"sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=\",\n      \"dev\": true\n    },\n    \"less\": {\n      \"version\": \"3.11.1\",\n      \"resolved\": \"https://registry.npmjs.org/less/-/less-3.11.1.tgz\",\n      \"integrity\": \"sha512-tlWX341RECuTOvoDIvtFqXsKj072hm3+9ymRBe76/mD6O5ZZecnlAOVDlWAleF2+aohFrxNidXhv2773f6kY7g==\",\n      \"requires\": {\n        \"clone\": \"2.1.2\",\n        \"errno\": \"0.1.7\",\n        \"graceful-fs\": \"4.1.15\",\n        \"image-size\": \"0.5.5\",\n        \"mime\": \"1.6.0\",\n        \"mkdirp\": \"0.5.1\",\n        \"promise\": \"7.3.1\",\n        \"request\": \"2.88.2\",\n        \"source-map\": \"0.6.1\",\n        \"tslib\": \"1.11.1\"\n      },\n      \"dependencies\": {\n        \"clone\": {\n          \"version\": \"2.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/clone/-/clone-2.1.2.tgz\",\n          \"integrity\": \"sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=\"\n        },\n        \"mime\": {\n          \"version\": \"1.6.0\",\n          \"resolved\": \"https://registry.npmjs.org/mime/-/mime-1.6.0.tgz\",\n          \"integrity\": \"sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==\",\n          \"optional\": true\n        },\n        \"promise\": {\n          \"version\": \"7.3.1\",\n          \"resolved\": \"https://registry.npmjs.org/promise/-/promise-7.3.1.tgz\",\n          \"integrity\": \"sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==\",\n          \"optional\": true,\n          \"requires\": {\n            \"asap\": \"2.0.6\"\n          }\n        },\n        \"tslib\": {\n          \"version\": \"1.11.1\",\n          \"resolved\": \"https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz\",\n          \"integrity\": \"sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==\"\n        }\n      }\n    },\n    \"less-loader\": {\n      \"version\": \"4.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/less-loader/-/less-loader-4.1.0.tgz\",\n      \"integrity\": \"sha512-KNTsgCE9tMOM70+ddxp9yyt9iHqgmSs0yTZc5XH5Wo+g80RWRIYNqE58QJKm/yMud5wZEvz50ugRDuzVIkyahg==\",\n      \"requires\": {\n        \"clone\": \"2.1.2\",\n        \"loader-utils\": \"1.2.3\",\n        \"pify\": \"3.0.0\"\n      },\n      \"dependencies\": {\n        \"clone\": {\n          \"version\": \"2.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/clone/-/clone-2.1.2.tgz\",\n          \"integrity\": \"sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=\"\n        }\n      }\n    },\n    \"leven\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/leven/-/leven-2.1.0.tgz\",\n      \"integrity\": \"sha1-wuep93IJTe6dNCAq6KzORoeHVYA=\"\n    },\n    \"levn\": {\n      \"version\": \"0.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/levn/-/levn-0.3.0.tgz\",\n      \"integrity\": \"sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=\",\n      \"requires\": {\n        \"prelude-ls\": \"1.1.2\",\n        \"type-check\": \"0.3.2\"\n      }\n    },\n    \"load-json-file\": {\n      \"version\": \"4.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz\",\n      \"integrity\": \"sha1-L19Fq5HjMhYjT9U62rZo607AmTs=\",\n      \"requires\": {\n        \"graceful-fs\": \"4.1.15\",\n        \"parse-json\": \"4.0.0\",\n        \"pify\": \"3.0.0\",\n        \"strip-bom\": \"3.0.0\"\n      }\n    },\n    \"loader-runner\": {\n      \"version\": \"2.3.1\",\n      \"resolved\": \"https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.1.tgz\",\n      \"integrity\": \"sha512-By6ZFY7ETWOc9RFaAIb23IjJVcM4dvJC/N57nmdz9RSkMXvAXGI7SyVlAw3v8vjtDRlqThgVDVmTnr9fqMlxkw==\"\n    },\n    \"loader-utils\": {\n      \"version\": \"1.2.3\",\n      \"resolved\": \"https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz\",\n      \"integrity\": \"sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==\",\n      \"requires\": {\n        \"big.js\": \"5.2.2\",\n        \"emojis-list\": \"2.1.0\",\n        \"json5\": \"1.0.1\"\n      },\n      \"dependencies\": {\n        \"json5\": {\n          \"version\": \"1.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/json5/-/json5-1.0.1.tgz\",\n          \"integrity\": \"sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==\",\n          \"requires\": {\n            \"minimist\": \"1.2.0\"\n          }\n        }\n      }\n    },\n    \"locate-path\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz\",\n      \"integrity\": \"sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=\",\n      \"requires\": {\n        \"p-locate\": \"2.0.0\",\n        \"path-exists\": \"3.0.0\"\n      }\n    },\n    \"lodash\": {\n      \"version\": \"4.17.11\",\n      \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz\",\n      \"integrity\": \"sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==\"\n    },\n    \"lodash.assign\": {\n      \"version\": \"4.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz\",\n      \"integrity\": \"sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=\"\n    },\n    \"lodash.camelcase\": {\n      \"version\": \"4.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz\",\n      \"integrity\": \"sha1-soqmKIorn8ZRA1x3EfZathkDMaY=\"\n    },\n    \"lodash.clonedeep\": {\n      \"version\": \"4.5.0\",\n      \"resolved\": \"https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz\",\n      \"integrity\": \"sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=\"\n    },\n    \"lodash.debounce\": {\n      \"version\": \"4.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz\",\n      \"integrity\": \"sha1-gteb/zCmfEAF/9XiUVMArZyk168=\"\n    },\n    \"lodash.filter\": {\n      \"version\": \"4.6.0\",\n      \"resolved\": \"https://registry.npmjs.org/lodash.filter/-/lodash.filter-4.6.0.tgz\",\n      \"integrity\": \"sha1-ZosdSYFgOuHMWm+nYBQ+SAtMSs4=\"\n    },\n    \"lodash.groupby\": {\n      \"version\": \"4.6.0\",\n      \"resolved\": \"https://registry.npmjs.org/lodash.groupby/-/lodash.groupby-4.6.0.tgz\",\n      \"integrity\": \"sha1-Cwih3PaDl8OXhVwyOXg4Mt90A9E=\"\n    },\n    \"lodash.map\": {\n      \"version\": \"4.6.0\",\n      \"resolved\": \"https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz\",\n      \"integrity\": \"sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=\"\n    },\n    \"lodash.memoize\": {\n      \"version\": \"4.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz\",\n      \"integrity\": \"sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=\"\n    },\n    \"lodash.merge\": {\n      \"version\": \"4.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.1.tgz\",\n      \"integrity\": \"sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ==\"\n    },\n    \"lodash.uniq\": {\n      \"version\": \"4.5.0\",\n      \"resolved\": \"https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz\",\n      \"integrity\": \"sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=\"\n    },\n    \"log-driver\": {\n      \"version\": \"1.2.5\",\n      \"resolved\": \"https://registry.npmjs.org/log-driver/-/log-driver-1.2.5.tgz\",\n      \"integrity\": \"sha1-euTsJXMC/XkNVXyxDJcQDYV7AFY=\",\n      \"dev\": true\n    },\n    \"log-symbols\": {\n      \"version\": \"2.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz\",\n      \"integrity\": \"sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==\",\n      \"requires\": {\n        \"chalk\": \"2.4.2\"\n      }\n    },\n    \"loglevelnext\": {\n      \"version\": \"1.0.5\",\n      \"resolved\": \"https://registry.npmjs.org/loglevelnext/-/loglevelnext-1.0.5.tgz\",\n      \"integrity\": \"sha512-V/73qkPuJmx4BcBF19xPBr+0ZRVBhc4POxvZTZdMeXpJ4NItXSJ/MSwuFT0kQJlCbXvdlZoQQ/418bS1y9Jh6A==\",\n      \"requires\": {\n        \"es6-symbol\": \"3.1.1\",\n        \"object.assign\": \"4.1.1\"\n      }\n    },\n    \"longest\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/longest/-/longest-1.0.1.tgz\",\n      \"integrity\": \"sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=\"\n    },\n    \"longest-streak\": {\n      \"version\": \"2.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz\",\n      \"integrity\": \"sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==\"\n    },\n    \"loose-envify\": {\n      \"version\": \"1.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz\",\n      \"integrity\": \"sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==\",\n      \"requires\": {\n        \"js-tokens\": \"3.0.2\"\n      }\n    },\n    \"loud-rejection\": {\n      \"version\": \"1.6.0\",\n      \"resolved\": \"https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz\",\n      \"integrity\": \"sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=\",\n      \"requires\": {\n        \"currently-unhandled\": \"0.4.1\",\n        \"signal-exit\": \"3.0.2\"\n      }\n    },\n    \"lower-case\": {\n      \"version\": \"1.1.4\",\n      \"resolved\": \"https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz\",\n      \"integrity\": \"sha1-miyr0bno4K6ZOkv31YdcOcQujqw=\"\n    },\n    \"lru-cache\": {\n      \"version\": \"4.1.5\",\n      \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz\",\n      \"integrity\": \"sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==\",\n      \"requires\": {\n        \"pseudomap\": \"1.0.2\",\n        \"yallist\": \"2.1.2\"\n      }\n    },\n    \"make-dir\": {\n      \"version\": \"1.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz\",\n      \"integrity\": \"sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==\",\n      \"requires\": {\n        \"pify\": \"3.0.0\"\n      }\n    },\n    \"map-cache\": {\n      \"version\": \"0.2.2\",\n      \"resolved\": \"https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz\",\n      \"integrity\": \"sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=\"\n    },\n    \"map-obj\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz\",\n      \"integrity\": \"sha1-plzSkIepJZi4eRJXpSPgISIqwfk=\"\n    },\n    \"map-visit\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz\",\n      \"integrity\": \"sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=\",\n      \"requires\": {\n        \"object-visit\": \"1.0.1\"\n      }\n    },\n    \"markdown-escapes\": {\n      \"version\": \"1.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.4.tgz\",\n      \"integrity\": \"sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg==\"\n    },\n    \"markdown-table\": {\n      \"version\": \"1.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz\",\n      \"integrity\": \"sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==\"\n    },\n    \"math-expression-evaluator\": {\n      \"version\": \"1.2.17\",\n      \"resolved\": \"https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz\",\n      \"integrity\": \"sha1-3oGf282E3M2PrlnGrreWFbnSZqw=\"\n    },\n    \"mathml-tag-names\": {\n      \"version\": \"2.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz\",\n      \"integrity\": \"sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==\"\n    },\n    \"md5.js\": {\n      \"version\": \"1.3.5\",\n      \"resolved\": \"https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz\",\n      \"integrity\": \"sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==\",\n      \"requires\": {\n        \"hash-base\": \"3.0.4\",\n        \"inherits\": \"2.0.3\",\n        \"safe-buffer\": \"5.1.2\"\n      }\n    },\n    \"mdast-util-compact\": {\n      \"version\": \"1.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/mdast-util-compact/-/mdast-util-compact-1.0.4.tgz\",\n      \"integrity\": \"sha512-3YDMQHI5vRiS2uygEFYaqckibpJtKq5Sj2c8JioeOQBU6INpKbdWzfyLqFFnDwEcEnRFIdMsguzs5pC1Jp4Isg==\",\n      \"requires\": {\n        \"unist-util-visit\": \"1.4.1\"\n      }\n    },\n    \"mdn-data\": {\n      \"version\": \"1.1.4\",\n      \"resolved\": \"https://registry.npmjs.org/mdn-data/-/mdn-data-1.1.4.tgz\",\n      \"integrity\": \"sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA==\"\n    },\n    \"media-typer\": {\n      \"version\": \"0.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz\",\n      \"integrity\": \"sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=\"\n    },\n    \"mem\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/mem/-/mem-1.1.0.tgz\",\n      \"integrity\": \"sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=\",\n      \"requires\": {\n        \"mimic-fn\": \"1.2.0\"\n      }\n    },\n    \"memory-fs\": {\n      \"version\": \"0.4.1\",\n      \"resolved\": \"https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz\",\n      \"integrity\": \"sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=\",\n      \"requires\": {\n        \"errno\": \"0.1.7\",\n        \"readable-stream\": \"2.3.6\"\n      }\n    },\n    \"meow\": {\n      \"version\": \"5.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/meow/-/meow-5.0.0.tgz\",\n      \"integrity\": \"sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==\",\n      \"requires\": {\n        \"camelcase-keys\": \"4.2.0\",\n        \"decamelize-keys\": \"1.1.0\",\n        \"loud-rejection\": \"1.6.0\",\n        \"minimist-options\": \"3.0.2\",\n        \"normalize-package-data\": \"2.4.0\",\n        \"read-pkg-up\": \"3.0.0\",\n        \"redent\": \"2.0.0\",\n        \"trim-newlines\": \"2.0.0\",\n        \"yargs-parser\": \"10.1.0\"\n      }\n    },\n    \"merge-descriptors\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz\",\n      \"integrity\": \"sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=\"\n    },\n    \"merge2\": {\n      \"version\": \"1.4.1\",\n      \"resolved\": \"https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz\",\n      \"integrity\": \"sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==\"\n    },\n    \"methods\": {\n      \"version\": \"1.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/methods/-/methods-1.1.2.tgz\",\n      \"integrity\": \"sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=\"\n    },\n    \"micromatch\": {\n      \"version\": \"3.1.10\",\n      \"resolved\": \"https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz\",\n      \"integrity\": \"sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==\",\n      \"requires\": {\n        \"arr-diff\": \"4.0.0\",\n        \"array-unique\": \"0.3.2\",\n        \"braces\": \"2.3.2\",\n        \"define-property\": \"2.0.2\",\n        \"extend-shallow\": \"3.0.2\",\n        \"extglob\": \"2.0.4\",\n        \"fragment-cache\": \"0.2.1\",\n        \"kind-of\": \"6.0.2\",\n        \"nanomatch\": \"1.2.13\",\n        \"object.pick\": \"1.3.0\",\n        \"regex-not\": \"1.0.2\",\n        \"snapdragon\": \"0.8.2\",\n        \"to-regex\": \"3.0.2\"\n      }\n    },\n    \"miller-rabin\": {\n      \"version\": \"4.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz\",\n      \"integrity\": \"sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==\",\n      \"requires\": {\n        \"bn.js\": \"4.11.8\",\n        \"brorand\": \"1.1.0\"\n      }\n    },\n    \"mime\": {\n      \"version\": \"2.4.6\",\n      \"resolved\": \"https://registry.npmjs.org/mime/-/mime-2.4.6.tgz\",\n      \"integrity\": \"sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA==\"\n    },\n    \"mime-db\": {\n      \"version\": \"1.37.0\",\n      \"resolved\": \"https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz\",\n      \"integrity\": \"sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==\"\n    },\n    \"mime-types\": {\n      \"version\": \"2.1.21\",\n      \"resolved\": \"https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz\",\n      \"integrity\": \"sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==\",\n      \"requires\": {\n        \"mime-db\": \"1.37.0\"\n      }\n    },\n    \"mimic-fn\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz\",\n      \"integrity\": \"sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==\"\n    },\n    \"minimalistic-assert\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz\",\n      \"integrity\": \"sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==\"\n    },\n    \"minimalistic-crypto-utils\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz\",\n      \"integrity\": \"sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=\"\n    },\n    \"minimatch\": {\n      \"version\": \"3.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz\",\n      \"integrity\": \"sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==\",\n      \"requires\": {\n        \"brace-expansion\": \"1.1.11\"\n      }\n    },\n    \"minimist\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz\",\n      \"integrity\": \"sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=\"\n    },\n    \"minimist-options\": {\n      \"version\": \"3.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz\",\n      \"integrity\": \"sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==\",\n      \"requires\": {\n        \"arrify\": \"1.0.1\",\n        \"is-plain-obj\": \"1.1.0\"\n      }\n    },\n    \"mississippi\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz\",\n      \"integrity\": \"sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==\",\n      \"requires\": {\n        \"concat-stream\": \"1.6.2\",\n        \"duplexify\": \"3.6.1\",\n        \"end-of-stream\": \"1.4.1\",\n        \"flush-write-stream\": \"1.0.3\",\n        \"from2\": \"2.3.0\",\n        \"parallel-transform\": \"1.1.0\",\n        \"pump\": \"2.0.1\",\n        \"pumpify\": \"1.5.1\",\n        \"stream-each\": \"1.2.3\",\n        \"through2\": \"2.0.5\"\n      }\n    },\n    \"mixin-deep\": {\n      \"version\": \"1.3.1\",\n      \"resolved\": \"https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz\",\n      \"integrity\": \"sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==\",\n      \"requires\": {\n        \"for-in\": \"1.0.2\",\n        \"is-extendable\": \"1.0.1\"\n      },\n      \"dependencies\": {\n        \"is-extendable\": {\n          \"version\": \"1.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz\",\n          \"integrity\": \"sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==\",\n          \"requires\": {\n            \"is-plain-object\": \"2.0.4\"\n          }\n        }\n      }\n    },\n    \"mkdirp\": {\n      \"version\": \"0.5.1\",\n      \"resolved\": \"https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz\",\n      \"integrity\": \"sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=\",\n      \"requires\": {\n        \"minimist\": \"0.0.8\"\n      },\n      \"dependencies\": {\n        \"minimist\": {\n          \"version\": \"0.0.8\",\n          \"resolved\": \"https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz\",\n          \"integrity\": \"sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=\"\n        }\n      }\n    },\n    \"mocha\": {\n      \"version\": \"5.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz\",\n      \"integrity\": \"sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==\",\n      \"dev\": true,\n      \"requires\": {\n        \"browser-stdout\": \"1.3.1\",\n        \"commander\": \"2.15.1\",\n        \"debug\": \"3.1.0\",\n        \"diff\": \"3.5.0\",\n        \"escape-string-regexp\": \"1.0.5\",\n        \"glob\": \"7.1.2\",\n        \"growl\": \"1.10.5\",\n        \"he\": \"1.1.1\",\n        \"minimatch\": \"3.0.4\",\n        \"mkdirp\": \"0.5.1\",\n        \"supports-color\": \"5.4.0\"\n      },\n      \"dependencies\": {\n        \"commander\": {\n          \"version\": \"2.15.1\",\n          \"resolved\": \"https://registry.npmjs.org/commander/-/commander-2.15.1.tgz\",\n          \"integrity\": \"sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==\",\n          \"dev\": true\n        },\n        \"debug\": {\n          \"version\": \"3.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/debug/-/debug-3.1.0.tgz\",\n          \"integrity\": \"sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==\",\n          \"dev\": true,\n          \"requires\": {\n            \"ms\": \"2.0.0\"\n          }\n        },\n        \"he\": {\n          \"version\": \"1.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/he/-/he-1.1.1.tgz\",\n          \"integrity\": \"sha1-k0EP0hsAlzUVH4howvJx80J+I/0=\",\n          \"dev\": true\n        },\n        \"supports-color\": {\n          \"version\": \"5.4.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz\",\n          \"integrity\": \"sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==\",\n          \"dev\": true,\n          \"requires\": {\n            \"has-flag\": \"3.0.0\"\n          }\n        }\n      }\n    },\n    \"move-concurrently\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz\",\n      \"integrity\": \"sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=\",\n      \"requires\": {\n        \"aproba\": \"1.2.0\",\n        \"copy-concurrently\": \"1.0.5\",\n        \"fs-write-stream-atomic\": \"1.0.10\",\n        \"mkdirp\": \"0.5.1\",\n        \"rimraf\": \"2.6.3\",\n        \"run-queue\": \"1.0.3\"\n      }\n    },\n    \"ms\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.0.0.tgz\",\n      \"integrity\": \"sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=\"\n    },\n    \"mute-stream\": {\n      \"version\": \"0.0.7\",\n      \"resolved\": \"https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz\",\n      \"integrity\": \"sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=\"\n    },\n    \"mvvm-babel-generator\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/mvvm-babel-generator/-/mvvm-babel-generator-1.0.8.tgz\",\n      \"integrity\": \"sha512-V1ETGVZIxAlK31DwzY31KNY3jKrV98E82B8ckmbuF75VkBvwLAhUiJht/rCN2C7N7dG/oEq8Xxu23tdcElXysQ==\",\n      \"requires\": {\n        \"@babel/types\": \"7.2.2\",\n        \"jsesc\": \"2.5.2\",\n        \"lodash\": \"4.17.11\",\n        \"source-map\": \"0.5.7\",\n        \"trim-right\": \"1.0.1\"\n      },\n      \"dependencies\": {\n        \"jsesc\": {\n          \"version\": \"2.5.2\",\n          \"resolved\": \"https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz\",\n          \"integrity\": \"sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==\"\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        }\n      }\n    },\n    \"mvvm-babel-parser\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/mvvm-babel-parser/-/mvvm-babel-parser-1.0.8.tgz\",\n      \"integrity\": \"sha512-xLRupxOWaKF/9vQcsDul21tN9gBoY2KScGlEGWzOJWFuGmxI+VuAA07ETdMtUbkn3ZCxFaPLvk40ouYTxhkdtg==\",\n      \"requires\": {\n        \"babel-generator\": \"6.26.1\",\n        \"babel-traverse\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\",\n        \"chai\": \"4.2.0\"\n      }\n    },\n    \"mvvm-cml-loader\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/mvvm-cml-loader/-/mvvm-cml-loader-1.0.8.tgz\",\n      \"integrity\": \"sha512-OMgsHdMDTNnfL89H5Ne8xuKsauBbBGAVB5eo3XC3Yb4OGQtGtkwDC5/c5ao56V92xq2Ac0HObVzOGojtfQsZjA==\",\n      \"requires\": {\n        \"chameleon-loader\": \"1.0.8\",\n        \"chameleon-tool-utils\": \"1.0.8\",\n        \"loader-utils\": \"1.1.0\",\n        \"mvvm-template-parser\": \"1.0.8\"\n      },\n      \"dependencies\": {\n        \"big.js\": {\n          \"version\": \"3.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz\",\n          \"integrity\": \"sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==\"\n        },\n        \"loader-utils\": {\n          \"version\": \"1.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz\",\n          \"integrity\": \"sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=\",\n          \"requires\": {\n            \"big.js\": \"3.2.0\",\n            \"emojis-list\": \"2.1.0\",\n            \"json5\": \"0.5.1\"\n          }\n        }\n      }\n    },\n    \"mvvm-file-loader\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/mvvm-file-loader/-/mvvm-file-loader-1.0.8.tgz\",\n      \"integrity\": \"sha512-hnefDb7k63qhua7i9TcLZcsD1ExXlpAUx5x39+P9L+yQZqyrNBUSI1vHHKB6+depK63NZW+AODNTeIj1hatfCg==\",\n      \"requires\": {\n        \"loader-utils\": \"1.2.3\",\n        \"mime\": \"2.4.6\",\n        \"schema-utils\": \"0.4.7\"\n      },\n      \"dependencies\": {\n        \"schema-utils\": {\n          \"version\": \"0.4.7\",\n          \"resolved\": \"https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz\",\n          \"integrity\": \"sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==\",\n          \"requires\": {\n            \"ajv\": \"6.6.2\",\n            \"ajv-keywords\": \"3.2.0\"\n          }\n        }\n      }\n    },\n    \"mvvm-miniapp-loader\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/mvvm-miniapp-loader/-/mvvm-miniapp-loader-1.0.8.tgz\",\n      \"integrity\": \"sha512-ZBuoR38MlJW4t6daMTBjie4mBoOi/+LsfheFlLfFFMfSmnjgrpihO1+Mdx7cFSNfv5ZXD+taqowx6mqwRYGiXg==\",\n      \"requires\": {\n        \"loader-utils\": \"1.2.3\"\n      }\n    },\n    \"mvvm-pack\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/mvvm-pack/-/mvvm-pack-1.0.8.tgz\",\n      \"integrity\": \"sha512-/4GdqFsIzn1uCGzgIVm88xOFhVUBUha2FisqGmHYMzspUfp33gb2X1CzdCAsihQ68EW2GSqsAfW1E0MphzqXIw==\",\n      \"requires\": {\n        \"@babel/core\": \"7.12.3\",\n        \"@babel/generator\": \"7.12.5\",\n        \"@babel/parser\": \"7.12.5\",\n        \"@babel/traverse\": \"7.12.5\",\n        \"@babel/types\": \"7.12.6\",\n        \"chameleon-tool-utils\": \"1.0.8\",\n        \"chameleon-webpack-plugin\": \"1.0.8\",\n        \"csso\": \"3.5.1\",\n        \"mvvm-babel-parser\": \"1.0.8\",\n        \"mvvm-template-parser\": \"1.0.8\",\n        \"runtime-check\": \"1.0.8\",\n        \"uglify-js\": \"3.11.5\",\n        \"webpack-merge\": \"4.2.2\"\n      },\n      \"dependencies\": {\n        \"@babel/code-frame\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz\",\n          \"integrity\": \"sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==\",\n          \"requires\": {\n            \"@babel/highlight\": \"7.10.4\"\n          }\n        },\n        \"@babel/generator\": {\n          \"version\": \"7.12.5\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz\",\n          \"integrity\": \"sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.6\",\n            \"jsesc\": \"2.5.2\",\n            \"source-map\": \"0.5.7\"\n          }\n        },\n        \"@babel/helper-function-name\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz\",\n          \"integrity\": \"sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==\",\n          \"requires\": {\n            \"@babel/helper-get-function-arity\": \"7.10.4\",\n            \"@babel/template\": \"7.10.4\",\n            \"@babel/types\": \"7.12.6\"\n          }\n        },\n        \"@babel/helper-get-function-arity\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz\",\n          \"integrity\": \"sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.6\"\n          }\n        },\n        \"@babel/helper-split-export-declaration\": {\n          \"version\": \"7.11.0\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz\",\n          \"integrity\": \"sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.6\"\n          }\n        },\n        \"@babel/highlight\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz\",\n          \"integrity\": \"sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==\",\n          \"requires\": {\n            \"@babel/helper-validator-identifier\": \"7.10.4\",\n            \"chalk\": \"2.4.2\",\n            \"js-tokens\": \"4.0.0\"\n          }\n        },\n        \"@babel/parser\": {\n          \"version\": \"7.12.5\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz\",\n          \"integrity\": \"sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==\"\n        },\n        \"@babel/template\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz\",\n          \"integrity\": \"sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==\",\n          \"requires\": {\n            \"@babel/code-frame\": \"7.10.4\",\n            \"@babel/parser\": \"7.12.5\",\n            \"@babel/types\": \"7.12.6\"\n          }\n        },\n        \"@babel/traverse\": {\n          \"version\": \"7.12.5\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.5.tgz\",\n          \"integrity\": \"sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA==\",\n          \"requires\": {\n            \"@babel/code-frame\": \"7.10.4\",\n            \"@babel/generator\": \"7.12.5\",\n            \"@babel/helper-function-name\": \"7.10.4\",\n            \"@babel/helper-split-export-declaration\": \"7.11.0\",\n            \"@babel/parser\": \"7.12.5\",\n            \"@babel/types\": \"7.12.6\",\n            \"debug\": \"4.2.0\",\n            \"globals\": \"11.12.0\",\n            \"lodash\": \"4.17.20\"\n          }\n        },\n        \"@babel/types\": {\n          \"version\": \"7.12.6\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz\",\n          \"integrity\": \"sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==\",\n          \"requires\": {\n            \"@babel/helper-validator-identifier\": \"7.10.4\",\n            \"lodash\": \"4.17.20\",\n            \"to-fast-properties\": \"2.0.0\"\n          }\n        },\n        \"csso\": {\n          \"version\": \"3.5.1\",\n          \"resolved\": \"https://registry.npmjs.org/csso/-/csso-3.5.1.tgz\",\n          \"integrity\": \"sha512-vrqULLffYU1Q2tLdJvaCYbONStnfkfimRxXNaGjxMldI0C7JPBC4rB1RyjhfdZ4m1frm8pM9uRPKH3d2knZ8gg==\",\n          \"requires\": {\n            \"css-tree\": \"1.0.0-alpha.29\"\n          }\n        },\n        \"debug\": {\n          \"version\": \"4.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.2.0.tgz\",\n          \"integrity\": \"sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==\",\n          \"requires\": {\n            \"ms\": \"2.1.2\"\n          }\n        },\n        \"globals\": {\n          \"version\": \"11.12.0\",\n          \"resolved\": \"https://registry.npmjs.org/globals/-/globals-11.12.0.tgz\",\n          \"integrity\": \"sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==\"\n        },\n        \"js-tokens\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz\",\n          \"integrity\": \"sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==\"\n        },\n        \"jsesc\": {\n          \"version\": \"2.5.2\",\n          \"resolved\": \"https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz\",\n          \"integrity\": \"sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==\"\n        },\n        \"lodash\": {\n          \"version\": \"4.17.20\",\n          \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz\",\n          \"integrity\": \"sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==\"\n        },\n        \"ms\": {\n          \"version\": \"2.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.2.tgz\",\n          \"integrity\": \"sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==\"\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"to-fast-properties\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz\",\n          \"integrity\": \"sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=\"\n        },\n        \"uglify-js\": {\n          \"version\": \"3.11.5\",\n          \"resolved\": \"https://registry.npmjs.org/uglify-js/-/uglify-js-3.11.5.tgz\",\n          \"integrity\": \"sha512-btvv/baMqe7HxP7zJSF7Uc16h1mSfuuSplT0/qdjxseesDU+yYzH33eHBH+eMdeRXwujXspaCTooWHQVVBh09w==\"\n        },\n        \"webpack-merge\": {\n          \"version\": \"4.2.2\",\n          \"resolved\": \"https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.2.2.tgz\",\n          \"integrity\": \"sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==\",\n          \"requires\": {\n            \"lodash\": \"4.17.20\"\n          }\n        }\n      }\n    },\n    \"mvvm-style-loader\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/mvvm-style-loader/-/mvvm-style-loader-1.0.8.tgz\",\n      \"integrity\": \"sha512-b/u23iK1OVsxad2eM3vEam5Lqaz+EuSk8d012MeRC2Sp/7ba31MLVa4/aRXafHgbsj9pRbnVE6tLWYBlLQCMCA==\",\n      \"requires\": {\n        \"chameleon-tool-utils\": \"1.0.8\",\n        \"postcss\": \"7.0.14\"\n      },\n      \"dependencies\": {\n        \"postcss\": {\n          \"version\": \"7.0.14\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-7.0.14.tgz\",\n          \"integrity\": \"sha512-NsbD6XUUMZvBxtQAJuWDJeeC4QFsmWsfozWxCJPWf3M55K9iu2iMDaKqyoOdTJ1R4usBXuxlVFAIo8rZPQD4Bg==\",\n          \"requires\": {\n            \"chalk\": \"2.4.2\",\n            \"source-map\": \"0.6.1\",\n            \"supports-color\": \"6.1.0\"\n          }\n        },\n        \"supports-color\": {\n          \"version\": \"6.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz\",\n          \"integrity\": \"sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==\",\n          \"requires\": {\n            \"has-flag\": \"3.0.0\"\n          }\n        }\n      }\n    },\n    \"mvvm-template-parser\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/mvvm-template-parser/-/mvvm-template-parser-1.0.8.tgz\",\n      \"integrity\": \"sha512-pSnkfE04VruSOwJuWu3GuxFqGkgvQTVfpQz+ukQjZ1E5jQdX9jMy3b0OMDmm3juMWn6mD0tqvWYKMEyK8NKq+w==\",\n      \"requires\": {\n        \"@babel/traverse\": \"7.12.5\",\n        \"@babel/types\": \"7.12.6\",\n        \"mvvm-babel-generator\": \"1.0.8\",\n        \"mvvm-babel-parser\": \"1.0.8\"\n      },\n      \"dependencies\": {\n        \"@babel/code-frame\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz\",\n          \"integrity\": \"sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==\",\n          \"requires\": {\n            \"@babel/highlight\": \"7.10.4\"\n          }\n        },\n        \"@babel/generator\": {\n          \"version\": \"7.12.5\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz\",\n          \"integrity\": \"sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.6\",\n            \"jsesc\": \"2.5.2\",\n            \"source-map\": \"0.5.7\"\n          }\n        },\n        \"@babel/helper-function-name\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz\",\n          \"integrity\": \"sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==\",\n          \"requires\": {\n            \"@babel/helper-get-function-arity\": \"7.10.4\",\n            \"@babel/template\": \"7.10.4\",\n            \"@babel/types\": \"7.12.6\"\n          }\n        },\n        \"@babel/helper-get-function-arity\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz\",\n          \"integrity\": \"sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.6\"\n          }\n        },\n        \"@babel/helper-split-export-declaration\": {\n          \"version\": \"7.11.0\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz\",\n          \"integrity\": \"sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==\",\n          \"requires\": {\n            \"@babel/types\": \"7.12.6\"\n          }\n        },\n        \"@babel/highlight\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz\",\n          \"integrity\": \"sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==\",\n          \"requires\": {\n            \"@babel/helper-validator-identifier\": \"7.10.4\",\n            \"chalk\": \"2.4.2\",\n            \"js-tokens\": \"4.0.0\"\n          }\n        },\n        \"@babel/parser\": {\n          \"version\": \"7.12.5\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz\",\n          \"integrity\": \"sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==\"\n        },\n        \"@babel/template\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz\",\n          \"integrity\": \"sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==\",\n          \"requires\": {\n            \"@babel/code-frame\": \"7.10.4\",\n            \"@babel/parser\": \"7.12.5\",\n            \"@babel/types\": \"7.12.6\"\n          }\n        },\n        \"@babel/traverse\": {\n          \"version\": \"7.12.5\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.5.tgz\",\n          \"integrity\": \"sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA==\",\n          \"requires\": {\n            \"@babel/code-frame\": \"7.10.4\",\n            \"@babel/generator\": \"7.12.5\",\n            \"@babel/helper-function-name\": \"7.10.4\",\n            \"@babel/helper-split-export-declaration\": \"7.11.0\",\n            \"@babel/parser\": \"7.12.5\",\n            \"@babel/types\": \"7.12.6\",\n            \"debug\": \"4.2.0\",\n            \"globals\": \"11.12.0\",\n            \"lodash\": \"4.17.20\"\n          }\n        },\n        \"@babel/types\": {\n          \"version\": \"7.12.6\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz\",\n          \"integrity\": \"sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==\",\n          \"requires\": {\n            \"@babel/helper-validator-identifier\": \"7.10.4\",\n            \"lodash\": \"4.17.20\",\n            \"to-fast-properties\": \"2.0.0\"\n          }\n        },\n        \"debug\": {\n          \"version\": \"4.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.2.0.tgz\",\n          \"integrity\": \"sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==\",\n          \"requires\": {\n            \"ms\": \"2.1.2\"\n          }\n        },\n        \"globals\": {\n          \"version\": \"11.12.0\",\n          \"resolved\": \"https://registry.npmjs.org/globals/-/globals-11.12.0.tgz\",\n          \"integrity\": \"sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==\"\n        },\n        \"js-tokens\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz\",\n          \"integrity\": \"sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==\"\n        },\n        \"jsesc\": {\n          \"version\": \"2.5.2\",\n          \"resolved\": \"https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz\",\n          \"integrity\": \"sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==\"\n        },\n        \"lodash\": {\n          \"version\": \"4.17.20\",\n          \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz\",\n          \"integrity\": \"sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==\"\n        },\n        \"ms\": {\n          \"version\": \"2.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.2.tgz\",\n          \"integrity\": \"sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==\"\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"to-fast-properties\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz\",\n          \"integrity\": \"sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=\"\n        }\n      }\n    },\n    \"nan\": {\n      \"version\": \"2.13.2\",\n      \"resolved\": \"https://registry.npmjs.org/nan/-/nan-2.13.2.tgz\",\n      \"integrity\": \"sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==\",\n      \"optional\": true\n    },\n    \"nanomatch\": {\n      \"version\": \"1.2.13\",\n      \"resolved\": \"https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz\",\n      \"integrity\": \"sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==\",\n      \"requires\": {\n        \"arr-diff\": \"4.0.0\",\n        \"array-unique\": \"0.3.2\",\n        \"define-property\": \"2.0.2\",\n        \"extend-shallow\": \"3.0.2\",\n        \"fragment-cache\": \"0.2.1\",\n        \"is-windows\": \"1.0.2\",\n        \"kind-of\": \"6.0.2\",\n        \"object.pick\": \"1.3.0\",\n        \"regex-not\": \"1.0.2\",\n        \"snapdragon\": \"0.8.2\",\n        \"to-regex\": \"3.0.2\"\n      }\n    },\n    \"natural-compare\": {\n      \"version\": \"1.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz\",\n      \"integrity\": \"sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=\",\n      \"dev\": true\n    },\n    \"negotiator\": {\n      \"version\": \"0.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz\",\n      \"integrity\": \"sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=\"\n    },\n    \"neo-async\": {\n      \"version\": \"2.6.0\",\n      \"resolved\": \"https://registry.npmjs.org/neo-async/-/neo-async-2.6.0.tgz\",\n      \"integrity\": \"sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==\"\n    },\n    \"next-tick\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz\",\n      \"integrity\": \"sha1-yobR/ogoFpsBICCOPchCS524NCw=\"\n    },\n    \"nice-try\": {\n      \"version\": \"1.0.5\",\n      \"resolved\": \"https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz\",\n      \"integrity\": \"sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==\",\n      \"dev\": true\n    },\n    \"no-case\": {\n      \"version\": \"2.3.2\",\n      \"resolved\": \"https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz\",\n      \"integrity\": \"sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==\",\n      \"requires\": {\n        \"lower-case\": \"1.1.4\"\n      }\n    },\n    \"node-forge\": {\n      \"version\": \"0.6.49\",\n      \"resolved\": \"https://registry.npmjs.org/node-forge/-/node-forge-0.6.49.tgz\",\n      \"integrity\": \"sha1-8e6V1ddGI5OP4Z1piqWibVTS9g8=\"\n    },\n    \"node-libs-browser\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz\",\n      \"integrity\": \"sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==\",\n      \"requires\": {\n        \"assert\": \"1.4.1\",\n        \"browserify-zlib\": \"0.2.0\",\n        \"buffer\": \"4.9.1\",\n        \"console-browserify\": \"1.1.0\",\n        \"constants-browserify\": \"1.0.0\",\n        \"crypto-browserify\": \"3.12.0\",\n        \"domain-browser\": \"1.2.0\",\n        \"events\": \"1.1.1\",\n        \"https-browserify\": \"1.0.0\",\n        \"os-browserify\": \"0.3.0\",\n        \"path-browserify\": \"0.0.0\",\n        \"process\": \"0.11.10\",\n        \"punycode\": \"1.4.1\",\n        \"querystring-es3\": \"0.2.1\",\n        \"readable-stream\": \"2.3.6\",\n        \"stream-browserify\": \"2.0.1\",\n        \"stream-http\": \"2.8.3\",\n        \"string_decoder\": \"1.1.1\",\n        \"timers-browserify\": \"2.0.10\",\n        \"tty-browserify\": \"0.0.0\",\n        \"url\": \"0.11.0\",\n        \"util\": \"0.10.4\",\n        \"vm-browserify\": \"0.0.4\"\n      },\n      \"dependencies\": {\n        \"punycode\": {\n          \"version\": \"1.4.1\",\n          \"resolved\": \"https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz\",\n          \"integrity\": \"sha1-wNWmOycYgArY4esPpSachN1BhF4=\"\n        }\n      }\n    },\n    \"node-mitmproxy\": {\n      \"version\": \"3.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/node-mitmproxy/-/node-mitmproxy-3.1.1.tgz\",\n      \"integrity\": \"sha512-oddTzpXUpSD0J1nRnfjqkF1cxe1gXR94v2uViyZaapnPK/R0yn5iuDPLqyqfTG82uXrCrrCjo7in0Y+ZregYBg==\",\n      \"requires\": {\n        \"agentkeepalive\": \"2.2.0\",\n        \"babel-core\": \"6.26.3\",\n        \"babel-plugin-transform-async-to-generator\": \"6.24.1\",\n        \"babel-polyfill\": \"6.26.0\",\n        \"babel-preset-es2015\": \"6.24.1\",\n        \"babel-register\": \"6.26.0\",\n        \"charset\": \"1.0.1\",\n        \"colors\": \"1.4.0\",\n        \"commander\": \"2.16.0\",\n        \"iconv-lite\": \"0.4.23\",\n        \"jschardet\": \"1.6.0\",\n        \"lodash\": \"4.17.11\",\n        \"mkdirp\": \"0.5.1\",\n        \"node-forge\": \"0.6.49\",\n        \"through2\": \"2.0.5\",\n        \"tunnel-agent\": \"0.4.3\"\n      }\n    },\n    \"node-phpcgi\": {\n      \"version\": \"0.3.7\",\n      \"resolved\": \"https://registry.npmjs.org/node-phpcgi/-/node-phpcgi-0.3.7.tgz\",\n      \"integrity\": \"sha1-J33Di28HKpk6mdlJQsY/uA7QgLU=\"\n    },\n    \"node-releases\": {\n      \"version\": \"1.1.64\",\n      \"resolved\": \"https://registry.npmjs.org/node-releases/-/node-releases-1.1.64.tgz\",\n      \"integrity\": \"sha512-Iec8O9166/x2HRMJyLLLWkd0sFFLrFNy+Xf+JQfSQsdBJzPcHpNl3JQ9gD4j+aJxmCa25jNsIbM4bmACtSbkSg==\"\n    },\n    \"node-watch\": {\n      \"version\": \"0.5.9\",\n      \"resolved\": \"https://registry.npmjs.org/node-watch/-/node-watch-0.5.9.tgz\",\n      \"integrity\": \"sha512-W0SgGKaB9qSCfFfNj2uQZ/5BlVumaNHjVCAPdEoXrkEJ3ynSf/806LEz1rbDFbJ4+PL9G8IxRkJJTvZndd5D9g==\"\n    },\n    \"nopt\": {\n      \"version\": \"5.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz\",\n      \"integrity\": \"sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==\",\n      \"requires\": {\n        \"abbrev\": \"1.1.1\"\n      }\n    },\n    \"normalize-package-data\": {\n      \"version\": \"2.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz\",\n      \"integrity\": \"sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==\",\n      \"requires\": {\n        \"hosted-git-info\": \"2.7.1\",\n        \"is-builtin-module\": \"1.0.0\",\n        \"semver\": \"5.6.0\",\n        \"validate-npm-package-license\": \"3.0.4\"\n      }\n    },\n    \"normalize-path\": {\n      \"version\": \"2.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz\",\n      \"integrity\": \"sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=\",\n      \"requires\": {\n        \"remove-trailing-separator\": \"1.1.0\"\n      }\n    },\n    \"normalize-range\": {\n      \"version\": \"0.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz\",\n      \"integrity\": \"sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=\"\n    },\n    \"normalize-selector\": {\n      \"version\": \"0.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/normalize-selector/-/normalize-selector-0.2.0.tgz\",\n      \"integrity\": \"sha1-0LFF62kRicY6eNIB3E/bEpPvDAM=\"\n    },\n    \"normalize-url\": {\n      \"version\": \"1.9.1\",\n      \"resolved\": \"https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz\",\n      \"integrity\": \"sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=\",\n      \"requires\": {\n        \"object-assign\": \"4.1.1\",\n        \"prepend-http\": \"1.0.4\",\n        \"query-string\": \"4.3.4\",\n        \"sort-keys\": \"1.1.2\"\n      }\n    },\n    \"npm-run-path\": {\n      \"version\": \"2.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz\",\n      \"integrity\": \"sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=\",\n      \"requires\": {\n        \"path-key\": \"2.0.1\"\n      }\n    },\n    \"nth-check\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz\",\n      \"integrity\": \"sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==\",\n      \"requires\": {\n        \"boolbase\": \"1.0.0\"\n      }\n    },\n    \"num2fraction\": {\n      \"version\": \"1.2.2\",\n      \"resolved\": \"https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz\",\n      \"integrity\": \"sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=\"\n    },\n    \"number-is-nan\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz\",\n      \"integrity\": \"sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=\"\n    },\n    \"nyc\": {\n      \"version\": \"13.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/nyc/-/nyc-13.1.0.tgz\",\n      \"integrity\": \"sha512-3GyY6TpQ58z9Frpv4GMExE1SV2tAgYqC7HSy2omEhNiCT3mhT9NyiOvIE8zkbuJVFzmvvNTnE4h/7/wQae7xLg==\",\n      \"dev\": true,\n      \"requires\": {\n        \"archy\": \"1.0.0\",\n        \"arrify\": \"1.0.1\",\n        \"caching-transform\": \"2.0.0\",\n        \"convert-source-map\": \"1.6.0\",\n        \"debug-log\": \"1.0.1\",\n        \"find-cache-dir\": \"2.0.0\",\n        \"find-up\": \"3.0.0\",\n        \"foreground-child\": \"1.5.6\",\n        \"glob\": \"7.1.3\",\n        \"istanbul-lib-coverage\": \"2.0.1\",\n        \"istanbul-lib-hook\": \"2.0.1\",\n        \"istanbul-lib-instrument\": \"3.0.0\",\n        \"istanbul-lib-report\": \"2.0.2\",\n        \"istanbul-lib-source-maps\": \"2.0.1\",\n        \"istanbul-reports\": \"2.0.1\",\n        \"make-dir\": \"1.3.0\",\n        \"merge-source-map\": \"1.1.0\",\n        \"resolve-from\": \"4.0.0\",\n        \"rimraf\": \"2.6.2\",\n        \"signal-exit\": \"3.0.2\",\n        \"spawn-wrap\": \"1.4.2\",\n        \"test-exclude\": \"5.0.0\",\n        \"uuid\": \"3.3.2\",\n        \"yargs\": \"11.1.0\",\n        \"yargs-parser\": \"9.0.2\"\n      },\n      \"dependencies\": {\n        \"align-text\": {\n          \"version\": \"0.1.4\",\n          \"resolved\": \"https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz\",\n          \"integrity\": \"sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=\",\n          \"dev\": true,\n          \"requires\": {\n            \"kind-of\": \"3.2.2\",\n            \"longest\": \"1.0.1\",\n            \"repeat-string\": \"1.6.1\"\n          }\n        },\n        \"amdefine\": {\n          \"version\": \"1.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz\",\n          \"integrity\": \"sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=\",\n          \"dev\": true\n        },\n        \"ansi-regex\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz\",\n          \"integrity\": \"sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=\",\n          \"dev\": true\n        },\n        \"append-transform\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz\",\n          \"integrity\": \"sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==\",\n          \"dev\": true,\n          \"requires\": {\n            \"default-require-extensions\": \"2.0.0\"\n          }\n        },\n        \"archy\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/archy/-/archy-1.0.0.tgz\",\n          \"integrity\": \"sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=\",\n          \"dev\": true\n        },\n        \"arrify\": {\n          \"version\": \"1.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz\",\n          \"integrity\": \"sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=\",\n          \"dev\": true\n        },\n        \"async\": {\n          \"version\": \"1.5.2\",\n          \"resolved\": \"https://registry.npmjs.org/async/-/async-1.5.2.tgz\",\n          \"integrity\": \"sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=\",\n          \"dev\": true\n        },\n        \"balanced-match\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz\",\n          \"integrity\": \"sha1-ibTRmasr7kneFk6gK4nORi1xt2c=\",\n          \"dev\": true\n        },\n        \"brace-expansion\": {\n          \"version\": \"1.1.11\",\n          \"resolved\": \"https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz\",\n          \"integrity\": \"sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==\",\n          \"dev\": true,\n          \"requires\": {\n            \"balanced-match\": \"1.0.0\",\n            \"concat-map\": \"0.0.1\"\n          }\n        },\n        \"builtin-modules\": {\n          \"version\": \"1.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz\",\n          \"integrity\": \"sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=\",\n          \"dev\": true\n        },\n        \"caching-transform\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/caching-transform/-/caching-transform-2.0.0.tgz\",\n          \"integrity\": \"sha512-tTfemGmFWe7KZ3KN6VsSgQZbd9Bgo7A40wlp4PTsJJvFu4YAnEC5YnfdiKq6Vh2i9XJLnA9n8OXD46orVpnPMw==\",\n          \"dev\": true,\n          \"requires\": {\n            \"make-dir\": \"1.3.0\",\n            \"md5-hex\": \"2.0.0\",\n            \"package-hash\": \"2.0.0\",\n            \"write-file-atomic\": \"2.3.0\"\n          }\n        },\n        \"camelcase\": {\n          \"version\": \"1.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz\",\n          \"integrity\": \"sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=\",\n          \"dev\": true,\n          \"optional\": true\n        },\n        \"center-align\": {\n          \"version\": \"0.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz\",\n          \"integrity\": \"sha1-qg0yYptu6XIgBBHL1EYckHvCt60=\",\n          \"dev\": true,\n          \"optional\": true,\n          \"requires\": {\n            \"align-text\": \"0.1.4\",\n            \"lazy-cache\": \"1.0.4\"\n          }\n        },\n        \"cliui\": {\n          \"version\": \"2.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz\",\n          \"integrity\": \"sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=\",\n          \"dev\": true,\n          \"optional\": true,\n          \"requires\": {\n            \"center-align\": \"0.1.3\",\n            \"right-align\": \"0.1.3\",\n            \"wordwrap\": \"0.0.2\"\n          },\n          \"dependencies\": {\n            \"wordwrap\": {\n              \"version\": \"0.0.2\",\n              \"resolved\": \"https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz\",\n              \"integrity\": \"sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=\",\n              \"dev\": true,\n              \"optional\": true\n            }\n          }\n        },\n        \"code-point-at\": {\n          \"version\": \"1.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz\",\n          \"integrity\": \"sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=\",\n          \"dev\": true\n        },\n        \"commondir\": {\n          \"version\": \"1.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz\",\n          \"integrity\": \"sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=\",\n          \"dev\": true\n        },\n        \"concat-map\": {\n          \"version\": \"0.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz\",\n          \"integrity\": \"sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=\",\n          \"dev\": true\n        },\n        \"convert-source-map\": {\n          \"version\": \"1.6.0\",\n          \"resolved\": \"https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz\",\n          \"integrity\": \"sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==\",\n          \"dev\": true,\n          \"requires\": {\n            \"safe-buffer\": \"5.1.2\"\n          }\n        },\n        \"cross-spawn\": {\n          \"version\": \"4.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz\",\n          \"integrity\": \"sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=\",\n          \"dev\": true,\n          \"requires\": {\n            \"lru-cache\": \"4.1.3\",\n            \"which\": \"1.3.1\"\n          }\n        },\n        \"debug\": {\n          \"version\": \"3.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/debug/-/debug-3.1.0.tgz\",\n          \"integrity\": \"sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==\",\n          \"dev\": true,\n          \"requires\": {\n            \"ms\": \"2.0.0\"\n          }\n        },\n        \"debug-log\": {\n          \"version\": \"1.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/debug-log/-/debug-log-1.0.1.tgz\",\n          \"integrity\": \"sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=\",\n          \"dev\": true\n        },\n        \"decamelize\": {\n          \"version\": \"1.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz\",\n          \"integrity\": \"sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=\",\n          \"dev\": true\n        },\n        \"default-require-extensions\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz\",\n          \"integrity\": \"sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=\",\n          \"dev\": true,\n          \"requires\": {\n            \"strip-bom\": \"3.0.0\"\n          }\n        },\n        \"error-ex\": {\n          \"version\": \"1.3.2\",\n          \"resolved\": \"https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz\",\n          \"integrity\": \"sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-arrayish\": \"0.2.1\"\n          }\n        },\n        \"es6-error\": {\n          \"version\": \"4.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz\",\n          \"integrity\": \"sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==\",\n          \"dev\": true\n        },\n        \"execa\": {\n          \"version\": \"0.7.0\",\n          \"resolved\": \"https://registry.npmjs.org/execa/-/execa-0.7.0.tgz\",\n          \"integrity\": \"sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=\",\n          \"dev\": true,\n          \"requires\": {\n            \"cross-spawn\": \"5.1.0\",\n            \"get-stream\": \"3.0.0\",\n            \"is-stream\": \"1.1.0\",\n            \"npm-run-path\": \"2.0.2\",\n            \"p-finally\": \"1.0.0\",\n            \"signal-exit\": \"3.0.2\",\n            \"strip-eof\": \"1.0.0\"\n          },\n          \"dependencies\": {\n            \"cross-spawn\": {\n              \"version\": \"5.1.0\",\n              \"resolved\": \"https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz\",\n              \"integrity\": \"sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=\",\n              \"dev\": true,\n              \"requires\": {\n                \"lru-cache\": \"4.1.3\",\n                \"shebang-command\": \"1.2.0\",\n                \"which\": \"1.3.1\"\n              }\n            }\n          }\n        },\n        \"find-cache-dir\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.0.0.tgz\",\n          \"integrity\": \"sha512-LDUY6V1Xs5eFskUVYtIwatojt6+9xC9Chnlk/jYOOvn3FAFfSaWddxahDGyNHh0b2dMXa6YW2m0tk8TdVaXHlA==\",\n          \"dev\": true,\n          \"requires\": {\n            \"commondir\": \"1.0.1\",\n            \"make-dir\": \"1.3.0\",\n            \"pkg-dir\": \"3.0.0\"\n          }\n        },\n        \"find-up\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz\",\n          \"integrity\": \"sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==\",\n          \"dev\": true,\n          \"requires\": {\n            \"locate-path\": \"3.0.0\"\n          }\n        },\n        \"foreground-child\": {\n          \"version\": \"1.5.6\",\n          \"resolved\": \"https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz\",\n          \"integrity\": \"sha1-T9ca0t/elnibmApcCilZN8svXOk=\",\n          \"dev\": true,\n          \"requires\": {\n            \"cross-spawn\": \"4.0.2\",\n            \"signal-exit\": \"3.0.2\"\n          }\n        },\n        \"fs.realpath\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz\",\n          \"integrity\": \"sha1-FQStJSMVjKpA20onh8sBQRmU6k8=\",\n          \"dev\": true\n        },\n        \"get-caller-file\": {\n          \"version\": \"1.0.3\",\n          \"resolved\": \"https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz\",\n          \"integrity\": \"sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==\",\n          \"dev\": true\n        },\n        \"get-stream\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz\",\n          \"integrity\": \"sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=\",\n          \"dev\": true\n        },\n        \"glob\": {\n          \"version\": \"7.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/glob/-/glob-7.1.3.tgz\",\n          \"integrity\": \"sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==\",\n          \"dev\": true,\n          \"requires\": {\n            \"fs.realpath\": \"1.0.0\",\n            \"inflight\": \"1.0.6\",\n            \"inherits\": \"2.0.3\",\n            \"minimatch\": \"3.0.4\",\n            \"once\": \"1.4.0\",\n            \"path-is-absolute\": \"1.0.1\"\n          }\n        },\n        \"graceful-fs\": {\n          \"version\": \"4.1.11\",\n          \"resolved\": \"https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz\",\n          \"integrity\": \"sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=\",\n          \"dev\": true\n        },\n        \"handlebars\": {\n          \"version\": \"4.0.11\",\n          \"resolved\": \"https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz\",\n          \"integrity\": \"sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=\",\n          \"dev\": true,\n          \"requires\": {\n            \"async\": \"1.5.2\",\n            \"optimist\": \"0.6.1\",\n            \"source-map\": \"0.4.4\",\n            \"uglify-js\": \"2.8.29\"\n          },\n          \"dependencies\": {\n            \"source-map\": {\n              \"version\": \"0.4.4\",\n              \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz\",\n              \"integrity\": \"sha1-66T12pwNyZneaAMti092FzZSA2s=\",\n              \"dev\": true,\n              \"requires\": {\n                \"amdefine\": \"1.0.1\"\n              }\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz\",\n          \"integrity\": \"sha1-tdRU3CGZriJWmfNGfloH87lVuv0=\",\n          \"dev\": true\n        },\n        \"hosted-git-info\": {\n          \"version\": \"2.7.1\",\n          \"resolved\": \"https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz\",\n          \"integrity\": \"sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==\",\n          \"dev\": true\n        },\n        \"imurmurhash\": {\n          \"version\": \"0.1.4\",\n          \"resolved\": \"https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz\",\n          \"integrity\": \"sha1-khi5srkoojixPcT7a21XbyMUU+o=\",\n          \"dev\": true\n        },\n        \"inflight\": {\n          \"version\": \"1.0.6\",\n          \"resolved\": \"https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz\",\n          \"integrity\": \"sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=\",\n          \"dev\": true,\n          \"requires\": {\n            \"once\": \"1.4.0\",\n            \"wrappy\": \"1.0.2\"\n          }\n        },\n        \"inherits\": {\n          \"version\": \"2.0.3\",\n          \"resolved\": \"https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz\",\n          \"integrity\": \"sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=\",\n          \"dev\": true\n        },\n        \"invert-kv\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz\",\n          \"integrity\": \"sha1-EEqOSqym09jNFXqO+L+rLXo//bY=\",\n          \"dev\": true\n        },\n        \"is-arrayish\": {\n          \"version\": \"0.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz\",\n          \"integrity\": \"sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=\",\n          \"dev\": true\n        },\n        \"is-buffer\": {\n          \"version\": \"1.1.6\",\n          \"resolved\": \"https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz\",\n          \"integrity\": \"sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==\",\n          \"dev\": true\n        },\n        \"is-builtin-module\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz\",\n          \"integrity\": \"sha1-VAVy0096wxGfj3bDDLwbHgN6/74=\",\n          \"dev\": true,\n          \"requires\": {\n            \"builtin-modules\": \"1.1.1\"\n          }\n        },\n        \"is-fullwidth-code-point\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz\",\n          \"integrity\": \"sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=\",\n          \"dev\": true\n        },\n        \"is-stream\": {\n          \"version\": \"1.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz\",\n          \"integrity\": \"sha1-EtSj3U5o4Lec6428hBc66A2RykQ=\",\n          \"dev\": true\n        },\n        \"isexe\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz\",\n          \"integrity\": \"sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=\",\n          \"dev\": true\n        },\n        \"istanbul-lib-coverage\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz\",\n          \"integrity\": \"sha512-nPvSZsVlbG9aLhZYaC3Oi1gT/tpyo3Yt5fNyf6NmcKIayz4VV/txxJFFKAK/gU4dcNn8ehsanBbVHVl0+amOLA==\",\n          \"dev\": true\n        },\n        \"istanbul-lib-hook\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.1.tgz\",\n          \"integrity\": \"sha512-ufiZoiJ8CxY577JJWEeFuxXZoMqiKpq/RqZtOAYuQLvlkbJWscq9n3gc4xrCGH9n4pW0qnTxOz1oyMmVtk8E1w==\",\n          \"dev\": true,\n          \"requires\": {\n            \"append-transform\": \"1.0.0\"\n          }\n        },\n        \"istanbul-lib-report\": {\n          \"version\": \"2.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.2.tgz\",\n          \"integrity\": \"sha512-rJ8uR3peeIrwAxoDEbK4dJ7cqqtxBisZKCuwkMtMv0xYzaAnsAi3AHrHPAAtNXzG/bcCgZZ3OJVqm1DTi9ap2Q==\",\n          \"dev\": true,\n          \"requires\": {\n            \"istanbul-lib-coverage\": \"2.0.1\",\n            \"make-dir\": \"1.3.0\",\n            \"supports-color\": \"5.4.0\"\n          }\n        },\n        \"istanbul-lib-source-maps\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-2.0.1.tgz\",\n          \"integrity\": \"sha512-30l40ySg+gvBLcxTrLzR4Z2XTRj3HgRCA/p2rnbs/3OiTaoj054gAbuP5DcLOtwqmy4XW8qXBHzrmP2/bQ9i3A==\",\n          \"dev\": true,\n          \"requires\": {\n            \"debug\": \"3.1.0\",\n            \"istanbul-lib-coverage\": \"2.0.1\",\n            \"make-dir\": \"1.3.0\",\n            \"rimraf\": \"2.6.2\",\n            \"source-map\": \"0.6.1\"\n          },\n          \"dependencies\": {\n            \"source-map\": {\n              \"version\": \"0.6.1\",\n              \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz\",\n              \"integrity\": \"sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==\",\n              \"dev\": true\n            }\n          }\n        },\n        \"istanbul-reports\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.0.1.tgz\",\n          \"integrity\": \"sha512-CT0QgMBJqs6NJLF678ZHcquUAZIoBIUNzdJrRJfpkI9OnzG6MkUfHxbJC3ln981dMswC7/B1mfX3LNkhgJxsuw==\",\n          \"dev\": true,\n          \"requires\": {\n            \"handlebars\": \"4.0.11\"\n          }\n        },\n        \"json-parse-better-errors\": {\n          \"version\": \"1.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz\",\n          \"integrity\": \"sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==\",\n          \"dev\": true\n        },\n        \"kind-of\": {\n          \"version\": \"3.2.2\",\n          \"resolved\": \"https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz\",\n          \"integrity\": \"sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-buffer\": \"1.1.6\"\n          }\n        },\n        \"lazy-cache\": {\n          \"version\": \"1.0.4\",\n          \"resolved\": \"https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz\",\n          \"integrity\": \"sha1-odePw6UEdMuAhF07O24dpJpEbo4=\",\n          \"dev\": true,\n          \"optional\": true\n        },\n        \"lcid\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz\",\n          \"integrity\": \"sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=\",\n          \"dev\": true,\n          \"requires\": {\n            \"invert-kv\": \"1.0.0\"\n          }\n        },\n        \"load-json-file\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz\",\n          \"integrity\": \"sha1-L19Fq5HjMhYjT9U62rZo607AmTs=\",\n          \"dev\": true,\n          \"requires\": {\n            \"graceful-fs\": \"4.1.11\",\n            \"parse-json\": \"4.0.0\",\n            \"pify\": \"3.0.0\",\n            \"strip-bom\": \"3.0.0\"\n          }\n        },\n        \"locate-path\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz\",\n          \"integrity\": \"sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==\",\n          \"dev\": true,\n          \"requires\": {\n            \"p-locate\": \"3.0.0\",\n            \"path-exists\": \"3.0.0\"\n          }\n        },\n        \"lodash.flattendeep\": {\n          \"version\": \"4.4.0\",\n          \"resolved\": \"https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz\",\n          \"integrity\": \"sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=\",\n          \"dev\": true\n        },\n        \"longest\": {\n          \"version\": \"1.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/longest/-/longest-1.0.1.tgz\",\n          \"integrity\": \"sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=\",\n          \"dev\": true\n        },\n        \"lru-cache\": {\n          \"version\": \"4.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz\",\n          \"integrity\": \"sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==\",\n          \"dev\": true,\n          \"requires\": {\n            \"pseudomap\": \"1.0.2\",\n            \"yallist\": \"2.1.2\"\n          }\n        },\n        \"make-dir\": {\n          \"version\": \"1.3.0\",\n          \"resolved\": \"https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz\",\n          \"integrity\": \"sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==\",\n          \"dev\": true,\n          \"requires\": {\n            \"pify\": \"3.0.0\"\n          }\n        },\n        \"md5-hex\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/md5-hex/-/md5-hex-2.0.0.tgz\",\n          \"integrity\": \"sha1-0FiOnxx0lUSS7NJKwKxs6ZfZLjM=\",\n          \"dev\": true,\n          \"requires\": {\n            \"md5-o-matic\": \"0.1.1\"\n          }\n        },\n        \"md5-o-matic\": {\n          \"version\": \"0.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/md5-o-matic/-/md5-o-matic-0.1.1.tgz\",\n          \"integrity\": \"sha1-givM1l4RfFFPqxdrJZRdVBAKA8M=\",\n          \"dev\": true\n        },\n        \"mem\": {\n          \"version\": \"1.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/mem/-/mem-1.1.0.tgz\",\n          \"integrity\": \"sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=\",\n          \"dev\": true,\n          \"requires\": {\n            \"mimic-fn\": \"1.2.0\"\n          }\n        },\n        \"merge-source-map\": {\n          \"version\": \"1.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz\",\n          \"integrity\": \"sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==\",\n          \"dev\": true,\n          \"requires\": {\n            \"source-map\": \"0.6.1\"\n          },\n          \"dependencies\": {\n            \"source-map\": {\n              \"version\": \"0.6.1\",\n              \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz\",\n              \"integrity\": \"sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==\",\n              \"dev\": true\n            }\n          }\n        },\n        \"mimic-fn\": {\n          \"version\": \"1.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz\",\n          \"integrity\": \"sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==\",\n          \"dev\": true\n        },\n        \"minimatch\": {\n          \"version\": \"3.0.4\",\n          \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz\",\n          \"integrity\": \"sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==\",\n          \"dev\": true,\n          \"requires\": {\n            \"brace-expansion\": \"1.1.11\"\n          }\n        },\n        \"minimist\": {\n          \"version\": \"0.0.10\",\n          \"resolved\": \"https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz\",\n          \"integrity\": \"sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=\",\n          \"dev\": true\n        },\n        \"mkdirp\": {\n          \"version\": \"0.5.1\",\n          \"resolved\": \"https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz\",\n          \"integrity\": \"sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=\",\n          \"dev\": true,\n          \"requires\": {\n            \"minimist\": \"0.0.8\"\n          },\n          \"dependencies\": {\n            \"minimist\": {\n              \"version\": \"0.0.8\",\n              \"resolved\": \"https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz\",\n              \"integrity\": \"sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=\",\n              \"dev\": true\n            }\n          }\n        },\n        \"ms\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.0.0.tgz\",\n          \"integrity\": \"sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=\",\n          \"dev\": true\n        },\n        \"normalize-package-data\": {\n          \"version\": \"2.4.0\",\n          \"resolved\": \"https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz\",\n          \"integrity\": \"sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==\",\n          \"dev\": true,\n          \"requires\": {\n            \"hosted-git-info\": \"2.7.1\",\n            \"is-builtin-module\": \"1.0.0\",\n            \"semver\": \"5.5.0\",\n            \"validate-npm-package-license\": \"3.0.3\"\n          }\n        },\n        \"npm-run-path\": {\n          \"version\": \"2.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz\",\n          \"integrity\": \"sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=\",\n          \"dev\": true,\n          \"requires\": {\n            \"path-key\": \"2.0.1\"\n          }\n        },\n        \"number-is-nan\": {\n          \"version\": \"1.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz\",\n          \"integrity\": \"sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=\",\n          \"dev\": true\n        },\n        \"once\": {\n          \"version\": \"1.4.0\",\n          \"resolved\": \"https://registry.npmjs.org/once/-/once-1.4.0.tgz\",\n          \"integrity\": \"sha1-WDsap3WWHUsROsF9nFC6753Xa9E=\",\n          \"dev\": true,\n          \"requires\": {\n            \"wrappy\": \"1.0.2\"\n          }\n        },\n        \"optimist\": {\n          \"version\": \"0.6.1\",\n          \"resolved\": \"https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz\",\n          \"integrity\": \"sha1-2j6nRob6IaGaERwybpDrFaAZZoY=\",\n          \"dev\": true,\n          \"requires\": {\n            \"minimist\": \"0.0.10\",\n            \"wordwrap\": \"0.0.3\"\n          }\n        },\n        \"os-homedir\": {\n          \"version\": \"1.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz\",\n          \"integrity\": \"sha1-/7xJiDNuDoM94MFox+8VISGqf7M=\",\n          \"dev\": true\n        },\n        \"os-locale\": {\n          \"version\": \"2.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz\",\n          \"integrity\": \"sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==\",\n          \"dev\": true,\n          \"requires\": {\n            \"execa\": \"0.7.0\",\n            \"lcid\": \"1.0.0\",\n            \"mem\": \"1.1.0\"\n          }\n        },\n        \"p-finally\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz\",\n          \"integrity\": \"sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=\",\n          \"dev\": true\n        },\n        \"p-limit\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/p-limit/-/p-limit-2.0.0.tgz\",\n          \"integrity\": \"sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==\",\n          \"dev\": true,\n          \"requires\": {\n            \"p-try\": \"2.0.0\"\n          }\n        },\n        \"p-locate\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz\",\n          \"integrity\": \"sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==\",\n          \"dev\": true,\n          \"requires\": {\n            \"p-limit\": \"2.0.0\"\n          }\n        },\n        \"p-try\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz\",\n          \"integrity\": \"sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==\",\n          \"dev\": true\n        },\n        \"package-hash\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/package-hash/-/package-hash-2.0.0.tgz\",\n          \"integrity\": \"sha1-eK4ybIngWk2BO2hgGXevBcANKg0=\",\n          \"dev\": true,\n          \"requires\": {\n            \"graceful-fs\": \"4.1.11\",\n            \"lodash.flattendeep\": \"4.4.0\",\n            \"md5-hex\": \"2.0.0\",\n            \"release-zalgo\": \"1.0.0\"\n          }\n        },\n        \"parse-json\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz\",\n          \"integrity\": \"sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=\",\n          \"dev\": true,\n          \"requires\": {\n            \"error-ex\": \"1.3.2\",\n            \"json-parse-better-errors\": \"1.0.2\"\n          }\n        },\n        \"path-exists\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz\",\n          \"integrity\": \"sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=\",\n          \"dev\": true\n        },\n        \"path-is-absolute\": {\n          \"version\": \"1.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz\",\n          \"integrity\": \"sha1-F0uSaHNVNP+8es5r9TpanhtcX18=\",\n          \"dev\": true\n        },\n        \"path-key\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz\",\n          \"integrity\": \"sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=\",\n          \"dev\": true\n        },\n        \"path-type\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz\",\n          \"integrity\": \"sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==\",\n          \"dev\": true,\n          \"requires\": {\n            \"pify\": \"3.0.0\"\n          }\n        },\n        \"pify\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/pify/-/pify-3.0.0.tgz\",\n          \"integrity\": \"sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=\",\n          \"dev\": true\n        },\n        \"pkg-dir\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz\",\n          \"integrity\": \"sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==\",\n          \"dev\": true,\n          \"requires\": {\n            \"find-up\": \"3.0.0\"\n          }\n        },\n        \"pseudomap\": {\n          \"version\": \"1.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz\",\n          \"integrity\": \"sha1-8FKijacOYYkX7wqKw0wa5aaChrM=\",\n          \"dev\": true\n        },\n        \"read-pkg\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz\",\n          \"integrity\": \"sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=\",\n          \"dev\": true,\n          \"requires\": {\n            \"load-json-file\": \"4.0.0\",\n            \"normalize-package-data\": \"2.4.0\",\n            \"path-type\": \"3.0.0\"\n          }\n        },\n        \"read-pkg-up\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz\",\n          \"integrity\": \"sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==\",\n          \"dev\": true,\n          \"requires\": {\n            \"find-up\": \"3.0.0\",\n            \"read-pkg\": \"3.0.0\"\n          }\n        },\n        \"release-zalgo\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz\",\n          \"integrity\": \"sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=\",\n          \"dev\": true,\n          \"requires\": {\n            \"es6-error\": \"4.1.1\"\n          }\n        },\n        \"repeat-string\": {\n          \"version\": \"1.6.1\",\n          \"resolved\": \"https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz\",\n          \"integrity\": \"sha1-jcrkcOHIirwtYA//Sndihtp15jc=\",\n          \"dev\": true\n        },\n        \"require-directory\": {\n          \"version\": \"2.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz\",\n          \"integrity\": \"sha1-jGStX9MNqxyXbiNE/+f3kqam30I=\",\n          \"dev\": true\n        },\n        \"require-main-filename\": {\n          \"version\": \"1.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz\",\n          \"integrity\": \"sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=\",\n          \"dev\": true\n        },\n        \"resolve-from\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz\",\n          \"integrity\": \"sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==\",\n          \"dev\": true\n        },\n        \"right-align\": {\n          \"version\": \"0.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz\",\n          \"integrity\": \"sha1-YTObci/mo1FWiSENJOFMlhSGE+8=\",\n          \"dev\": true,\n          \"optional\": true,\n          \"requires\": {\n            \"align-text\": \"0.1.4\"\n          }\n        },\n        \"rimraf\": {\n          \"version\": \"2.6.2\",\n          \"resolved\": \"https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz\",\n          \"integrity\": \"sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==\",\n          \"dev\": true,\n          \"requires\": {\n            \"glob\": \"7.1.3\"\n          }\n        },\n        \"safe-buffer\": {\n          \"version\": \"5.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz\",\n          \"integrity\": \"sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==\",\n          \"dev\": true\n        },\n        \"semver\": {\n          \"version\": \"5.5.0\",\n          \"resolved\": \"https://registry.npmjs.org/semver/-/semver-5.5.0.tgz\",\n          \"integrity\": \"sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==\",\n          \"dev\": true\n        },\n        \"set-blocking\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz\",\n          \"integrity\": \"sha1-BF+XgtARrppoA93TgrJDkrPYkPc=\",\n          \"dev\": true\n        },\n        \"shebang-command\": {\n          \"version\": \"1.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz\",\n          \"integrity\": \"sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=\",\n          \"dev\": true,\n          \"requires\": {\n            \"shebang-regex\": \"1.0.0\"\n          }\n        },\n        \"shebang-regex\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz\",\n          \"integrity\": \"sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=\",\n          \"dev\": true\n        },\n        \"signal-exit\": {\n          \"version\": \"3.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz\",\n          \"integrity\": \"sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=\",\n          \"dev\": true\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\",\n          \"dev\": true,\n          \"optional\": true\n        },\n        \"spawn-wrap\": {\n          \"version\": \"1.4.2\",\n          \"resolved\": \"https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.4.2.tgz\",\n          \"integrity\": \"sha512-vMwR3OmmDhnxCVxM8M+xO/FtIp6Ju/mNaDfCMMW7FDcLRTPFWUswec4LXJHTJE2hwTI9O0YBfygu4DalFl7Ylg==\",\n          \"dev\": true,\n          \"requires\": {\n            \"foreground-child\": \"1.5.6\",\n            \"mkdirp\": \"0.5.1\",\n            \"os-homedir\": \"1.0.2\",\n            \"rimraf\": \"2.6.2\",\n            \"signal-exit\": \"3.0.2\",\n            \"which\": \"1.3.1\"\n          }\n        },\n        \"spdx-correct\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz\",\n          \"integrity\": \"sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==\",\n          \"dev\": true,\n          \"requires\": {\n            \"spdx-expression-parse\": \"3.0.0\",\n            \"spdx-license-ids\": \"3.0.0\"\n          }\n        },\n        \"spdx-exceptions\": {\n          \"version\": \"2.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz\",\n          \"integrity\": \"sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==\",\n          \"dev\": true\n        },\n        \"spdx-expression-parse\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz\",\n          \"integrity\": \"sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==\",\n          \"dev\": true,\n          \"requires\": {\n            \"spdx-exceptions\": \"2.1.0\",\n            \"spdx-license-ids\": \"3.0.0\"\n          }\n        },\n        \"spdx-license-ids\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz\",\n          \"integrity\": \"sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==\",\n          \"dev\": true\n        },\n        \"string-width\": {\n          \"version\": \"2.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz\",\n          \"integrity\": \"sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-fullwidth-code-point\": \"2.0.0\",\n            \"strip-ansi\": \"4.0.0\"\n          }\n        },\n        \"strip-ansi\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz\",\n          \"integrity\": \"sha1-qEeQIusaw2iocTibY1JixQXuNo8=\",\n          \"dev\": true,\n          \"requires\": {\n            \"ansi-regex\": \"3.0.0\"\n          }\n        },\n        \"strip-bom\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz\",\n          \"integrity\": \"sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=\",\n          \"dev\": true\n        },\n        \"strip-eof\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz\",\n          \"integrity\": \"sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=\",\n          \"dev\": true\n        },\n        \"supports-color\": {\n          \"version\": \"5.4.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz\",\n          \"integrity\": \"sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==\",\n          \"dev\": true,\n          \"requires\": {\n            \"has-flag\": \"3.0.0\"\n          }\n        },\n        \"test-exclude\": {\n          \"version\": \"5.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/test-exclude/-/test-exclude-5.0.0.tgz\",\n          \"integrity\": \"sha512-bO3Lj5+qFa9YLfYW2ZcXMOV1pmQvw+KS/DpjqhyX6Y6UZ8zstpZJ+mA2ERkXfpOqhxsJlQiLeVXD3Smsrs6oLw==\",\n          \"dev\": true,\n          \"requires\": {\n            \"arrify\": \"1.0.1\",\n            \"minimatch\": \"3.0.4\",\n            \"read-pkg-up\": \"4.0.0\",\n            \"require-main-filename\": \"1.0.1\"\n          }\n        },\n        \"uglify-js\": {\n          \"version\": \"2.8.29\",\n          \"resolved\": \"https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz\",\n          \"integrity\": \"sha1-KcVzMUgFe7Th913zW3qcty5qWd0=\",\n          \"dev\": true,\n          \"optional\": true,\n          \"requires\": {\n            \"source-map\": \"0.5.7\",\n            \"uglify-to-browserify\": \"1.0.2\",\n            \"yargs\": \"3.10.0\"\n          },\n          \"dependencies\": {\n            \"yargs\": {\n              \"version\": \"3.10.0\",\n              \"resolved\": \"https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz\",\n              \"integrity\": \"sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=\",\n              \"dev\": true,\n              \"optional\": true,\n              \"requires\": {\n                \"camelcase\": \"1.2.1\",\n                \"cliui\": \"2.1.0\",\n                \"decamelize\": \"1.2.0\",\n                \"window-size\": \"0.1.0\"\n              }\n            }\n          }\n        },\n        \"uglify-to-browserify\": {\n          \"version\": \"1.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz\",\n          \"integrity\": \"sha1-bgkk1r2mta/jSeOabWMoUKD4grc=\",\n          \"dev\": true,\n          \"optional\": true\n        },\n        \"uuid\": {\n          \"version\": \"3.3.2\",\n          \"resolved\": \"https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz\",\n          \"integrity\": \"sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==\",\n          \"dev\": true\n        },\n        \"validate-npm-package-license\": {\n          \"version\": \"3.0.3\",\n          \"resolved\": \"https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz\",\n          \"integrity\": \"sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==\",\n          \"dev\": true,\n          \"requires\": {\n            \"spdx-correct\": \"3.0.0\",\n            \"spdx-expression-parse\": \"3.0.0\"\n          }\n        },\n        \"which\": {\n          \"version\": \"1.3.1\",\n          \"resolved\": \"https://registry.npmjs.org/which/-/which-1.3.1.tgz\",\n          \"integrity\": \"sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==\",\n          \"dev\": true,\n          \"requires\": {\n            \"isexe\": \"2.0.0\"\n          }\n        },\n        \"which-module\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz\",\n          \"integrity\": \"sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=\",\n          \"dev\": true\n        },\n        \"window-size\": {\n          \"version\": \"0.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz\",\n          \"integrity\": \"sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=\",\n          \"dev\": true,\n          \"optional\": true\n        },\n        \"wordwrap\": {\n          \"version\": \"0.0.3\",\n          \"resolved\": \"https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz\",\n          \"integrity\": \"sha1-o9XabNXAvAAI03I0u68b7WMFkQc=\",\n          \"dev\": true\n        },\n        \"wrap-ansi\": {\n          \"version\": \"2.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz\",\n          \"integrity\": \"sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=\",\n          \"dev\": true,\n          \"requires\": {\n            \"string-width\": \"1.0.2\",\n            \"strip-ansi\": \"3.0.1\"\n          },\n          \"dependencies\": {\n            \"ansi-regex\": {\n              \"version\": \"2.1.1\",\n              \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz\",\n              \"integrity\": \"sha1-w7M6te42DYbg5ijwRorn7yfWVN8=\",\n              \"dev\": true\n            },\n            \"is-fullwidth-code-point\": {\n              \"version\": \"1.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz\",\n              \"integrity\": \"sha1-754xOG8DGn8NZDr4L95QxFfvAMs=\",\n              \"dev\": true,\n              \"requires\": {\n                \"number-is-nan\": \"1.0.1\"\n              }\n            },\n            \"string-width\": {\n              \"version\": \"1.0.2\",\n              \"resolved\": \"https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz\",\n              \"integrity\": \"sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=\",\n              \"dev\": true,\n              \"requires\": {\n                \"code-point-at\": \"1.1.0\",\n                \"is-fullwidth-code-point\": \"1.0.0\",\n                \"strip-ansi\": \"3.0.1\"\n              }\n            },\n            \"strip-ansi\": {\n              \"version\": \"3.0.1\",\n              \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz\",\n              \"integrity\": \"sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=\",\n              \"dev\": true,\n              \"requires\": {\n                \"ansi-regex\": \"2.1.1\"\n              }\n            }\n          }\n        },\n        \"wrappy\": {\n          \"version\": \"1.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz\",\n          \"integrity\": \"sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=\",\n          \"dev\": true\n        },\n        \"write-file-atomic\": {\n          \"version\": \"2.3.0\",\n          \"resolved\": \"https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz\",\n          \"integrity\": \"sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==\",\n          \"dev\": true,\n          \"requires\": {\n            \"graceful-fs\": \"4.1.11\",\n            \"imurmurhash\": \"0.1.4\",\n            \"signal-exit\": \"3.0.2\"\n          }\n        },\n        \"y18n\": {\n          \"version\": \"3.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz\",\n          \"integrity\": \"sha1-bRX7qITAhnnA136I53WegR4H+kE=\",\n          \"dev\": true\n        },\n        \"yallist\": {\n          \"version\": \"2.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz\",\n          \"integrity\": \"sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=\",\n          \"dev\": true\n        },\n        \"yargs\": {\n          \"version\": \"11.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz\",\n          \"integrity\": \"sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==\",\n          \"dev\": true,\n          \"requires\": {\n            \"cliui\": \"4.1.0\",\n            \"decamelize\": \"1.2.0\",\n            \"find-up\": \"2.1.0\",\n            \"get-caller-file\": \"1.0.3\",\n            \"os-locale\": \"2.1.0\",\n            \"require-directory\": \"2.1.1\",\n            \"require-main-filename\": \"1.0.1\",\n            \"set-blocking\": \"2.0.0\",\n            \"string-width\": \"2.1.1\",\n            \"which-module\": \"2.0.0\",\n            \"y18n\": \"3.2.1\",\n            \"yargs-parser\": \"9.0.2\"\n          },\n          \"dependencies\": {\n            \"cliui\": {\n              \"version\": \"4.1.0\",\n              \"resolved\": \"https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz\",\n              \"integrity\": \"sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==\",\n              \"dev\": true,\n              \"requires\": {\n                \"string-width\": \"2.1.1\",\n                \"strip-ansi\": \"4.0.0\",\n                \"wrap-ansi\": \"2.1.0\"\n              }\n            },\n            \"find-up\": {\n              \"version\": \"2.1.0\",\n              \"resolved\": \"https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz\",\n              \"integrity\": \"sha1-RdG35QbHF93UgndaK3eSCjwMV6c=\",\n              \"dev\": true,\n              \"requires\": {\n                \"locate-path\": \"2.0.0\"\n              }\n            },\n            \"locate-path\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz\",\n              \"integrity\": \"sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=\",\n              \"dev\": true,\n              \"requires\": {\n                \"p-locate\": \"2.0.0\",\n                \"path-exists\": \"3.0.0\"\n              }\n            },\n            \"p-limit\": {\n              \"version\": \"1.3.0\",\n              \"resolved\": \"https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz\",\n              \"integrity\": \"sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==\",\n              \"dev\": true,\n              \"requires\": {\n                \"p-try\": \"1.0.0\"\n              }\n            },\n            \"p-locate\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz\",\n              \"integrity\": \"sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=\",\n              \"dev\": true,\n              \"requires\": {\n                \"p-limit\": \"1.3.0\"\n              }\n            },\n            \"p-try\": {\n              \"version\": \"1.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz\",\n              \"integrity\": \"sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=\",\n              \"dev\": true\n            }\n          }\n        },\n        \"yargs-parser\": {\n          \"version\": \"9.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz\",\n          \"integrity\": \"sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=\",\n          \"dev\": true,\n          \"requires\": {\n            \"camelcase\": \"4.1.0\"\n          },\n          \"dependencies\": {\n            \"camelcase\": {\n              \"version\": \"4.1.0\",\n              \"resolved\": \"https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz\",\n              \"integrity\": \"sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=\",\n              \"dev\": true\n            }\n          }\n        }\n      }\n    },\n    \"oauth-sign\": {\n      \"version\": \"0.9.0\",\n      \"resolved\": \"https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz\",\n      \"integrity\": \"sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==\",\n      \"optional\": true\n    },\n    \"object-assign\": {\n      \"version\": \"4.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz\",\n      \"integrity\": \"sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=\"\n    },\n    \"object-copy\": {\n      \"version\": \"0.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz\",\n      \"integrity\": \"sha1-fn2Fi3gb18mRpBupde04EnVOmYw=\",\n      \"requires\": {\n        \"copy-descriptor\": \"0.1.1\",\n        \"define-property\": \"0.2.5\",\n        \"kind-of\": \"3.2.2\"\n      },\n      \"dependencies\": {\n        \"define-property\": {\n          \"version\": \"0.2.5\",\n          \"resolved\": \"https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz\",\n          \"integrity\": \"sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=\",\n          \"requires\": {\n            \"is-descriptor\": \"0.1.6\"\n          }\n        },\n        \"kind-of\": {\n          \"version\": \"3.2.2\",\n          \"resolved\": \"https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz\",\n          \"integrity\": \"sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=\",\n          \"requires\": {\n            \"is-buffer\": \"1.1.6\"\n          }\n        }\n      }\n    },\n    \"object-inspect\": {\n      \"version\": \"1.8.0\",\n      \"resolved\": \"https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz\",\n      \"integrity\": \"sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==\"\n    },\n    \"object-keys\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz\",\n      \"integrity\": \"sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==\"\n    },\n    \"object-visit\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz\",\n      \"integrity\": \"sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=\",\n      \"requires\": {\n        \"isobject\": \"3.0.1\"\n      }\n    },\n    \"object.assign\": {\n      \"version\": \"4.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/object.assign/-/object.assign-4.1.1.tgz\",\n      \"integrity\": \"sha512-VT/cxmx5yaoHSOTSyrCygIDFco+RsibY2NM0a4RdEeY/4KgqezwFtK1yr3U67xYhqJSlASm2pKhLVzPj2lr4bA==\",\n      \"requires\": {\n        \"define-properties\": \"1.1.3\",\n        \"es-abstract\": \"1.18.0-next.1\",\n        \"has-symbols\": \"1.0.1\",\n        \"object-keys\": \"1.1.1\"\n      }\n    },\n    \"object.defaults\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz\",\n      \"integrity\": \"sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=\",\n      \"requires\": {\n        \"array-each\": \"1.0.1\",\n        \"array-slice\": \"1.1.0\",\n        \"for-own\": \"1.0.0\",\n        \"isobject\": \"3.0.1\"\n      }\n    },\n    \"object.pick\": {\n      \"version\": \"1.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz\",\n      \"integrity\": \"sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=\",\n      \"requires\": {\n        \"isobject\": \"3.0.1\"\n      }\n    },\n    \"on-finished\": {\n      \"version\": \"2.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz\",\n      \"integrity\": \"sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=\",\n      \"requires\": {\n        \"ee-first\": \"1.1.1\"\n      }\n    },\n    \"once\": {\n      \"version\": \"1.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/once/-/once-1.4.0.tgz\",\n      \"integrity\": \"sha1-WDsap3WWHUsROsF9nFC6753Xa9E=\",\n      \"requires\": {\n        \"wrappy\": \"1.0.2\"\n      }\n    },\n    \"onetime\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz\",\n      \"integrity\": \"sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=\",\n      \"requires\": {\n        \"mimic-fn\": \"1.2.0\"\n      }\n    },\n    \"opener\": {\n      \"version\": \"1.5.1\",\n      \"resolved\": \"https://registry.npmjs.org/opener/-/opener-1.5.1.tgz\",\n      \"integrity\": \"sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA==\"\n    },\n    \"opn\": {\n      \"version\": \"5.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/opn/-/opn-5.3.0.tgz\",\n      \"integrity\": \"sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g==\",\n      \"requires\": {\n        \"is-wsl\": \"1.1.0\"\n      }\n    },\n    \"optimist\": {\n      \"version\": \"0.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz\",\n      \"integrity\": \"sha1-2j6nRob6IaGaERwybpDrFaAZZoY=\",\n      \"requires\": {\n        \"minimist\": \"0.0.10\",\n        \"wordwrap\": \"0.0.3\"\n      },\n      \"dependencies\": {\n        \"minimist\": {\n          \"version\": \"0.0.10\",\n          \"resolved\": \"https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz\",\n          \"integrity\": \"sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=\"\n        },\n        \"wordwrap\": {\n          \"version\": \"0.0.3\",\n          \"resolved\": \"https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz\",\n          \"integrity\": \"sha1-o9XabNXAvAAI03I0u68b7WMFkQc=\"\n        }\n      }\n    },\n    \"optimize-css-assets-webpack-plugin\": {\n      \"version\": \"3.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/optimize-css-assets-webpack-plugin/-/optimize-css-assets-webpack-plugin-3.2.0.tgz\",\n      \"integrity\": \"sha512-Fjn7wyyadPAriuH2DHamDQw5B8GohEWbroBkKoPeP+vSF2PIAPI7WDihi8WieMRb/At4q7Ea7zTKaMDuSoIAAg==\",\n      \"requires\": {\n        \"cssnano\": \"3.10.0\",\n        \"last-call-webpack-plugin\": \"2.1.2\"\n      }\n    },\n    \"optionator\": {\n      \"version\": \"0.8.2\",\n      \"resolved\": \"https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz\",\n      \"integrity\": \"sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=\",\n      \"requires\": {\n        \"deep-is\": \"0.1.3\",\n        \"fast-levenshtein\": \"2.0.6\",\n        \"levn\": \"0.3.0\",\n        \"prelude-ls\": \"1.1.2\",\n        \"type-check\": \"0.3.2\",\n        \"wordwrap\": \"1.0.0\"\n      }\n    },\n    \"ora\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/ora/-/ora-2.1.0.tgz\",\n      \"integrity\": \"sha512-hNNlAd3gfv/iPmsNxYoAPLvxg7HuPozww7fFonMZvL84tP6Ox5igfk5j/+a9rtJJwqMgKK+JgWsAQik5o0HTLA==\",\n      \"requires\": {\n        \"chalk\": \"2.4.2\",\n        \"cli-cursor\": \"2.1.0\",\n        \"cli-spinners\": \"1.3.1\",\n        \"log-symbols\": \"2.2.0\",\n        \"strip-ansi\": \"4.0.0\",\n        \"wcwidth\": \"1.0.1\"\n      },\n      \"dependencies\": {\n        \"ansi-regex\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz\",\n          \"integrity\": \"sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=\"\n        },\n        \"strip-ansi\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz\",\n          \"integrity\": \"sha1-qEeQIusaw2iocTibY1JixQXuNo8=\",\n          \"requires\": {\n            \"ansi-regex\": \"3.0.0\"\n          }\n        }\n      }\n    },\n    \"os-browserify\": {\n      \"version\": \"0.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz\",\n      \"integrity\": \"sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=\"\n    },\n    \"os-homedir\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz\",\n      \"integrity\": \"sha1-/7xJiDNuDoM94MFox+8VISGqf7M=\"\n    },\n    \"os-locale\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz\",\n      \"integrity\": \"sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==\",\n      \"requires\": {\n        \"execa\": \"0.7.0\",\n        \"lcid\": \"1.0.0\",\n        \"mem\": \"1.1.0\"\n      }\n    },\n    \"os-tmpdir\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz\",\n      \"integrity\": \"sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=\"\n    },\n    \"p-finally\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz\",\n      \"integrity\": \"sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=\"\n    },\n    \"p-limit\": {\n      \"version\": \"1.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz\",\n      \"integrity\": \"sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==\",\n      \"requires\": {\n        \"p-try\": \"1.0.0\"\n      }\n    },\n    \"p-locate\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz\",\n      \"integrity\": \"sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=\",\n      \"requires\": {\n        \"p-limit\": \"1.3.0\"\n      }\n    },\n    \"p-try\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz\",\n      \"integrity\": \"sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=\"\n    },\n    \"pako\": {\n      \"version\": \"1.0.7\",\n      \"resolved\": \"https://registry.npmjs.org/pako/-/pako-1.0.7.tgz\",\n      \"integrity\": \"sha512-3HNK5tW4x8o5mO8RuHZp3Ydw9icZXx0RANAOMzlMzx7LVXhMJ4mo3MOBpzyd7r/+RUu8BmndP47LXT+vzjtWcQ==\"\n    },\n    \"parallel-transform\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.1.0.tgz\",\n      \"integrity\": \"sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY=\",\n      \"requires\": {\n        \"cyclist\": \"0.2.2\",\n        \"inherits\": \"2.0.3\",\n        \"readable-stream\": \"2.3.6\"\n      }\n    },\n    \"param-case\": {\n      \"version\": \"2.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz\",\n      \"integrity\": \"sha1-35T9jPZTHs915r75oIWPvHK+Ikc=\",\n      \"requires\": {\n        \"no-case\": \"2.3.2\"\n      }\n    },\n    \"parent-module\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/parent-module/-/parent-module-1.0.0.tgz\",\n      \"integrity\": \"sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA==\",\n      \"dev\": true,\n      \"requires\": {\n        \"callsites\": \"3.0.0\"\n      },\n      \"dependencies\": {\n        \"callsites\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz\",\n          \"integrity\": \"sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==\",\n          \"dev\": true\n        }\n      }\n    },\n    \"parse-asn1\": {\n      \"version\": \"5.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz\",\n      \"integrity\": \"sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==\",\n      \"requires\": {\n        \"asn1.js\": \"4.10.1\",\n        \"browserify-aes\": \"1.2.0\",\n        \"create-hash\": \"1.2.0\",\n        \"evp_bytestokey\": \"1.0.3\",\n        \"pbkdf2\": \"3.0.17\"\n      }\n    },\n    \"parse-entities\": {\n      \"version\": \"1.2.2\",\n      \"resolved\": \"https://registry.npmjs.org/parse-entities/-/parse-entities-1.2.2.tgz\",\n      \"integrity\": \"sha512-NzfpbxW/NPrzZ/yYSoQxyqUZMZXIdCfE0OIN4ESsnptHJECoUk3FZktxNuzQf4tjt5UEopnxpYJbvYuxIFDdsg==\",\n      \"requires\": {\n        \"character-entities\": \"1.2.4\",\n        \"character-entities-legacy\": \"1.1.4\",\n        \"character-reference-invalid\": \"1.1.4\",\n        \"is-alphanumerical\": \"1.0.4\",\n        \"is-decimal\": \"1.0.4\",\n        \"is-hexadecimal\": \"1.0.4\"\n      }\n    },\n    \"parse-json\": {\n      \"version\": \"4.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz\",\n      \"integrity\": \"sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=\",\n      \"requires\": {\n        \"error-ex\": \"1.3.2\",\n        \"json-parse-better-errors\": \"1.0.2\"\n      }\n    },\n    \"parseurl\": {\n      \"version\": \"1.3.2\",\n      \"resolved\": \"https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz\",\n      \"integrity\": \"sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=\"\n    },\n    \"pascalcase\": {\n      \"version\": \"0.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz\",\n      \"integrity\": \"sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=\"\n    },\n    \"path-browserify\": {\n      \"version\": \"0.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz\",\n      \"integrity\": \"sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=\"\n    },\n    \"path-dirname\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz\",\n      \"integrity\": \"sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=\"\n    },\n    \"path-exists\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz\",\n      \"integrity\": \"sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=\"\n    },\n    \"path-is-absolute\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz\",\n      \"integrity\": \"sha1-F0uSaHNVNP+8es5r9TpanhtcX18=\"\n    },\n    \"path-is-inside\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz\",\n      \"integrity\": \"sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=\",\n      \"dev\": true\n    },\n    \"path-key\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz\",\n      \"integrity\": \"sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=\"\n    },\n    \"path-parse\": {\n      \"version\": \"1.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz\",\n      \"integrity\": \"sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==\"\n    },\n    \"path-to-regexp\": {\n      \"version\": \"0.1.7\",\n      \"resolved\": \"https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz\",\n      \"integrity\": \"sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=\"\n    },\n    \"path-type\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz\",\n      \"integrity\": \"sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==\",\n      \"requires\": {\n        \"pify\": \"3.0.0\"\n      }\n    },\n    \"pathval\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz\",\n      \"integrity\": \"sha1-uULm1L3mUwBe9rcTYd74cn0GReA=\"\n    },\n    \"pbkdf2\": {\n      \"version\": \"3.0.17\",\n      \"resolved\": \"https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz\",\n      \"integrity\": \"sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==\",\n      \"requires\": {\n        \"create-hash\": \"1.2.0\",\n        \"create-hmac\": \"1.1.7\",\n        \"ripemd160\": \"2.0.2\",\n        \"safe-buffer\": \"5.1.2\",\n        \"sha.js\": \"2.4.11\"\n      }\n    },\n    \"performance-now\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz\",\n      \"integrity\": \"sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=\",\n      \"optional\": true\n    },\n    \"picomatch\": {\n      \"version\": \"2.2.2\",\n      \"resolved\": \"https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz\",\n      \"integrity\": \"sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==\"\n    },\n    \"pify\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/pify/-/pify-3.0.0.tgz\",\n      \"integrity\": \"sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=\"\n    },\n    \"pinkie\": {\n      \"version\": \"2.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz\",\n      \"integrity\": \"sha1-clVrgM+g1IqXToDnckjoDtT3+HA=\",\n      \"dev\": true\n    },\n    \"pinkie-promise\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz\",\n      \"integrity\": \"sha1-ITXW36ejWMBprJsXh3YogihFD/o=\",\n      \"dev\": true,\n      \"requires\": {\n        \"pinkie\": \"2.0.4\"\n      }\n    },\n    \"pkg-dir\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz\",\n      \"integrity\": \"sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=\",\n      \"requires\": {\n        \"find-up\": \"2.1.0\"\n      }\n    },\n    \"pluralize\": {\n      \"version\": \"7.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz\",\n      \"integrity\": \"sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==\",\n      \"dev\": true\n    },\n    \"portfinder\": {\n      \"version\": \"1.0.20\",\n      \"resolved\": \"https://registry.npmjs.org/portfinder/-/portfinder-1.0.20.tgz\",\n      \"integrity\": \"sha512-Yxe4mTyDzTd59PZJY4ojZR8F+E5e97iq2ZOHPz3HDgSvYC5siNad2tLooQ5y5QHyQhc3xVqvyk/eNA3wuoa7Sw==\",\n      \"requires\": {\n        \"async\": \"1.5.2\",\n        \"debug\": \"2.6.9\",\n        \"mkdirp\": \"0.5.1\"\n      },\n      \"dependencies\": {\n        \"async\": {\n          \"version\": \"1.5.2\",\n          \"resolved\": \"https://registry.npmjs.org/async/-/async-1.5.2.tgz\",\n          \"integrity\": \"sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=\"\n        }\n      }\n    },\n    \"posix-character-classes\": {\n      \"version\": \"0.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz\",\n      \"integrity\": \"sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=\"\n    },\n    \"postcss\": {\n      \"version\": \"6.0.23\",\n      \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz\",\n      \"integrity\": \"sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==\",\n      \"requires\": {\n        \"chalk\": \"2.4.2\",\n        \"source-map\": \"0.6.1\",\n        \"supports-color\": \"5.5.0\"\n      }\n    },\n    \"postcss-calc\": {\n      \"version\": \"5.3.1\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-calc/-/postcss-calc-5.3.1.tgz\",\n      \"integrity\": \"sha1-d7rnypKK2FcW4v2kLyYb98HWW14=\",\n      \"requires\": {\n        \"postcss\": \"5.2.18\",\n        \"postcss-message-helpers\": \"2.0.0\",\n        \"reduce-css-calc\": \"1.3.0\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-colormin\": {\n      \"version\": \"2.2.2\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-2.2.2.tgz\",\n      \"integrity\": \"sha1-ZjFBfV8OkJo9fsJrJMio0eT5bks=\",\n      \"requires\": {\n        \"colormin\": \"1.1.2\",\n        \"postcss\": \"5.2.18\",\n        \"postcss-value-parser\": \"3.3.1\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-convert-values\": {\n      \"version\": \"2.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz\",\n      \"integrity\": \"sha1-u9hZPFwf0uPRwyK7kl3K6Nrk1i0=\",\n      \"requires\": {\n        \"postcss\": \"5.2.18\",\n        \"postcss-value-parser\": \"3.3.1\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-discard-comments\": {\n      \"version\": \"2.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz\",\n      \"integrity\": \"sha1-vv6J+v1bPazlzM5Rt2uBUUvgDj0=\",\n      \"requires\": {\n        \"postcss\": \"5.2.18\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-discard-duplicates\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz\",\n      \"integrity\": \"sha1-uavye4isGIFYpesSq8riAmO5GTI=\",\n      \"requires\": {\n        \"postcss\": \"5.2.18\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-discard-empty\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz\",\n      \"integrity\": \"sha1-0rS9nVztXr2Nyt52QMfXzX9PkrU=\",\n      \"requires\": {\n        \"postcss\": \"5.2.18\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-discard-overridden\": {\n      \"version\": \"0.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz\",\n      \"integrity\": \"sha1-ix6vVU9ob7KIzYdMVWZ7CqNmjVg=\",\n      \"requires\": {\n        \"postcss\": \"5.2.18\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-discard-unused\": {\n      \"version\": \"2.2.3\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz\",\n      \"integrity\": \"sha1-vOMLLMWR/8Y0Mitfs0ZLbZNPRDM=\",\n      \"requires\": {\n        \"postcss\": \"5.2.18\",\n        \"uniqs\": \"2.0.0\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-filter-plugins\": {\n      \"version\": \"2.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-filter-plugins/-/postcss-filter-plugins-2.0.3.tgz\",\n      \"integrity\": \"sha512-T53GVFsdinJhgwm7rg1BzbeBRomOg9y5MBVhGcsV0CxurUdVj1UlPdKtn7aqYA/c/QVkzKMjq2bSV5dKG5+AwQ==\",\n      \"requires\": {\n        \"postcss\": \"5.2.18\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-html\": {\n      \"version\": \"0.36.0\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-html/-/postcss-html-0.36.0.tgz\",\n      \"integrity\": \"sha512-HeiOxGcuwID0AFsNAL0ox3mW6MHH5cstWN1Z3Y+n6H+g12ih7LHdYxWwEA/QmrebctLjo79xz9ouK3MroHwOJw==\",\n      \"requires\": {\n        \"htmlparser2\": \"3.10.1\"\n      }\n    },\n    \"postcss-import\": {\n      \"version\": \"11.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-import/-/postcss-import-11.1.0.tgz\",\n      \"integrity\": \"sha512-5l327iI75POonjxkXgdRCUS+AlzAdBx4pOvMEhTKTCjb1p8IEeVR9yx3cPbmN7LIWJLbfnIXxAhoB4jpD0c/Cw==\",\n      \"requires\": {\n        \"postcss\": \"6.0.23\",\n        \"postcss-value-parser\": \"3.3.1\",\n        \"read-cache\": \"1.0.0\",\n        \"resolve\": \"1.9.0\"\n      }\n    },\n    \"postcss-jsx\": {\n      \"version\": \"0.36.4\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-jsx/-/postcss-jsx-0.36.4.tgz\",\n      \"integrity\": \"sha512-jwO/7qWUvYuWYnpOb0+4bIIgJt7003pgU3P6nETBLaOyBXuTD55ho21xnals5nBrlpTIFodyd3/jBi6UO3dHvA==\",\n      \"requires\": {\n        \"@babel/core\": \"7.12.3\"\n      }\n    },\n    \"postcss-less\": {\n      \"version\": \"3.1.4\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-less/-/postcss-less-3.1.4.tgz\",\n      \"integrity\": \"sha512-7TvleQWNM2QLcHqvudt3VYjULVB49uiW6XzEUFmvwHzvsOEF5MwBrIXZDJQvJNFGjJQTzSzZnDoCJ8h/ljyGXA==\",\n      \"requires\": {\n        \"postcss\": \"7.0.35\"\n      },\n      \"dependencies\": {\n        \"postcss\": {\n          \"version\": \"7.0.35\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz\",\n          \"integrity\": \"sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==\",\n          \"requires\": {\n            \"chalk\": \"2.4.2\",\n            \"source-map\": \"0.6.1\",\n            \"supports-color\": \"6.1.0\"\n          }\n        },\n        \"supports-color\": {\n          \"version\": \"6.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz\",\n          \"integrity\": \"sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==\",\n          \"requires\": {\n            \"has-flag\": \"3.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-load-config\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-1.2.0.tgz\",\n      \"integrity\": \"sha1-U56a/J3chiASHr+djDZz4M5Q0oo=\",\n      \"requires\": {\n        \"cosmiconfig\": \"2.2.2\",\n        \"object-assign\": \"4.1.1\",\n        \"postcss-load-options\": \"1.2.0\",\n        \"postcss-load-plugins\": \"2.3.0\"\n      },\n      \"dependencies\": {\n        \"cosmiconfig\": {\n          \"version\": \"2.2.2\",\n          \"resolved\": \"https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-2.2.2.tgz\",\n          \"integrity\": \"sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A==\",\n          \"requires\": {\n            \"is-directory\": \"0.3.1\",\n            \"js-yaml\": \"3.12.1\",\n            \"minimist\": \"1.2.0\",\n            \"object-assign\": \"4.1.1\",\n            \"os-homedir\": \"1.0.2\",\n            \"parse-json\": \"2.2.0\",\n            \"require-from-string\": \"1.2.1\"\n          }\n        },\n        \"parse-json\": {\n          \"version\": \"2.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz\",\n          \"integrity\": \"sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=\",\n          \"requires\": {\n            \"error-ex\": \"1.3.2\"\n          }\n        }\n      }\n    },\n    \"postcss-load-options\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-load-options/-/postcss-load-options-1.2.0.tgz\",\n      \"integrity\": \"sha1-sJixVZ3awt8EvAuzdfmaXP4rbYw=\",\n      \"requires\": {\n        \"cosmiconfig\": \"2.2.2\",\n        \"object-assign\": \"4.1.1\"\n      },\n      \"dependencies\": {\n        \"cosmiconfig\": {\n          \"version\": \"2.2.2\",\n          \"resolved\": \"https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-2.2.2.tgz\",\n          \"integrity\": \"sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A==\",\n          \"requires\": {\n            \"is-directory\": \"0.3.1\",\n            \"js-yaml\": \"3.12.1\",\n            \"minimist\": \"1.2.0\",\n            \"object-assign\": \"4.1.1\",\n            \"os-homedir\": \"1.0.2\",\n            \"parse-json\": \"2.2.0\",\n            \"require-from-string\": \"1.2.1\"\n          }\n        },\n        \"parse-json\": {\n          \"version\": \"2.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz\",\n          \"integrity\": \"sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=\",\n          \"requires\": {\n            \"error-ex\": \"1.3.2\"\n          }\n        }\n      }\n    },\n    \"postcss-load-plugins\": {\n      \"version\": \"2.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz\",\n      \"integrity\": \"sha1-dFdoEWWZrKLwCfrUJrABdQSdjZI=\",\n      \"requires\": {\n        \"cosmiconfig\": \"2.2.2\",\n        \"object-assign\": \"4.1.1\"\n      },\n      \"dependencies\": {\n        \"cosmiconfig\": {\n          \"version\": \"2.2.2\",\n          \"resolved\": \"https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-2.2.2.tgz\",\n          \"integrity\": \"sha512-GiNXLwAFPYHy25XmTPpafYvn3CLAkJ8FLsscq78MQd1Kh0OU6Yzhn4eV2MVF4G9WEQZoWEGltatdR+ntGPMl5A==\",\n          \"requires\": {\n            \"is-directory\": \"0.3.1\",\n            \"js-yaml\": \"3.12.1\",\n            \"minimist\": \"1.2.0\",\n            \"object-assign\": \"4.1.1\",\n            \"os-homedir\": \"1.0.2\",\n            \"parse-json\": \"2.2.0\",\n            \"require-from-string\": \"1.2.1\"\n          }\n        },\n        \"parse-json\": {\n          \"version\": \"2.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz\",\n          \"integrity\": \"sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=\",\n          \"requires\": {\n            \"error-ex\": \"1.3.2\"\n          }\n        }\n      }\n    },\n    \"postcss-loader\": {\n      \"version\": \"2.1.5\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.1.5.tgz\",\n      \"integrity\": \"sha512-pV7kB5neJ0/1tZ8L1uGOBNTVBCSCXQoIsZMsrwvO8V2rKGa2tBl/f80GGVxow2jJnRJ2w1ocx693EKhZAb9Isg==\",\n      \"requires\": {\n        \"loader-utils\": \"1.2.3\",\n        \"postcss\": \"6.0.23\",\n        \"postcss-load-config\": \"1.2.0\",\n        \"schema-utils\": \"0.4.7\"\n      },\n      \"dependencies\": {\n        \"schema-utils\": {\n          \"version\": \"0.4.7\",\n          \"resolved\": \"https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz\",\n          \"integrity\": \"sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==\",\n          \"requires\": {\n            \"ajv\": \"6.6.2\",\n            \"ajv-keywords\": \"3.2.0\"\n          }\n        }\n      }\n    },\n    \"postcss-markdown\": {\n      \"version\": \"0.36.0\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-markdown/-/postcss-markdown-0.36.0.tgz\",\n      \"integrity\": \"sha512-rl7fs1r/LNSB2bWRhyZ+lM/0bwKv9fhl38/06gF6mKMo/NPnp55+K1dSTosSVjFZc0e1ppBlu+WT91ba0PMBfQ==\",\n      \"requires\": {\n        \"remark\": \"10.0.1\",\n        \"unist-util-find-all-after\": \"1.0.5\"\n      }\n    },\n    \"postcss-media-query-parser\": {\n      \"version\": \"0.2.3\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz\",\n      \"integrity\": \"sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ=\"\n    },\n    \"postcss-merge-idents\": {\n      \"version\": \"2.1.7\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz\",\n      \"integrity\": \"sha1-TFUwMTwI4dWzu/PSu8dH4njuonA=\",\n      \"requires\": {\n        \"has\": \"1.0.3\",\n        \"postcss\": \"5.2.18\",\n        \"postcss-value-parser\": \"3.3.1\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-merge-longhand\": {\n      \"version\": \"2.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz\",\n      \"integrity\": \"sha1-I9kM0Sewp3mUkVMyc5A0oaTz1lg=\",\n      \"requires\": {\n        \"postcss\": \"5.2.18\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-merge-rules\": {\n      \"version\": \"2.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz\",\n      \"integrity\": \"sha1-0d9d+qexrMO+VT8OnhDofGG19yE=\",\n      \"requires\": {\n        \"browserslist\": \"1.7.7\",\n        \"caniuse-api\": \"1.6.1\",\n        \"postcss\": \"5.2.18\",\n        \"postcss-selector-parser\": \"2.2.3\",\n        \"vendors\": \"1.0.2\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"browserslist\": {\n          \"version\": \"1.7.7\",\n          \"resolved\": \"https://registry.npmjs.org/browserslist/-/browserslist-1.7.7.tgz\",\n          \"integrity\": \"sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=\",\n          \"requires\": {\n            \"caniuse-db\": \"1.0.30000928\",\n            \"electron-to-chromium\": \"1.3.100\"\n          }\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"postcss-selector-parser\": {\n          \"version\": \"2.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz\",\n          \"integrity\": \"sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A=\",\n          \"requires\": {\n            \"flatten\": \"1.0.2\",\n            \"indexes-of\": \"1.0.1\",\n            \"uniq\": \"1.0.1\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-message-helpers\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz\",\n      \"integrity\": \"sha1-pPL0+rbk/gAvCu0ABHjN9S+bpg4=\"\n    },\n    \"postcss-minify-font-values\": {\n      \"version\": \"1.0.5\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz\",\n      \"integrity\": \"sha1-S1jttWZB66fIR0qzUmyv17vey2k=\",\n      \"requires\": {\n        \"object-assign\": \"4.1.1\",\n        \"postcss\": \"5.2.18\",\n        \"postcss-value-parser\": \"3.3.1\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-minify-gradients\": {\n      \"version\": \"1.0.5\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz\",\n      \"integrity\": \"sha1-Xb2hE3NwP4PPtKPqOIHY11/15uE=\",\n      \"requires\": {\n        \"postcss\": \"5.2.18\",\n        \"postcss-value-parser\": \"3.3.1\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-minify-params\": {\n      \"version\": \"1.2.2\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz\",\n      \"integrity\": \"sha1-rSzgcTc7lDs9kwo/pZo1jCjW8fM=\",\n      \"requires\": {\n        \"alphanum-sort\": \"1.0.2\",\n        \"postcss\": \"5.2.18\",\n        \"postcss-value-parser\": \"3.3.1\",\n        \"uniqs\": \"2.0.0\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-minify-selectors\": {\n      \"version\": \"2.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz\",\n      \"integrity\": \"sha1-ssapjAByz5G5MtGkllCBFDEXNb8=\",\n      \"requires\": {\n        \"alphanum-sort\": \"1.0.2\",\n        \"has\": \"1.0.3\",\n        \"postcss\": \"5.2.18\",\n        \"postcss-selector-parser\": \"2.2.3\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"postcss-selector-parser\": {\n          \"version\": \"2.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz\",\n          \"integrity\": \"sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A=\",\n          \"requires\": {\n            \"flatten\": \"1.0.2\",\n            \"indexes-of\": \"1.0.1\",\n            \"uniq\": \"1.0.1\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-modules-extract-imports\": {\n      \"version\": \"1.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.1.tgz\",\n      \"integrity\": \"sha512-6jt9XZwUhwmRUhb/CkyJY020PYaPJsCyt3UjbaWo6XEbH/94Hmv6MP7fG2C5NDU/BcHzyGYxNtHvM+LTf9HrYw==\",\n      \"requires\": {\n        \"postcss\": \"6.0.23\"\n      }\n    },\n    \"postcss-modules-local-by-default\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz\",\n      \"integrity\": \"sha1-99gMOYxaOT+nlkRmvRlQCn1hwGk=\",\n      \"requires\": {\n        \"css-selector-tokenizer\": \"0.7.1\",\n        \"postcss\": \"6.0.23\"\n      }\n    },\n    \"postcss-modules-scope\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz\",\n      \"integrity\": \"sha1-1upkmUx5+XtipytCb75gVqGUu5A=\",\n      \"requires\": {\n        \"css-selector-tokenizer\": \"0.7.1\",\n        \"postcss\": \"6.0.23\"\n      }\n    },\n    \"postcss-modules-values\": {\n      \"version\": \"1.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz\",\n      \"integrity\": \"sha1-7P+p1+GSUYOJ9CrQ6D9yrsRW6iA=\",\n      \"requires\": {\n        \"icss-replace-symbols\": \"1.1.0\",\n        \"postcss\": \"6.0.23\"\n      }\n    },\n    \"postcss-normalize-charset\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz\",\n      \"integrity\": \"sha1-757nEhLX/nWceO0WL2HtYrXLk/E=\",\n      \"requires\": {\n        \"postcss\": \"5.2.18\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-normalize-url\": {\n      \"version\": \"3.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz\",\n      \"integrity\": \"sha1-EI90s/L82viRov+j6kWSJ5/HgiI=\",\n      \"requires\": {\n        \"is-absolute-url\": \"2.1.0\",\n        \"normalize-url\": \"1.9.1\",\n        \"postcss\": \"5.2.18\",\n        \"postcss-value-parser\": \"3.3.1\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-ordered-values\": {\n      \"version\": \"2.2.3\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz\",\n      \"integrity\": \"sha1-7sbCpntsQSqNsgQud/6NpD+VwR0=\",\n      \"requires\": {\n        \"postcss\": \"5.2.18\",\n        \"postcss-value-parser\": \"3.3.1\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-plugin-px2rem\": {\n      \"version\": \"0.7.0\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-plugin-px2rem/-/postcss-plugin-px2rem-0.7.0.tgz\",\n      \"integrity\": \"sha1-UXjPZNLcYumNSNHM/QU+5KAOJUU=\",\n      \"requires\": {\n        \"postcss\": \"5.2.18\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-plugin-weex\": {\n      \"version\": \"0.1.6\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-plugin-weex/-/postcss-plugin-weex-0.1.6.tgz\",\n      \"integrity\": \"sha512-B92g02Va+SPzP6AIlfhTMD6WBPrRL77ESKR36N27uhJP2OA4Lkni9YYsMEeHRB607FGkqYKQJ1edbdY9zw2+LA==\"\n    },\n    \"postcss-reduce-idents\": {\n      \"version\": \"2.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz\",\n      \"integrity\": \"sha1-wsbSDMlYKE9qv75j92Cb9AkFmtM=\",\n      \"requires\": {\n        \"postcss\": \"5.2.18\",\n        \"postcss-value-parser\": \"3.3.1\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-reduce-initial\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz\",\n      \"integrity\": \"sha1-aPgGlfBF0IJjqHmtJA343WT2ROo=\",\n      \"requires\": {\n        \"postcss\": \"5.2.18\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-reduce-transforms\": {\n      \"version\": \"1.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz\",\n      \"integrity\": \"sha1-/3b02CEkN7McKYpC0uFEQCV3GuE=\",\n      \"requires\": {\n        \"has\": \"1.0.3\",\n        \"postcss\": \"5.2.18\",\n        \"postcss-value-parser\": \"3.3.1\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-reporter\": {\n      \"version\": \"6.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-reporter/-/postcss-reporter-6.0.1.tgz\",\n      \"integrity\": \"sha512-LpmQjfRWyabc+fRygxZjpRxfhRf9u/fdlKf4VHG4TSPbV2XNsuISzYW1KL+1aQzx53CAppa1bKG4APIB/DOXXw==\",\n      \"requires\": {\n        \"chalk\": \"2.4.2\",\n        \"lodash\": \"4.17.11\",\n        \"log-symbols\": \"2.2.0\",\n        \"postcss\": \"7.0.35\"\n      },\n      \"dependencies\": {\n        \"postcss\": {\n          \"version\": \"7.0.35\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz\",\n          \"integrity\": \"sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==\",\n          \"requires\": {\n            \"chalk\": \"2.4.2\",\n            \"source-map\": \"0.6.1\",\n            \"supports-color\": \"6.1.0\"\n          }\n        },\n        \"supports-color\": {\n          \"version\": \"6.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz\",\n          \"integrity\": \"sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==\",\n          \"requires\": {\n            \"has-flag\": \"3.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-resolve-nested-selector\": {\n      \"version\": \"0.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz\",\n      \"integrity\": \"sha1-Kcy8fDfe36wwTp//C/FZaz9qDk4=\"\n    },\n    \"postcss-safe-parser\": {\n      \"version\": \"4.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-4.0.2.tgz\",\n      \"integrity\": \"sha512-Uw6ekxSWNLCPesSv/cmqf2bY/77z11O7jZGPax3ycZMFU/oi2DMH9i89AdHc1tRwFg/arFoEwX0IS3LCUxJh1g==\",\n      \"requires\": {\n        \"postcss\": \"7.0.35\"\n      },\n      \"dependencies\": {\n        \"postcss\": {\n          \"version\": \"7.0.35\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz\",\n          \"integrity\": \"sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==\",\n          \"requires\": {\n            \"chalk\": \"2.4.2\",\n            \"source-map\": \"0.6.1\",\n            \"supports-color\": \"6.1.0\"\n          }\n        },\n        \"supports-color\": {\n          \"version\": \"6.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz\",\n          \"integrity\": \"sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==\",\n          \"requires\": {\n            \"has-flag\": \"3.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-sass\": {\n      \"version\": \"0.3.5\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-sass/-/postcss-sass-0.3.5.tgz\",\n      \"integrity\": \"sha512-B5z2Kob4xBxFjcufFnhQ2HqJQ2y/Zs/ic5EZbCywCkxKd756Q40cIQ/veRDwSrw1BF6+4wUgmpm0sBASqVi65A==\",\n      \"requires\": {\n        \"gonzales-pe\": \"4.3.0\",\n        \"postcss\": \"7.0.35\"\n      },\n      \"dependencies\": {\n        \"postcss\": {\n          \"version\": \"7.0.35\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz\",\n          \"integrity\": \"sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==\",\n          \"requires\": {\n            \"chalk\": \"2.4.2\",\n            \"source-map\": \"0.6.1\",\n            \"supports-color\": \"6.1.0\"\n          }\n        },\n        \"supports-color\": {\n          \"version\": \"6.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz\",\n          \"integrity\": \"sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==\",\n          \"requires\": {\n            \"has-flag\": \"3.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-scss\": {\n      \"version\": \"2.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-scss/-/postcss-scss-2.1.1.tgz\",\n      \"integrity\": \"sha512-jQmGnj0hSGLd9RscFw9LyuSVAa5Bl1/KBPqG1NQw9w8ND55nY4ZEsdlVuYJvLPpV+y0nwTV5v/4rHPzZRihQbA==\",\n      \"requires\": {\n        \"postcss\": \"7.0.35\"\n      },\n      \"dependencies\": {\n        \"postcss\": {\n          \"version\": \"7.0.35\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz\",\n          \"integrity\": \"sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==\",\n          \"requires\": {\n            \"chalk\": \"2.4.2\",\n            \"source-map\": \"0.6.1\",\n            \"supports-color\": \"6.1.0\"\n          }\n        },\n        \"supports-color\": {\n          \"version\": \"6.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz\",\n          \"integrity\": \"sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==\",\n          \"requires\": {\n            \"has-flag\": \"3.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-selector-parser\": {\n      \"version\": \"3.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz\",\n      \"integrity\": \"sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==\",\n      \"requires\": {\n        \"dot-prop\": \"5.3.0\",\n        \"indexes-of\": \"1.0.1\",\n        \"uniq\": \"1.0.1\"\n      }\n    },\n    \"postcss-svgo\": {\n      \"version\": \"2.1.6\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-2.1.6.tgz\",\n      \"integrity\": \"sha1-tt8YqmE7Zm4TPwittSGcJoSsEI0=\",\n      \"requires\": {\n        \"is-svg\": \"2.1.0\",\n        \"postcss\": \"5.2.18\",\n        \"postcss-value-parser\": \"3.3.1\",\n        \"svgo\": \"0.7.2\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-syntax\": {\n      \"version\": \"0.36.2\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-syntax/-/postcss-syntax-0.36.2.tgz\",\n      \"integrity\": \"sha512-nBRg/i7E3SOHWxF3PpF5WnJM/jQ1YpY9000OaVXlAQj6Zp/kIqJxEDWIZ67tAd7NLuk7zqN4yqe9nc0oNAOs1w==\"\n    },\n    \"postcss-unique-selectors\": {\n      \"version\": \"2.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz\",\n      \"integrity\": \"sha1-mB1X0p3csz57Hf4f1DuGSfkzyh0=\",\n      \"requires\": {\n        \"alphanum-sort\": \"1.0.2\",\n        \"postcss\": \"5.2.18\",\n        \"uniqs\": \"2.0.0\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-value-parser\": {\n      \"version\": \"3.3.1\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz\",\n      \"integrity\": \"sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==\"\n    },\n    \"postcss-zindex\": {\n      \"version\": \"2.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-2.2.0.tgz\",\n      \"integrity\": \"sha1-0hCd3AVbka9n/EyzsCWUZjnSryI=\",\n      \"requires\": {\n        \"has\": \"1.0.3\",\n        \"postcss\": \"5.2.18\",\n        \"uniqs\": \"2.0.0\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.5.0\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"prelude-ls\": {\n      \"version\": \"1.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz\",\n      \"integrity\": \"sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=\"\n    },\n    \"prepend-http\": {\n      \"version\": \"1.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz\",\n      \"integrity\": \"sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=\"\n    },\n    \"prettier\": {\n      \"version\": \"1.15.3\",\n      \"resolved\": \"https://registry.npmjs.org/prettier/-/prettier-1.15.3.tgz\",\n      \"integrity\": \"sha512-gAU9AGAPMaKb3NNSUUuhhFAS7SCO4ALTN4nRIn6PJ075Qd28Yn2Ig2ahEJWdJwJmlEBTUfC7mMUSFy8MwsOCfg==\"\n    },\n    \"pretty-error\": {\n      \"version\": \"2.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz\",\n      \"integrity\": \"sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=\",\n      \"requires\": {\n        \"renderkid\": \"2.0.2\",\n        \"utila\": \"0.4.0\"\n      }\n    },\n    \"private\": {\n      \"version\": \"0.1.8\",\n      \"resolved\": \"https://registry.npmjs.org/private/-/private-0.1.8.tgz\",\n      \"integrity\": \"sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==\"\n    },\n    \"process\": {\n      \"version\": \"0.11.10\",\n      \"resolved\": \"https://registry.npmjs.org/process/-/process-0.11.10.tgz\",\n      \"integrity\": \"sha1-czIwDoQBYb2j5podHZGn1LwW8YI=\"\n    },\n    \"process-nextick-args\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz\",\n      \"integrity\": \"sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==\"\n    },\n    \"progress\": {\n      \"version\": \"2.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/progress/-/progress-2.0.3.tgz\",\n      \"integrity\": \"sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==\"\n    },\n    \"progress-bar-webpack-plugin\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/progress-bar-webpack-plugin/-/progress-bar-webpack-plugin-2.1.0.tgz\",\n      \"integrity\": \"sha512-UtlZbnxpYk1wufEWfhIjRn2U52zlY38uvnzFhs8rRxJxC1hSqw88JNR2Mbpqq9Kix8L1nGb3uQ+/1BiUWbigAg==\",\n      \"requires\": {\n        \"chalk\": \"3.0.0\",\n        \"progress\": \"2.0.3\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"4.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz\",\n          \"integrity\": \"sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==\",\n          \"requires\": {\n            \"@types/color-name\": \"1.1.1\",\n            \"color-convert\": \"2.0.1\"\n          }\n        },\n        \"chalk\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz\",\n          \"integrity\": \"sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==\",\n          \"requires\": {\n            \"ansi-styles\": \"4.2.1\",\n            \"supports-color\": \"7.1.0\"\n          }\n        },\n        \"color-convert\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz\",\n          \"integrity\": \"sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==\",\n          \"requires\": {\n            \"color-name\": \"1.1.4\"\n          }\n        },\n        \"color-name\": {\n          \"version\": \"1.1.4\",\n          \"resolved\": \"https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz\",\n          \"integrity\": \"sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==\"\n        },\n        \"has-flag\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz\",\n          \"integrity\": \"sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==\"\n        },\n        \"supports-color\": {\n          \"version\": \"7.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz\",\n          \"integrity\": \"sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==\",\n          \"requires\": {\n            \"has-flag\": \"4.0.0\"\n          }\n        }\n      }\n    },\n    \"promise\": {\n      \"version\": \"8.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/promise/-/promise-8.1.0.tgz\",\n      \"integrity\": \"sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==\",\n      \"requires\": {\n        \"asap\": \"2.0.6\"\n      }\n    },\n    \"promise-inflight\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz\",\n      \"integrity\": \"sha1-mEcocL8igTL8vdhoEputEsPAKeM=\"\n    },\n    \"proto-list\": {\n      \"version\": \"1.2.4\",\n      \"resolved\": \"https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz\",\n      \"integrity\": \"sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=\"\n    },\n    \"proxy-addr\": {\n      \"version\": \"2.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz\",\n      \"integrity\": \"sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==\",\n      \"requires\": {\n        \"forwarded\": \"0.1.2\",\n        \"ipaddr.js\": \"1.8.0\"\n      }\n    },\n    \"prr\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/prr/-/prr-1.0.1.tgz\",\n      \"integrity\": \"sha1-0/wRS6BplaRexok/SEzrHXj19HY=\"\n    },\n    \"pseudomap\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz\",\n      \"integrity\": \"sha1-8FKijacOYYkX7wqKw0wa5aaChrM=\"\n    },\n    \"psl\": {\n      \"version\": \"1.8.0\",\n      \"resolved\": \"https://registry.npmjs.org/psl/-/psl-1.8.0.tgz\",\n      \"integrity\": \"sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==\",\n      \"optional\": true\n    },\n    \"public-encrypt\": {\n      \"version\": \"4.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz\",\n      \"integrity\": \"sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==\",\n      \"requires\": {\n        \"bn.js\": \"4.11.8\",\n        \"browserify-rsa\": \"4.0.1\",\n        \"create-hash\": \"1.2.0\",\n        \"parse-asn1\": \"5.1.1\",\n        \"randombytes\": \"2.0.6\",\n        \"safe-buffer\": \"5.1.2\"\n      }\n    },\n    \"pump\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/pump/-/pump-2.0.1.tgz\",\n      \"integrity\": \"sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==\",\n      \"requires\": {\n        \"end-of-stream\": \"1.4.1\",\n        \"once\": \"1.4.0\"\n      }\n    },\n    \"pumpify\": {\n      \"version\": \"1.5.1\",\n      \"resolved\": \"https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz\",\n      \"integrity\": \"sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==\",\n      \"requires\": {\n        \"duplexify\": \"3.6.1\",\n        \"inherits\": \"2.0.3\",\n        \"pump\": \"2.0.1\"\n      }\n    },\n    \"punycode\": {\n      \"version\": \"2.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz\",\n      \"integrity\": \"sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==\"\n    },\n    \"q\": {\n      \"version\": \"1.5.1\",\n      \"resolved\": \"https://registry.npmjs.org/q/-/q-1.5.1.tgz\",\n      \"integrity\": \"sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=\"\n    },\n    \"qrcode-terminal\": {\n      \"version\": \"0.12.0\",\n      \"resolved\": \"https://registry.npmjs.org/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz\",\n      \"integrity\": \"sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ==\"\n    },\n    \"qs\": {\n      \"version\": \"6.5.2\",\n      \"resolved\": \"https://registry.npmjs.org/qs/-/qs-6.5.2.tgz\",\n      \"integrity\": \"sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==\"\n    },\n    \"query-string\": {\n      \"version\": \"4.3.4\",\n      \"resolved\": \"https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz\",\n      \"integrity\": \"sha1-u7aTucqRXCMlFbIosaArYJBD2+s=\",\n      \"requires\": {\n        \"object-assign\": \"4.1.1\",\n        \"strict-uri-encode\": \"1.1.0\"\n      }\n    },\n    \"querystring\": {\n      \"version\": \"0.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz\",\n      \"integrity\": \"sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=\"\n    },\n    \"querystring-es3\": {\n      \"version\": \"0.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz\",\n      \"integrity\": \"sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=\"\n    },\n    \"quick-lru\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz\",\n      \"integrity\": \"sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=\"\n    },\n    \"randombytes\": {\n      \"version\": \"2.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz\",\n      \"integrity\": \"sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==\",\n      \"requires\": {\n        \"safe-buffer\": \"5.1.2\"\n      }\n    },\n    \"randomfill\": {\n      \"version\": \"1.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz\",\n      \"integrity\": \"sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==\",\n      \"requires\": {\n        \"randombytes\": \"2.0.6\",\n        \"safe-buffer\": \"5.1.2\"\n      }\n    },\n    \"range-parser\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz\",\n      \"integrity\": \"sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=\"\n    },\n    \"raw-body\": {\n      \"version\": \"2.3.3\",\n      \"resolved\": \"https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz\",\n      \"integrity\": \"sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==\",\n      \"requires\": {\n        \"bytes\": \"3.0.0\",\n        \"http-errors\": \"1.6.3\",\n        \"iconv-lite\": \"0.4.23\",\n        \"unpipe\": \"1.0.0\"\n      }\n    },\n    \"read-cache\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz\",\n      \"integrity\": \"sha1-5mTvMRYRZsl1HNvo28+GtftY93Q=\",\n      \"requires\": {\n        \"pify\": \"2.3.0\"\n      },\n      \"dependencies\": {\n        \"pify\": {\n          \"version\": \"2.3.0\",\n          \"resolved\": \"https://registry.npmjs.org/pify/-/pify-2.3.0.tgz\",\n          \"integrity\": \"sha1-7RQaasBDqEnqWISY59yosVMw6Qw=\"\n        }\n      }\n    },\n    \"read-pkg\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz\",\n      \"integrity\": \"sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=\",\n      \"requires\": {\n        \"load-json-file\": \"4.0.0\",\n        \"normalize-package-data\": \"2.4.0\",\n        \"path-type\": \"3.0.0\"\n      }\n    },\n    \"read-pkg-up\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz\",\n      \"integrity\": \"sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=\",\n      \"requires\": {\n        \"find-up\": \"2.1.0\",\n        \"read-pkg\": \"3.0.0\"\n      }\n    },\n    \"readable-stream\": {\n      \"version\": \"2.3.6\",\n      \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz\",\n      \"integrity\": \"sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==\",\n      \"requires\": {\n        \"core-util-is\": \"1.0.2\",\n        \"inherits\": \"2.0.3\",\n        \"isarray\": \"1.0.0\",\n        \"process-nextick-args\": \"2.0.0\",\n        \"safe-buffer\": \"5.1.2\",\n        \"string_decoder\": \"1.1.1\",\n        \"util-deprecate\": \"1.0.2\"\n      }\n    },\n    \"readdirp\": {\n      \"version\": \"2.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz\",\n      \"integrity\": \"sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==\",\n      \"requires\": {\n        \"graceful-fs\": \"4.1.15\",\n        \"micromatch\": \"3.1.10\",\n        \"readable-stream\": \"2.3.6\"\n      }\n    },\n    \"recast\": {\n      \"version\": \"0.11.23\",\n      \"resolved\": \"https://registry.npmjs.org/recast/-/recast-0.11.23.tgz\",\n      \"integrity\": \"sha1-RR/TAEqx5N+bTktmN2sqIZEkYtM=\",\n      \"requires\": {\n        \"ast-types\": \"0.9.6\",\n        \"esprima\": \"3.1.3\",\n        \"private\": \"0.1.8\",\n        \"source-map\": \"0.5.7\"\n      },\n      \"dependencies\": {\n        \"esprima\": {\n          \"version\": \"3.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz\",\n          \"integrity\": \"sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=\"\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        }\n      }\n    },\n    \"rechoir\": {\n      \"version\": \"0.6.2\",\n      \"resolved\": \"https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz\",\n      \"integrity\": \"sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=\",\n      \"requires\": {\n        \"resolve\": \"1.9.0\"\n      }\n    },\n    \"redent\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/redent/-/redent-2.0.0.tgz\",\n      \"integrity\": \"sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=\",\n      \"requires\": {\n        \"indent-string\": \"3.2.0\",\n        \"strip-indent\": \"2.0.0\"\n      }\n    },\n    \"reduce-css-calc\": {\n      \"version\": \"1.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz\",\n      \"integrity\": \"sha1-dHyRTgSWFKTJz7umKYca0dKSdxY=\",\n      \"requires\": {\n        \"balanced-match\": \"0.4.2\",\n        \"math-expression-evaluator\": \"1.2.17\",\n        \"reduce-function-call\": \"1.0.2\"\n      },\n      \"dependencies\": {\n        \"balanced-match\": {\n          \"version\": \"0.4.2\",\n          \"resolved\": \"https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz\",\n          \"integrity\": \"sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=\"\n        }\n      }\n    },\n    \"reduce-function-call\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/reduce-function-call/-/reduce-function-call-1.0.2.tgz\",\n      \"integrity\": \"sha1-WiAL+S4ON3UXUv5FsKszD9S2vpk=\",\n      \"requires\": {\n        \"balanced-match\": \"0.4.2\"\n      },\n      \"dependencies\": {\n        \"balanced-match\": {\n          \"version\": \"0.4.2\",\n          \"resolved\": \"https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.2.tgz\",\n          \"integrity\": \"sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=\"\n        }\n      }\n    },\n    \"regenerate\": {\n      \"version\": \"1.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz\",\n      \"integrity\": \"sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==\"\n    },\n    \"regenerator-runtime\": {\n      \"version\": \"0.11.1\",\n      \"resolved\": \"https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz\",\n      \"integrity\": \"sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==\"\n    },\n    \"regenerator-transform\": {\n      \"version\": \"0.10.1\",\n      \"resolved\": \"https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz\",\n      \"integrity\": \"sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\",\n        \"private\": \"0.1.8\"\n      }\n    },\n    \"regex-not\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz\",\n      \"integrity\": \"sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==\",\n      \"requires\": {\n        \"extend-shallow\": \"3.0.2\",\n        \"safe-regex\": \"1.1.0\"\n      }\n    },\n    \"regexpp\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz\",\n      \"integrity\": \"sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==\",\n      \"dev\": true\n    },\n    \"regexpu-core\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz\",\n      \"integrity\": \"sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=\",\n      \"requires\": {\n        \"regenerate\": \"1.4.0\",\n        \"regjsgen\": \"0.2.0\",\n        \"regjsparser\": \"0.1.5\"\n      }\n    },\n    \"regjsgen\": {\n      \"version\": \"0.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz\",\n      \"integrity\": \"sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=\"\n    },\n    \"regjsparser\": {\n      \"version\": \"0.1.5\",\n      \"resolved\": \"https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz\",\n      \"integrity\": \"sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=\",\n      \"requires\": {\n        \"jsesc\": \"0.5.0\"\n      },\n      \"dependencies\": {\n        \"jsesc\": {\n          \"version\": \"0.5.0\",\n          \"resolved\": \"https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz\",\n          \"integrity\": \"sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=\"\n        }\n      }\n    },\n    \"relateurl\": {\n      \"version\": \"0.2.7\",\n      \"resolved\": \"https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz\",\n      \"integrity\": \"sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=\"\n    },\n    \"remark\": {\n      \"version\": \"10.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/remark/-/remark-10.0.1.tgz\",\n      \"integrity\": \"sha512-E6lMuoLIy2TyiokHprMjcWNJ5UxfGQjaMSMhV+f4idM625UjjK4j798+gPs5mfjzDE6vL0oFKVeZM6gZVSVrzQ==\",\n      \"requires\": {\n        \"remark-parse\": \"6.0.3\",\n        \"remark-stringify\": \"6.0.4\",\n        \"unified\": \"7.1.0\"\n      }\n    },\n    \"remark-parse\": {\n      \"version\": \"6.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/remark-parse/-/remark-parse-6.0.3.tgz\",\n      \"integrity\": \"sha512-QbDXWN4HfKTUC0hHa4teU463KclLAnwpn/FBn87j9cKYJWWawbiLgMfP2Q4XwhxxuuuOxHlw+pSN0OKuJwyVvg==\",\n      \"requires\": {\n        \"collapse-white-space\": \"1.0.6\",\n        \"is-alphabetical\": \"1.0.4\",\n        \"is-decimal\": \"1.0.4\",\n        \"is-whitespace-character\": \"1.0.4\",\n        \"is-word-character\": \"1.0.4\",\n        \"markdown-escapes\": \"1.0.4\",\n        \"parse-entities\": \"1.2.2\",\n        \"repeat-string\": \"1.6.1\",\n        \"state-toggle\": \"1.0.3\",\n        \"trim\": \"0.0.1\",\n        \"trim-trailing-lines\": \"1.1.3\",\n        \"unherit\": \"1.1.3\",\n        \"unist-util-remove-position\": \"1.1.4\",\n        \"vfile-location\": \"2.0.6\",\n        \"xtend\": \"4.0.1\"\n      }\n    },\n    \"remark-stringify\": {\n      \"version\": \"6.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/remark-stringify/-/remark-stringify-6.0.4.tgz\",\n      \"integrity\": \"sha512-eRWGdEPMVudijE/psbIDNcnJLRVx3xhfuEsTDGgH4GsFF91dVhw5nhmnBppafJ7+NWINW6C7ZwWbi30ImJzqWg==\",\n      \"requires\": {\n        \"ccount\": \"1.0.5\",\n        \"is-alphanumeric\": \"1.0.0\",\n        \"is-decimal\": \"1.0.4\",\n        \"is-whitespace-character\": \"1.0.4\",\n        \"longest-streak\": \"2.0.4\",\n        \"markdown-escapes\": \"1.0.4\",\n        \"markdown-table\": \"1.1.3\",\n        \"mdast-util-compact\": \"1.0.4\",\n        \"parse-entities\": \"1.2.2\",\n        \"repeat-string\": \"1.6.1\",\n        \"state-toggle\": \"1.0.3\",\n        \"stringify-entities\": \"1.3.2\",\n        \"unherit\": \"1.1.3\",\n        \"xtend\": \"4.0.1\"\n      }\n    },\n    \"remove-trailing-separator\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz\",\n      \"integrity\": \"sha1-wkvOKig62tW8P1jg1IJJuSN52O8=\"\n    },\n    \"renderkid\": {\n      \"version\": \"2.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/renderkid/-/renderkid-2.0.2.tgz\",\n      \"integrity\": \"sha512-FsygIxevi1jSiPY9h7vZmBFUbAOcbYm9UwyiLNdVsLRs/5We9Ob5NMPbGYUTWiLq5L+ezlVdE0A8bbME5CWTpg==\",\n      \"requires\": {\n        \"css-select\": \"1.2.0\",\n        \"dom-converter\": \"0.2.0\",\n        \"htmlparser2\": \"3.3.0\",\n        \"strip-ansi\": \"3.0.1\",\n        \"utila\": \"0.4.0\"\n      },\n      \"dependencies\": {\n        \"domhandler\": {\n          \"version\": \"2.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/domhandler/-/domhandler-2.1.0.tgz\",\n          \"integrity\": \"sha1-0mRvXlf2w7qxHPbLBdPArPdBJZQ=\",\n          \"requires\": {\n            \"domelementtype\": \"1.3.1\"\n          }\n        },\n        \"domutils\": {\n          \"version\": \"1.1.6\",\n          \"resolved\": \"https://registry.npmjs.org/domutils/-/domutils-1.1.6.tgz\",\n          \"integrity\": \"sha1-vdw94Jm5ou+sxRxiPyj0FuzFdIU=\",\n          \"requires\": {\n            \"domelementtype\": \"1.3.1\"\n          }\n        },\n        \"htmlparser2\": {\n          \"version\": \"3.3.0\",\n          \"resolved\": \"https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.3.0.tgz\",\n          \"integrity\": \"sha1-zHDQWln2VC5D8OaFyYLhTJJKnv4=\",\n          \"requires\": {\n            \"domelementtype\": \"1.3.1\",\n            \"domhandler\": \"2.1.0\",\n            \"domutils\": \"1.1.6\",\n            \"readable-stream\": \"1.0.34\"\n          }\n        },\n        \"isarray\": {\n          \"version\": \"0.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz\",\n          \"integrity\": \"sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=\"\n        },\n        \"readable-stream\": {\n          \"version\": \"1.0.34\",\n          \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz\",\n          \"integrity\": \"sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=\",\n          \"requires\": {\n            \"core-util-is\": \"1.0.2\",\n            \"inherits\": \"2.0.3\",\n            \"isarray\": \"0.0.1\",\n            \"string_decoder\": \"0.10.31\"\n          }\n        },\n        \"string_decoder\": {\n          \"version\": \"0.10.31\",\n          \"resolved\": \"https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz\",\n          \"integrity\": \"sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=\"\n        }\n      }\n    },\n    \"repeat-element\": {\n      \"version\": \"1.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz\",\n      \"integrity\": \"sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==\"\n    },\n    \"repeat-string\": {\n      \"version\": \"1.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz\",\n      \"integrity\": \"sha1-jcrkcOHIirwtYA//Sndihtp15jc=\"\n    },\n    \"repeating\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz\",\n      \"integrity\": \"sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=\",\n      \"requires\": {\n        \"is-finite\": \"1.0.2\"\n      }\n    },\n    \"replace-ext\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz\",\n      \"integrity\": \"sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=\"\n    },\n    \"request\": {\n      \"version\": \"2.88.2\",\n      \"resolved\": \"https://registry.npmjs.org/request/-/request-2.88.2.tgz\",\n      \"integrity\": \"sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==\",\n      \"optional\": true,\n      \"requires\": {\n        \"aws-sign2\": \"0.7.0\",\n        \"aws4\": \"1.8.0\",\n        \"caseless\": \"0.12.0\",\n        \"combined-stream\": \"1.0.7\",\n        \"extend\": \"3.0.2\",\n        \"forever-agent\": \"0.6.1\",\n        \"form-data\": \"2.3.3\",\n        \"har-validator\": \"5.1.3\",\n        \"http-signature\": \"1.2.0\",\n        \"is-typedarray\": \"1.0.0\",\n        \"isstream\": \"0.1.2\",\n        \"json-stringify-safe\": \"5.0.1\",\n        \"mime-types\": \"2.1.21\",\n        \"oauth-sign\": \"0.9.0\",\n        \"performance-now\": \"2.1.0\",\n        \"qs\": \"6.5.2\",\n        \"safe-buffer\": \"5.1.2\",\n        \"tough-cookie\": \"2.5.0\",\n        \"tunnel-agent\": \"0.6.0\",\n        \"uuid\": \"3.3.2\"\n      },\n      \"dependencies\": {\n        \"tunnel-agent\": {\n          \"version\": \"0.6.0\",\n          \"resolved\": \"https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz\",\n          \"integrity\": \"sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=\",\n          \"optional\": true,\n          \"requires\": {\n            \"safe-buffer\": \"5.1.2\"\n          }\n        }\n      }\n    },\n    \"require-directory\": {\n      \"version\": \"2.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz\",\n      \"integrity\": \"sha1-jGStX9MNqxyXbiNE/+f3kqam30I=\"\n    },\n    \"require-from-string\": {\n      \"version\": \"1.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz\",\n      \"integrity\": \"sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg=\"\n    },\n    \"require-main-filename\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz\",\n      \"integrity\": \"sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=\"\n    },\n    \"requires-port\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz\",\n      \"integrity\": \"sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=\"\n    },\n    \"resolve\": {\n      \"version\": \"1.9.0\",\n      \"resolved\": \"https://registry.npmjs.org/resolve/-/resolve-1.9.0.tgz\",\n      \"integrity\": \"sha512-TZNye00tI67lwYvzxCxHGjwTNlUV70io54/Ed4j6PscB8xVfuBJpRenI/o6dVk0cY0PYTY27AgCoGGxRnYuItQ==\",\n      \"requires\": {\n        \"path-parse\": \"1.0.6\"\n      }\n    },\n    \"resolve-from\": {\n      \"version\": \"4.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz\",\n      \"integrity\": \"sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==\"\n    },\n    \"resolve-url\": {\n      \"version\": \"0.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz\",\n      \"integrity\": \"sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=\"\n    },\n    \"restore-cursor\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz\",\n      \"integrity\": \"sha1-n37ih/gv0ybU/RYpI9YhKe7g368=\",\n      \"requires\": {\n        \"onetime\": \"2.0.1\",\n        \"signal-exit\": \"3.0.2\"\n      }\n    },\n    \"ret\": {\n      \"version\": \"0.1.15\",\n      \"resolved\": \"https://registry.npmjs.org/ret/-/ret-0.1.15.tgz\",\n      \"integrity\": \"sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==\"\n    },\n    \"rework\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/rework/-/rework-1.0.1.tgz\",\n      \"integrity\": \"sha1-MIBqhBNCtUUQqkEQhQzUhTQUSqc=\",\n      \"requires\": {\n        \"convert-source-map\": \"0.3.5\",\n        \"css\": \"2.2.4\"\n      },\n      \"dependencies\": {\n        \"convert-source-map\": {\n          \"version\": \"0.3.5\",\n          \"resolved\": \"https://registry.npmjs.org/convert-source-map/-/convert-source-map-0.3.5.tgz\",\n          \"integrity\": \"sha1-8dgClQr33SYxof6+BZZVDIarMZA=\"\n        }\n      }\n    },\n    \"right-align\": {\n      \"version\": \"0.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz\",\n      \"integrity\": \"sha1-YTObci/mo1FWiSENJOFMlhSGE+8=\",\n      \"requires\": {\n        \"align-text\": \"0.1.4\"\n      }\n    },\n    \"rimraf\": {\n      \"version\": \"2.6.3\",\n      \"resolved\": \"https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz\",\n      \"integrity\": \"sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==\",\n      \"requires\": {\n        \"glob\": \"7.1.3\"\n      },\n      \"dependencies\": {\n        \"glob\": {\n          \"version\": \"7.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/glob/-/glob-7.1.3.tgz\",\n          \"integrity\": \"sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==\",\n          \"requires\": {\n            \"fs.realpath\": \"1.0.0\",\n            \"inflight\": \"1.0.6\",\n            \"inherits\": \"2.0.3\",\n            \"minimatch\": \"3.0.4\",\n            \"once\": \"1.4.0\",\n            \"path-is-absolute\": \"1.0.1\"\n          }\n        }\n      }\n    },\n    \"ripemd160\": {\n      \"version\": \"2.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz\",\n      \"integrity\": \"sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==\",\n      \"requires\": {\n        \"hash-base\": \"3.0.4\",\n        \"inherits\": \"2.0.3\"\n      }\n    },\n    \"run-async\": {\n      \"version\": \"2.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz\",\n      \"integrity\": \"sha1-A3GrSuC91yDUFm19/aZP96RFpsA=\",\n      \"requires\": {\n        \"is-promise\": \"2.1.0\"\n      }\n    },\n    \"run-queue\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz\",\n      \"integrity\": \"sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=\",\n      \"requires\": {\n        \"aproba\": \"1.2.0\"\n      }\n    },\n    \"runtime-check\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/runtime-check/-/runtime-check-1.0.8.tgz\",\n      \"integrity\": \"sha512-SNEIbwoI2+hVsVWK146bTY+TRQ+CNz5edPf0Be9/hWR8zk4j+jq7ASG455c/6iGrhmiz+LTZEg8ZcPaFoWsILA==\",\n      \"requires\": {\n        \"@babel/parser\": \"7.1.0\",\n        \"babel-generator\": \"6.26.1\",\n        \"babel-traverse\": \"6.26.0\"\n      },\n      \"dependencies\": {\n        \"@babel/parser\": {\n          \"version\": \"7.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.1.0.tgz\",\n          \"integrity\": \"sha512-SmjnXCuPAlai75AFtzv+KCBcJ3sDDWbIn+WytKw1k+wAtEy6phqI2RqKh/zAnw53i1NR8su3Ep/UoqaKcimuLg==\"\n        }\n      }\n    },\n    \"rxjs\": {\n      \"version\": \"6.3.3\",\n      \"resolved\": \"https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz\",\n      \"integrity\": \"sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==\",\n      \"requires\": {\n        \"tslib\": \"1.9.3\"\n      }\n    },\n    \"safe-buffer\": {\n      \"version\": \"5.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz\",\n      \"integrity\": \"sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==\"\n    },\n    \"safe-regex\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz\",\n      \"integrity\": \"sha1-QKNmnzsHfR6UPURinhV91IAjvy4=\",\n      \"requires\": {\n        \"ret\": \"0.1.15\"\n      }\n    },\n    \"safer-buffer\": {\n      \"version\": \"2.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz\",\n      \"integrity\": \"sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==\"\n    },\n    \"sax\": {\n      \"version\": \"1.2.4\",\n      \"resolved\": \"https://registry.npmjs.org/sax/-/sax-1.2.4.tgz\",\n      \"integrity\": \"sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==\"\n    },\n    \"schema-utils\": {\n      \"version\": \"0.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz\",\n      \"integrity\": \"sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=\",\n      \"requires\": {\n        \"ajv\": \"5.5.2\"\n      },\n      \"dependencies\": {\n        \"ajv\": {\n          \"version\": \"5.5.2\",\n          \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz\",\n          \"integrity\": \"sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=\",\n          \"requires\": {\n            \"co\": \"4.6.0\",\n            \"fast-deep-equal\": \"1.1.0\",\n            \"fast-json-stable-stringify\": \"2.0.0\",\n            \"json-schema-traverse\": \"0.3.1\"\n          }\n        },\n        \"fast-deep-equal\": {\n          \"version\": \"1.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz\",\n          \"integrity\": \"sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=\"\n        },\n        \"json-schema-traverse\": {\n          \"version\": \"0.3.1\",\n          \"resolved\": \"https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz\",\n          \"integrity\": \"sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=\"\n        }\n      }\n    },\n    \"semver\": {\n      \"version\": \"5.6.0\",\n      \"resolved\": \"https://registry.npmjs.org/semver/-/semver-5.6.0.tgz\",\n      \"integrity\": \"sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==\"\n    },\n    \"send\": {\n      \"version\": \"0.16.2\",\n      \"resolved\": \"https://registry.npmjs.org/send/-/send-0.16.2.tgz\",\n      \"integrity\": \"sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==\",\n      \"requires\": {\n        \"debug\": \"2.6.9\",\n        \"depd\": \"1.1.2\",\n        \"destroy\": \"1.0.4\",\n        \"encodeurl\": \"1.0.2\",\n        \"escape-html\": \"1.0.3\",\n        \"etag\": \"1.8.1\",\n        \"fresh\": \"0.5.2\",\n        \"http-errors\": \"1.6.3\",\n        \"mime\": \"1.4.1\",\n        \"ms\": \"2.0.0\",\n        \"on-finished\": \"2.3.0\",\n        \"range-parser\": \"1.2.0\",\n        \"statuses\": \"1.4.0\"\n      },\n      \"dependencies\": {\n        \"mime\": {\n          \"version\": \"1.4.1\",\n          \"resolved\": \"https://registry.npmjs.org/mime/-/mime-1.4.1.tgz\",\n          \"integrity\": \"sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==\"\n        },\n        \"statuses\": {\n          \"version\": \"1.4.0\",\n          \"resolved\": \"https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz\",\n          \"integrity\": \"sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==\"\n        }\n      }\n    },\n    \"serialize-javascript\": {\n      \"version\": \"1.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.6.1.tgz\",\n      \"integrity\": \"sha512-A5MOagrPFga4YaKQSWHryl7AXvbQkEqpw4NNYMTNYUNV51bA8ABHgYFpqKx+YFFrw59xMV1qGH1R4AgoNIVgCw==\"\n    },\n    \"serve-static\": {\n      \"version\": \"1.13.2\",\n      \"resolved\": \"https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz\",\n      \"integrity\": \"sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==\",\n      \"requires\": {\n        \"encodeurl\": \"1.0.2\",\n        \"escape-html\": \"1.0.3\",\n        \"parseurl\": \"1.3.2\",\n        \"send\": \"0.16.2\"\n      }\n    },\n    \"set-blocking\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz\",\n      \"integrity\": \"sha1-BF+XgtARrppoA93TgrJDkrPYkPc=\"\n    },\n    \"set-value\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz\",\n      \"integrity\": \"sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==\",\n      \"requires\": {\n        \"extend-shallow\": \"2.0.1\",\n        \"is-extendable\": \"0.1.1\",\n        \"is-plain-object\": \"2.0.4\",\n        \"split-string\": \"3.1.0\"\n      },\n      \"dependencies\": {\n        \"extend-shallow\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz\",\n          \"integrity\": \"sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=\",\n          \"requires\": {\n            \"is-extendable\": \"0.1.1\"\n          }\n        }\n      }\n    },\n    \"setimmediate\": {\n      \"version\": \"1.0.5\",\n      \"resolved\": \"https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz\",\n      \"integrity\": \"sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=\"\n    },\n    \"setprototypeof\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz\",\n      \"integrity\": \"sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==\"\n    },\n    \"sha.js\": {\n      \"version\": \"2.4.11\",\n      \"resolved\": \"https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz\",\n      \"integrity\": \"sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==\",\n      \"requires\": {\n        \"inherits\": \"2.0.3\",\n        \"safe-buffer\": \"5.1.2\"\n      }\n    },\n    \"shebang-command\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz\",\n      \"integrity\": \"sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=\",\n      \"requires\": {\n        \"shebang-regex\": \"1.0.0\"\n      }\n    },\n    \"shebang-regex\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz\",\n      \"integrity\": \"sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=\"\n    },\n    \"shelljs\": {\n      \"version\": \"0.8.2\",\n      \"resolved\": \"https://registry.npmjs.org/shelljs/-/shelljs-0.8.2.tgz\",\n      \"integrity\": \"sha512-pRXeNrCA2Wd9itwhvLp5LZQvPJ0wU6bcjaTMywHHGX5XWhVN2nzSu7WV0q+oUY7mGK3mgSkDDzP3MgjqdyIgbQ==\",\n      \"requires\": {\n        \"glob\": \"7.1.2\",\n        \"interpret\": \"1.2.0\",\n        \"rechoir\": \"0.6.2\"\n      }\n    },\n    \"sigmund\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz\",\n      \"integrity\": \"sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=\"\n    },\n    \"signal-exit\": {\n      \"version\": \"3.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz\",\n      \"integrity\": \"sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=\"\n    },\n    \"slash\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/slash/-/slash-1.0.0.tgz\",\n      \"integrity\": \"sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=\"\n    },\n    \"slice-ansi\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.0.0.tgz\",\n      \"integrity\": \"sha512-4j2WTWjp3GsZ+AOagyzVbzp4vWGtZ0hEZ/gDY/uTvm6MTxUfTUIsnMIFb1bn8o0RuXiqUw15H1bue8f22Vw2oQ==\",\n      \"requires\": {\n        \"ansi-styles\": \"3.2.1\",\n        \"astral-regex\": \"1.0.0\",\n        \"is-fullwidth-code-point\": \"2.0.0\"\n      }\n    },\n    \"snapdragon\": {\n      \"version\": \"0.8.2\",\n      \"resolved\": \"https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz\",\n      \"integrity\": \"sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==\",\n      \"requires\": {\n        \"base\": \"0.11.2\",\n        \"debug\": \"2.6.9\",\n        \"define-property\": \"0.2.5\",\n        \"extend-shallow\": \"2.0.1\",\n        \"map-cache\": \"0.2.2\",\n        \"source-map\": \"0.5.7\",\n        \"source-map-resolve\": \"0.5.2\",\n        \"use\": \"3.1.1\"\n      },\n      \"dependencies\": {\n        \"define-property\": {\n          \"version\": \"0.2.5\",\n          \"resolved\": \"https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz\",\n          \"integrity\": \"sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=\",\n          \"requires\": {\n            \"is-descriptor\": \"0.1.6\"\n          }\n        },\n        \"extend-shallow\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz\",\n          \"integrity\": \"sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=\",\n          \"requires\": {\n            \"is-extendable\": \"0.1.1\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        }\n      }\n    },\n    \"snapdragon-node\": {\n      \"version\": \"2.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz\",\n      \"integrity\": \"sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==\",\n      \"requires\": {\n        \"define-property\": \"1.0.0\",\n        \"isobject\": \"3.0.1\",\n        \"snapdragon-util\": \"3.0.1\"\n      },\n      \"dependencies\": {\n        \"define-property\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz\",\n          \"integrity\": \"sha1-dp66rz9KY6rTr56NMEybvnm/sOY=\",\n          \"requires\": {\n            \"is-descriptor\": \"1.0.2\"\n          }\n        },\n        \"is-accessor-descriptor\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz\",\n          \"integrity\": \"sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==\",\n          \"requires\": {\n            \"kind-of\": \"6.0.2\"\n          }\n        },\n        \"is-data-descriptor\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz\",\n          \"integrity\": \"sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==\",\n          \"requires\": {\n            \"kind-of\": \"6.0.2\"\n          }\n        },\n        \"is-descriptor\": {\n          \"version\": \"1.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz\",\n          \"integrity\": \"sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==\",\n          \"requires\": {\n            \"is-accessor-descriptor\": \"1.0.0\",\n            \"is-data-descriptor\": \"1.0.0\",\n            \"kind-of\": \"6.0.2\"\n          }\n        }\n      }\n    },\n    \"snapdragon-util\": {\n      \"version\": \"3.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz\",\n      \"integrity\": \"sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==\",\n      \"requires\": {\n        \"kind-of\": \"3.2.2\"\n      },\n      \"dependencies\": {\n        \"kind-of\": {\n          \"version\": \"3.2.2\",\n          \"resolved\": \"https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz\",\n          \"integrity\": \"sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=\",\n          \"requires\": {\n            \"is-buffer\": \"1.1.6\"\n          }\n        }\n      }\n    },\n    \"sntp\": {\n      \"version\": \"1.0.9\",\n      \"resolved\": \"https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz\",\n      \"integrity\": \"sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=\",\n      \"dev\": true,\n      \"requires\": {\n        \"hoek\": \"2.16.3\"\n      }\n    },\n    \"sort-keys\": {\n      \"version\": \"1.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz\",\n      \"integrity\": \"sha1-RBttTTRnmPG05J6JIK37oOVD+a0=\",\n      \"requires\": {\n        \"is-plain-obj\": \"1.1.0\"\n      }\n    },\n    \"source-list-map\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz\",\n      \"integrity\": \"sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==\"\n    },\n    \"source-map\": {\n      \"version\": \"0.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz\",\n      \"integrity\": \"sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==\"\n    },\n    \"source-map-resolve\": {\n      \"version\": \"0.5.2\",\n      \"resolved\": \"https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz\",\n      \"integrity\": \"sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==\",\n      \"requires\": {\n        \"atob\": \"2.1.2\",\n        \"decode-uri-component\": \"0.2.0\",\n        \"resolve-url\": \"0.2.1\",\n        \"source-map-url\": \"0.4.0\",\n        \"urix\": \"0.1.0\"\n      }\n    },\n    \"source-map-support\": {\n      \"version\": \"0.4.18\",\n      \"resolved\": \"https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz\",\n      \"integrity\": \"sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==\",\n      \"requires\": {\n        \"source-map\": \"0.5.7\"\n      },\n      \"dependencies\": {\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        }\n      }\n    },\n    \"source-map-url\": {\n      \"version\": \"0.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz\",\n      \"integrity\": \"sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=\"\n    },\n    \"spdx-correct\": {\n      \"version\": \"3.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz\",\n      \"integrity\": \"sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==\",\n      \"requires\": {\n        \"spdx-expression-parse\": \"3.0.0\",\n        \"spdx-license-ids\": \"3.0.3\"\n      }\n    },\n    \"spdx-exceptions\": {\n      \"version\": \"2.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz\",\n      \"integrity\": \"sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==\"\n    },\n    \"spdx-expression-parse\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz\",\n      \"integrity\": \"sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==\",\n      \"requires\": {\n        \"spdx-exceptions\": \"2.2.0\",\n        \"spdx-license-ids\": \"3.0.3\"\n      }\n    },\n    \"spdx-license-ids\": {\n      \"version\": \"3.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz\",\n      \"integrity\": \"sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==\"\n    },\n    \"specificity\": {\n      \"version\": \"0.4.1\",\n      \"resolved\": \"https://registry.npmjs.org/specificity/-/specificity-0.4.1.tgz\",\n      \"integrity\": \"sha512-1klA3Gi5PD1Wv9Q0wUoOQN1IWAuPu0D1U03ThXTr0cJ20+/iq2tHSDnK7Kk/0LXJ1ztUB2/1Os0wKmfyNgUQfg==\"\n    },\n    \"split-string\": {\n      \"version\": \"3.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz\",\n      \"integrity\": \"sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==\",\n      \"requires\": {\n        \"extend-shallow\": \"3.0.2\"\n      }\n    },\n    \"sprintf-js\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz\",\n      \"integrity\": \"sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=\"\n    },\n    \"sshpk\": {\n      \"version\": \"1.16.0\",\n      \"resolved\": \"https://registry.npmjs.org/sshpk/-/sshpk-1.16.0.tgz\",\n      \"integrity\": \"sha512-Zhev35/y7hRMcID/upReIvRse+I9SVhyVre/KTJSJQWMz3C3+G+HpO7m1wK/yckEtujKZ7dS4hkVxAnmHaIGVQ==\",\n      \"requires\": {\n        \"asn1\": \"0.2.4\",\n        \"assert-plus\": \"1.0.0\",\n        \"bcrypt-pbkdf\": \"1.0.2\",\n        \"dashdash\": \"1.14.1\",\n        \"ecc-jsbn\": \"0.1.2\",\n        \"getpass\": \"0.1.7\",\n        \"jsbn\": \"0.1.1\",\n        \"safer-buffer\": \"2.1.2\",\n        \"tweetnacl\": \"0.14.5\"\n      }\n    },\n    \"ssri\": {\n      \"version\": \"5.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz\",\n      \"integrity\": \"sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==\",\n      \"requires\": {\n        \"safe-buffer\": \"5.1.2\"\n      }\n    },\n    \"stackframe\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/stackframe/-/stackframe-1.2.0.tgz\",\n      \"integrity\": \"sha512-GrdeshiRmS1YLMYgzF16olf2jJ/IzxXY9lhKOskuVziubpTYcYqyOwYeJKzQkwy7uN0fYSsbsC4RQaXf9LCrYA==\"\n    },\n    \"state-toggle\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.3.tgz\",\n      \"integrity\": \"sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ==\"\n    },\n    \"static-extend\": {\n      \"version\": \"0.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz\",\n      \"integrity\": \"sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=\",\n      \"requires\": {\n        \"define-property\": \"0.2.5\",\n        \"object-copy\": \"0.1.0\"\n      },\n      \"dependencies\": {\n        \"define-property\": {\n          \"version\": \"0.2.5\",\n          \"resolved\": \"https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz\",\n          \"integrity\": \"sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=\",\n          \"requires\": {\n            \"is-descriptor\": \"0.1.6\"\n          }\n        }\n      }\n    },\n    \"statuses\": {\n      \"version\": \"1.5.0\",\n      \"resolved\": \"https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz\",\n      \"integrity\": \"sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=\"\n    },\n    \"stream-browserify\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz\",\n      \"integrity\": \"sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=\",\n      \"requires\": {\n        \"inherits\": \"2.0.3\",\n        \"readable-stream\": \"2.3.6\"\n      }\n    },\n    \"stream-each\": {\n      \"version\": \"1.2.3\",\n      \"resolved\": \"https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz\",\n      \"integrity\": \"sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==\",\n      \"requires\": {\n        \"end-of-stream\": \"1.4.1\",\n        \"stream-shift\": \"1.0.0\"\n      }\n    },\n    \"stream-exhaust\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz\",\n      \"integrity\": \"sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==\"\n    },\n    \"stream-http\": {\n      \"version\": \"2.8.3\",\n      \"resolved\": \"https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz\",\n      \"integrity\": \"sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==\",\n      \"requires\": {\n        \"builtin-status-codes\": \"3.0.0\",\n        \"inherits\": \"2.0.3\",\n        \"readable-stream\": \"2.3.6\",\n        \"to-arraybuffer\": \"1.0.1\",\n        \"xtend\": \"4.0.1\"\n      }\n    },\n    \"stream-shift\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz\",\n      \"integrity\": \"sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=\"\n    },\n    \"strict-uri-encode\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz\",\n      \"integrity\": \"sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=\"\n    },\n    \"string-width\": {\n      \"version\": \"2.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz\",\n      \"integrity\": \"sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==\",\n      \"requires\": {\n        \"is-fullwidth-code-point\": \"2.0.0\",\n        \"strip-ansi\": \"4.0.0\"\n      },\n      \"dependencies\": {\n        \"ansi-regex\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz\",\n          \"integrity\": \"sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=\"\n        },\n        \"strip-ansi\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz\",\n          \"integrity\": \"sha1-qEeQIusaw2iocTibY1JixQXuNo8=\",\n          \"requires\": {\n            \"ansi-regex\": \"3.0.0\"\n          }\n        }\n      }\n    },\n    \"string.prototype.trimend\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.2.tgz\",\n      \"integrity\": \"sha512-8oAG/hi14Z4nOVP0z6mdiVZ/wqjDtWSLygMigTzAb+7aPEDTleeFf+WrF+alzecxIRkckkJVn+dTlwzJXORATw==\",\n      \"requires\": {\n        \"define-properties\": \"1.1.3\",\n        \"es-abstract\": \"1.18.0-next.1\"\n      }\n    },\n    \"string.prototype.trimstart\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.2.tgz\",\n      \"integrity\": \"sha512-7F6CdBTl5zyu30BJFdzSTlSlLPwODC23Od+iLoVH8X6+3fvDPPuBVVj9iaB1GOsSTSIgVfsfm27R2FGrAPznWg==\",\n      \"requires\": {\n        \"define-properties\": \"1.1.3\",\n        \"es-abstract\": \"1.18.0-next.1\"\n      }\n    },\n    \"string_decoder\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz\",\n      \"integrity\": \"sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==\",\n      \"requires\": {\n        \"safe-buffer\": \"5.1.2\"\n      }\n    },\n    \"stringify-entities\": {\n      \"version\": \"1.3.2\",\n      \"resolved\": \"https://registry.npmjs.org/stringify-entities/-/stringify-entities-1.3.2.tgz\",\n      \"integrity\": \"sha512-nrBAQClJAPN2p+uGCVJRPIPakKeKWZ9GtBCmormE7pWOSlHat7+x5A8gx85M7HM5Dt0BP3pP5RhVW77WdbJJ3A==\",\n      \"requires\": {\n        \"character-entities-html4\": \"1.1.4\",\n        \"character-entities-legacy\": \"1.1.4\",\n        \"is-alphanumerical\": \"1.0.4\",\n        \"is-hexadecimal\": \"1.0.4\"\n      }\n    },\n    \"stringstream\": {\n      \"version\": \"0.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz\",\n      \"integrity\": \"sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==\",\n      \"dev\": true\n    },\n    \"strip-ansi\": {\n      \"version\": \"3.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz\",\n      \"integrity\": \"sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=\",\n      \"requires\": {\n        \"ansi-regex\": \"2.1.1\"\n      }\n    },\n    \"strip-bom\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz\",\n      \"integrity\": \"sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=\"\n    },\n    \"strip-eof\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz\",\n      \"integrity\": \"sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=\"\n    },\n    \"strip-indent\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz\",\n      \"integrity\": \"sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=\"\n    },\n    \"strip-json-comments\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz\",\n      \"integrity\": \"sha1-PFMZQukIwml8DsNEhYwobHygpgo=\",\n      \"dev\": true\n    },\n    \"style-loader\": {\n      \"version\": \"0.18.2\",\n      \"resolved\": \"https://registry.npmjs.org/style-loader/-/style-loader-0.18.2.tgz\",\n      \"integrity\": \"sha512-WPpJPZGUxWYHWIUMNNOYqql7zh85zGmr84FdTVWq52WTIkqlW9xSxD3QYWi/T31cqn9UNSsietVEgGn2aaSCzw==\",\n      \"requires\": {\n        \"loader-utils\": \"1.2.3\",\n        \"schema-utils\": \"0.3.0\"\n      }\n    },\n    \"style-search\": {\n      \"version\": \"0.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz\",\n      \"integrity\": \"sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI=\"\n    },\n    \"stylelint\": {\n      \"version\": \"9.10.1\",\n      \"resolved\": \"https://registry.npmjs.org/stylelint/-/stylelint-9.10.1.tgz\",\n      \"integrity\": \"sha512-9UiHxZhOAHEgeQ7oLGwrwoDR8vclBKlSX7r4fH0iuu0SfPwFaLkb1c7Q2j1cqg9P7IDXeAV2TvQML/fRQzGBBQ==\",\n      \"requires\": {\n        \"autoprefixer\": \"9.8.6\",\n        \"balanced-match\": \"1.0.0\",\n        \"chalk\": \"2.4.2\",\n        \"cosmiconfig\": \"5.2.1\",\n        \"debug\": \"4.2.0\",\n        \"execall\": \"1.0.0\",\n        \"file-entry-cache\": \"4.0.0\",\n        \"get-stdin\": \"6.0.0\",\n        \"global-modules\": \"2.0.0\",\n        \"globby\": \"9.2.0\",\n        \"globjoin\": \"0.1.4\",\n        \"html-tags\": \"2.0.0\",\n        \"ignore\": \"5.1.8\",\n        \"import-lazy\": \"3.1.0\",\n        \"imurmurhash\": \"0.1.4\",\n        \"known-css-properties\": \"0.11.0\",\n        \"leven\": \"2.1.0\",\n        \"lodash\": \"4.17.11\",\n        \"log-symbols\": \"2.2.0\",\n        \"mathml-tag-names\": \"2.1.3\",\n        \"meow\": \"5.0.0\",\n        \"micromatch\": \"3.1.10\",\n        \"normalize-selector\": \"0.2.0\",\n        \"pify\": \"4.0.1\",\n        \"postcss\": \"7.0.35\",\n        \"postcss-html\": \"0.36.0\",\n        \"postcss-jsx\": \"0.36.4\",\n        \"postcss-less\": \"3.1.4\",\n        \"postcss-markdown\": \"0.36.0\",\n        \"postcss-media-query-parser\": \"0.2.3\",\n        \"postcss-reporter\": \"6.0.1\",\n        \"postcss-resolve-nested-selector\": \"0.1.1\",\n        \"postcss-safe-parser\": \"4.0.2\",\n        \"postcss-sass\": \"0.3.5\",\n        \"postcss-scss\": \"2.1.1\",\n        \"postcss-selector-parser\": \"3.1.2\",\n        \"postcss-syntax\": \"0.36.2\",\n        \"postcss-value-parser\": \"3.3.1\",\n        \"resolve-from\": \"4.0.0\",\n        \"signal-exit\": \"3.0.2\",\n        \"slash\": \"2.0.0\",\n        \"specificity\": \"0.4.1\",\n        \"string-width\": \"3.1.0\",\n        \"style-search\": \"0.1.0\",\n        \"sugarss\": \"2.0.0\",\n        \"svg-tags\": \"1.0.0\",\n        \"table\": \"5.1.1\"\n      },\n      \"dependencies\": {\n        \"ansi-regex\": {\n          \"version\": \"4.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz\",\n          \"integrity\": \"sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==\"\n        },\n        \"autoprefixer\": {\n          \"version\": \"9.8.6\",\n          \"resolved\": \"https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.6.tgz\",\n          \"integrity\": \"sha512-XrvP4VVHdRBCdX1S3WXVD8+RyG9qeb1D5Sn1DeLiG2xfSpzellk5k54xbUERJ3M5DggQxes39UGOTP8CFrEGbg==\",\n          \"requires\": {\n            \"browserslist\": \"4.14.5\",\n            \"caniuse-lite\": \"1.0.30001151\",\n            \"colorette\": \"1.2.1\",\n            \"normalize-range\": \"0.1.2\",\n            \"num2fraction\": \"1.2.2\",\n            \"postcss\": \"7.0.35\",\n            \"postcss-value-parser\": \"4.1.0\"\n          },\n          \"dependencies\": {\n            \"postcss-value-parser\": {\n              \"version\": \"4.1.0\",\n              \"resolved\": \"https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz\",\n              \"integrity\": \"sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==\"\n            }\n          }\n        },\n        \"browserslist\": {\n          \"version\": \"4.14.5\",\n          \"resolved\": \"https://registry.npmjs.org/browserslist/-/browserslist-4.14.5.tgz\",\n          \"integrity\": \"sha512-Z+vsCZIvCBvqLoYkBFTwEYH3v5MCQbsAjp50ERycpOjnPmolg1Gjy4+KaWWpm8QOJt9GHkhdqAl14NpCX73CWA==\",\n          \"requires\": {\n            \"caniuse-lite\": \"1.0.30001151\",\n            \"electron-to-chromium\": \"1.3.583\",\n            \"escalade\": \"3.1.1\",\n            \"node-releases\": \"1.1.64\"\n          }\n        },\n        \"caniuse-lite\": {\n          \"version\": \"1.0.30001151\",\n          \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001151.tgz\",\n          \"integrity\": \"sha512-Zh3sHqskX6mHNrqUerh+fkf0N72cMxrmflzje/JyVImfpknscMnkeJrlFGJcqTmaa0iszdYptGpWMJCRQDkBVw==\"\n        },\n        \"debug\": {\n          \"version\": \"4.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.2.0.tgz\",\n          \"integrity\": \"sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==\",\n          \"requires\": {\n            \"ms\": \"2.1.2\"\n          }\n        },\n        \"electron-to-chromium\": {\n          \"version\": \"1.3.583\",\n          \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.583.tgz\",\n          \"integrity\": \"sha512-L9BwLwJohjZW9mQESI79HRzhicPk1DFgM+8hOCfGgGCFEcA3Otpv7QK6SGtYoZvfQfE3wKLh0Hd5ptqUFv3gvQ==\"\n        },\n        \"file-entry-cache\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-4.0.0.tgz\",\n          \"integrity\": \"sha512-AVSwsnbV8vH/UVbvgEhf3saVQXORNv0ZzSkvkhQIaia5Tia+JhGTaa/ePUSVoPHQyGayQNmYfkzFi3WZV5zcpA==\",\n          \"requires\": {\n            \"flat-cache\": \"2.0.1\"\n          }\n        },\n        \"flat-cache\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz\",\n          \"integrity\": \"sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==\",\n          \"requires\": {\n            \"flatted\": \"2.0.2\",\n            \"rimraf\": \"2.6.3\",\n            \"write\": \"1.0.3\"\n          }\n        },\n        \"ms\": {\n          \"version\": \"2.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.2.tgz\",\n          \"integrity\": \"sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==\"\n        },\n        \"pify\": {\n          \"version\": \"4.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/pify/-/pify-4.0.1.tgz\",\n          \"integrity\": \"sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==\"\n        },\n        \"postcss\": {\n          \"version\": \"7.0.35\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz\",\n          \"integrity\": \"sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==\",\n          \"requires\": {\n            \"chalk\": \"2.4.2\",\n            \"source-map\": \"0.6.1\",\n            \"supports-color\": \"6.1.0\"\n          }\n        },\n        \"slash\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/slash/-/slash-2.0.0.tgz\",\n          \"integrity\": \"sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==\"\n        },\n        \"string-width\": {\n          \"version\": \"3.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz\",\n          \"integrity\": \"sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==\",\n          \"requires\": {\n            \"emoji-regex\": \"7.0.3\",\n            \"is-fullwidth-code-point\": \"2.0.0\",\n            \"strip-ansi\": \"5.2.0\"\n          }\n        },\n        \"strip-ansi\": {\n          \"version\": \"5.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz\",\n          \"integrity\": \"sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==\",\n          \"requires\": {\n            \"ansi-regex\": \"4.1.0\"\n          }\n        },\n        \"supports-color\": {\n          \"version\": \"6.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz\",\n          \"integrity\": \"sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==\",\n          \"requires\": {\n            \"has-flag\": \"3.0.0\"\n          }\n        },\n        \"write\": {\n          \"version\": \"1.0.3\",\n          \"resolved\": \"https://registry.npmjs.org/write/-/write-1.0.3.tgz\",\n          \"integrity\": \"sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==\",\n          \"requires\": {\n            \"mkdirp\": \"0.5.1\"\n          }\n        }\n      }\n    },\n    \"stylus\": {\n      \"version\": \"0.54.5\",\n      \"resolved\": \"https://registry.npmjs.org/stylus/-/stylus-0.54.5.tgz\",\n      \"integrity\": \"sha1-QrlWCTHKcJDOhRWnmLqeaqPW3Hk=\",\n      \"requires\": {\n        \"css-parse\": \"1.7.0\",\n        \"debug\": \"2.6.9\",\n        \"glob\": \"7.0.6\",\n        \"mkdirp\": \"0.5.1\",\n        \"sax\": \"0.5.8\",\n        \"source-map\": \"0.1.43\"\n      },\n      \"dependencies\": {\n        \"glob\": {\n          \"version\": \"7.0.6\",\n          \"resolved\": \"https://registry.npmjs.org/glob/-/glob-7.0.6.tgz\",\n          \"integrity\": \"sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=\",\n          \"requires\": {\n            \"fs.realpath\": \"1.0.0\",\n            \"inflight\": \"1.0.6\",\n            \"inherits\": \"2.0.3\",\n            \"minimatch\": \"3.0.4\",\n            \"once\": \"1.4.0\",\n            \"path-is-absolute\": \"1.0.1\"\n          }\n        },\n        \"sax\": {\n          \"version\": \"0.5.8\",\n          \"resolved\": \"https://registry.npmjs.org/sax/-/sax-0.5.8.tgz\",\n          \"integrity\": \"sha1-1HLbIo6zMcJQaw6MFVJK25OdEsE=\"\n        },\n        \"source-map\": {\n          \"version\": \"0.1.43\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz\",\n          \"integrity\": \"sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=\",\n          \"requires\": {\n            \"amdefine\": \"1.0.1\"\n          }\n        }\n      }\n    },\n    \"stylus-converter\": {\n      \"version\": \"0.8.1\",\n      \"resolved\": \"https://registry.npmjs.org/stylus-converter/-/stylus-converter-0.8.1.tgz\",\n      \"integrity\": \"sha512-ptptDMX5er9IhSUsgVPEI0DBUhw4pydkPz+d52/mvB1/l40LeN8DH66OqslRi78piLDcxJZ++1xwoaLezmjZYg==\",\n      \"requires\": {\n        \"commander\": \"2.16.0\",\n        \"invariant\": \"2.2.4\",\n        \"lodash.debounce\": \"4.0.8\",\n        \"lodash.uniq\": \"4.5.0\",\n        \"ms\": \"2.1.2\",\n        \"optimist\": \"0.6.1\",\n        \"ora\": \"2.1.0\",\n        \"stylus\": \"0.54.5\"\n      },\n      \"dependencies\": {\n        \"ms\": {\n          \"version\": \"2.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.2.tgz\",\n          \"integrity\": \"sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==\"\n        }\n      }\n    },\n    \"stylus-loader\": {\n      \"version\": \"3.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/stylus-loader/-/stylus-loader-3.0.2.tgz\",\n      \"integrity\": \"sha512-+VomPdZ6a0razP+zinir61yZgpw2NfljeSsdUF5kJuEzlo3khXhY19Fn6l8QQz1GRJGtMCo8nG5C04ePyV7SUA==\",\n      \"requires\": {\n        \"loader-utils\": \"1.2.3\",\n        \"lodash.clonedeep\": \"4.5.0\",\n        \"when\": \"3.6.4\"\n      }\n    },\n    \"sugarss\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/sugarss/-/sugarss-2.0.0.tgz\",\n      \"integrity\": \"sha512-WfxjozUk0UVA4jm+U1d736AUpzSrNsQcIbyOkoE364GrtWmIrFdk5lksEupgWMD4VaT/0kVx1dobpiDumSgmJQ==\",\n      \"requires\": {\n        \"postcss\": \"7.0.35\"\n      },\n      \"dependencies\": {\n        \"postcss\": {\n          \"version\": \"7.0.35\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz\",\n          \"integrity\": \"sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==\",\n          \"requires\": {\n            \"chalk\": \"2.4.2\",\n            \"source-map\": \"0.6.1\",\n            \"supports-color\": \"6.1.0\"\n          }\n        },\n        \"supports-color\": {\n          \"version\": \"6.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz\",\n          \"integrity\": \"sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==\",\n          \"requires\": {\n            \"has-flag\": \"3.0.0\"\n          }\n        }\n      }\n    },\n    \"supports-color\": {\n      \"version\": \"5.5.0\",\n      \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz\",\n      \"integrity\": \"sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==\",\n      \"requires\": {\n        \"has-flag\": \"3.0.0\"\n      }\n    },\n    \"svg-tags\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz\",\n      \"integrity\": \"sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=\"\n    },\n    \"svgo\": {\n      \"version\": \"0.7.2\",\n      \"resolved\": \"https://registry.npmjs.org/svgo/-/svgo-0.7.2.tgz\",\n      \"integrity\": \"sha1-n1dyQTlSE1xv779Ar+ak+qiLS7U=\",\n      \"requires\": {\n        \"coa\": \"1.0.4\",\n        \"colors\": \"1.1.2\",\n        \"csso\": \"2.3.2\",\n        \"js-yaml\": \"3.7.0\",\n        \"mkdirp\": \"0.5.1\",\n        \"sax\": \"1.2.4\",\n        \"whet.extend\": \"0.9.9\"\n      },\n      \"dependencies\": {\n        \"colors\": {\n          \"version\": \"1.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/colors/-/colors-1.1.2.tgz\",\n          \"integrity\": \"sha1-FopHAXVran9RoSzgyXv6KMCE7WM=\"\n        },\n        \"esprima\": {\n          \"version\": \"2.7.3\",\n          \"resolved\": \"https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz\",\n          \"integrity\": \"sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=\"\n        },\n        \"js-yaml\": {\n          \"version\": \"3.7.0\",\n          \"resolved\": \"https://registry.npmjs.org/js-yaml/-/js-yaml-3.7.0.tgz\",\n          \"integrity\": \"sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A=\",\n          \"requires\": {\n            \"argparse\": \"1.0.10\",\n            \"esprima\": \"2.7.3\"\n          }\n        }\n      }\n    },\n    \"table\": {\n      \"version\": \"5.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/table/-/table-5.1.1.tgz\",\n      \"integrity\": \"sha512-NUjapYb/qd4PeFW03HnAuOJ7OMcBkJlqeClWxeNlQ0lXGSb52oZXGzkO0/I0ARegQ2eUT1g2VDJH0eUxDRcHmw==\",\n      \"requires\": {\n        \"ajv\": \"6.6.2\",\n        \"lodash\": \"4.17.11\",\n        \"slice-ansi\": \"2.0.0\",\n        \"string-width\": \"2.1.1\"\n      }\n    },\n    \"tapable\": {\n      \"version\": \"1.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz\",\n      \"integrity\": \"sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==\"\n    },\n    \"text-table\": {\n      \"version\": \"0.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz\",\n      \"integrity\": \"sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=\"\n    },\n    \"through\": {\n      \"version\": \"2.3.8\",\n      \"resolved\": \"https://registry.npmjs.org/through/-/through-2.3.8.tgz\",\n      \"integrity\": \"sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=\"\n    },\n    \"through2\": {\n      \"version\": \"2.0.5\",\n      \"resolved\": \"https://registry.npmjs.org/through2/-/through2-2.0.5.tgz\",\n      \"integrity\": \"sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==\",\n      \"requires\": {\n        \"readable-stream\": \"2.3.6\",\n        \"xtend\": \"4.0.1\"\n      }\n    },\n    \"timers-browserify\": {\n      \"version\": \"2.0.10\",\n      \"resolved\": \"https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz\",\n      \"integrity\": \"sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==\",\n      \"requires\": {\n        \"setimmediate\": \"1.0.5\"\n      }\n    },\n    \"tmp\": {\n      \"version\": \"0.0.33\",\n      \"resolved\": \"https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz\",\n      \"integrity\": \"sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==\",\n      \"requires\": {\n        \"os-tmpdir\": \"1.0.2\"\n      }\n    },\n    \"to-arraybuffer\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz\",\n      \"integrity\": \"sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=\"\n    },\n    \"to-fast-properties\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz\",\n      \"integrity\": \"sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=\"\n    },\n    \"to-object-path\": {\n      \"version\": \"0.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz\",\n      \"integrity\": \"sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=\",\n      \"requires\": {\n        \"kind-of\": \"3.2.2\"\n      },\n      \"dependencies\": {\n        \"kind-of\": {\n          \"version\": \"3.2.2\",\n          \"resolved\": \"https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz\",\n          \"integrity\": \"sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=\",\n          \"requires\": {\n            \"is-buffer\": \"1.1.6\"\n          }\n        }\n      }\n    },\n    \"to-regex\": {\n      \"version\": \"3.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz\",\n      \"integrity\": \"sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==\",\n      \"requires\": {\n        \"define-property\": \"2.0.2\",\n        \"extend-shallow\": \"3.0.2\",\n        \"regex-not\": \"1.0.2\",\n        \"safe-regex\": \"1.1.0\"\n      }\n    },\n    \"to-regex-range\": {\n      \"version\": \"2.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz\",\n      \"integrity\": \"sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=\",\n      \"requires\": {\n        \"is-number\": \"3.0.0\",\n        \"repeat-string\": \"1.6.1\"\n      }\n    },\n    \"toposort\": {\n      \"version\": \"1.0.7\",\n      \"resolved\": \"https://registry.npmjs.org/toposort/-/toposort-1.0.7.tgz\",\n      \"integrity\": \"sha1-LmhELZ9k7HILjMieZEOsbKqVACk=\"\n    },\n    \"tough-cookie\": {\n      \"version\": \"2.5.0\",\n      \"resolved\": \"https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz\",\n      \"integrity\": \"sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==\",\n      \"optional\": true,\n      \"requires\": {\n        \"psl\": \"1.8.0\",\n        \"punycode\": \"2.1.1\"\n      }\n    },\n    \"traverse\": {\n      \"version\": \"0.6.6\",\n      \"resolved\": \"https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz\",\n      \"integrity\": \"sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=\"\n    },\n    \"trim\": {\n      \"version\": \"0.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/trim/-/trim-0.0.1.tgz\",\n      \"integrity\": \"sha1-WFhUf2spB1fulczMZm+1AITEYN0=\"\n    },\n    \"trim-newlines\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz\",\n      \"integrity\": \"sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=\"\n    },\n    \"trim-right\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz\",\n      \"integrity\": \"sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=\"\n    },\n    \"trim-trailing-lines\": {\n      \"version\": \"1.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.3.tgz\",\n      \"integrity\": \"sha512-4ku0mmjXifQcTVfYDfR5lpgV7zVqPg6zV9rdZmwOPqq0+Zq19xDqEgagqVbc4pOOShbncuAOIs59R3+3gcF3ZA==\"\n    },\n    \"trough\": {\n      \"version\": \"1.0.5\",\n      \"resolved\": \"https://registry.npmjs.org/trough/-/trough-1.0.5.tgz\",\n      \"integrity\": \"sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==\"\n    },\n    \"tryer\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz\",\n      \"integrity\": \"sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA==\"\n    },\n    \"tslib\": {\n      \"version\": \"1.9.3\",\n      \"resolved\": \"https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz\",\n      \"integrity\": \"sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==\"\n    },\n    \"tty-browserify\": {\n      \"version\": \"0.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz\",\n      \"integrity\": \"sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=\"\n    },\n    \"tunnel-agent\": {\n      \"version\": \"0.4.3\",\n      \"resolved\": \"https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz\",\n      \"integrity\": \"sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=\"\n    },\n    \"tweetnacl\": {\n      \"version\": \"0.14.5\",\n      \"resolved\": \"https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz\",\n      \"integrity\": \"sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=\"\n    },\n    \"type-check\": {\n      \"version\": \"0.3.2\",\n      \"resolved\": \"https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz\",\n      \"integrity\": \"sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=\",\n      \"requires\": {\n        \"prelude-ls\": \"1.1.2\"\n      }\n    },\n    \"type-detect\": {\n      \"version\": \"4.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz\",\n      \"integrity\": \"sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==\"\n    },\n    \"type-is\": {\n      \"version\": \"1.6.16\",\n      \"resolved\": \"https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz\",\n      \"integrity\": \"sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==\",\n      \"requires\": {\n        \"media-typer\": \"0.3.0\",\n        \"mime-types\": \"2.1.21\"\n      }\n    },\n    \"typedarray\": {\n      \"version\": \"0.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz\",\n      \"integrity\": \"sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=\"\n    },\n    \"uglify-js\": {\n      \"version\": \"3.4.9\",\n      \"resolved\": \"https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz\",\n      \"integrity\": \"sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==\",\n      \"requires\": {\n        \"commander\": \"2.17.1\",\n        \"source-map\": \"0.6.1\"\n      },\n      \"dependencies\": {\n        \"commander\": {\n          \"version\": \"2.17.1\",\n          \"resolved\": \"https://registry.npmjs.org/commander/-/commander-2.17.1.tgz\",\n          \"integrity\": \"sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==\"\n        }\n      }\n    },\n    \"uglify-to-browserify\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz\",\n      \"integrity\": \"sha1-bgkk1r2mta/jSeOabWMoUKD4grc=\",\n      \"optional\": true\n    },\n    \"uglifyjs-webpack-plugin\": {\n      \"version\": \"0.4.6\",\n      \"resolved\": \"https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz\",\n      \"integrity\": \"sha1-uVH0q7a9YX5m9j64kUmOORdj4wk=\",\n      \"requires\": {\n        \"source-map\": \"0.5.7\",\n        \"uglify-js\": \"2.8.29\",\n        \"webpack-sources\": \"1.3.0\"\n      },\n      \"dependencies\": {\n        \"camelcase\": {\n          \"version\": \"1.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz\",\n          \"integrity\": \"sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=\"\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"uglify-js\": {\n          \"version\": \"2.8.29\",\n          \"resolved\": \"https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz\",\n          \"integrity\": \"sha1-KcVzMUgFe7Th913zW3qcty5qWd0=\",\n          \"requires\": {\n            \"source-map\": \"0.5.7\",\n            \"uglify-to-browserify\": \"1.0.2\",\n            \"yargs\": \"3.10.0\"\n          }\n        },\n        \"yargs\": {\n          \"version\": \"3.10.0\",\n          \"resolved\": \"https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz\",\n          \"integrity\": \"sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=\",\n          \"requires\": {\n            \"camelcase\": \"1.2.1\",\n            \"cliui\": \"2.1.0\",\n            \"decamelize\": \"1.2.0\",\n            \"window-size\": \"0.1.0\"\n          }\n        }\n      }\n    },\n    \"unherit\": {\n      \"version\": \"1.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/unherit/-/unherit-1.1.3.tgz\",\n      \"integrity\": \"sha512-Ft16BJcnapDKp0+J/rqFC3Rrk6Y/Ng4nzsC028k2jdDII/rdZ7Wd3pPT/6+vIIxRagwRc9K0IUX0Ra4fKvw+WQ==\",\n      \"requires\": {\n        \"inherits\": \"2.0.3\",\n        \"xtend\": \"4.0.1\"\n      }\n    },\n    \"unified\": {\n      \"version\": \"7.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/unified/-/unified-7.1.0.tgz\",\n      \"integrity\": \"sha512-lbk82UOIGuCEsZhPj8rNAkXSDXd6p0QLzIuSsCdxrqnqU56St4eyOB+AlXsVgVeRmetPTYydIuvFfpDIed8mqw==\",\n      \"requires\": {\n        \"@types/unist\": \"2.0.3\",\n        \"@types/vfile\": \"3.0.2\",\n        \"bail\": \"1.0.5\",\n        \"extend\": \"3.0.2\",\n        \"is-plain-obj\": \"1.1.0\",\n        \"trough\": \"1.0.5\",\n        \"vfile\": \"3.0.1\",\n        \"x-is-string\": \"0.1.0\"\n      }\n    },\n    \"union-value\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz\",\n      \"integrity\": \"sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=\",\n      \"requires\": {\n        \"arr-union\": \"3.1.0\",\n        \"get-value\": \"2.0.6\",\n        \"is-extendable\": \"0.1.1\",\n        \"set-value\": \"0.4.3\"\n      },\n      \"dependencies\": {\n        \"extend-shallow\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz\",\n          \"integrity\": \"sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=\",\n          \"requires\": {\n            \"is-extendable\": \"0.1.1\"\n          }\n        },\n        \"set-value\": {\n          \"version\": \"0.4.3\",\n          \"resolved\": \"https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz\",\n          \"integrity\": \"sha1-fbCPnT0i3H945Trzw79GZuzfzPE=\",\n          \"requires\": {\n            \"extend-shallow\": \"2.0.1\",\n            \"is-extendable\": \"0.1.1\",\n            \"is-plain-object\": \"2.0.4\",\n            \"to-object-path\": \"0.3.0\"\n          }\n        }\n      }\n    },\n    \"uniq\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz\",\n      \"integrity\": \"sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=\"\n    },\n    \"uniqs\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz\",\n      \"integrity\": \"sha1-/+3ks2slKQaW5uFl1KWe25mOawI=\"\n    },\n    \"unique-filename\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz\",\n      \"integrity\": \"sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==\",\n      \"requires\": {\n        \"unique-slug\": \"2.0.1\"\n      }\n    },\n    \"unique-slug\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.1.tgz\",\n      \"integrity\": \"sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg==\",\n      \"requires\": {\n        \"imurmurhash\": \"0.1.4\"\n      }\n    },\n    \"unist-util-find-all-after\": {\n      \"version\": \"1.0.5\",\n      \"resolved\": \"https://registry.npmjs.org/unist-util-find-all-after/-/unist-util-find-all-after-1.0.5.tgz\",\n      \"integrity\": \"sha512-lWgIc3rrTMTlK1Y0hEuL+k+ApzFk78h+lsaa2gHf63Gp5Ww+mt11huDniuaoq1H+XMK2lIIjjPkncxXcDp3QDw==\",\n      \"requires\": {\n        \"unist-util-is\": \"3.0.0\"\n      }\n    },\n    \"unist-util-is\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz\",\n      \"integrity\": \"sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==\"\n    },\n    \"unist-util-remove-position\": {\n      \"version\": \"1.1.4\",\n      \"resolved\": \"https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.4.tgz\",\n      \"integrity\": \"sha512-tLqd653ArxJIPnKII6LMZwH+mb5q+n/GtXQZo6S6csPRs5zB0u79Yw8ouR3wTw8wxvdJFhpP6Y7jorWdCgLO0A==\",\n      \"requires\": {\n        \"unist-util-visit\": \"1.4.1\"\n      }\n    },\n    \"unist-util-stringify-position\": {\n      \"version\": \"2.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz\",\n      \"integrity\": \"sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==\",\n      \"requires\": {\n        \"@types/unist\": \"2.0.3\"\n      }\n    },\n    \"unist-util-visit\": {\n      \"version\": \"1.4.1\",\n      \"resolved\": \"https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz\",\n      \"integrity\": \"sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==\",\n      \"requires\": {\n        \"unist-util-visit-parents\": \"2.1.2\"\n      }\n    },\n    \"unist-util-visit-parents\": {\n      \"version\": \"2.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-2.1.2.tgz\",\n      \"integrity\": \"sha512-DyN5vD4NE3aSeB+PXYNKxzGsfocxp6asDc2XXE3b0ekO2BaRUpBicbbUygfSvYfUz1IkmjFR1YF7dPklraMZ2g==\",\n      \"requires\": {\n        \"unist-util-is\": \"3.0.0\"\n      }\n    },\n    \"universalify\": {\n      \"version\": \"0.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz\",\n      \"integrity\": \"sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==\"\n    },\n    \"unpipe\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz\",\n      \"integrity\": \"sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=\"\n    },\n    \"unset-value\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz\",\n      \"integrity\": \"sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=\",\n      \"requires\": {\n        \"has-value\": \"0.3.1\",\n        \"isobject\": \"3.0.1\"\n      },\n      \"dependencies\": {\n        \"has-value\": {\n          \"version\": \"0.3.1\",\n          \"resolved\": \"https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz\",\n          \"integrity\": \"sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=\",\n          \"requires\": {\n            \"get-value\": \"2.0.6\",\n            \"has-values\": \"0.1.4\",\n            \"isobject\": \"2.1.0\"\n          },\n          \"dependencies\": {\n            \"isobject\": {\n              \"version\": \"2.1.0\",\n              \"resolved\": \"https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz\",\n              \"integrity\": \"sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=\",\n              \"requires\": {\n                \"isarray\": \"1.0.0\"\n              }\n            }\n          }\n        },\n        \"has-values\": {\n          \"version\": \"0.1.4\",\n          \"resolved\": \"https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz\",\n          \"integrity\": \"sha1-bWHeldkd/Km5oCCJrThL/49it3E=\"\n        }\n      }\n    },\n    \"upath\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/upath/-/upath-1.1.0.tgz\",\n      \"integrity\": \"sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==\"\n    },\n    \"upper-case\": {\n      \"version\": \"1.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz\",\n      \"integrity\": \"sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=\"\n    },\n    \"uri-js\": {\n      \"version\": \"4.2.2\",\n      \"resolved\": \"https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz\",\n      \"integrity\": \"sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==\",\n      \"requires\": {\n        \"punycode\": \"2.1.1\"\n      }\n    },\n    \"urix\": {\n      \"version\": \"0.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/urix/-/urix-0.1.0.tgz\",\n      \"integrity\": \"sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=\"\n    },\n    \"url\": {\n      \"version\": \"0.11.0\",\n      \"resolved\": \"https://registry.npmjs.org/url/-/url-0.11.0.tgz\",\n      \"integrity\": \"sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=\",\n      \"requires\": {\n        \"punycode\": \"1.3.2\",\n        \"querystring\": \"0.2.0\"\n      },\n      \"dependencies\": {\n        \"punycode\": {\n          \"version\": \"1.3.2\",\n          \"resolved\": \"https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz\",\n          \"integrity\": \"sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=\"\n        }\n      }\n    },\n    \"use\": {\n      \"version\": \"3.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/use/-/use-3.1.1.tgz\",\n      \"integrity\": \"sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==\"\n    },\n    \"util\": {\n      \"version\": \"0.10.4\",\n      \"resolved\": \"https://registry.npmjs.org/util/-/util-0.10.4.tgz\",\n      \"integrity\": \"sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==\",\n      \"requires\": {\n        \"inherits\": \"2.0.3\"\n      }\n    },\n    \"util-deprecate\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz\",\n      \"integrity\": \"sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=\"\n    },\n    \"utila\": {\n      \"version\": \"0.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/utila/-/utila-0.4.0.tgz\",\n      \"integrity\": \"sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=\"\n    },\n    \"utils-merge\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz\",\n      \"integrity\": \"sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=\"\n    },\n    \"uuid\": {\n      \"version\": \"3.3.2\",\n      \"resolved\": \"https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz\",\n      \"integrity\": \"sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==\"\n    },\n    \"validate-npm-package-license\": {\n      \"version\": \"3.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz\",\n      \"integrity\": \"sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==\",\n      \"requires\": {\n        \"spdx-correct\": \"3.1.0\",\n        \"spdx-expression-parse\": \"3.0.0\"\n      }\n    },\n    \"vary\": {\n      \"version\": \"1.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/vary/-/vary-1.1.2.tgz\",\n      \"integrity\": \"sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=\"\n    },\n    \"vendors\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/vendors/-/vendors-1.0.2.tgz\",\n      \"integrity\": \"sha512-w/hry/368nO21AN9QljsaIhb9ZiZtZARoVH5f3CsFbawdLdayCgKRPup7CggujvySMxx0I91NOyxdVENohprLQ==\"\n    },\n    \"verror\": {\n      \"version\": \"1.10.0\",\n      \"resolved\": \"https://registry.npmjs.org/verror/-/verror-1.10.0.tgz\",\n      \"integrity\": \"sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=\",\n      \"requires\": {\n        \"assert-plus\": \"1.0.0\",\n        \"core-util-is\": \"1.0.2\",\n        \"extsprintf\": \"1.3.0\"\n      }\n    },\n    \"vfile\": {\n      \"version\": \"3.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/vfile/-/vfile-3.0.1.tgz\",\n      \"integrity\": \"sha512-y7Y3gH9BsUSdD4KzHsuMaCzRjglXN0W2EcMf0gpvu6+SbsGhMje7xDc8AEoeXy6mIwCKMI6BkjMsRjzQbhMEjQ==\",\n      \"requires\": {\n        \"is-buffer\": \"2.0.4\",\n        \"replace-ext\": \"1.0.0\",\n        \"unist-util-stringify-position\": \"1.1.2\",\n        \"vfile-message\": \"1.1.1\"\n      },\n      \"dependencies\": {\n        \"is-buffer\": {\n          \"version\": \"2.0.4\",\n          \"resolved\": \"https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz\",\n          \"integrity\": \"sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==\"\n        },\n        \"unist-util-stringify-position\": {\n          \"version\": \"1.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-1.1.2.tgz\",\n          \"integrity\": \"sha512-pNCVrk64LZv1kElr0N1wPiHEUoXNVFERp+mlTg/s9R5Lwg87f9bM/3sQB99w+N9D/qnM9ar3+AKDBwo/gm/iQQ==\"\n        },\n        \"vfile-message\": {\n          \"version\": \"1.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/vfile-message/-/vfile-message-1.1.1.tgz\",\n          \"integrity\": \"sha512-1WmsopSGhWt5laNir+633LszXvZ+Z/lxveBf6yhGsqnQIhlhzooZae7zV6YVM1Sdkw68dtAW3ow0pOdPANugvA==\",\n          \"requires\": {\n            \"unist-util-stringify-position\": \"1.1.2\"\n          }\n        }\n      }\n    },\n    \"vfile-location\": {\n      \"version\": \"2.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.6.tgz\",\n      \"integrity\": \"sha512-sSFdyCP3G6Ka0CEmN83A2YCMKIieHx0EDaj5IDP4g1pa5ZJ4FJDvpO0WODLxo4LUX4oe52gmSCK7Jw4SBghqxA==\"\n    },\n    \"vfile-message\": {\n      \"version\": \"2.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz\",\n      \"integrity\": \"sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==\",\n      \"requires\": {\n        \"@types/unist\": \"2.0.3\",\n        \"unist-util-stringify-position\": \"2.0.3\"\n      }\n    },\n    \"vm-browserify\": {\n      \"version\": \"0.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz\",\n      \"integrity\": \"sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=\",\n      \"requires\": {\n        \"indexof\": \"0.0.1\"\n      }\n    },\n    \"vue\": {\n      \"version\": \"2.5.16\",\n      \"resolved\": \"https://registry.npmjs.org/vue/-/vue-2.5.16.tgz\",\n      \"integrity\": \"sha512-/ffmsiVuPC8PsWcFkZngdpas19ABm5mh2wA7iDqcltyCTwlgZjHGeJYOXkBMo422iPwIcviOtrTCUpSfXmToLQ==\"\n    },\n    \"vue-hot-reload-api\": {\n      \"version\": \"2.3.4\",\n      \"resolved\": \"https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz\",\n      \"integrity\": \"sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==\"\n    },\n    \"vue-router\": {\n      \"version\": \"3.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/vue-router/-/vue-router-3.0.1.tgz\",\n      \"integrity\": \"sha512-vLLoY452L+JBpALMP5UHum9+7nzR9PeIBCghU9ZtJ1eWm6ieUI8Zb/DI3MYxH32bxkjzYV1LRjNv4qr8d+uX/w==\"\n    },\n    \"vue-style-loader\": {\n      \"version\": \"4.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.0.1.tgz\",\n      \"integrity\": \"sha512-k21XBqrm13hFt4+ywXP5Jv1T4v31lI7r7dpA4zS5FS2T28MjJc5rq8EG85K2IVjq9FDk8d+IUSD/4stYfG4UZg==\",\n      \"requires\": {\n        \"hash-sum\": \"1.0.2\",\n        \"loader-utils\": \"1.2.3\"\n      }\n    },\n    \"vue-template-compiler\": {\n      \"version\": \"2.5.16\",\n      \"resolved\": \"https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.5.16.tgz\",\n      \"integrity\": \"sha512-ZbuhCcF/hTYmldoUOVcu2fcbeSAZnfzwDskGduOrnjBiIWHgELAd+R8nAtX80aZkceWDKGQ6N9/0/EUpt+l22A==\",\n      \"requires\": {\n        \"de-indent\": \"1.0.2\",\n        \"he\": \"1.2.0\"\n      }\n    },\n    \"vue-template-es2015-compiler\": {\n      \"version\": \"1.9.1\",\n      \"resolved\": \"https://registry.npmjs.org/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz\",\n      \"integrity\": \"sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==\"\n    },\n    \"vuex\": {\n      \"version\": \"3.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/vuex/-/vuex-3.0.1.tgz\",\n      \"integrity\": \"sha512-wLoqz0B7DSZtgbWL1ShIBBCjv22GV5U+vcBFox658g6V0s4wZV9P4YjCNyoHSyIBpj1f29JBoNQIqD82cR4O3w==\"\n    },\n    \"watchpack\": {\n      \"version\": \"1.6.0\",\n      \"resolved\": \"https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz\",\n      \"integrity\": \"sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==\",\n      \"requires\": {\n        \"chokidar\": \"2.0.4\",\n        \"graceful-fs\": \"4.1.15\",\n        \"neo-async\": \"2.6.0\"\n      }\n    },\n    \"wcwidth\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz\",\n      \"integrity\": \"sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=\",\n      \"requires\": {\n        \"defaults\": \"1.0.3\"\n      }\n    },\n    \"webpack\": {\n      \"version\": \"3.12.0\",\n      \"resolved\": \"https://registry.npmjs.org/webpack/-/webpack-3.12.0.tgz\",\n      \"integrity\": \"sha512-Sw7MdIIOv/nkzPzee4o0EdvCuPmxT98+vVpIvwtcwcF1Q4SDSNp92vwcKc4REe7NItH9f1S4ra9FuQ7yuYZ8bQ==\",\n      \"requires\": {\n        \"acorn\": \"5.7.3\",\n        \"acorn-dynamic-import\": \"2.0.2\",\n        \"ajv\": \"6.6.2\",\n        \"ajv-keywords\": \"3.2.0\",\n        \"async\": \"2.6.1\",\n        \"enhanced-resolve\": \"3.4.1\",\n        \"escope\": \"3.6.0\",\n        \"interpret\": \"1.2.0\",\n        \"json-loader\": \"0.5.7\",\n        \"json5\": \"0.5.1\",\n        \"loader-runner\": \"2.3.1\",\n        \"loader-utils\": \"1.2.3\",\n        \"memory-fs\": \"0.4.1\",\n        \"mkdirp\": \"0.5.1\",\n        \"node-libs-browser\": \"2.1.0\",\n        \"source-map\": \"0.5.7\",\n        \"supports-color\": \"4.5.0\",\n        \"tapable\": \"0.2.9\",\n        \"uglifyjs-webpack-plugin\": \"0.4.6\",\n        \"watchpack\": \"1.6.0\",\n        \"webpack-sources\": \"1.3.0\",\n        \"yargs\": \"8.0.2\"\n      },\n      \"dependencies\": {\n        \"acorn\": {\n          \"version\": \"5.7.3\",\n          \"resolved\": \"https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz\",\n          \"integrity\": \"sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==\"\n        },\n        \"has-flag\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz\",\n          \"integrity\": \"sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=\"\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"4.5.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz\",\n          \"integrity\": \"sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=\",\n          \"requires\": {\n            \"has-flag\": \"2.0.0\"\n          }\n        },\n        \"tapable\": {\n          \"version\": \"0.2.9\",\n          \"resolved\": \"https://registry.npmjs.org/tapable/-/tapable-0.2.9.tgz\",\n          \"integrity\": \"sha512-2wsvQ+4GwBvLPLWsNfLCDYGsW6xb7aeC6utq2Qh0PFwgEy7K7dsma9Jsmb2zSQj7GvYAyUGSntLtsv++GmgL1A==\"\n        }\n      }\n    },\n    \"webpack-bundle-analyzer\": {\n      \"version\": \"2.13.1\",\n      \"resolved\": \"https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-2.13.1.tgz\",\n      \"integrity\": \"sha512-rwxyfecTAxoarCC9VlHlIpfQCmmJ/qWD5bpbjkof+7HrNhTNZIwZITxN6CdlYL2axGmwNUQ+tFgcSOiNXMf/sQ==\",\n      \"requires\": {\n        \"acorn\": \"5.7.3\",\n        \"bfj-node4\": \"5.3.1\",\n        \"chalk\": \"2.4.2\",\n        \"commander\": \"2.16.0\",\n        \"ejs\": \"2.6.2\",\n        \"express\": \"4.16.3\",\n        \"filesize\": \"3.6.1\",\n        \"gzip-size\": \"4.1.0\",\n        \"lodash\": \"4.17.11\",\n        \"mkdirp\": \"0.5.1\",\n        \"opener\": \"1.5.1\",\n        \"ws\": \"4.1.0\"\n      },\n      \"dependencies\": {\n        \"acorn\": {\n          \"version\": \"5.7.3\",\n          \"resolved\": \"https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz\",\n          \"integrity\": \"sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==\"\n        },\n        \"ws\": {\n          \"version\": \"4.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/ws/-/ws-4.1.0.tgz\",\n          \"integrity\": \"sha512-ZGh/8kF9rrRNffkLFV4AzhvooEclrOH0xaugmqGsIfFgOE/pIz4fMc4Ef+5HSQqTEug2S9JZIWDR47duDSLfaA==\",\n          \"requires\": {\n            \"async-limiter\": \"1.0.0\",\n            \"safe-buffer\": \"5.1.2\"\n          }\n        }\n      }\n    },\n    \"webpack-check-plugin\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/webpack-check-plugin/-/webpack-check-plugin-1.0.8.tgz\",\n      \"integrity\": \"sha512-4MwjW3hyQizRYhgVg4O51emeWd15/4kbZI+nIiWcaboCv7q82+G8zuanUDS20DyIUzeckEoLRoCRcP7VF7sYow==\",\n      \"requires\": {\n        \"@babel/parser\": \"7.1.0\",\n        \"babel-generator\": \"6.26.1\",\n        \"babel-traverse\": \"6.26.0\",\n        \"chalk\": \"2.4.2\",\n        \"lodash.uniq\": \"4.5.0\"\n      },\n      \"dependencies\": {\n        \"@babel/parser\": {\n          \"version\": \"7.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.1.0.tgz\",\n          \"integrity\": \"sha512-SmjnXCuPAlai75AFtzv+KCBcJ3sDDWbIn+WytKw1k+wAtEy6phqI2RqKh/zAnw53i1NR8su3Ep/UoqaKcimuLg==\"\n        }\n      }\n    },\n    \"webpack-chunk-hash\": {\n      \"version\": \"0.6.0\",\n      \"resolved\": \"https://registry.npmjs.org/webpack-chunk-hash/-/webpack-chunk-hash-0.6.0.tgz\",\n      \"integrity\": \"sha512-FsOg1RpW2nf3nYpGTy/Qs59RZ7gYG+sI4VrCE8TIBQYh/Kogi04xD39Pj9zUEeUcNx9HeTVPGSO3mtmpLeX9eQ==\",\n      \"requires\": {\n        \"@types/webpack\": \"4.4.22\"\n      }\n    },\n    \"webpack-hot-middleware\": {\n      \"version\": \"2.22.2\",\n      \"resolved\": \"https://registry.npmjs.org/webpack-hot-middleware/-/webpack-hot-middleware-2.22.2.tgz\",\n      \"integrity\": \"sha512-uccPS6b/UlXJoNCS+3fuc40z2KZgO0qQhnu+Ne1iZiHTy9s5fMCJAV+Vc8VTVkN203UphsxQmkumxYeHLiQ5jg==\",\n      \"requires\": {\n        \"ansi-html\": \"0.0.7\",\n        \"html-entities\": \"1.2.1\",\n        \"querystring\": \"0.2.0\",\n        \"strip-ansi\": \"3.0.1\"\n      }\n    },\n    \"webpack-liveload-middleware\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/webpack-liveload-middleware/-/webpack-liveload-middleware-1.0.8.tgz\",\n      \"integrity\": \"sha512-rV+Or2bLzymHOs/egsBbr9+KGC+JDGHBWAkLy9VfGqYOqvWcWxJ+iYWBfo0TBy4DZe8bF04sUAshSGIGKEV2Cw==\",\n      \"requires\": {\n        \"querystring\": \"0.2.0\"\n      }\n    },\n    \"webpack-log\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/webpack-log/-/webpack-log-1.2.0.tgz\",\n      \"integrity\": \"sha512-U9AnICnu50HXtiqiDxuli5gLB5PGBo7VvcHx36jRZHwK4vzOYLbImqT4lwWwoMHdQWwEKw736fCHEekokTEKHA==\",\n      \"requires\": {\n        \"chalk\": \"2.4.2\",\n        \"log-symbols\": \"2.2.0\",\n        \"loglevelnext\": \"1.0.5\",\n        \"uuid\": \"3.3.2\"\n      }\n    },\n    \"webpack-merge\": {\n      \"version\": \"4.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.1.3.tgz\",\n      \"integrity\": \"sha512-zxwAIGK7nKdu5CIZL0BjTQoq3elV0t0MfB7rUC1zj668geid52abs6hN/ACwZdK6LeMS8dC9B6WmtF978zH5mg==\",\n      \"requires\": {\n        \"lodash\": \"4.17.11\"\n      }\n    },\n    \"webpack-sources\": {\n      \"version\": \"1.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.3.0.tgz\",\n      \"integrity\": \"sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==\",\n      \"requires\": {\n        \"source-list-map\": \"2.0.1\",\n        \"source-map\": \"0.6.1\"\n      }\n    },\n    \"weex-styler\": {\n      \"version\": \"0.3.1\",\n      \"resolved\": \"https://registry.npmjs.org/weex-styler/-/weex-styler-0.3.1.tgz\",\n      \"integrity\": \"sha512-xkX5/wS/QLiJXKwbdpeytbLN0kHviQwj9CLdvBxqu+RRZABZpTniKZr1oxjh9Q0+n/aRC+smwFpQpUKvXh9V1g==\",\n      \"requires\": {\n        \"css\": \"2.2.4\"\n      }\n    },\n    \"weex-template-compiler\": {\n      \"version\": \"2.5.16-weex.1\",\n      \"resolved\": \"https://registry.npmjs.org/weex-template-compiler/-/weex-template-compiler-2.5.16-weex.1.tgz\",\n      \"integrity\": \"sha512-v6hlv2eANy35y2iu9mO+OQ3oHx1/OtfbEx1PrONaCeS6tHKTu4W0dx22GP0T4qinSLlORBvwGwMGyKEme5YD7w==\",\n      \"requires\": {\n        \"acorn\": \"5.7.4\",\n        \"escodegen\": \"1.14.3\",\n        \"he\": \"1.2.0\",\n        \"vue-template-es2015-compiler\": \"1.9.1\"\n      },\n      \"dependencies\": {\n        \"acorn\": {\n          \"version\": \"5.7.4\",\n          \"resolved\": \"https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz\",\n          \"integrity\": \"sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==\"\n        }\n      }\n    },\n    \"when\": {\n      \"version\": \"3.6.4\",\n      \"resolved\": \"https://registry.npmjs.org/when/-/when-3.6.4.tgz\",\n      \"integrity\": \"sha1-RztRfsFZ4rhQBUl6E5g/CVQS404=\"\n    },\n    \"whet.extend\": {\n      \"version\": \"0.9.9\",\n      \"resolved\": \"https://registry.npmjs.org/whet.extend/-/whet.extend-0.9.9.tgz\",\n      \"integrity\": \"sha1-+HfVv2SMl+WqVC+twW1qJZucEaE=\"\n    },\n    \"which\": {\n      \"version\": \"1.3.1\",\n      \"resolved\": \"https://registry.npmjs.org/which/-/which-1.3.1.tgz\",\n      \"integrity\": \"sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==\",\n      \"requires\": {\n        \"isexe\": \"2.0.0\"\n      }\n    },\n    \"which-module\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz\",\n      \"integrity\": \"sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=\"\n    },\n    \"window-size\": {\n      \"version\": \"0.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz\",\n      \"integrity\": \"sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=\"\n    },\n    \"wordwrap\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz\",\n      \"integrity\": \"sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=\"\n    },\n    \"wrap-ansi\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz\",\n      \"integrity\": \"sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=\",\n      \"requires\": {\n        \"string-width\": \"1.0.2\",\n        \"strip-ansi\": \"3.0.1\"\n      },\n      \"dependencies\": {\n        \"is-fullwidth-code-point\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz\",\n          \"integrity\": \"sha1-754xOG8DGn8NZDr4L95QxFfvAMs=\",\n          \"requires\": {\n            \"number-is-nan\": \"1.0.1\"\n          }\n        },\n        \"string-width\": {\n          \"version\": \"1.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz\",\n          \"integrity\": \"sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=\",\n          \"requires\": {\n            \"code-point-at\": \"1.1.0\",\n            \"is-fullwidth-code-point\": \"1.0.0\",\n            \"strip-ansi\": \"3.0.1\"\n          }\n        }\n      }\n    },\n    \"wrappy\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz\",\n      \"integrity\": \"sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=\"\n    },\n    \"write\": {\n      \"version\": \"0.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/write/-/write-0.2.1.tgz\",\n      \"integrity\": \"sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=\",\n      \"dev\": true,\n      \"requires\": {\n        \"mkdirp\": \"0.5.1\"\n      }\n    },\n    \"ws\": {\n      \"version\": \"6.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/ws/-/ws-6.1.2.tgz\",\n      \"integrity\": \"sha512-rfUqzvz0WxmSXtJpPMX2EeASXabOrSMk1ruMOV3JBTBjo4ac2lDjGGsbQSyxj8Odhw5fBib8ZKEjDNvgouNKYw==\",\n      \"requires\": {\n        \"async-limiter\": \"1.0.0\"\n      }\n    },\n    \"x-is-string\": {\n      \"version\": \"0.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/x-is-string/-/x-is-string-0.1.0.tgz\",\n      \"integrity\": \"sha1-R0tQhlrzpJqcRlfwWs0UVFj3fYI=\"\n    },\n    \"xtend\": {\n      \"version\": \"4.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz\",\n      \"integrity\": \"sha1-pcbVMr5lbiPbgg77lDofBJmNY68=\"\n    },\n    \"y18n\": {\n      \"version\": \"4.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz\",\n      \"integrity\": \"sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==\"\n    },\n    \"yallist\": {\n      \"version\": \"2.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz\",\n      \"integrity\": \"sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=\"\n    },\n    \"yargs\": {\n      \"version\": \"8.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz\",\n      \"integrity\": \"sha1-YpmpBVsc78lp/355wdkY3Osiw2A=\",\n      \"requires\": {\n        \"camelcase\": \"4.1.0\",\n        \"cliui\": \"3.2.0\",\n        \"decamelize\": \"1.2.0\",\n        \"get-caller-file\": \"1.0.3\",\n        \"os-locale\": \"2.1.0\",\n        \"read-pkg-up\": \"2.0.0\",\n        \"require-directory\": \"2.1.1\",\n        \"require-main-filename\": \"1.0.1\",\n        \"set-blocking\": \"2.0.0\",\n        \"string-width\": \"2.1.1\",\n        \"which-module\": \"2.0.0\",\n        \"y18n\": \"3.2.1\",\n        \"yargs-parser\": \"7.0.0\"\n      },\n      \"dependencies\": {\n        \"camelcase\": {\n          \"version\": \"4.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz\",\n          \"integrity\": \"sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=\"\n        },\n        \"cliui\": {\n          \"version\": \"3.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz\",\n          \"integrity\": \"sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=\",\n          \"requires\": {\n            \"string-width\": \"1.0.2\",\n            \"strip-ansi\": \"3.0.1\",\n            \"wrap-ansi\": \"2.1.0\"\n          },\n          \"dependencies\": {\n            \"string-width\": {\n              \"version\": \"1.0.2\",\n              \"resolved\": \"https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz\",\n              \"integrity\": \"sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=\",\n              \"requires\": {\n                \"code-point-at\": \"1.1.0\",\n                \"is-fullwidth-code-point\": \"1.0.0\",\n                \"strip-ansi\": \"3.0.1\"\n              }\n            }\n          }\n        },\n        \"is-fullwidth-code-point\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz\",\n          \"integrity\": \"sha1-754xOG8DGn8NZDr4L95QxFfvAMs=\",\n          \"requires\": {\n            \"number-is-nan\": \"1.0.1\"\n          }\n        },\n        \"load-json-file\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz\",\n          \"integrity\": \"sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=\",\n          \"requires\": {\n            \"graceful-fs\": \"4.1.15\",\n            \"parse-json\": \"2.2.0\",\n            \"pify\": \"2.3.0\",\n            \"strip-bom\": \"3.0.0\"\n          }\n        },\n        \"parse-json\": {\n          \"version\": \"2.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz\",\n          \"integrity\": \"sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=\",\n          \"requires\": {\n            \"error-ex\": \"1.3.2\"\n          }\n        },\n        \"path-type\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz\",\n          \"integrity\": \"sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=\",\n          \"requires\": {\n            \"pify\": \"2.3.0\"\n          }\n        },\n        \"pify\": {\n          \"version\": \"2.3.0\",\n          \"resolved\": \"https://registry.npmjs.org/pify/-/pify-2.3.0.tgz\",\n          \"integrity\": \"sha1-7RQaasBDqEnqWISY59yosVMw6Qw=\"\n        },\n        \"read-pkg\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz\",\n          \"integrity\": \"sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=\",\n          \"requires\": {\n            \"load-json-file\": \"2.0.0\",\n            \"normalize-package-data\": \"2.4.0\",\n            \"path-type\": \"2.0.0\"\n          }\n        },\n        \"read-pkg-up\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz\",\n          \"integrity\": \"sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=\",\n          \"requires\": {\n            \"find-up\": \"2.1.0\",\n            \"read-pkg\": \"2.0.0\"\n          }\n        },\n        \"y18n\": {\n          \"version\": \"3.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz\",\n          \"integrity\": \"sha1-bRX7qITAhnnA136I53WegR4H+kE=\"\n        },\n        \"yargs-parser\": {\n          \"version\": \"7.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz\",\n          \"integrity\": \"sha1-jQrELxbqVd69MyyvTEA4s+P139k=\",\n          \"requires\": {\n            \"camelcase\": \"4.1.0\"\n          }\n        }\n      }\n    },\n    \"yargs-parser\": {\n      \"version\": \"10.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz\",\n      \"integrity\": \"sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==\",\n      \"requires\": {\n        \"camelcase\": \"4.1.0\"\n      },\n      \"dependencies\": {\n        \"camelcase\": {\n          \"version\": \"4.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz\",\n          \"integrity\": \"sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-tool/package.json",
    "content": "{\n  \"name\": \"chameleon-tool\",\n  \"version\": \"1.0.8\",\n  \"description\": \"chameleon 脚手架工具\",\n  \"main\": \"chameleon.js\",\n  \"scripts\": {\n    \"eslint\": \"eslint ./lib ./configs ./commanders\",\n    \"test\": \"mocha --recursive --reporter spec\",\n    \"cover\": \"nyc ./node_modules/mocha/bin/mocha ./test/*/*.js\"\n  },\n  \"bin\": {\n    \"cml\": \"chameleon.js\"\n  },\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"keywords\": [\n    \"chameleon\",\n    \"cml\",\n    \"miniprogram\",\n    \"vue\",\n    \"weex\",\n    \"android\",\n    \"ios\",\n    \"mobile\",\n    \"mvvm\"\n  ],\n  \"dependencies\": {\n    \"@babel/polyfill\": \"7.0.0\",\n    \"assets-webpack-plugin\": \"3.8.4\",\n    \"autoprefixer\": \"8.6.4\",\n    \"babel-core\": \"6.26.3\",\n    \"babel-loader\": \"7.1.4\",\n    \"babel-plugin-chameleon-import\": \"^1.0.8\",\n    \"babel-plugin-transform-remove-strict-mode\": \"0.0.2\",\n    \"babel-plugin-transform-runtime\": \"6.23.0\",\n    \"babel-preset-env\": \"1.7.0\",\n    \"babel-preset-flow\": \"6.23.0\",\n    \"babel-preset-stage-0\": \"6.24.1\",\n    \"body-parser\": \"^1.18.3\",\n    \"cache-loader\": \"^4.1.0\",\n    \"chalk\": \"^2.4.2\",\n    \"chameleon-css-loader\": \"^1.0.8\",\n    \"chameleon-dev-proxy\": \"^1.0.8\",\n    \"chameleon-errors-webpack-plugin\": \"^1.0.8\",\n    \"chameleon-linter\": \"^1.0.8\",\n    \"chameleon-loader\": \"^1.0.8\",\n    \"chameleon-miniapp-target\": \"^1.0.8\",\n    \"chameleon-mixins\": \"^1.0.8\",\n    \"chameleon-template-parse\": \"^1.0.8\",\n    \"chameleon-templates\": \"^1.0.8\",\n    \"chameleon-tool-utils\": \"^1.0.8\",\n    \"chameleon-url-loader\": \"^1.0.8\",\n    \"chameleon-vue-precompiler\": \"^1.0.8\",\n    \"chameleon-webpack-plugin\": \"^1.0.8\",\n    \"chameleon-weex-vue-loader\": \"^1.0.8\",\n    \"circular-dependency-plugin\": \"^4.4.0\",\n    \"clean-webpack-plugin\": \"0.1.19\",\n    \"cml-extract-css-webpack-plugin\": \"^1.0.8\",\n    \"cml-vue-loader\": \"^1.0.8\",\n    \"commander\": \"2.16.0\",\n    \"connect-history-api-fallback\": \"^1.5.0\",\n    \"copy-webpack-plugin\": \"4.5.2\",\n    \"css-hot-loader\": \"1.3.9\",\n    \"css-loader\": \"0.28.11\",\n    \"duplicate-package-checker-webpack-plugin\": \"^2.1.0\",\n    \"envinfo\": \"^7.5.1\",\n    \"eventsource-polyfill\": \"0.9.6\",\n    \"express\": \"4.16.3\",\n    \"extra-watch-webpack-plugin\": \"^1.0.3\",\n    \"file-loader\": \"1.1.11\",\n    \"fs-extra\": \"6.0.1\",\n    \"glob\": \"7.1.2\",\n    \"glob-watcher\": \"^5.0.3\",\n    \"html-loader\": \"0.5.5\",\n    \"html-webpack-plugin\": \"2.30.1\",\n    \"http-proxy-middleware\": \"^1.0.4\",\n    \"inquirer\": \"6.0.0\",\n    \"interface-loader\": \"^1.0.8\",\n    \"ip\": \"1.1.5\",\n    \"less\": \"^3.11.1\",\n    \"less-loader\": \"4.1.0\",\n    \"minimist\": \"1.2.0\",\n    \"mvvm-cml-loader\": \"1.0.8\",\n    \"mvvm-file-loader\": \"1.0.8\",\n    \"mvvm-miniapp-loader\": \"1.0.8\",\n    \"mvvm-pack\": \"1.0.8\",\n    \"mvvm-style-loader\": \"1.0.8\",\n    \"node-phpcgi\": \"0.3.7\",\n    \"node-watch\": \"^0.5.9\",\n    \"opn\": \"5.3.0\",\n    \"optimize-css-assets-webpack-plugin\": \"3.2.0\",\n    \"ora\": \"2.1.0\",\n    \"portfinder\": \"^1.0.13\",\n    \"postcss-import\": \"11.1.0\",\n    \"postcss-loader\": \"2.1.5\",\n    \"postcss-plugin-px2rem\": \"0.7.0\",\n    \"postcss-plugin-weex\": \"0.1.6\",\n    \"prettier\": \"1.15.3\",\n    \"progress-bar-webpack-plugin\": \"^2.1.0\",\n    \"shelljs\": \"0.8.2\",\n    \"style-loader\": \"0.18.2\",\n    \"stylus\": \"0.54.5\",\n    \"stylus-loader\": \"3.0.2\",\n    \"vue\": \"2.5.16\",\n    \"vue-router\": \"3.0.1\",\n    \"vue-template-compiler\": \"2.5.16\",\n    \"vuex\": \"3.0.1\",\n    \"webpack\": \"3.12.0\",\n    \"webpack-bundle-analyzer\": \"2.13.1\",\n    \"webpack-check-plugin\": \"^1.0.8\",\n    \"webpack-chunk-hash\": \"0.6.0\",\n    \"webpack-hot-middleware\": \"2.22.2\",\n    \"webpack-liveload-middleware\": \"^1.0.8\",\n    \"webpack-merge\": \"4.1.3\",\n    \"ws\": \"^6.1.0\"\n  },\n  \"devDependencies\": {\n    \"chai\": \"^4.2.0\",\n    \"coveralls\": \"^2.11.9\",\n    \"eslint\": \"^5.9.0\",\n    \"istanbul\": \"^0.4.5\",\n    \"mocha\": \"^5.2.0\",\n    \"nyc\": \"^13.1.0\"\n  },\n  \"mail\": \"ChameleonCore@didiglobal.com\"\n}\n"
  },
  {
    "path": "packages/chameleon-tool/test/commander/index.cml",
    "content": "<template>\n  <view><text>Hello Chameleon!</text></view>\n</template>\n\n<script>\n\nclass Replace   {\n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new Replace();\n</script>\n\n<style>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  },\n  \"wx\": {\n    \"navigationBarTitleText\": \"index\",\n    \"backgroundTextStyle\": \"dark\",\n    \"backgroundColor\": \"#E2E2E2\"\n  },\n  \"alipay\": {\n    \"defaultTitle\": \"index\",\n    \"pullRefresh\": false,\n    \"allowsBounceVertical\": \"YES\",\n    \"titleBarColor\": \"#ffffff\"\n  },\n  \"baidu\": {\n    \"navigationBarBackgroundColor\": \"#ffffff\",\n    \"navigationBarTextStyle\": \"white\",\n    \"navigationBarTitleText\": \"index\",\n    \"backgroundColor\": \"#ffffff\",\n    \"backgroundTextStyle\": \"dark\",\n    \"enablePullDownRefresh\": false,\n    \"onReachBottomDistance\": 50\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-tool/test/commander/index.interface",
    "content": "<script cml-type=\"interface\">\ninterface ReplaceInterface {\n  getMsg(msg: String): String;\n}\n\n</script>\n\n<script cml-type=\"web\">\n\nclass Method implements ReplaceInterface {\n  getMsg(msg) {\n    return 'web:' + msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"weex\">\n\nclass Method implements ReplaceInterface {\n  getMsg(msg) {\n    return 'weex:' + msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"wx\">\n\nclass Method implements ReplaceInterface {\n  getMsg(msg) {\n    return 'wx:' + msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"alipay\">\n\nclass Method implements ReplaceInterface {\n  getMsg(msg) {\n    return 'alipay:' + msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"baidu\">\n\nclass Method implements ReplaceInterface {\n  getMsg(msg) {\n    return 'baidu:' + msg;\n  }\n}\n\nexport default new Method();\n</script>\n"
  },
  {
    "path": "packages/chameleon-tool/test/commander/init.test.js",
    "content": "const initCommander = require('../../commanders/init/index.js');\nconst path = require('path');\nconst fs = require('fs');\nvar expect = require('chai').expect;\nprocess.argv = ['node', 'chameleon.js'];\nrequire('../../lib/index.js');\n\ndescribe('init/index.js', function() {\n  it('toUpperCase', function () {\n    let uppername = 'demo-com';\n    let result = initCommander.toUpperCase(uppername);\n    expect(result).to.be.equal('DemoCom');\n  })\n\n  it('getIgnorePlatform no params', function () {\n    cml.config.merge({\n      platforms: ['web', 'weex', 'wx']\n    })\n    let result = initCommander.getIgnorePlatform();\n    expect(!!~result.ignorePlatform.indexOf('alipay')).to.be.equal(true);\n    expect(!!~result.ignorePlatform.indexOf('baidu')).to.be.equal(true);\n  })\n\n  it('getIgnorePlatform has params', function () {\n    let result = initCommander.getIgnorePlatform(['web', 'weex']);\n    expect(!!~result.ignorePlatform.indexOf('alipay')).to.be.equal(true);\n    expect(!!~result.ignorePlatform.indexOf('baidu')).to.be.equal(true);\n    expect(!!~result.ignorePlatform.indexOf('wx')).to.be.equal(true);\n  })\n\n  it('contentIgnoreHanle cml', function () {\n    cml.config.merge({\n      platforms: ['web', 'weex', 'wx']\n    })\n    let content = fs.readFileSync(path.join(__dirname, './index.cml'), {encoding: 'utf8'});\n    let result = initCommander.contentIgnoreHanle(content, 'cml');\n    let splitContent = cml.utils.getScriptPart({content: result, cmlType: 'json'});\n    if (splitContent) {\n      let jsonObj = JSON.parse(splitContent.content);\n      console.log(jsonObj);\n      expect(typeof jsonObj.alipay).to.be.equal('undefined');\n      expect(typeof jsonObj.baidu).to.be.equal('undefined');\n      expect(typeof jsonObj.wx).to.be.equal('object');\n    }\n  })\n  it('contentIgnoreHanle interface', function () {\n    cml.config.merge({\n      platforms: ['web', 'weex', 'wx']\n    })\n    let content = fs.readFileSync(path.join(__dirname, './index.interface'), {encoding: 'utf8'});\n    let result = initCommander.contentIgnoreHanle(content, 'interface');\n    expect(/cml\\-type\\=\\\"wx\\\"/.test(result)).to.be.equal(true); \n    expect(/cml\\-type\\=\\\"web\\\"/.test(result)).to.be.equal(true); \n    expect(/cml\\-type\\=\\\"weex\\\"/.test(result)).to.be.equal(true); \n    expect(!/cml\\-type\\=\\\"alipay\\\"/.test(result)).to.be.equal(true); \n  })\n})\n"
  },
  {
    "path": "packages/chameleon-tool/test/configs/utils.js",
    "content": "\nprocess.argv = ['node', 'chameleon.js'];\nrequire('../../lib/index.js');\nvar utils = require('../../configs/utils.js');\nconst _ = require('chameleon-tool-utils');\nvar expect = require('chai').expect;\nconst path = require('path');\nconst fse = require('fs-extra');\n\n\ndescribe('configs utils.js', function () {\n  it('getPostcssrcPath', function () {\n    let platfrom = ['alipay', 'baidu', 'export', 'web', 'weex', 'wx'];\n    platfrom.forEach(item => {\n      expect(_.isFile(utils.getPostcssrcPath(item))).to.equal(true);\n      expect(utils.getPostcssrcPath(item)).to.equal(path.join(__dirname, `../../configs/postcss/${item}/.postcssrc.js`));\n    })\n  })\n\n  it('cssLoaders', function () {\n    let options = {\n      type: 'web'\n    }\n    let result = utils.cssLoaders(options);\n    expect(result).to.have.property('css');\n    expect(result).to.have.property('less');\n    expect(result).to.have.property('js');\n    expect(result).to.have.property('stylus');\n    expect(result).to.have.property('styl');\n\n  })\n\n\n  it('styleLoaders', function () {\n    let result = utils.styleLoaders();\n    expect(_.is(result, 'Array')).to.equal(true);\n  })\n\n  it('getMiniAppEntry', function () {\n    cml.projectRoot = path.join(__dirname, '../../node_modules/chameleon-templates/project');\n    cml.media = 'dev';\n    let result = utils.getMiniAppEntry('wx');\n    expect(result).to.have.property('app');\n    expect(result).to.have.property('common');\n  })\n\n \n\n  it('getMiniAppEntry export', function () {\n    cml.projectRoot = path.join(__dirname, '../../node_modules/chameleon-templates/project');\n    cml.media = 'export';\n    cml.config.merge({\n      wx: {\n        export: {\n          entry: [\n            './src'\n          ]\n        }\n      }\n    })\n    let result = utils.getMiniAppEntry('wx');\n    expect(result).to.have.property('common');\n    expect(result).to.have.property('src/app/app');\n    expect(result).to.have.property('src/pages/index/index');\n  })\n\n  // it('getWebEntry', function () {\n  //   cml.projectRoot = path.join(__dirname, '../../node_modules/chameleon-templates/project');\n  //   cml.media = 'build';\n    // var {getOptions} = require('../../commanders/utils.js');\n    // let options = getOptions('build', 'web');\n    // let result = utils.getWebEntry(options);\n    // expect(Object.keys(result.entry).length > 0).to.equal(true);\n    // expect(result.htmlPlugins.length > 0).to.equal(true);\n  // })\n\n  // it('getWebExportEntry', function () {\n  //   cml.projectRoot = path.join(__dirname, '../../node_modules/chameleon-templates/project');\n  //   cml.media = 'build';\n  //   cml.config.merge({\n  //     web: {\n  //       export: {\n  //         entry: ['src']\n  //       }\n  //     }\n  //   })\n  //   var {getOptions} = require('../../commanders/utils.js');\n  //   let options = getOptions('export', 'web');\n  //   let result = utils.getWebExportEntry(options);\n  //   expect(Object.keys(result.entry).length > 0).to.equal(true);\n  //   expect(result.htmlPlugins.length === 0).to.equal(true);\n  // })\n\n  // it('getWeexEntry', function () {\n  //   cml.projectRoot = path.join(__dirname, '../../node_modules/chameleon-templates/project');\n  //   cml.media = 'build';\n  //   cml.config.merge({\n  //     projectName: 'test'\n  //   })\n  //   var {getOptions} = require('../../commanders/utils.js');\n  //   let options = getOptions('build', 'weex');\n  //   let result = utils.getWeexEntry(options);\n  //   expect(result.test.length > 0).to.equal(true);\n  // })\n\n  // it('getWeexExportEntry', function () {\n  //   cml.projectRoot = path.join(__dirname, '../../node_modules/chameleon-templates/project');\n  //   cml.media = 'build';\n  //   cml.config.merge({\n  //     projectName: 'test'\n  //   })\n  //   var {getOptions} = require('../../commanders/utils.js');\n  //   let options = getOptions('build', 'weex');\n  //   let result = utils.getWeexEntry(options);\n  //   expect(result.test.length > 0).to.equal(true);\n  // })\n\n  it('getEntryName', function () {\n    cml.projectRoot = path.join(__dirname, '../../node_modules/chameleon-templates/project');\n    cml.media = 'build';\n    cml.config.merge({\n      projectName: 'test'\n    })\n    let result = utils.getEntryName();\n    expect(result).to.equal('test');\n  })\n\n  it('getBabelPath', function () {\n    cml.projectRoot = path.join(__dirname, '../../node_modules/chameleon-templates/project');\n    cml.media = 'build';\n    cml.config.merge({\n      projectName: 'test'\n    })\n    let result = utils.getBabelPath();\n    expect(!!~result.indexOf(path.join(cml.projectRoot, 'src'))).to.equal(true);\n    expect(!!~result.indexOf(path.join(cml.root, 'configs'))).to.equal(true);\n  })\n\n  it('getGlobalCheckWhiteList', function () {\n    cml.projectRoot = path.join(__dirname, '../../node_modules/chameleon-templates/project');\n    cml.media = 'build';\n    cml.config.merge({\n      globalCheckWhiteList: [\n        'test.min.js'\n      ]\n    })\n\n    let result = utils.getGlobalCheckWhiteList();\n    expect(result instanceof Array).to.equal(true);\n  })\n\n  it('copyDefaultFile', function () {\n    cml.projectRoot = path.join(__dirname, '../../node_modules/chameleon-templates/project');\n    // const tempDir = path.join(cml.projectRoot, '.temp')\n    // fse.removeSync(tempDir);\n    utils.copyDefaultFile(cml.projectRoot, 'web', 'build');\n    // expect(_.isDirectory(tempDir)).to.equal(true);\n    // expect(_.isFile(path.join(tempDir, 'entry.html'))).to.equal(true);\n    // expect(_.isFile(path.join(tempDir, 'entry.web.js'))).to.equal(true);\n    // expect(_.isFile(path.join(tempDir, 'router.js'))).to.equal(true);\n    // expect(_.isFile(path.join(tempDir, 'routerOptions.js'))).to.equal(true);\n  })\n\n  it('setFreePort and getFreePort', function () {\n    utils.setFreePort().then(res => {\n      let result = utils.getFreePort();\n      expect(typeof result.webServerPort).to.equal('number');\n      expect(typeof result.weexLiveLoadPort).to.equal('number');\n    })\n  })\n\n})\n"
  },
  {
    "path": "packages/chameleon-tool/test/lib/cli.test.js",
    "content": "process.argv = ['node', 'chameleon.js'];\n\nrequire('../../lib/index.js');\n\ndescribe('log.js', function () {\n  it('it should console debug', function () {\n    let cli = require('../../lib/cli.js');\n    cli.run();\n  })\n\n})\n"
  },
  {
    "path": "packages/chameleon-tool/test/lib/config.test.js",
    "content": "var config = require('../../lib/config.js');\nvar expect = require('chai').expect;\nconst _ = require('chameleon-tool-utils');\ndescribe('config', function () {\n  it('it should get config Object', function () {\n    let result = config.get();\n    expect(_.is(result, 'Object')).to.equal(true);\n  });\n\n  it('config merge', function () {\n    let result = config.get();\n    let beforeCheckEnable = result.check.enable;\n    let obj = {\n      templateType: 'test', // 直接覆盖\n      check: { // merge\n        enableTypes: ['test'] // 直接覆盖\n      }\n    }\n    config.merge(obj);\n\n    let newresult = config.get();\n\n    expect(newresult.templateType).to.equal('test');\n    expect(newresult.check.enable).to.equal(beforeCheckEnable);\n  })\n\n  it('config assign', function () {\n    let obj = {\n      base: {\n        dev: {\n          base: true\n        },\n        build: {\n          base: true\n        }\n      }\n    }\n    config.merge(obj);\n\n    let newresult = config.get();\n\n    expect(newresult.wx.dev.base).to.equal(true);\n    expect(newresult.web.dev.base).to.equal(true);\n  })\n\n  it('config assign', function () {\n    let obj = {\n      templateType: 'test', // 直接覆盖\n      check: { // merge\n        enableTypes: ['test'] // 直接覆盖\n      }\n    }\n    config.assign(obj);\n\n    let newresult = config.get();\n\n    expect(newresult.templateType).to.equal('test');\n    expect(newresult.check.enable).to.equal(undefined);\n  })\n})\n"
  },
  {
    "path": "packages/chameleon-tool/test/lib/index.test.js",
    "content": "process.argv = ['node', 'chameleon.js'];\nrequire('../../lib/index.js');\nvar expect = require('chai').expect;\ndescribe('index.js', function () {\n  it('cml has config', function () {\n    expect(cml).to.have.property('config');\n  })\n  it('cml has root', function () {\n    expect(cml).to.have.property('root');\n  })\n  it('cml has projectRoot', function () {\n    expect(cml).to.have.property('projectRoot');\n  })\n  it('cml has utils', function () {\n    expect(cml).to.have.property('utils');\n  })\n  it('cml has cli', function () {\n    expect(cml).to.have.property('cli');\n  })\n  it('cml has log', function () {\n    expect(cml).to.have.property('log');\n  })\n  it('cml has event', function () {\n    expect(cml).to.have.property('event');\n  })\n\n})\n"
  },
  {
    "path": "packages/chameleon-tool/test/lib/log.test.js",
    "content": "var log = require('../../lib/log.js');\nvar expect = require('chai').expect;\n\ndescribe('log.js', function () {\n  it('it should console debug', function () {\n    expect(log.debug('log.debug')).to.equal(undefined);\n  })\n  it('it should console notice', function () {\n    expect(log.notice('log.notice')).to.equal(undefined);\n  })\n  it('it should console warn', function () {\n    expect(log.warn('log.warn')).to.equal(undefined);\n  })\n  it('it should console error', function () {\n    expect(log.error('log.error')).to.equal(undefined);\n  })\n\n  it('it should set Log level', function () {\n    log.setLogLevel('debug');\n    expect(log.debug('log.error')).to.equal(undefined);\n  })\n\n\n})\n"
  },
  {
    "path": "packages/chameleon-tool-utils/.eslintrc",
    "content": "{\n    // 在配置文件里配置全局变量时，使用 globals 指出你要使用的全局变量。将变量设置为 true 将允许变量被重写，或 false 将不允许被重写\n    \"globals\": {\n        \"cml\": false\n    },\n  // 环境定义了预定义的全局变量。\n  \"env\": {\n      //环境定义了预定义的全局变量。更多在官网查看\n      \"browser\": true,\n      \"node\": true,\n      \"commonjs\": true,\n      \"amd\": true,\n      \"es6\": true,\n      \"mocha\": true\n  },\n  // JavaScript 语言选项\n  \"parserOptions\": {\n      // ECMAScript 版本\n      \"ecmaVersion\": 6,\n      \"sourceType\": \"module\", //设置为 \"script\" (默认) 或 \"module\"（如果你的代码是 ECMAScript 模块)。\n      //想使用的额外的语言特性:\n      \"ecmaFeatures\": {\n          // 允许在全局作用域下使用 return 语句\n          \"globalReturn\": true,\n          // impliedStric\n          \"impliedStrict\": true,\n          // 启用 JSX\n          \"jsx\": true,\n          \"modules\": true\n      }\n  },\n  //-----让eslint支持 JSX start\n  \"plugins\": [\n\n  ],\n  \"extends\": [\n      \"eslint:recommended\"\n  ],\n  //-----让eslint支持 JSX end\n\n\n  /**\n   * \"off\" 或 0 - 关闭规则\n   * \"warn\" 或 1 - 开启规则，使用警告级别的错误：warn (不会导致程序退出),\n   * \"error\" 或 2 - 开启规则，使用错误级别的错误：error (当被触发的时候，程序会退出)\n   */\n  \"rules\": {\n\n      ////////////////\n      // 可能的错误 //\n      ////////////////\n\n      // 禁止条件表达式中出现赋值操作符\n      \"no-cond-assign\": 2,\n      // 禁用 console\n      \"no-console\": 0,\n      // 禁止在条件中使用常量表达式\n      // if (false) {\n      // doSomethingUnfinished();\n      // } //cuowu\n      \"no-constant-condition\": 2,\n      // 禁止在正则表达式中使用控制字符 ：new RegExp(\"\\x1f\")\n      \"no-control-regex\": 2,\n      // 数组和对象键值对最后一个逗号， never参数：不能带末尾的逗号, always参数：必须带末尾的逗号，\n      // always-multiline：多行模式必须带逗号，单行模式不能带逗号\n      \"comma-dangle\": [1, \"never\"],\n      // 禁用 debugger\n      \"no-debugger\": 2,\n      // 禁止 function 定义中出现重名参数\n      \"no-dupe-args\": 2,\n      // 禁止对象字面量中出现重复的 key\n      \"no-dupe-keys\": 2,\n      // 禁止重复的 case 标签\n      \"no-duplicate-case\": 2,\n      // 禁止空语句块\n      \"no-empty\": 2,\n      // 禁止在正则表达式中使用空字符集 (/^abc[]/)\n      \"no-empty-character-class\": 2,\n      // 禁止对 catch 子句的参数重新赋值\n      \"no-ex-assign\": 2,\n      // 禁止不必要的布尔转换\n      \"no-extra-boolean-cast\": 2,\n      // 禁止不必要的括号 //(a * b) + c;//报错\n      \"no-extra-parens\": 0,\n      // 禁止不必要的分号\n      \"no-extra-semi\": 2,\n      // 禁止对 function 声明重新赋值\n      \"no-func-assign\": 2,\n      // 禁止在嵌套的块中出现 function 或 var 声明\n      \"no-inner-declarations\": [2, \"functions\"],\n      // 禁止 RegExp 构造函数中无效的正则表达式字符串\n      \"no-invalid-regexp\": 2,\n      // 禁止在字符串和注释之外不规则的空白\n      \"no-irregular-whitespace\": 2,\n      // 禁止在 in 表达式中出现否定的左操作数\n      \"no-negated-in-lhs\": 2,\n      // 禁止把全局对象 (Math 和 JSON) 作为函数调用 错误：var math = Math();\n      \"no-obj-calls\": 2,\n      // 禁止直接使用 Object.prototypes 的内置属性\n      \"no-prototype-builtins\": 0,\n      // 禁止正则表达式字面量中出现多个空格\n      \"no-regex-spaces\": 2,\n      // 禁用稀疏数组\n      \"no-sparse-arrays\": 2,\n      // 禁止出现令人困惑的多行表达式\n      \"no-unexpected-multiline\": 2,\n      // 禁止在return、throw、continue 和 break语句之后出现不可达代码\n      \"no-unreachable\": 2,\n      // 要求使用 isNaN() 检查 NaN\n      \"use-isnan\": 2,\n      // 强制使用有效的 JSDoc 注释\n      \"valid-jsdoc\": 0,\n      // 强制 typeof 表达式与有效的字符串进行比较\n      // typeof foo === \"undefimed\" 错误\n      \"valid-typeof\": 2,\n\n\n      //////////////\n      // 最佳实践 //\n      //////////////\n\n      // 定义对象的set存取器属性时，强制定义get\n      \"accessor-pairs\": 2,\n      // 强制数组方法的回调函数中有 return 语句\n      \"array-callback-return\": 0,\n      // 强制把变量的使用限制在其定义的作用域范围内\n      \"block-scoped-var\": 0,\n      // 限制圈复杂度，也就是类似if else能连续接多少个\n      \"complexity\": [2, 20],\n      // 要求 return 语句要么总是指定返回的值，要么不指定\n      \"consistent-return\": 0,\n      // 强制所有控制语句使用一致的括号风格\n      \"curly\": [2, \"all\"],\n      // switch 语句强制 default 分支，也可添加 // no default 注释取消此次警告\n      \"default-case\": 2,\n      // 强制object.key 中 . 的位置，参数:\n      // property，'.'号应与属性在同一行\n      // object, '.' 号应与对象名在同一行\n      \"dot-location\": [2, \"property\"],\n      // 强制使用.号取属性\n      // 参数： allowKeywords：true 使用保留字做属性名时，只能使用.方式取属性\n      // false 使用保留字做属性名时, 只能使用[]方式取属性 e.g [2, {\"allowKeywords\": false}]\n      // allowPattern: 当属性名匹配提供的正则表达式时，允许使用[]方式取值,否则只能用.号取值 e.g [2, {\"allowPattern\": \"^[a-z]+(_[a-z]+)+$\"}]\n      \"dot-notation\": [2, {\n          \"allowKeywords\": false\n      }],\n      // 使用 === 替代 == allow-null允许null和undefined==\n      \"eqeqeq\": [0, \"allow-null\"],\n      // 要求 for-in 循环中有一个 if 语句\n      \"guard-for-in\": 2,\n      // 禁用 alert、confirm 和 prompt\n      \"no-alert\": 0,\n      // 禁用 arguments.caller 或 arguments.callee\n      \"no-caller\": 2,\n      // 不允许在 case 子句中使用词法声明\n      \"no-case-declarations\": 2,\n      // 禁止除法操作符显式的出现在正则表达式开始的位置\n      \"no-div-regex\": 2,\n      // 禁止 if 语句中有 return 之后有 else\n      \"no-else-return\": 0,\n      // 禁止出现空函数.如果一个函数包含了一条注释，它将不会被认为有问题。\n      \"no-empty-function\": 2,\n      // 禁止使用空解构模式no-empty-pattern\n      \"no-empty-pattern\": 2,\n      // 禁止在没有类型检查操作符的情况下与 null 进行比较\n      \"no-eq-null\": 1,\n      // 禁用 eval()\n      \"no-eval\": 2,\n      // 禁止扩展原生类型\n      \"no-extend-native\": 2,\n      // 禁止不必要的 .bind() 调用\n      \"no-extra-bind\": 2,\n      // 禁用不必要的标签\n      \"no-extra-label:\": 0,\n      // 禁止 case 语句落空\n      \"no-fallthrough\": 2,\n      // 禁止数字字面量中使用前导和末尾小数点\n      \"no-floating-decimal\": 2,\n      // 禁止使用短符号进行类型转换(!!fOO)\n      \"no-implicit-coercion\": 0,\n      // 禁止在全局范围内使用 var 和命名的 function 声明\n      \"no-implicit-globals\": 1,\n      // 禁止使用类似 eval() 的方法\n      \"no-implied-eval\": 2,\n      // 禁止 this 关键字出现在类和类对象之外\n      \"no-invalid-this\": 0,\n      // 禁用 __iterator__ 属性\n      \"no-iterator\": 2,\n      // 禁用标签语句\n      \"no-labels\": 2,\n      // 禁用不必要的嵌套块\n      \"no-lone-blocks\": 2,\n      // 禁止在循环中出现 function 声明和表达式\n      \"no-loop-func\": 1,\n      // 禁用魔术数字(3.14什么的用常量代替)\n      \"no-magic-numbers\": [1, {\n          \"ignore\": [0, -1, 1]\n      }],\n      // 禁止使用多个空格\n      \"no-multi-spaces\": 2,\n      // 禁止使用多行字符串，在 JavaScript 中，可以在新行之前使用斜线创建多行字符串\n      \"no-multi-str\": 2,\n      // 禁止对原生对象赋值\n      \"no-native-reassign\": 2,\n      // 禁止在非赋值或条件语句中使用 new 操作符\n      \"no-new\": 2,\n      // 禁止对 Function 对象使用 new 操作符\n      \"no-new-func\": 0,\n      // 禁止对 String，Number 和 Boolean 使用 new 操作符\n      \"no-new-wrappers\": 2,\n      // 禁用八进制字面量\n      \"no-octal\": 2,\n      // 禁止在字符串中使用八进制转义序列\n      \"no-octal-escape\": 2,\n      // 不允许对 function 的参数进行重新赋值\n      \"no-param-reassign\": 0,\n      // 禁用 __proto__ 属性\n      \"no-proto\": 2,\n      // 禁止使用 var 多次声明同一变量\n      \"no-redeclare\": 2,\n      // 禁用指定的通过 require 加载的模块\n      \"no-return-assign\": 0,\n      // 禁止使用 javascript: url\n      \"no-script-url\": 0,\n      // 禁止自我赋值\n      \"no-self-assign\": 2,\n      // 禁止自身比较\n      \"no-self-compare\": 2,\n      // 禁用逗号操作符\n      \"no-sequences\": 2,\n      // 禁止抛出非异常字面量\n      \"no-throw-literal\": 2,\n      // 禁用一成不变的循环条件\n      \"no-unmodified-loop-condition\": 2,\n      // 禁止出现未使用过的表达式\n      \"no-unused-expressions\": 0,\n      // 禁用未使用过的标签\n      \"no-unused-labels\": 2,\n      // 禁止不必要的 .call() 和 .apply()\n      \"no-useless-call\": 2,\n      // 禁止不必要的字符串字面量或模板字面量的连接\n      \"no-useless-concat\": 0,\n      // 禁用不必要的转义字符\n      \"no-useless-escape\": 0,\n      // 禁用 void 操作符\n      \"no-void\": 0,\n      // 禁止在注释中使用特定的警告术语\n      \"no-warning-comments\": 0,\n      // 禁用 with 语句\n      \"no-with\": 2,\n      // 强制在parseInt()使用基数参数\n      \"radix\": 2,\n      // 要求所有的 var 声明出现在它们所在的作用域顶部\n      \"vars-on-top\": 0,\n      // 要求 IIFE 使用括号括起来\n      \"wrap-iife\": [2, \"any\"],\n      // 要求或禁止 “Yoda” 条件\n      \"yoda\": [2, \"never\"],\n      // 要求或禁止使用严格模式指令\n      \"strict\": 0,\n\n\n      //////////////\n      // 变量声明 //\n      //////////////\n\n      // 要求或禁止 var 声明中的初始化(初值)\n      \"init-declarations\": 0,\n      // 不允许 catch 子句的参数与外层作用域中的变量同名\n      \"no-catch-shadow\": 0,\n      // 禁止删除变量\n      \"no-delete-var\": 2,\n      // 不允许标签与变量同名\n      \"no-label-var\": 2,\n      // 禁用特定的全局变量\n      \"no-restricted-globals\": 0,\n      // 禁止 var 声明 与外层作用域的变量同名\n      \"no-shadow\": 0,\n      // 禁止覆盖受限制的标识符\n      \"no-shadow-restricted-names\": 2,\n      // 禁用未声明的变量，除非它们在 /*global */ 注释中被提到\n      \"no-undef\": 2,\n      // 禁止将变量初始化为 undefined\n      \"no-undef-init\": 2,\n      // 禁止将 undefined 作为标识符\n      \"no-undefined\": 0,\n      // 禁止出现未使用过的变量\n      \"no-unused-vars\": [2, {\n          \"vars\": \"all\",\n          \"args\": \"none\"\n      }],\n      // 不允许在变量定义之前使用它们\n      \"no-use-before-define\": 0,\n\n      //////////////////////////\n      // Node.js and CommonJS //\n      //////////////////////////\n\n      // require return statements after callbacks\n      \"callback-return\": 0,\n      // 要求 require() 出现在顶层模块作用域中\n      \"global-require\": 1,\n      // 要求回调函数中有容错处理\n      \"handle-callback-err\": [2, \"^(err|error)$\"],\n      // 禁止混合常规 var 声明和 require 调用\n      \"no-mixed-requires\": 0,\n      // 禁止调用 require 时使用 new 操作符\n      \"no-new-require\": 2,\n      // 禁止对 __dirname 和 __filename进行字符串连接\n      \"no-path-concat\": 0,\n      // 禁用 process.env\n      \"no-process-env\": 0,\n      // 禁用 process.exit()\n      \"no-process-exit\": 0,\n      // 禁用同步方法\n      \"no-sync\": 0,\n\n      //////////////\n      // 风格指南 //\n      //////////////\n\n      // 指定数组的元素之间要以空格隔开(, 后面)， never参数：[ 之前和 ] 之后不能带空格，always参数：[ 之前和 ] 之后必须带空格\n      \"array-bracket-spacing\": [2, \"never\"],\n      // 禁止或强制在单行代码块中使用空格(禁用)\n      \"block-spacing\": [1, \"never\"],\n      //强制使用一致的缩进 第二个参数为 \"tab\" 时，会使用tab，\n      // if while function 后面的{必须与if在同一行，java风格。\n      \"brace-style\": [2, \"1tbs\", {\n          \"allowSingleLine\": true\n      }],\n      // 双峰驼命名格式\n      \"camelcase\": 2,\n      // 控制逗号前后的空格\n      \"comma-spacing\": [2, {\n          \"before\": false,\n          \"after\": true\n      }],\n      // 控制逗号在行尾出现还是在行首出现 (默认行尾)\n      // http://eslint.org/docs/rules/comma-style\n      \"comma-style\": [2, \"last\"],\n      //\"SwitchCase\" (默认：0) 强制 switch 语句中的 case 子句的缩进水平\n      // 以方括号取对象属性时，[ 后面和 ] 前面是否需要空格, 可选参数 never, always\n      \"computed-property-spacing\": [2, \"never\"],\n      // 用于指统一在回调函数中指向this的变量名，箭头函数中的this已经可以指向外层调用者，应该没卵用了\n      // e.g [0,\"that\"] 指定只能 var that = this. that不能指向其他任何值，this也不能赋值给that以外的其他值\n      \"consistent-this\": [1, \"that\"],\n      // 强制使用命名的 function 表达式\n      \"func-names\": 0,\n      // 文件末尾强制换行\n      \"eol-last\": 2,\n      \"indent\": [2, 2, {\n          \"SwitchCase\": 1\n      }],\n      // 强制在对象字面量的属性中键和值之间使用一致的间距\n      \"key-spacing\": [2, {\n          \"beforeColon\": false,\n          \"afterColon\": true\n      }],\n      // 强制使用一致的换行风格\n      \"linebreak-style\": [1, \"unix\"],\n      // 要求在注释周围有空行 ( 要求在块级注释之前有一空行)\n      \"lines-around-comment\": [1, {\n          \"beforeBlockComment\": true\n      }],\n      // 强制一致地使用函数声明或函数表达式，方法定义风格，参数：\n      // declaration: 强制使用方法声明的方式，function f(){} e.g [2, \"declaration\"]\n      // expression：强制使用方法表达式的方式，var f = function() {} e.g [2, \"expression\"]\n      // allowArrowFunctions: declaration风格中允许箭头函数。 e.g [2, \"declaration\", { \"allowArrowFunctions\": true }]\n      \"func-style\": 0,\n      // 强制回调函数最大嵌套深度 5层\n      \"max-nested-callbacks\": [1, 5],\n      // 禁止使用指定的标识符\n      \"id-blacklist\": 0,\n      // 强制标识符的最新和最大长度\n      \"id-length\": 0,\n      // 要求标识符匹配一个指定的正则表达式\n      \"id-match\": 0,\n      // 强制在 JSX 属性中一致地使用双引号或单引号\n      \"jsx-quotes\": 0,\n      // 强制在关键字前后使用一致的空格 (前后腰需要)\n      \"keyword-spacing\": 2,\n      // 强制一行的最大长度\n      \"max-len\": [1, 200],\n      // 强制最大行数\n      \"max-lines\": 0,\n      // 强制 function 定义中最多允许的参数数量\n      \"max-params\": [1, 7],\n      // 强制 function 块最多允许的的语句数量\n      \"max-statements\": [1, 200],\n      // 强制每一行中所允许的最大语句数量\n      \"max-statements-per-line\": 0,\n      // 要求构造函数首字母大写 （要求调用 new 操作符时有首字母大小的函数，允许调用首字母大写的函数时没有 new 操作符。）\n      \"new-cap\": [2, {\n          \"newIsCap\": true,\n          \"capIsNew\": false\n      }],\n      // 要求调用无参构造函数时有圆括号\n      \"new-parens\": 2,\n      // 要求或禁止 var 声明语句后有一行空行\n      \"newline-after-var\": 0,\n      // 禁止使用 Array 构造函数\n      \"no-array-constructor\": 2,\n      // 禁用按位运算符\n      \"no-bitwise\": 0,\n      // 要求 return 语句之前有一空行\n      \"newline-before-return\": 0,\n      // 要求方法链中每个调用都有一个换行符\n      \"newline-per-chained-call\": 1,\n      // 禁用 continue 语句\n      \"no-continue\": 0,\n      // 禁止在代码行后使用内联注释\n      \"no-inline-comments\": 0,\n      // 禁止 if 作为唯一的语句出现在 else 语句中\n      \"no-lonely-if\": 0,\n      // 禁止混合使用不同的操作符\n      \"no-mixed-operators\": 0,\n      // 不允许空格和 tab 混合缩进\n      \"no-mixed-spaces-and-tabs\": 2,\n      // 不允许多个空行\n      \"no-multiple-empty-lines\": [2, {\n          \"max\": 2\n      }],\n      // 不允许否定的表达式\n      \"no-negated-condition\": 0,\n      // 不允许使用嵌套的三元表达式\n      \"no-nested-ternary\": 0,\n      // 禁止使用 Object 的构造函数\n      \"no-new-object\": 2,\n      // 禁止使用一元操作符 ++ 和 --\n      \"no-plusplus\": 0,\n      // 禁止使用特定的语法\n      \"no-restricted-syntax\": 0,\n      // 禁止 function 标识符和括号之间出现空格\n      \"no-spaced-func\": 2,\n      // 不允许使用三元操作符\n      \"no-ternary\": 0,\n      // 禁用行尾空格\n      \"no-trailing-spaces\": 2,\n      // 禁止标识符中有悬空下划线_bar\n      \"no-underscore-dangle\": 0,\n      // 禁止可以在有更简单的可替代的表达式时使用三元操作符\n      \"no-unneeded-ternary\": 2,\n      // 禁止属性前有空白\n      \"no-whitespace-before-property\": 0,\n      // 强制花括号内换行符的一致性\n      \"object-curly-newline\": 0,\n      // 强制在花括号中使用一致的空格\n      \"object-curly-spacing\": 0,\n      // 强制将对象的属性放在不同的行上\n      \"object-property-newline\": 0,\n      // 强制函数中的变量要么一起声明要么分开声明\n      \"one-var\": [2, {\n          \"initialized\": \"never\"\n      }],\n      // 要求或禁止在 var 声明周围换行\n      \"one-var-declaration-per-line\": 0,\n      // 要求或禁止在可能的情况下要求使用简化的赋值操作符\n      \"operator-assignment\": 0,\n      // 强制操作符使用一致的换行符\n      \"operator-linebreak\": [2, \"after\", {\n          \"overrides\": {\n              \"?\": \"before\",\n              \":\": \"before\"\n          }\n      }],\n      // 要求或禁止块内填充\n      \"padded-blocks\": 0,\n      // 要求对象字面量属性名称用引号括起来\n      \"quote-props\": 0,\n      // 强制使用一致的反勾号、双引号或单引号\n    //   \"quotes\": [2, \"single\",\"double\", \"avoid-escape\"],\n      // 要求使用 JSDoc 注释\n      \"require-jsdoc\": 0,\n      // 要求或禁止使用分号而不是 ASI（这个才是控制行尾部分号的，）\n      \"semi\": [0, \"always\"],\n      // 强制分号之前和之后使用一致的空格\n      \"semi-spacing\": 0,\n      // 要求同一个声明块中的变量按顺序排列\n      \"sort-vars\": 0,\n      // 强制在块之前使用一致的空格\n      \"space-before-blocks\": [2, \"always\"],\n      // 强制在 function的左括号之前使用一致的空格\n      \"space-before-function-paren\": [0, \"always\"],\n      // 强制在圆括号内使用一致的空格\n      \"space-in-parens\": [2, \"never\"],\n      // 要求操作符周围有空格\n      \"space-infix-ops\": 2,\n      // 强制在一元操作符前后使用一致的空格\n      \"space-unary-ops\": [2, {\n          \"words\": true,\n          \"nonwords\": false\n      }],\n      // 强制在注释中 // 或 /* 使用一致的空格\n      \"spaced-comment\": [2, \"always\", {\n          \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n      }],\n      // 要求或禁止 Unicode BOM\n      \"unicode-bom\": 0,\n      // 要求正则表达式被括号括起来\n      \"wrap-regex\": 0,\n\n      //////////////\n      // ES6.相关 //\n      //////////////\n\n      // 要求箭头函数体使用大括号\n      \"arrow-body-style\": 2,\n      // 要求箭头函数的参数使用圆括号\n      \"arrow-parens\": 0,\n      \"arrow-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 强制在子类构造函数中用super()调用父类构造函数，TypeScrip的编译器也会提示\n      \"constructor-super\": 0,\n      // 强制 generator 函数中 * 号周围使用一致的空格\n      \"generator-star-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 禁止修改类声明的变量\n      \"no-class-assign\": 2,\n      // 不允许箭头功能，在那里他们可以混淆的比较\n      \"no-confusing-arrow\": 0,\n      // 禁止修改 const 声明的变量\n      \"no-const-assign\": 2,\n      // 禁止类成员中出现重复的名称\n      \"no-dupe-class-members\": 2,\n      // 不允许复制模块的进口\n      \"no-duplicate-imports\": 0,\n      // 禁止 Symbol 的构造函数\n      \"no-new-symbol\": 2,\n      // 允许指定模块加载时的进口\n      \"no-restricted-imports\": 0,\n      // 禁止在构造函数中，在调用 super() 之前使用 this 或 super\n      \"no-this-before-super\": 2,\n      // 禁止不必要的计算性能键对象的文字\n      \"no-useless-computed-key\": 0,\n      // 要求使用 let 或 const 而不是 var\n      \"no-var\": 0,\n      // 要求或禁止对象字面量中方法和属性使用简写语法\n      \"object-shorthand\": 0,\n      // 要求使用箭头函数作为回调\n      \"prefer-arrow-callback\": 0,\n      // 要求使用 const 声明那些声明后不再被修改的变量\n      \"prefer-const\": 0,\n      // 要求在合适的地方使用 Reflect 方法\n      \"prefer-reflect\": 0,\n      // 要求使用扩展运算符而非 .apply()\n      \"prefer-spread\": 0,\n      // 要求使用模板字面量而非字符串连接\n      \"prefer-template\": 0,\n      // Suggest using the rest parameters instead of arguments\n      \"prefer-rest-params\": 0,\n      // 要求generator 函数内有 yield\n      \"require-yield\": 0,\n      // enforce spacing between rest and spread operators and their expressions\n      \"rest-spread-spacing\": 0,\n      // 强制模块内的 import 排序\n      \"sort-imports\": 0,\n      // 要求或禁止模板字符串中的嵌入表达式周围空格的使用\n      \"template-curly-spacing\": 1,\n      // 强制在 yield* 表达式中 * 周围使用空格\n      \"yield-star-spacing\": 2\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-tool-utils/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\ndist\ncoverage\n# ///////////////////////////\n\n"
  },
  {
    "path": "packages/chameleon-tool-utils/.istanbul.yml",
    "content": "\nverbose: false\ninstrumentation:\n    root: .\n    extensions:\n        - .js\n    default-excludes: true\n    excludes: [\n      '**/node_modules/**',\n      '**/test/**'\n    ]\n    embed-source: false\n    variable: __coverage__\n    compact: true\n    preserve-comments: false\n    complete-copy: false\n    save-baseline: false\n    baseline-file: ./coverage/coverage-baseline.json\n    include-all-sources: false\n    include-pid: false\n    es-modules: false\nreporting:\n    print: summary\n    reports:\n        - lcov\n    dir: ./coverage\n    watermarks:\n        statements: [50, 80]\n        lines: [50, 80]\n        functions: [50, 80]\n        branches: [50, 80]\n    report-config:\n        clover: {file: clover.xml}\n        cobertura: {file: cobertura-coverage.xml}\n        json: {file: coverage-final.json}\n        json-summary: {file: coverage-summary.json}\n        lcovonly: {file: lcov.info}\n        teamcity: {file: null, blockName: Code Coverage Summary}\n        text: {file: null, maxCols: 0}\n        text-lcov: {file: lcov.info}\n        text-summary: {file: null}\nhooks:\n    hook-run-in-context: false\n    post-require-hook: null\n    handle-sigint: false\ncheck:\n    global:\n        statements: 0\n        lines: 0\n        branches: 0\n        functions: 0\n        excludes: []\n    each:\n        statements: 0\n        lines: 0\n        branches: 0\n        functions: 0\n        excludes: []"
  },
  {
    "path": "packages/chameleon-tool-utils/.npmignore",
    "content": ".scripts/\ntest/\ngulpfile.js\ncoverage"
  },
  {
    "path": "packages/chameleon-tool-utils/.travis.yml",
    "content": "language: node_js\nnode_js:\n  - \"8\"\nscript:\n  - npm run cover\nafter_script: \"cat coverage/lcov.info | node_modules/coveralls/bin/coveralls.js\"\n"
  },
  {
    "path": "packages/chameleon-tool-utils/gulpfile.js",
    "content": "const gulp = require('gulp');\nconst uglify = require('gulp-uglify-es').default;\n\ngulp.task('build', function () {\n  gulp.src('src/**/**.js')\n    .pipe(uglify({\n      parse: {\n        bare_returns: true,\n\n      },\n      mangle: {\n        toplevel: true\n      },\n      compress: {\n        drop_console: true,\n        drop_debugger: true\n      }\n    }))\n    .pipe(gulp.dest('dist/'));\n});"
  },
  {
    "path": "packages/chameleon-tool-utils/package.json",
    "content": "{\n  \"author\": {\n    \"name\": \"Chameleon-Team\"\n  },\n  \"bundleDependencies\": false,\n  \"dependencies\": {\n    \"chalk\": \"^2.4.2\",\n    \"colors\": \"^1.3.0\",\n    \"de-indent\": \"^1.0.2\",\n    \"fs-extra\": \"^6.0.1\",\n    \"glob\": \"^7.1.2\",\n    \"hash-sum\": \"^1.0.2\",\n    \"he\": \"^1.2.0\",\n    \"lru-cache\": \"^4.1.3\",\n    \"resolve\": \"^1.10.0\"\n  },\n  \"deprecated\": false,\n  \"description\": \"chameleon-tool-utils\",\n  \"devDependencies\": {\n    \"chai\": \"^4.2.0\",\n    \"coveralls\": \"^2.11.9\",\n    \"eslint\": \"^5.9.0\",\n    \"gulp\": \"^3.9.1\",\n    \"gulp-uglify-es\": \"^1.0.4\",\n    \"istanbul\": \"^0.4.5\",\n    \"mocha\": \"^5.2.0\"\n  },\n  \"gitHead\": \"5ddcde4330774710f7646559446e008f7785ce00\",\n  \"license\": \"Apache\",\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"main\": \"src/index.js\",\n  \"name\": \"chameleon-tool-utils\",\n  \"scripts\": {\n    \"cover\": \"istanbul cover --report lcov node_modules/mocha/bin/_mocha -- test/*.test.js test/**/*.test.js\",\n    \"eslint\": \"eslint ./src\",\n    \"test\": \"mocha --recursive --reporter spec\",\n    \"break-test\": \"./node_modules/.bin/mocha  --inspect-brk --recursive --reporter spec\"\n  },\n  \"version\": \"1.0.8\"\n}"
  },
  {
    "path": "packages/chameleon-tool-utils/src/index.js",
    "content": "/* eslint-disable */\nconst fs = require('fs');\nconst path = require('path');\nconst pth = path;\nconst _exists = fs.existsSync || pth.existsSync;\nconst IS_WIN = process.platform.indexOf('win') === 0;\nconst glob = require('glob');\nvar TEMP_ROOT;\nconst fse = require('fs-extra');\nconst log = require('./log.js');\nconst cacheNumber = 100;\nconst cache = require('lru-cache')(cacheNumber);\nconst hash = require('hash-sum');\nconst splitParts = require('./lib/splitParts.js');\nconst childProcess = require('child_process');\nconst crypto = require('crypto');\n\nconst resolve = require('resolve');\n\nconst querystring = require('querystring');\nvar _ = module.exports = {}\n\n_.log = log;\n\n_.is = function (source, type) {\n  return Object.prototype.toString.call(source) === '[object ' + type + ']';\n};\n\n// 还是放在全局 保证单例，可能cli与loader中的utils版本不一致会用不同的utils\n_.isCli = function () {\n  return !!(global.cml && global.cml.__ISCML__ === true);\n}\n\n_.setCli = function (flag) {\n  global.cml.__ISCML__ = flag;\n}\n\n_.fse = fse;\n\n// 内置组件库名称\nlet builtinNpmName = 'chameleon-ui-builtin';\n\n// 内置组件库可设置\n_.setBuiltinNpmName = function(npmName) {\n  builtinNpmName = npmName;\n  return builtinNpmName;\n}\n\n// include 和script的src不支持别名查找 并且必须有后缀 window上不会加后缀\n_.resolveSync = function(filepath, requirePath) {\n  let fromCwd\n  try {\n    fromCwd = resolve.sync(requirePath, { basedir: path.dirname(filepath)})\n  } catch (e) {}\n  return fromCwd\n}\n\n/**\n * @param oldFilePath 旧文件路径\n * @param interfaceFilePath 新文件路径\n * @param requirePath require的路径\n */\n_.resolveInterfaceRequire = function(oldFilePath, newFilePath, requirePath) {\n  // 非相对路径不处理\n  if (requirePath[0] !== '.') {\n    return requirePath;\n  } else {\n    // 处理相对路径\n    const absPath = path.join(path.dirname(oldFilePath), requirePath);\n    let result = path.relative(path.dirname(newFilePath), absPath);\n    result = _.handleWinPath(result);\n    if (result[0] !== '.') {\n      result = './' + result;\n    }\n    return result;\n  }\n\n}\n\n/**\n * 对象枚举元素遍历，若merge为true则进行_.assign(obj, callback)，若为false则回调元素的key value index\n * @param  {Object}   obj      源对象\n * @param  {Function|Object} callback 回调函数|目标对象\n * @param  {Boolean}   merge    是否为对象赋值模式\n * @name map\n * @function\n */\n_.map = function (obj, callback, merge) {\n  var index = 0;\n  for (var key in obj) {\n    if (obj.hasOwnProperty(key)) {\n      if (merge) {\n        callback[key] = obj[key];\n      } else if (callback(key, obj[key], index++)) {\n        break;\n      }\n    }\n  }\n};\n\n/**\n * 将target合并到source上，新值为undefiend一样会覆盖掉原有数据\n * @param  {Object} source 源对象\n * @param  {Object} target 目标对象\n * @return {Object}        合并后的对象\n * @name merge\n * @function\n */\n_.merge = function (source, target) {\n  if (_.is(source, 'Object') && _.is(target, 'Object')) {\n    _.map(target, function (key, value) {\n      source[key] = _.merge(source[key], value);\n    });\n  } else {\n    source = target;\n  }\n  return source;\n};\n\n_.getTempRoot = function () {\n  if (!TEMP_ROOT) {\n    var list = ['CML_TEMP_DIR', 'HOME'];\n    var tmp;\n    for (var i = 0, len = list.length; i < len; i++) {\n      if ((tmp = process.env[list[i]])) {\n        break;\n      }\n    }\n    tmp = tmp || __dirname + '/../';\n    tmp = path.resolve(tmp + '/.chameleon');\n\n    _.setTempRoot(tmp);\n  }\n  return TEMP_ROOT;\n};\n\n_.getDevServerPath = function () {\n  return path.resolve(_.getTempRoot() + '/www');\n}\n\n\n_.setTempRoot = function (tmp) {\n  try {\n    TEMP_ROOT = tmp;\n    fse.ensureDirSync(tmp);\n  } catch (e) {\n    console.log(e);\n  }\n};\n\n/**\n * 判断文件是否存在。\n * @param {String} filepath 文件路径。\n * @name exist\n * @function\n */\n_.exists = fs.existsSync || pth.existsSync;\n\n/**\n * 是否为文件夹\n * @param  {String}  path 路径\n * @return {Boolean}      true为是\n * @name isDir\n * @function\n */\n_.isDir = function (path) {\n  return _.exists(path) && fs.statSync(path).isDirectory();\n};\n\n/**\n * 递归创建文件夹\n * @param  {String} path 路径\n * @param  {Number} mode 创建模式\n * @name mkdir\n * @function\n */\n_.mkdir = function (path, mode) {\n  if (typeof mode === 'undefined') {\n    // 511 === 0777\n    const maxPower = 511;\n    mode = maxPower & (~process.umask());\n  }\n  if (_exists(path)) {\n    return;\n  }\n  path.split('/').reduce(function (prev, next) {\n    if (prev && !_exists(prev)) {\n      fs.mkdirSync(prev, mode);\n    }\n    return prev + '/' + next;\n  });\n  if (!_exists(path)) {\n    fs.mkdirSync(path, mode);\n  }\n};\n\n/**\n * shell编码转义\n * @param  {String} 命令\n * @memberOf chameleon.utils\n * @name escapeShellArg\n * @function\n */\n_.escapeShellArg = function (cmd) {\n  return '\"' + cmd + '\"';\n};\n\n/**\n * 是否为windows系统\n * @return {Boolean}\n * @name isWin\n * @function\n */\n_.isWin = function () {\n  return IS_WIN;\n};\n\n_.open = function (path, callback) {\n  var cmd = cml.utils.escapeShellArg(path);\n  if (cml.utils.isWin()) {\n    cmd = 'start \"\" ' + cmd;\n  } else {\n    if (process.env.XDG_SESSION_COOKIE ||\n      process.env.XDG_CONFIG_DIRS ||\n      process.env.XDG_CURRENT_DESKTOP) {\n      cmd = 'xdg-open ' + cmd;\n    } else if (process.env.GNOME_DESKTOP_SESSION_ID) {\n      cmd = 'gnome-open ' + cmd;\n    } else {\n      cmd = 'open ' + cmd;\n    }\n  }\n  cml.log.notice(cmd)\n  childProcess.exec(cmd, callback);\n};\n\n_.isFile = function (filePath) {\n  if (fs.existsSync(filePath)) {\n    var fileStat = fs.statSync(filePath);\n    return fileStat.isFile();\n  } else {\n    return false;\n  }\n}\n\n_.isDirectory = function (filePath) {\n  if (fs.existsSync(filePath)) {\n    var fileStat = fs.statSync(filePath);\n    return fileStat.isDirectory();\n  } else {\n    return false;\n  }\n}\n\n\n/**\n * @param {String} filePath  cml文件位置 已经不再支持json文件\n * @param {String} confType 获取的类型 wx|web|weex\n * @return {String} fileContent\n */\n/* eslint-disable complexity */\n_.getJsonFileContent = function (filePath, confType) {\n  filePath = path.join(filePath);\n  let content = '';\n  if (~filePath.indexOf('.cml')) {\n    if (_.isFile(filePath)) {\n      let cmlFileContent = fs.readFileSync(filePath, {\n        encoding: 'utf-8'\n      });\n      content = _.getScriptContent({\n        content: cmlFileContent,\n        cmlType: 'json'\n      })\n      if (!content) {\n        _.log.error(`The file ${filePath}is not exist <script cml-type=\"json\"></script>`)\n      }\n    } else {\n      _.log.error(`There is no file:${filePath}`)\n    }\n  } else if (~['.wxml', '.axml', '.swan', '.qml','.ttml'].indexOf(path.extname(filePath))) {\n    let jsonFilePath = filePath.replace(/(\\.wxml|\\.axml|\\.swan|\\.qml|\\.ttml)/, '.json');\n    if (_.isFile(filePath)) {\n      let content = fs.readFileSync(jsonFilePath, {\n        encoding: 'utf-8'\n      });\n      let jsonObject = {}\n      try {\n        jsonObject = JSON.parse(content);\n      } catch (e) {\n        log.warn('JSON configThe in file：' + jsonFilePath + ' is not correct ');\n      }\n      return jsonObject;\n    } else {\n      _.log.error(`can't find the .json file corresponding to :${filePath}  `)\n    }\n  } else {\n    _.log.error(`The file :${filePath} is missing .json file corresponding to`)\n  }\n\n  let jsonObject = {}\n  try {\n    jsonObject = JSON.parse(content);\n  } catch (e) {\n    log.warn(`The .json file corresponding to :${filePath} is not correct`);\n  }\n  jsonObject = jsonObject || {};\n  let targetObject = jsonObject[confType] || {};\n  if (jsonObject.base) {\n    targetObject = _.merge(jsonObject.base, targetObject)\n  }\n  if (_.isCli()) {\n    let fileType = _.getCmlFileType(filePath, cml.projectRoot, confType);\n    if (fileType === 'app') {\n      targetObject.pages = targetObject.pages || [];\n      // 有配置路由文件，给app.json添加pages\n      let {routerConfig, hasError} = _.getRouterConfig();\n      if (!hasError) {\n        if (routerConfig.routes) {\n          routerConfig.routes.forEach(item => {\n            if (!~targetObject.pages.indexOf(item.path)) {\n              let itemPath = item.path;\n              // router.config.json中的pages写的是绝对路径，因为小程序中跳转的路径需要是绝对路径，但是app.json中的pages不能以/开头\n              if (itemPath[0] === '/') {\n                itemPath = itemPath.slice(1);\n              }\n              let usedPlatforms = item.usedPlatforms;\n              if(!usedPlatforms || (usedPlatforms && usedPlatforms.includes(confType))){\n                targetObject.pages.push(itemPath);\n              }\n            }\n          })\n        }\n      }\n      // 处理copyNpm 直接拷贝的pages\n      let copyNpm = cml.config.get().copyNpm && cml.config.get().copyNpm[confType];\n      if (copyNpm && copyNpm.length > 0) {\n        copyNpm.forEach(function(npmName) {\n          let packageJson = JSON.parse(fs.readFileSync(path.join(cml.projectRoot, 'node_modules', npmName, 'package.json'), {encoding: 'utf-8'}));\n          let cmlConfig = packageJson.cml && packageJson.cml[confType];\n          if (cmlConfig && cmlConfig.pages && cmlConfig.pages.length > 0) {\n            cmlConfig.pages.forEach(item => {\n              if (!~targetObject.pages.indexOf(item)) {\n                targetObject.pages.push(item);\n              } else {\n                cml.log.error(`page ${item} in ${npmName} is conflict in project!`)\n              }\n            })\n          }\n        })\n      }\n      // 处理subProject配置的npm包中cml项目的页面\n      let subProject = cml.config.get().subProject;\n      if (subProject && subProject.length > 0) {\n        subProject.forEach(function(item) {\n          let npmName = _.isString(item) ? item : item.npmName;\n          let npmRouterConfig = _.readsubProjectRouterConfig(cml.projectRoot, npmName);\n          npmRouterConfig.routes && npmRouterConfig.routes.forEach(item => {\n            let cmlFilePath = path.join(cml.projectRoot, 'node_modules', npmName, 'src', item.path + '.cml');\n            let routePath = _.getPureEntryName(cmlFilePath, confType, cml.projectRoot);\n            routePath = _.handleSpecialChar(routePath);\n            if (routePath[0] === '/') {\n              routePath = routePath.slice(1);\n            }\n            if (!~targetObject.pages.indexOf(routePath)) {\n              targetObject.pages.push(routePath);\n            } else {\n              cml.log.error(`page ${routePath} in ${npmName} is conflict in project!`)\n            }\n          })\n\n        })\n      }\n\n    } else if (fileType === 'component') {\n      targetObject.component = true;\n    } else {\n      delete targetObject.component;\n    }\n  } else {\n    // cli 外的如果加了page 为true,则为page  其他的component\n    if (targetObject.page === true) {\n      delete targetObject.page;\n    } else {\n      targetObject.component = true;\n    }\n  }\n  return targetObject;\n}\n/* eslint-disable complexity */\n\n\n// 获取路由配置文件对象\n_.getRouterConfig = function() {\n  // 有配置路由文件，给app.json添加pages\n  let routerConfigPath = path.join(cml.projectRoot, 'src/router.config.json');\n  let routerConfig = {};\n  let hasError = false;\n  try {\n    let content = fs.readFileSync(routerConfigPath, {\n      encoding: 'utf-8'\n    });\n    routerConfig = JSON.parse(content);\n  } catch (e) {\n    hasError = true;\n  }\n  return {\n    hasError,\n    routerConfig\n  };\n}\n\n// 获取子项目的路由配置\n_.getSubProjectRouter = function() {\n  let subProject = cml.config.get().subProject;\n  let subProjectMap = {};\n  if (subProject && subProject.length > 0) {\n    subProject.forEach(function(item) {\n      let npmName = _.isString(item) ? item : item.npmName;\n      let npmRouterConfig = _.readsubProjectRouterConfig(cml.projectRoot, npmName);\n      subProjectMap[npmName] = npmRouterConfig;\n    })\n  }\n  return subProjectMap;\n}\n\n// 分离文件\n_.splitParts = function ({\n  content,\n  options\n}) {\n\n  const cacheKey = hash(content)\n  let parts = cache.get(cacheKey)\n  if (parts) {\n    return parts;\n  }\n  parts = splitParts(content, options);\n  cache.set(cacheKey, parts);\n  return parts;\n}\n\n// 获取cmlType类型的script part\n_.getScriptPart = function ({\n  content,\n  options,\n  cmlType\n}) {\n  let parts = _.splitParts({\n    content,\n    options\n  });\n  let scripts = parts.script || [];\n  for (let i = 0; i < scripts.length; i++) {\n    let item = scripts[i];\n    if (item.cmlType === cmlType) {\n      return item;\n    }\n  }\n  return null\n}\n\n// 获取cmlType类型的script content\n_.getScriptContent = function ({\n  content,\n  options,\n  cmlType\n}) {\n  let part = _.getScriptPart({\n    content,\n    options,\n    cmlType\n  });\n  return part && part.content;\n}\n\n// 删除类型的script content\n_.deleteScript = function ({\n  content,\n  options,\n  cmlType\n}) {\n  let part = _.getScriptPart({\n    content,\n    options,\n    cmlType\n  });\n  if (part) {\n    content = content.slice(0, part.tagStart) + content.slice(part.tagEnd)\n  }\n  return content;\n}\n\n// 检查配置文件\n_.checkProjectConfig = function () {\n  /* istanbul ignore if  */\n  if (!cml.config.loaded) {\n    log.error('Chameleon command line should be excuted in the root directory or  there is short of the file :chameleon.config.js in the root directory   ')\n    process.exit();\n  }\n}\n\n// 获取项目中配置的npm componets组件\n_.getNpmComponents = function (cmlType, context) {\n  if (!_.isCli()) {\n    return []\n  }\n  cml.npmComponents = cml.npmComponents || {};\n\n  if (cml.npmComponents[cmlType]) {\n    return cml.npmComponents[cmlType];\n  }\n  // 配置的npmComponets,在生成wx的json文件和weex注册组件时还是要用处理\n  let npmComponents = [];\n\n  let cmlComponents = cml.config.get().cmlComponents || [];\n  if (cml.utils.is(cmlComponents, 'Array')) {\n    // 放入内置组件\n    cmlComponents = [...new Set(cmlComponents)];\n\n    cmlComponents.forEach(npmName => {\n      let packageFilePath = path.join(cml.projectRoot, 'node_modules', npmName, 'package.json');\n      let result = _.getOnePackageComponents(npmName, packageFilePath, cmlType, context);\n      npmComponents = npmComponents.concat(result)\n\n    })\n  } else {\n    throw new Error('The field : cmlComponents in chameleon.config.js should be arraytype ')\n  }\n\n  return cml.npmComponents[cmlType] = npmComponents;\n}\n\n\nconst cacheBuildIn = {};\n// 获取内置组件的数据\n_.getBuildinComponents = function (cmlType, context) {\n  if (cacheBuildIn[cmlType]) {\n    return cacheBuildIn[cmlType];\n  }\n  let newNpmName = builtinNpmName;\n  if (_.isCli() && cml.extPlatformPlugin && cml.extPlatformPlugin[cmlType]) {\n    newNpmName = cml.extPlatformPlugin[cmlType].builtinUINpmName || newNpmName;\n  }\n  let packageFilePath = path.join(context, 'node_modules', newNpmName, 'package.json');\n  let result = _.getOnePackageComponents(newNpmName, packageFilePath, cmlType, context);\n  let compileTagMap = {};\n  // 内置组件的componet name需要特殊处理，并且挂在cml上给模板编译做处理\n  result.forEach(item => {\n    let newName = `cml-buildin-${item.name}`;\n    compileTagMap[item.name] = newName;\n    item.name = newName;\n    item.builtInOriginName = item.name;\n    item.isBuiltin = true;\n\n  })\n  return cacheBuildIn[cmlType] = {\n    components: result,\n    compileTagMap\n  }\n\n}\n\n// 获取这个组件要插入的组件\n_.getTargetInsertComponents = function (filePath, cmlType, context) {\n  filePath = path.join(filePath);\n  let result = [];\n\n  // 内建不需要插入\n  if (_.isBuildIn(filePath, cmlType, context)) {\n    return result;\n  }\n\n  // node_modules中的不自动引入\n  if (!~filePath.indexOf('node_modules')) {\n    let npmComponents = _.getNpmComponents(cmlType, context);\n    result = result.concat(npmComponents);\n  }\n  let buildIn = _.getBuildinComponents(cmlType, context);\n  result = result.concat(buildIn.components);\n\n  let targetFileDir = path.dirname(filePath);\n  // 删除自身的引用\n  result = result.filter(item => {\n    if (item) {\n      item.filePath = path.join(item.filePath);\n      let comdir = path.dirname(item.filePath);\n      return targetFileDir !== comdir;\n    }\n    return false;\n  })\n\n  return result;\n\n}\n\n\n/**\n * 是否是内置组件\n */\n_.isBuildIn = function (filePath, cmlType, context) {\n  let result = false;\n  if (_.isCli()) {\n    if (cml.config.get().isBuildInProject) {\n      result = true;\n    } else {\n      let {components} = _.getBuildinComponents(cmlType, context);\n      for (let i = 0; i < components.length; i++) {\n        if (filePath === components[i].filePath) {\n          result = true;\n          break;\n        }\n      }\n    }\n  } else {\n    if (~filePath.indexOf(builtinNpmName)) {\n      result = true;\n    }\n  }\n  return result;\n}\n\n// 给json文件添加npm和buildin的components\n_.addNpmComponents = function (jsonObject, jsonFile, cmlType, context) {\n\n  let npmComponents = _.getTargetInsertComponents(jsonFile, cmlType, context);\n  if (npmComponents.length) {\n    let coms = jsonObject.usingComponents = jsonObject.usingComponents ? jsonObject.usingComponents : {};\n    let customComsKeys = Object.keys(coms);\n    npmComponents.forEach(item => {\n      let npmcomName = item.name;\n      if (item.isBuiltin) {\n        npmcomName = item.name.replace('cml-buildin-', '');\n      }\n      // 如果自动引入的组件与用户自定义组件重名则不自动引入\n      if (!~customComsKeys.indexOf(npmcomName)) {\n        // refPath 改为相对路径\n        let refPath = _.npmRefPathToRelative(item.refPath, jsonFile, context);\n        coms[item.name] = refPath;\n      }\n    })\n  }\n\n}\n\n// 通过单个packages  寻找npm包中的interface入口的组件 单独的cml文件不会找到\n_.getOnePackageComponents = function (npmName, packageFilePath, cmlType, context) {\n  let components = [];\n  if (_.isFile(packageFilePath)) {\n    let packageFile = fs.readFileSync(packageFilePath);\n    let packageJson = JSON.parse(packageFile);\n    let main = '';\n    if (packageJson && packageJson.main) {\n      main = packageJson && packageJson.main;\n    }\n    // let cmlExtReg = new RegExp(`(\\\\.cml|\\\\.${cmlType}.cml)`)\n    // npm包中的多态组件也是以interface文件为入口进行查找，多态api无法找到对应cml文件\n    let globPath = path.join(context, 'node_modules', npmName, main, '/**/*.interface');\n    glob.sync(globPath).forEach(interfacePath => {\n      // 其他端的多态cml组件排除在外\n      let content = fs.readFileSync(interfacePath, {encoding: 'utf-8'});\n      let cmlFilePath = _.findPolymorphicComponent(interfacePath, content, cmlType);\n\n      if (_.isFile(cmlFilePath)) {\n        // 组件的名称是interface文件的名称\n        let comKey = _.deleteExt(path.basename(interfacePath));\n        components.push({\n          name: comKey,\n          filePath: cmlFilePath,\n          refPath: _.npmComponentRefPath(cmlFilePath, context)\n        })\n      }\n    })\n\n    // npm包中的组件库都是以interface为入口\n    // 多态组件之外 还有普通的cml组件 怎么判断  文件名中.cml 用.分隔后数组长度是2 后面是cml\n    // let cmlGlobPath = path.join(context, 'node_modules', npmName, main, '/**/*.cml');\n    // glob.sync(cmlGlobPath).forEach(cmlFilePath => {\n    //   // 其他端的多态cml组件排除在外\n    //   let paths = path.basename(cmlFilePath).split('.');\n    //   if (paths.length === 2 && paths[1] === 'cml') {\n    //     if (_.isFile(cmlFilePath)) {\n    //       let comKey = path.basename(cmlFilePath).replace(cmlExtReg, '');\n    //       components.push({\n    //         name: comKey,\n    //         filePath: cmlFilePath,\n    //         refPath: _.npmComponentRefPath(cmlFilePath, context)\n    //       })\n    //     }\n    //   }\n    // })\n  }\n\n  return components;\n\n}\n\n/**\n * @param root 项目根目录\n * @param cmlFilePath cml文件的绝对路径\n * @param comPath json文件中引用的组件的路径\n * @param cmlType cmlType   wx web weex\n * @return {\n *  filePath: 组件的绝对路径\n *  refUrl: 规范化后json文件中组件引用的路径\n * }\n */\n\n_.handleComponentUrl = function (context, cmlFilePath, comPath, cmlType) {\n  // plugin://  对于小程序插件不做处理\n  if (comPath.indexOf('plugin://') === 0) {\n    return {\n      filePath: '',\n      refUrl: comPath\n    }\n  }\n  let srcPath = path.join(context, 'src');\n  let npmPath = path.join(context, 'node_modules');\n  let refUrl = comPath; // json文件中引用的组件链接\n  let filePath; // 组件cml文件位置\n  let findFile = false;\n\n  // 相对路径查找\n  if (comPath[0] === '.') {\n    let cmlbasepath = path.dirname(cmlFilePath);\n    filePath = path.resolve(cmlbasepath, comPath);\n\n    let extPath = _.findComponent(filePath, cmlType);\n    if (extPath) {\n      filePath = extPath;\n      findFile = true;\n    }\n  } else {\n    // src目录\n    filePath = path.join(srcPath, comPath);\n    let extPath = _.findComponent(filePath, cmlType);\n    if (extPath) {\n      filePath = extPath;\n      findFile = true;\n    } else {\n      // 项目根目录下查找\n      filePath = path.join(context, comPath);\n      let extPath = _.findComponent(filePath, cmlType);\n      if (extPath) {\n        filePath = extPath;\n        findFile = true;\n      } else {\n        // node_modules中查找\n        filePath = path.join(npmPath, comPath);\n        let extPath = _.findComponent(filePath, cmlType);\n        if (extPath) {\n          filePath = extPath;\n          findFile = true;\n        }\n      }\n    }\n  }\n  if (!findFile) {\n    if (_.isCli()) {\n      // 扩展查找组件方法\n      const result = {\n        filePath: '',\n        refUrl\n      };\n      // 通过扩展找到文件\n      if (result.filePath && _.isFile(result.filePath)) {\n        return result;\n      }\n    }\n    return {\n      filePath: '',\n      refUrl\n    }\n  }\n  if (~filePath.indexOf('node_modules')) {\n    refUrl = _.npmComponentRefPath(filePath, context);\n    // 改为相对路径\n    refUrl = _.npmRefPathToRelative(refUrl, cmlFilePath, context);\n\n  } else {\n    // 改成相对路径\n    refUrl = _.handleRelativePath(cmlFilePath, filePath);\n  }\n\n  refUrl = _.deleteExt(refUrl);\n\n  if (cmlType === 'qq') {\n    refUrl = refUrl.replace(/\\.qml$/g, '');\n  }\n\n  return {\n    refUrl,\n    filePath\n  }\n\n}\n\n// 记录多态cml文件对应的interface文件的路径及\nconst RecordCml2Interface = _.RecordCml2Interface = {};\n\n// 判断不带后缀的文件路径是否存在\n// filePath  是不带后缀的文件路径\n_.findComponent = function (filePath, cmlType) {\n\n  // 如果没有传递cmlType  默认是interface  这个情况是给cmllint用的 构建必须传cmlType\n  // cml-linter 需要获取interface文件\n  if (cmlType === 'interface') {\n    let interfaceFile = filePath + '.interface';\n    if (_.isFile(interfaceFile)) {\n      return interfaceFile;\n    } else {\n      return false;\n    }\n  }\n\n  /**\n   * 1 .interface 文件   遍历寻找到interface的内容  遍历寻找到当前cmlType的多态cml文件的真实路径  然后内存中记录这个多态cml文件对应的interface文件内容与依赖的文件 在处理多态cml组件是添加dev依赖\n   * 2 .cml 文件\n   *  */\n\n  // 1\n  // 记录多态组件依赖的第一级interface文件 编译cml文件时再根据这个interface文件查找接口定义\n  // 不保存接口定义的代码，这样保证interface变化 触发cml编译 重新编译时重新或者接口定义\n  let interfacePath = filePath + '.interface';\n\n  if (_.isFile(interfacePath)) {\n    let content = fs.readFileSync(interfacePath, {encoding: 'utf-8'});\n\n    // 多态文件路径\n    let polymorphicComponentPath = _.findPolymorphicComponent(interfacePath, content, cmlType);\n\n    if (polymorphicComponentPath) {\n      return polymorphicComponentPath;\n    }\n  }\n\n  // 2\n  let cmlFilePath = filePath + '.cml';\n  if (_.isFile(cmlFilePath)) {\n    return cmlFilePath;\n  }\n\n  // 3\n  let fileExtMap = {\n    weex: ['.vue', '.js'],\n    web: ['.vue', '.js'],\n    wx: '.wxml',\n    baidu: '.swan',\n    alipay: '.axml',\n    qq: '.qml',\n    tt: '.ttml'\n  }\n\n  let ext = fileExtMap[cmlType];\n  if (ext) {\n    if (typeof ext === 'string') {\n      ext = [ext];\n    }\n    for (let i = 0; i < ext.length; i++) {\n      let extFilePath = filePath + ext[i];\n      if (_.isFile(extFilePath)) {\n        return extFilePath;\n      }\n    }\n  }\n\n  let result = {\n    cmlType,\n    filePath,\n    extPath: ''\n  }\n  // 4 扩展端原生组件\n  if (_.isCli()) {\n    cml.event.emit('find-component', result);\n  }\n  if (result.extPath) {\n    return result.extPath;\n  }\n  return false;\n}\n\n\n// 根据interface寻找多态组件路径 多态组件优先级 · 1 interface文件中指定  2 未指定找同名多态cml文件  3 include中查找\n_.findPolymorphicComponent = function(interfacePath, content, cmlType) {\n\n  function find(interfacePath, content, cmlType) {\n    let parts = _.splitParts({content});\n    let include = [];\n    for (let i = 0;i < parts.customBlocks.length;i++) {\n      if (parts.customBlocks[i].type === 'include') {\n        include.push(parts.customBlocks[i]);\n      }\n    }\n    let targetScript = null;\n    for (let i = 0;i < parts.script.length;i++) {\n      if (~parts.script[i].cmlType.split(',').indexOf(cmlType)) {\n        targetScript = parts.script[i];\n      }\n    }\n    // interface文件中script src 指定\n    if (targetScript && targetScript.attrs && targetScript.attrs.src) {\n      let cmlFilePath = _.resolveSync(interfacePath, targetScript.attrs.src);\n      let reg = new RegExp('\\\\.cml$'); // 只要是.cml文件就可以 不限制多态文件名称\n      // let reg = new RegExp(`\\\\.${cmlType}\\\\.cml$`);\n      // 获取npm包中的组件时 只能够根据interface文件去查找 无法区分是多态组件还是接口 如果找到了组件就返回 找不到就返回空\n      if (reg.test(cmlFilePath)) {\n        return cmlFilePath;\n      }\n      return;\n    }\n    // 同名文件\n    let sameNamePath = interfacePath.replace(/\\.interface$/, `.${cmlType}.cml`);\n    if (_.isFile(sameNamePath)) {\n      return sameNamePath;\n    }\n    // include中查找\n    for (let i = include.length - 1; i >= 0; i--) {\n      let item = include[i];\n      let includeFilePath = _.resolveSync(interfacePath, item.attrs.src);\n      if (!_.isFile(includeFilePath)) {\n        throw new Error(`${includeFilePath} is not a file in : ${interfacePath}`);\n      }\n      let newContent = fs.readFileSync(includeFilePath, {encoding: 'utf-8'});\n      return find(includeFilePath, newContent, cmlType);\n    }\n  }\n\n  let cmlFilePath = find(interfacePath, content, cmlType);\n  if (cmlFilePath) {\n    RecordCml2Interface[cmlFilePath] = interfacePath;\n  }\n  return cmlFilePath;\n}\n// 提供给cml-lint使用 cml-lint不知道cmlType\n_.lintHandleComponentUrl = function(context, cmlFilePath, comPath) {\n  let cmlTypeList = ['wx', 'web', 'weex', 'alipay', 'baidu', 'qq'];\n  for (let i = 0; i < cmlTypeList.length; i++) {\n    let cmlType = cmlTypeList[i];\n    let result = _.handleComponentUrl(context, cmlFilePath, comPath, cmlType);\n    if (result.filePath) {\n      // 如果是.cml并且不是多态的cml文件\n      // let cmlReg = new RegExp(`\\\\.${cmlType}\\\\.cml$`)\n      // if (/\\.cml$/.test(result.filePath) && !cmlReg.test(result.filePath)) {\n      //   result.isCml = true;\n      // }\n      if (/\\.cml$/.test(result.filePath) && !_.RecordCml2Interface[result.filePath]) {\n        result.isCml = true;\n      }\n      return result;\n    }\n  }\n\n  return {\n    filePath: '',\n    refUrl: comPath\n  }\n}\n\n// 查找interface文件 cml-linter需要\n_.findInterfaceFile = function(context, cmlFilePath, comPath) {\n  return _.handleComponentUrl(context, cmlFilePath, comPath, 'interface');\n}\n\n/**\n * @description 将/npm 的组件引用改为相对路径\n * @param npmRefPath npm绝对引用路径  /npm/cml-ui/button/button\n * @param cmlFilePath cml文件路径\n * @param context 项目根目录\n */\n_.npmRefPathToRelative = function(npmRefPath, cmlFilePath, context) {\n  if (npmRefPath[0] === '/') {\n    let entryPath = _.getEntryPath(cmlFilePath, context);\n    // pages/index/index.cml  derLength = 2\n    let dirLength = entryPath.split('/').length - 1;\n    let relativePath = './';\n    for (let i = 0; i < dirLength; i++) {\n      relativePath += '../';\n    }\n    npmRefPath = npmRefPath.slice(1);\n    npmRefPath = relativePath + npmRefPath;\n    return npmRefPath;\n  } else {\n    return npmRefPath;\n  }\n}\n\n// 处理npm中组件的引用路径 root是项目根目录 得到的是绝对路径/npm\n_.npmComponentRefPath = function (componentAbsolutePath, context) {\n  let refUrl = '';\n  refUrl = path.relative(context, componentAbsolutePath);\n  refUrl = refUrl.replace('node_modules', 'npm');\n  refUrl = _.handleWinPath(refUrl);\n  if (refUrl[0] !== '/') {\n    refUrl = '/' + refUrl\n  }\n  // refUrl = refUrl.replace(/(\\.cml|\\.web\\.cml|\\.alipay\\.cml|\\.baidu\\.cml|\\.wx\\.cml|\\.weex\\.cml)/, '');\n  refUrl = _.deleteExt(refUrl);\n  return refUrl;\n\n}\n\n/**\n * @param  {String} sourcePath 源文件地址 绝对路径\n * @param  {String} targetPath 目标文件地址  绝对路径\n * @param  {String} 目标文件相对源文件的相对路径\n */\n_.handleRelativePath = function(sourcePath, targetPath) {\n  sourcePath = path.join(sourcePath);\n  targetPath = path.join(targetPath);\n  let relativePath = path.relative(sourcePath, targetPath);\n\n  if (relativePath == '..' || relativePath == '.') {\n    relativePath = ''\n  } else {\n\n    if (_.isWin()) { // windows特殊处理下\n      !path.isAbsolute(relativePath) && (relativePath = relativePath.slice(3));// eslint-disable-line\n    } else {\n      relativePath = relativePath.slice(3); // eslint-disable-line\n    }\n  }\n  relativePath = _.handleWinPath(relativePath);\n  // 不是绝对路径都加上./  否则同一目录文件引用有问题  这里的路径是给代码中使用 统一处理成正斜杠\n  if (!path.isAbsolute(relativePath)) {\n    relativePath = './' + relativePath;\n  }\n  return relativePath;\n}\n\n\n_.handleWinPath = function (url) {\n  if (_.isWin()) {\n    url = url.replace(/\\\\/g, '/');\n  }\n  return url;\n}\n\n/**\n * cml 插件，仅支持同步\n * 注册插件\n * @param  {[String]} pluginKey [插件key]\n * @param  {[any]} pluginParams      [插件所需数据]\n * @param  {[Function]} callback    [插件完成后的回调]\n */\n_.applyPlugin = function (pluginKey, pluginParams, callback) {\n  callback && cml.event.on(getPluginKey('2', pluginKey), callback);\n  cml.event.emit(getPluginKey('1', pluginKey), pluginParams);\n}\n\n/**\n * 调用插件\n * @param  {[String]} pluginKey [插件key]\n * @param  {[Function]} handle(pluginParams, callback)  [插件执行的内容]\n *         handle~pluginParams: [插件所需数据]\n *         handle~callback(data):     [插件完成后执行回调]\n *         handle~callback~data:      [插件处理后的数据传给cml主程序]\n */\n_.plugin = function (pluginKey, handle) {\n  cml.event.on(getPluginKey('1', pluginKey), function (pluginParams) {\n    handle(pluginParams, function (data) {\n      cml.event.emit(getPluginKey('2', pluginKey), data);\n    });\n  });\n}\n\nfunction getPluginKey(type, key) {\n  return `__${type === '1' ? 'plugineventout' : 'plugineventin'}__${key}__`;\n}\n\n\n// 获取export模式的入口cml文件\n_.getExportEntry = function (cmlType, context, entry = []) {\n  let exportFiles = [];\n  function addExport(filePath) {\n    if (_.isFile(filePath) && !~exportFiles.indexOf(filePath)) {\n      exportFiles.push(filePath);\n    }\n  }\n  if (entry && entry.length > 0) {\n    entry.forEach(item => {\n      let filePath = path.join(context, item);\n      // cml文件插入\n      if (_.isFile(filePath)) {\n        if (path.extname(filePath) === '.cml') {\n          exportFiles.push(filePath);\n        } else if (path.extname(filePath) === '.interface') {\n          let content = fs.readFileSync(filePath, {encoding: 'utf-8'});\n          let cmlFilePath = _.findPolymorphicComponent(filePath, content, cmlType);\n          addExport(cmlFilePath);\n        }\n      } else if (_.isDirectory(filePath)) {\n        let cmlFilePath = path.join(filePath, '**/*.cml');\n        let interfaceFilePath = path.join(filePath, '**/*.interface');\n        // 1 先找interface指定的多态组件\n        // 2 再找cml文件 不能根据文件名称区分端，如果所有cml文件 也会把其他端多态组件引入，所以取只有一个逗号的cml文件为非多态组件\n        // 获取重复添加入口时有校验\n        glob.sync(interfaceFilePath).forEach(interfacePath => {\n          // 其他端的多态cml组件排除在外\n          let content = fs.readFileSync(interfacePath, {encoding: 'utf-8'});\n          let cmlFilePath = _.findPolymorphicComponent(interfacePath, content, cmlType);\n          addExport(cmlFilePath);\n        })\n\n        glob.sync(cmlFilePath).forEach(item => {\n          let basename = path.basename(item);\n          if (basename.split('.').length === 2) {\n            addExport(item);\n          }\n        })\n      }\n    })\n  } else {\n    _.log.warn('please assign the entry of what you want to export')\n  }\n  if (exportFiles.length == 0) {\n    throw new Error('can\\'t find the entry file that you want to export')\n  }\n  return exportFiles;\n}\n\n\n/**\n * 根据cml文件路径获取webpack入口entry名称\n * /user/didi/cml/src/pages/index/index.cml to pages/index/index\n  /user/didi/cml/node_modules/cml-ui/toast/toast.cml to npm/cml-ui/toast/toast\n */\n_.getPureEntryName = function (cmlFilePath, cmlType, context) {\n  let entryPath = _.getEntryPath(cmlFilePath, context);\n  // let cmlExtReg = new RegExp(`(\\\\.cml|\\\\.${cmlType}.cml)`);\n  // if (cmlType === 'wx') {\n  //   entryPath = entryPath.replace(/\\.wxml/g, '');\n  // }\n  // if (cmlType === 'alipay') {\n  //   entryPath = entryPath.replace(/\\.axml/g, '');\n  // }\n  // if (cmlType === 'baidu') {\n  //   entryPath = entryPath.replace(/\\.swan/g, '');\n  // }\n  return _.deleteExt(entryPath);\n  // return entryPath.replace(cmlExtReg, '');\n}\n\n/**\n * 获取文件生成的路径 去除项目根目录和node_modules的路径 带有文件后缀，weback入口与生成小程序文件中使用\n/user/didi/cml/src/pages/index/index.cml to pages/index/index.cml\n/user/didi/cml/node_modules/cml-ui/toast/toast.cml to npm/cml-ui/toast/toast.cml\n*/\n_.getEntryPath = function (filePath, context) {\n  let root = context;\n  let projectPath = path.resolve(root, 'src');\n  let entryName;\n  if (~filePath.indexOf('node_modules')) {\n    entryName = path.relative(root, filePath);\n    entryName = entryName.replace('node_modules', 'npm');\n  } else {\n    entryName = path.relative(projectPath, filePath);\n  }\n  entryName = _.handleWinPath(entryName);\n  return entryName;\n}\n\n/**\n * 获取cml文件的类型\n * @param cmlFilePath   cml文件的路径\n * @param context 项目根目录\n * @param cmlType 构建类型\n */\n_.getCmlFileType = function(cmlFilePath, context, cmlType) {\n  let type = '';\n  if (!_.isCli()) {\n    // 如果不是cli中 统一当做组件处理,目前cli外 的页不会调用该方法\n    type = 'component';\n  } else {\n    var entryName = _.getPureEntryName(cmlFilePath, cmlType, context);\n    if (entryName === 'app/app') {\n      type = 'app';\n    } else {\n      let subProject = cml.config.get().subProject || [];\n      let npmNames = subProject.map(item => {\n        let npmName = _.isString(item) ? item : item.npmName;\n        return 'node_modules/' + npmName\n      });\n      let subProjectIndex = -1;\n      for (let i = 0; i < npmNames.length; i++) {\n        //比如 配置 npmName: '@didi/cml-login',在windows中药改成对应的分隔符\n        if (_.isWin()) { // 修复windows平台下将npm页面全部解析成component的问题\n          npmNames[i] = npmNames[i].replace(/\\//g,'\\\\')\n        }\n        if (~cmlFilePath.indexOf(npmNames[i])) {\n          subProjectIndex = i;\n          break;\n        }\n      }\n      // 是subProject npm包中的cml文件 用subProject中的router.config.json判断\n      if (subProjectIndex != -1) {\n        let currentNpm = _.isString(subProject[subProjectIndex]) ? subProject[subProjectIndex] : subProject[subProjectIndex].npmName\n        let routerConfig = _.readsubProjectRouterConfig(context, currentNpm);\n        let pageFiles = routerConfig.routes.map(item => path.join(context, 'node_modules', currentNpm, 'src', item.path + '.cml'))\n        // 如果是配置的路由则是page\n        if (~pageFiles.indexOf(cmlFilePath)) {\n          type = 'page';\n        } else {\n          type = 'component';\n        }\n      } else {\n        // 不是subProject 中的cml文件走正常判断\n        let {routerConfig, hasError} = _.getRouterConfig();\n        if (!hasError) {\n          let routes = routerConfig.routes;\n          // 删除/\n          let pageNames = routes.map(item => {\n            if (item.path && item.path[0] == '/') {\n              return item.path.slice(1);\n            } else {\n              return '';\n            }\n          })\n          // 如果是配置的路由则是page\n          if (~pageNames.indexOf(entryName)) {\n            type = 'page';\n          } else {\n            type = 'component';\n          }\n        }\n      }\n\n    }\n  }\n  return type;\n\n}\n\n// 小程序中有文件夹有@符号无法上传\n_.handleSpecialChar = function (str) {\n  let result = str.replace(/\\@/g, '_')\n  return result\n}\n\n_.readsubProjectRouterConfig = function(context, npmName) {\n  return JSON.parse(fs.readFileSync(path.join(context, 'node_modules', npmName, 'src/router.config.json'), {encoding: 'utf-8'}))\n}\n\n\n_.createMd5 = function(content) {\n  let md5 = crypto.createHash('md5');\n  md5.update(content);\n  return md5.digest('hex');\n}\n\n// 给文件添加hash值\n_.addHashName = function(filePath, hashValue) {\n  let dirname = path.dirname(filePath);\n  let basename = path.basename(filePath);\n  let nameArray = basename.split('.');\n  if (nameArray.length > 1) {\n    nameArray[nameArray.length - 2] = nameArray[nameArray.length - 2] + '_' + hashValue;\n  } else {\n    nameArray[0] = nameArray[0] + '_' + hashValue;\n  }\n  basename = nameArray.join('.');\n  return path.join(dirname, basename);\n}\n\n_.delQueryPath = function(filePath) {\n  return filePath.split('?')[0];\n}\n\n_.splitFileName = function(filePath) {\n  let basename = path.basename(filePath.split('?')[0]);\n  return basename.split('.');\n}\n\n_.isInline = function(filePath) {\n  if (~filePath.indexOf('__inline')) {\n    return true;\n  }\n  return false;\n}\n\n// 删除cml文件的后缀 因为有了script src语法之后  .cmlType.cml的语法已经无法穷举，\n// 处理的文件分隔符为 /\n_.deleteExt = function(filePath) {\n  let splitArray = filePath.split(/\\/|\\\\/);\n\n  let basename = splitArray.pop();\n  basename = basename.split('.')[0];\n  splitArray.push(basename);\n  let result = splitArray.join('/')\n  return result;\n}\n\n\n_.isType = function(type, o) {\n  return Object.prototype.toString.call(o) === `[object ${type}]`\n}\n\n_.isArray = function(arr) {\n  return _.isType('Array', arr)\n}\n\n_.isPlainObject = function(obj) {\n  return _.isType('Object', obj);\n}\n\n_.isFunction = function(fun) {\n  return _.isType('Function', fun);\n}\n_.isString = function(str) {\n  return typeof str === 'string'\n}\n\n_.getDynamicInfo = function(query){\n  if(!query){\n    return {\n      dynamic:0,\n    }\n  }else{\n    return querystring.parse(query)\n  }\n}\n\n"
  },
  {
    "path": "packages/chameleon-tool-utils/src/lib/splitParts.js",
    "content": "var deindent = require('de-indent');\nvar he = require('he');\n\nfunction makeMap(\n  str,\n  expectsLowerCase\n) {\n  var map = Object.create(null);\n  var list = str.split(',');\n  for (var i = 0; i < list.length; i++) {\n    map[list[i]] = true;\n  }\n  return expectsLowerCase\n    ? function (val) {\n      return map[val.toLowerCase()];\n    }\n    : function (val) {\n      return map[val];\n    }\n}\n\n\n/**\n * Create a cached version of a pure function.\n */\nfunction cached(fn) {\n  var cache = Object.create(null);\n  return (function cachedFn(str) {\n    var hit = cache[str];\n    return hit || (cache[str] = fn(str))\n  })\n}\n\n/**\n * Camelize a hyphen-delimited string.\n */\nvar camelizeRE = /-(\\w)/g;\nvar camelize = cached(function (str) {\n  return str.replace(camelizeRE, function (_, c) {\n    return c ? c.toUpperCase() : '';\n  })\n});\n\n/**\n * Capitalize a string.\n */\n/**\n * Simple bind polyfill for environments that do not support it... e.g.\n * PhantomJS 1.x. Technically we don't need this anymore since native bind is\n * now more performant in most browsers, but removing it would be breaking for\n * code that was able to run in PhantomJS 1.x, so this must be kept for\n * backwards compatibility.\n */\n\n/* istanbul ignore next */\nfunction polyfillBind(fn, ctx) {\n  function boundFn(a) {\n    var l = arguments.length;\n    return l\n      ? l > 1\n        ? fn.apply(ctx, arguments)\n        : fn.call(ctx, a)\n      : fn.call(ctx)\n  }\n\n  boundFn._length = fn.length;\n  return boundFn\n}\n\n\n/**\n * Always return false.\n */\nvar no = function (a, b, c) {\n  return false;\n};\n\n\nvar isUnaryTag = makeMap(\n  'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +\n  'link,meta,param,source,track,wbr'\n);\n\n// Elements that you can, intentionally, leave open\n// (and which close themselves)\nvar canBeLeftOpenTag = makeMap(\n  'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source'\n);\n\n// HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3\n// Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content\nvar isNonPhrasingTag = makeMap(\n  'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' +\n  'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' +\n  'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' +\n  'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' +\n  'title,tr,track'\n);\n\n/**\n * Not type-checking this file because it's mostly vendor code.\n */\n\n/*!\n * HTML Parser By John Resig (ejohn.org)\n * Modified by Juriy \"kangax\" Zaytsev\n * Original code by Erik Arvidsson, Mozilla Public License\n * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js\n */\n\n// Regular Expressions for parsing tags and attributes\nvar attribute = /^\\s*([^\\s\"'<>\\/=]+)(?:\\s*(=)\\s*(?:\"([^\"]*)\"+|'([^']*)'+|([^\\s\"'=<>`]+)))?/;\n// could use https://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-QName\n// but for Vue templates we can enforce a simple charset\nvar ncname = '[a-zA-Z_][\\\\w\\\\-\\\\.]*';\nvar qnameCapture = \"((?:\" + ncname + \"\\\\:)?\" + ncname + \")\";\nvar startTagOpen = new RegExp((\"^<\" + qnameCapture));\nvar startTagClose = /^\\s*(\\/?)>/;\nvar endTag = new RegExp((\"^<\\\\/\" + qnameCapture + \"[^>]*>\"));\nvar doctype = /^<!DOCTYPE [^>]+>/i;\n// #7298: escape - to avoid being pased as HTML comment when inlined in page\nvar comment = /^<!\\--/;\nvar conditionalComment = /^<!\\[/;\n\nvar IS_REGEX_CAPTURING_BROKEN = false;\n'x'.replace(/x(.)?/g, function (m, g) {\n  IS_REGEX_CAPTURING_BROKEN = g === '';\n});\n\n// Special Elements (can contain anything)\nvar isPlainTextElement = makeMap('script,style,textarea', true);\nvar reCache = {};\n\nvar decodingMap = {\n  '&lt;': '<',\n  '&gt;': '>',\n  '&quot;': '\"',\n  '&amp;': '&',\n  '&#10;': '\\n',\n  '&#9;': '\\t'\n};\nvar encodedAttr = /&(?:lt|gt|quot|amp);/g;\nvar encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#10|#9);/g;\n\n// #5992\nvar isIgnoreNewlineTag = makeMap('pre,textarea', true);\nvar shouldIgnoreFirstNewline = function (tag, html) {\n  return tag && isIgnoreNewlineTag(tag) && html[0] === '\\n';\n};\n\nfunction decodeAttr(value, shouldDecodeNewlines) {\n  var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;\n  return value.replace(re, function (match) {\n    return decodingMap[match];\n  })\n}\n\nfunction parseHTML(html, options) {\n  var stack = [];\n  var expectHTML = options.expectHTML;\n  var isUnaryTag$$1 = options.isUnaryTag || no;\n  var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no;\n  var index = 0;\n  var last, lastTag;\n  while (html) {\n    last = html;\n    // Make sure we're not in a plaintext content element like script/style\n    if (!lastTag || !isPlainTextElement(lastTag)) {\n      var textEnd = html.indexOf('<');\n      if (textEnd === 0) {\n        // Comment:\n        if (comment.test(html)) {\n          var commentEnd = html.indexOf('-->');\n\n          if (commentEnd >= 0) {\n            if (options.shouldKeepComment) {\n              options.comment(html.substring(4, commentEnd));\n            }\n            advance(commentEnd + 3);\n            continue\n          }\n        }\n\n        // http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment\n        if (conditionalComment.test(html)) {\n          var conditionalEnd = html.indexOf(']>');\n\n          if (conditionalEnd >= 0) {\n            advance(conditionalEnd + 2);\n            continue\n          }\n        }\n\n        // Doctype:\n        var doctypeMatch = html.match(doctype);\n        if (doctypeMatch) {\n          advance(doctypeMatch[0].length);\n          continue\n        }\n\n        // End tag:\n        var endTagMatch = html.match(endTag);\n        if (endTagMatch) {\n          var curIndex = index;\n          advance(endTagMatch[0].length);\n          parseEndTag(endTagMatch[1], curIndex, index);\n          continue\n        }\n\n        // Start tag:\n        var startTagMatch = parseStartTag();\n        if (startTagMatch) {\n          handleStartTag(startTagMatch);\n          if (shouldIgnoreFirstNewline(lastTag, html)) {\n            advance(1);\n          }\n          continue\n        }\n      }\n\n      var text = (void 0);\n\n\n      var rest = (void 0);\n\n\n      var next = (void 0);\n      if (textEnd >= 0) {\n        rest = html.slice(textEnd);\n        while (\n          !endTag.test(rest) &&\n          !startTagOpen.test(rest) &&\n          !comment.test(rest) &&\n          !conditionalComment.test(rest)\n        ) {\n          // < in plain text, be forgiving and treat it as text\n          next = rest.indexOf('<', 1);\n          if (next < 0) {\n            break\n          }\n          textEnd += next;\n          rest = html.slice(textEnd);\n        }\n        text = html.substring(0, textEnd);\n        advance(textEnd);\n      }\n\n      if (textEnd < 0) {\n        text = html;\n        html = '';\n      }\n\n      if (options.chars && text) {\n        options.chars(text);\n      }\n    } else {\n      var endTagLength = 0;\n      var stackedTag = lastTag.toLowerCase();\n      var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\\\s\\\\S]*?)(</' + stackedTag + '[^>]*>)', 'i'));\n      var rest$1 = html.replace(reStackedTag, function (all, text, endTag) {\n        endTagLength = endTag.length;\n        if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') {\n          text = text\n            .replace(/<!\\--([\\s\\S]*?)-->/g, '$1') // #7298\n            .replace(/<!\\[CDATA\\[([\\s\\S]*?)]]>/g, '$1');\n        }\n        if (shouldIgnoreFirstNewline(stackedTag, text)) {\n          text = text.slice(1);\n        }\n        if (options.chars) {\n          options.chars(text);\n        }\n        return ''\n      });\n      index += html.length - rest$1.length;\n      html = rest$1;\n      parseEndTag(stackedTag, index - endTagLength, index);\n    }\n\n    if (html === last) {\n      options.chars && options.chars(html);\n      if (process.env.NODE_ENV !== 'production' && !stack.length && options.warn) {\n        options.warn((\"Mal-formatted tag at end of template: \\\"\" + html + \"\\\"\"));\n      }\n      break\n    }\n  }\n\n  // Clean up any remaining tags\n  parseEndTag();\n\n  function advance(n) {\n    index += n;\n    html = html.substring(n);\n  }\n\n  function parseStartTag() {\n    var start = html.match(startTagOpen);\n    if (start) {\n      var match = {\n        tagName: start[1],\n        attrs: [],\n        start: index\n      };\n      advance(start[0].length);\n      var end, attr;\n      while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) {\n        advance(attr[0].length);\n        match.attrs.push(attr);\n      }\n      if (end) {\n        match.unarySlash = end[1];\n        advance(end[0].length);\n        match.end = index;\n        return match\n      }\n    }\n  }\n\n  function handleStartTag(match) {\n    var tagName = match.tagName;\n    var unarySlash = match.unarySlash;\n\n    if (expectHTML) {\n      if (lastTag === 'p' && isNonPhrasingTag(tagName)) {\n        parseEndTag(lastTag);\n      }\n      if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) {\n        parseEndTag(tagName);\n      }\n    }\n\n    var unary = isUnaryTag$$1(tagName) || !!unarySlash;\n\n    var l = match.attrs.length;\n    var attrs = new Array(l);\n    for (var i = 0; i < l; i++) {\n      var args = match.attrs[i];\n      // hackish work around FF bug https://bugzilla.mozilla.org/show_bug.cgi?id=369778\n      if (IS_REGEX_CAPTURING_BROKEN && args[0].indexOf('\"\"') === -1) {\n        if (args[3] === '') {\n          delete args[3];\n        }\n        if (args[4] === '') {\n          delete args[4];\n        }\n        if (args[5] === '') {\n          delete args[5];\n        }\n      }\n      var value = args[3] || args[4] || args[5] || '';\n      var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href'\n        ? options.shouldDecodeNewlinesForHref\n        : options.shouldDecodeNewlines;\n      attrs[i] = {\n        name: args[1],\n        value: decodeAttr(value, shouldDecodeNewlines)\n      };\n    }\n\n    if (!unary) {\n      stack.push({\n        tag: tagName,\n        lowerCasedTag: tagName.toLowerCase(),\n        attrs: attrs\n      });\n      lastTag = tagName;\n    }\n\n    if (options.start) {\n      options.start(tagName, attrs, unary, match.start, match.end);\n    }\n  }\n\n  function parseEndTag(tagName, start, end) {\n    var pos, lowerCasedTagName;\n    if (start == null) {\n      start = index;\n    }\n    if (end == null) {\n      end = index;\n    }\n\n    if (tagName) {\n      lowerCasedTagName = tagName.toLowerCase();\n    }\n\n    // Find the closest opened tag of the same type\n    if (tagName) {\n      for (pos = stack.length - 1; pos >= 0; pos--) {\n        if (stack[pos].lowerCasedTag === lowerCasedTagName) {\n          break\n        }\n      }\n    } else {\n      // If no tag name is provided, clean shop\n      pos = 0;\n    }\n\n    if (pos >= 0) {\n      // Close all the open elements, up the stack\n      for (var i = stack.length - 1; i >= pos; i--) {\n        if (process.env.NODE_ENV !== 'production' &&\n          (i > pos || !tagName) &&\n          options.warn\n        ) {\n          options.warn(\n            (\"tag <\" + (stack[i].tag) + \"> has no matching end tag.\")\n          );\n        }\n        if (options.end) {\n          options.end(stack[i].tag, start, end);\n        }\n      }\n\n      // Remove the open elements from the stack\n      stack.length = pos;\n      lastTag = pos && stack[pos - 1].tag;\n    } else if (lowerCasedTagName === 'br') {\n      if (options.start) {\n        options.start(tagName, [], true, start, end);\n      }\n    } else if (lowerCasedTagName === 'p') {\n      if (options.start) {\n        options.start(tagName, [], false, start, end);\n      }\n      if (options.end) {\n        options.end(tagName, start, end);\n      }\n    }\n  }\n}\n\n/*  */\n\nvar splitRE = /\\r?\\n/g;\nvar replaceRE = /./g;\nvar isSpecialTag = makeMap('script,style,template', true);\n\n\nfunction splitParts(\n  content,\n  options\n) {\n  if (options === void 0) {options = {};}\n\n  var sfc = {\n    template: [],\n    script: [],\n    style: [],\n    customBlocks: []\n  };\n  var depth = 0;\n  var currentBlock = null;\n\n  function start(\n    tag,\n    attrs,\n    unary,\n    start,\n    end\n  ) {\n    if (depth === 0) {\n      var startLine = content.slice(0, start).split(splitRE).length;\n      currentBlock = {\n        type: tag,\n        content: '',\n        start: end,\n        tagStart: start, // start 是标签的第一个位置\n        startLine,\n        attrs: attrs.reduce(function (cumulated, ref) {\n          var name = ref.name;\n          var value = ref.value;\n\n          cumulated[name] = value || true;\n          return cumulated\n        }, {})\n      };\n      if (isSpecialTag(tag)) {\n        checkAttrs(currentBlock, attrs);\n        sfc[tag].push(currentBlock);\n      } else { // custom blocks\n        sfc.customBlocks.push(currentBlock);\n      }\n    }\n    if (!unary) {\n      depth++;\n    }\n  }\n\n  function checkAttrs (block, attrs) {\n    for (var i = 0; i < attrs.length; i++) {\n      var attr = attrs[i];\n      if (attr.name === 'lang') {\n        block.lang = attr.value;\n      }\n      if (attr.name === 'scoped') {\n        block.scoped = true;\n      }\n      if (attr.name === 'module') {\n        block.module = attr.value || true;\n      }\n      if (attr.name === 'src') {\n        block.src = attr.value;\n      }\n      if (attr.name === 'cml-type') {\n        block.cmlType = attr.value;\n      }\n    }\n  }\n\n  function end(tag, start, end) {\n\n    if (depth === 1 && currentBlock) {\n      var endLine = content.slice(0, start).split(splitRE).length;\n\n      currentBlock.tagEnd = end; // end 是标签>的下一个位置\n      currentBlock.end = start;\n      currentBlock.endLine = endLine;\n      var text = deindent(content.slice(currentBlock.start, currentBlock.end));\n      // pad content so that linters and pre-processors can output correct\n      // line numbers in errors and warnings\n      if (currentBlock.type !== 'template' && options.pad) {\n        text = padContent(currentBlock, options.pad) + text;\n      }\n      currentBlock.content = text;\n      currentBlock.tagContent = deindent(content.slice(currentBlock.tagStart, currentBlock.tagEnd));\n\n      currentBlock = null;\n    }\n    depth--;\n  }\n\n  function padContent(block, pad) {\n    if (pad === 'space') {\n      return content.slice(0, block.start).replace(replaceRE, ' ')\n    } else {\n      var offset = content.slice(0, block.start).split(splitRE).length;\n      var padChar = block.type === 'script' && !block.lang\n        ? '//\\n'\n        : '\\n';\n      return Array(offset).join(padChar)\n    }\n  }\n\n  parseHTML(content, {\n    start: start,\n    end: end\n  });\n  return sfc\n}\n\n\nmodule.exports = splitParts;\n"
  },
  {
    "path": "packages/chameleon-tool-utils/src/log.js",
    "content": "const chalk = require('chalk');\n\nconst _ = module.exports = {};\n\n_.debug = function(msg) {\n  process.stdout.write('\\n' + chalk.gray('[DEBUG]') + ' ' + msg + '\\n');\n}\n\n_.notice = function(msg) {\n  process.stdout.write('\\n' + chalk.cyan('[INFO]') + ' ' + msg + '\\n');\n}\n\n_.warn = function(msg) {\n  process.stdout.write('\\n' + chalk.yellow('[WARNI]') + ' ' + msg + '\\n');\n}\n\n_.error = function(msg) {\n  process.stdout.write('\\n' + chalk.red('[ERROR]') + ' ' + msg + '\\n');\n}\n\n"
  },
  {
    "path": "packages/chameleon-tool-utils/test/index.test.js",
    "content": "var _ = require('../src/index.js');\nvar expect = require('chai').expect;\nconst path = require('path');\nconst fs = require('fs');\nconst EventEmitter = require('events');\nconst cmlFileContent = fs.readFileSync(path.resolve(__dirname, './testlib/index.cml'), {\n  encoding: 'utf-8'\n});\nconst interfaceFileContent = fs.readFileSync(path.resolve(__dirname, './testlib/index.interface'), {\n  encoding: 'utf-8'\n});\n\nlet cmlplatforms = ['wx', 'weex', 'baidu', 'alipay', 'web'];\nlet miniplatform = [{\n  key: 'wx',\n  name: 'wxml'\n},\n{\n  key: 'alipay',\n  name: 'axml'\n},\n{\n  key: 'baidu',\n  name: 'swan'\n}\n]\n\ndescribe('index.js', function () {\n  it('is Object', function () {\n    let result = _.is({}, 'Object')\n    expect(result).to.be.equal(true);\n  })\n  it('is Array', function () {\n    let result = _.is([], 'Array')\n    expect(result).to.be.equal(true);\n  })\n  it('is String', function () {\n    let result = _.is('', 'String')\n    expect(result).to.be.equal(true);\n  })\n  it('is Cli', function () {\n    let originCml = global.cml;\n    delete global.cml;\n    let result = _.isCli();\n    expect(result).to.be.equal(false);\n    global.cml = {};\n    _.setCli(true);\n    result = _.isCli();\n    expect(result).to.be.equal(true);\n    global.cml = originCml;\n  })\n\n  it('map', function () {\n    var obj = {\n      a: 1,\n      b: {\n        c: 2\n      }\n    };\n    _.map(obj, function (key, value) {\n      switch (key) {\n        case 'a':\n          expect(value).to.equal(1);\n          break;\n        case 'b':\n          expect(value).to.deep.equal({\n            c: 2\n          });\n          break;\n        default:\n          expect(true).to.equal(false);\n      }\n    });\n  });\n  it('merge', function () {\n    var obj = {\n      a: 1,\n      b: {\n        c: 2\n      }\n    };\n    var ret = {\n      b: {\n        d: 3\n      },\n      e: 'abc'\n    };\n    _.map(obj, ret, true);\n    expect(ret).to.deep.equal({\n      a: 1,\n      b: {\n        c: 2\n      },\n      e: 'abc'\n    });\n  });\n\n  it('setBuiltinNpmName', function () {\n    let result = _.setBuiltinNpmName('cml-ui')\n    expect(result).to.be.equal('cml-ui');\n  })\n  it('isDir', function () {\n    let result = _.isDir(__dirname)\n    expect(result).to.be.equal(true);\n  })\n\n  it('escapeShellArg', function () {\n    let result = _.escapeShellArg('name')\n    expect(result).to.be.equal('\"name\"');\n  })\n\n  it('isWin', function () {\n    let result = _.isWin()\n    expect(result).to.be.equal(process.platform.indexOf('win') === 0);\n  })\n\n  it('isFile true', function () {\n    let result = _.isFile(path.join(__dirname, \"index.test.js\"))\n    expect(result).to.be.equal(true);\n  })\n\n  it('isFile false', function () {\n    let result = _.isFile(path.join(__dirname))\n    expect(result).to.be.equal(false);\n  })\n\n  it('isDirectory false', function () {\n    let result = _.isDirectory(path.join(__dirname, \"index.test.js\"))\n    expect(result).to.be.equal(false);\n  })\n\n  it('isDirectory true', function () {\n    let result = _.isDirectory(path.join(__dirname))\n    expect(result).to.be.equal(true);\n  })\n\n\n  cmlplatforms.forEach(cmlType => {\n    it(`getJsonFileContent cml文件 ${cmlType}`, function () {\n      global.cml = {};\n      _.setCli(false);\n      let result = _.getJsonFileContent(path.join(__dirname, `./testlib/index.cml`), cmlType);\n      expect(result).to.have.property('usingComponents');\n      expect(result).to.have.property(`attr${cmlType}`);\n    })\n  })\n\n\n  miniplatform.forEach(item => {\n    it(`getJsonFileContent ${item.key}  ${item.name}`, function () {\n      global.cml = {};\n      _.setCli(false);\n      let result = _.getJsonFileContent(path.join(__dirname, `./testlib/${item.key}/${item.key}.${item.name}`), item.key);\n      expect(result).to.have.property('name');\n    })\n  })\n\n  it('splitParts', function () {\n    let result = _.splitParts({\n      content: cmlFileContent\n    });\n    expect(result.template.length).to.equal(1);\n    expect(result.script.length).to.equal(2);\n    expect(result.style.length).to.equal(1);\n  })\n\n  cmlplatforms.forEach(cmlType => {\n    it(`getScriptPart ${cmlType}`, function () {\n      let result = _.getScriptPart({\n        content: interfaceFileContent,\n        cmlType\n      }).content;\n      result = result.indexOf(cmlType);\n      expect(result).to.not.equal(-1);\n    })\n  })\n\n  cmlplatforms.forEach(cmlType => {\n    it(`getScriptContent ${cmlType}`, function () {\n      let result = _.getScriptContent({\n        content: interfaceFileContent,\n        cmlType\n      });\n      result = result.indexOf(cmlType);\n      expect(result).to.not.equal(-1);\n    })\n  })\n\n  cmlplatforms.forEach(cmlType => {\n    it(`deleteScript ${cmlType}`, function () {\n      let result = _.deleteScript({\n        content: interfaceFileContent,\n        cmlType\n      });\n      result = result.indexOf(cmlType);\n      expect(result).to.equal(-1);\n    })\n  })\n\n  it(`getNpmComponents not cli`, function () {\n    global.cml = {};\n    _.setCli(false);\n    let result = _.getNpmComponents();\n    expect(_.is(result, 'Array')).to.equal(true);\n\n  })\n\n  it(`getNpmComponents cli`, function () {\n    global.cml = {};\n    _.setCli(true);\n    cml.config = require('./testlib/cli/config.js');\n    cml.utils = require('../src/index.js');\n    cml.projectRoot = path.join(__dirname, 'testlib/demo-project');\n    cml.config.merge({\n      cmlComponents: ['cml-ui']\n    })\n    // let result = _.getNpmComponents('wx', cml.projectRoot);\n    // expect(result.length).to.equal(1);\n  })\n\n  it(`getBuildinComponents`, function () {\n    global.cml = {};\n    _.setCli(true);\n    cml.config = require('./testlib/cli/config.js');\n    cml.utils = require('../src/index.js');\n    cml.projectRoot = path.join(__dirname, 'testlib/demo-project');\n\n    // let result = _.getBuildinComponents('wx', cml.projectRoot);\n    // expect(result.components.length).to.equal(1);\n    // expect(Object.keys(result.compileTagMap).length).to.equal(1);\n  })\n\n  it(`getTargetInsertComponents`, function () {\n    global.cml = {};\n    _.setCli(true);\n    cml.config = require('./testlib/cli/config.js');\n    cml.utils = require('../src/index.js');\n    cml.projectRoot = path.join(__dirname, 'testlib/demo-project');\n    cml.config.merge({\n      cmlComponents: ['cml-ui']\n    })\n    // let result = _.getTargetInsertComponents(__dirname, 'wx', cml.projectRoot);\n    // expect(result.length).to.equal(2);\n  })\n\n  it(`isBuildIn  isBuildInProject: true`, function () {\n    global.cml = {};\n    _.setCli(true);\n    cml.config = require('./testlib/cli/config.js');\n    cml.utils = require('../src/index.js');\n    cml.projectRoot = path.join(__dirname, 'testlib/demo-project');\n    cml.config.merge({\n      isBuildInProject: true\n    })\n\n    let result = _.isBuildIn();\n    expect(result).to.equal(true);\n  })\n\n  it(`isBuildIn   buildinpath`, function () {\n    global.cml = {};\n    _.setCli(true);\n    cml.config = require('./testlib/cli/config.js');\n    cml.utils = require('../src/index.js');\n    cml.projectRoot = path.join(__dirname, 'testlib/demo-project');\n    cml.config.merge({\n      isBuildInProject: false\n    })\n    let result = _.isBuildIn('/Users/didi/work/chameleon-open/chameleon/packages/chameleon-tool-utils/test/testlib/demo-project/node_modules/cml-ui/components/picker/picker.cml', 'wx', cml.projectRoot);\n    expect(result).to.equal(false);\n  })\n\n  it(`addNpmComponents`, function () {\n    global.cml = {};\n    _.setCli(true);\n    cml.config = require('./testlib/cli/config.js');\n    cml.utils = require('../src/index.js');\n    cml.projectRoot = path.join(__dirname, 'testlib/demo-project');\n    cml.config.merge({\n      cmlComponents: ['cml-ui']\n    })\n    let obj = {};\n    // _.addNpmComponents(obj, __dirname, 'wx', cml.projectRoot);\n\n\n    // expect(Object.keys(obj.usingComponents).length).to.equal(2);\n  })\n\n  it(`getOnePackageComponents`, function () {\n    global.cml = {};\n    _.setCli(true);\n    cml.config = require('./testlib/cli/config.js');\n    cml.utils = require('../src/index.js');\n    cml.projectRoot = path.join(__dirname, 'testlib/demo-project');\n    cml.config.merge({\n      cmlComponents: ['cml-ui']\n    })\n    // let result = _.getOnePackageComponents('cml-ui', '/Users/didi/Documents/cml/chameleon-cli-utils/test/testlib/demo-project/node_modules/cml-ui/package.json', 'wx', cml.projectRoot);\n    // expect(result.length).to.equal(1);\n  })\n\n  it(`handleComponentUrl`, function () {\n    global.cml = {};\n    _.setCli(true);\n    cml.config = require('./testlib/cli/config.js');\n    cml.utils = require('../src/index.js');\n    cml.projectRoot = path.join(__dirname, 'testlib/demo-project');\n    cml.config.merge({\n      cmlComponents: ['cml-ui']\n    })\n\n    miniplatform.forEach(item => {\n      let params = [\n        cml.projectRoot,\n        path.join(cml.projectRoot, 'index.cml'),\n        `../${item.key}/${item.key}`,\n        item.key\n      ]\n\n      let result = _.handleComponentUrl(...params);\n      expect(result.filePath).to.equal(path.join(__dirname, `./testlib/${item.key}/${item.key}.${item.name}`));\n    })\n  })\n\n  it('lintHandleComponentUrl', function() {\n    global.cml = {};\n    _.setCli(true);\n    cml.config = require('./testlib/cli/config.js');\n    cml.utils = require('../src/index.js');\n    cml.projectRoot = path.join(__dirname, 'testlib/demo-project');\n    global.cml.event = new EventEmitter();\n\n    cml.config.merge({\n      cmlComponents: ['cml-ui']\n    })\n\n    miniplatform.forEach(item => {\n      let params = [\n        cml.projectRoot,\n        path.join(cml.projectRoot, 'index.cml'),\n        `../${item.key}/${item.key}`\n      ]\n      let result = _.lintHandleComponentUrl(...params);\n      expect(result.filePath).to.equal(path.join(__dirname, `./testlib/${item.key}/${item.key}.${item.name}`));\n      expect(result.isCml).to.equal(undefined);\n    })\n  })\n\n\n  it('lintHandleComponentUrl isCml true', function() {\n    global.cml = {};\n    _.setCli(true);\n    cml.config = require('./testlib/cli/config.js');\n    cml.utils = require('../src/index.js');\n    cml.projectRoot = path.join(__dirname, 'testlib/demo-project');\n    global.cml.event = new EventEmitter();\n\n    cml.config.merge({\n      cmlComponents: ['cml-ui']\n    })\n    var cmlFilePath = path.join(__dirname, 'testlib/demo-project/index.cml');\n    var comrefPath = './comb/comb'\n\n\n    let result = _.lintHandleComponentUrl(cml.projectRoot, cmlFilePath, comrefPath);\n    expect(result.filePath).to.equal(path.join(__dirname, `testlib/demo-project/comb/comb.cml`));\n    expect(result.isCml).to.equal(true);\n  })\n\n  it('handleComponentUrl isCml true wxml', function() {\n    global.cml = {};\n    _.setCli(true);\n    cml.event = new EventEmitter();\n    cml.config = require('./testlib/cli/config.js');\n    cml.utils = require('../src/index.js');\n    cml.projectRoot = path.join(__dirname, 'testlib/demo-project');\n    cml.config.merge({\n    })\n    var cmlFilePath = path.join(__dirname, 'testlib/demo-project/src/pages/pagea/pagea.cml');\n    var comrefPath = 'vant-weapp/test'\n\n    let result = _.handleComponentUrl(cml.projectRoot, cmlFilePath, comrefPath, 'wx');\n    expect(result.refUrl).to.equal('./../../npm/vant-weapp/test');\n  })\n\n  it('findInterfaceFile', function() {\n    global.cml = {};\n    _.setCli(true);\n    cml.config = require('./testlib/cli/config.js');\n    cml.utils = require('../src/index.js');\n    cml.projectRoot = path.join(__dirname, 'testlib/demo-project');\n    cml.config.merge({\n      cmlComponents: ['cml-ui']\n    })\n\n    var cmlFilePath = path.join(__dirname, 'testlib/demo-project/index.cml');\n    var comrefPath = './coma/coma'\n    let result = _.findInterfaceFile(cml.projectRoot, cmlFilePath, comrefPath);\n    expect(result.filePath).to.equal(path.join(__dirname, `testlib/demo-project/coma/coma.interface`));\n  })\n\n\n  it(`findComponent true`, function () {\n    global.cml = {};\n    _.setCli(true);\n    cml.config = require('./testlib/cli/config.js');\n    cml.utils = require('../src/index.js');\n    cml.projectRoot = path.join(__dirname, 'testlib/demo-project');\n    cml.config.merge({\n      cmlComponents: ['cml-ui']\n    })\n\n    miniplatform.forEach(item => {\n      let result = _.findComponent(path.join(__dirname, `./testlib/${item.key}/${item.key}`), item.key);\n      expect(result).to.equal(path.join(__dirname, `./testlib/${item.key}/${item.key}.${item.name}`));\n    })\n\n  })\n\n  it(`findComponent false`, function () {\n    global.cml = {};\n    _.setCli(true);\n    cml.event = new EventEmitter();\n    cml.config = require('./testlib/cli/config.js');\n    cml.utils = require('../src/index.js');\n    cml.projectRoot = path.join(__dirname, 'testlib/demo-project');\n    cml.config.merge({\n      cmlComponents: ['cml-ui']\n    })\n\n    let result = _.findComponent(__dirname, 'wx');\n    expect(result).to.equal(false);\n\n  })\n\n  it('getDevServerPath', function() {\n    process.env.HOME = __dirname;\n    let devpath = cml.utils.getDevServerPath();\n    expect(devpath).to.be.equal(path.join(__dirname, '.chameleon/www'))\n  })\n\n  it('handleRelativePath same level', function() {\n    let sourcePath = 'C:/src/compoents/a/a.cml';\n    let targetPath = 'C:/src/compoents/a/b.cml';\n    let relativePath = _.handleRelativePath(sourcePath, targetPath);\n    expect(relativePath).to.be.equal('./b.cml')\n  })\n\n  it('handleRelativePath diff level1', function() {\n    let sourcePath = 'C:/src/compoents/a/b/a.cml';\n    let targetPath = 'C:/src/compoents/a/b.cml';\n    let relativePath = _.handleRelativePath(sourcePath, targetPath);\n    expect(relativePath).to.be.equal('./../b.cml')\n  })\n\n  it('handleRelativePath diff level1', function() {\n    let sourcePath = 'C:/src/compoents/a/c.cml';\n    let targetPath = 'C:/src/compoents/a/b/a.cml';\n    let relativePath = _.handleRelativePath(sourcePath, targetPath);\n    expect(relativePath).to.be.equal('./b/a.cml')\n  })\n\n\n  it('getCmlFileType', function() {\n    global.cml = {};\n    _.setCli(true);\n    cml.config = require('./testlib/cli/config.js');\n    cml.utils = require('../src/index.js');\n    cml.projectRoot = path.join(__dirname, 'testlib/demo-project');\n    let pagea = path.join(__dirname, './testlib/demo-project/src/pages/pagea/pagea.cml')\n    let coma = path.join(__dirname, './testlib/demo-project/src/components/coma/coma.cml')\n    let app = path.join(__dirname, './testlib/demo-project/src/app/app.cml')\n    let result1 = cml.utils.getCmlFileType(pagea, cml.projectRoot, 'wx')\n    let result2 = cml.utils.getCmlFileType(coma, cml.projectRoot, 'wx')\n    let result3 = cml.utils.getCmlFileType(app, cml.projectRoot, 'wx')\n    expect(result1).to.be.equal('page')\n    expect(result2).to.be.equal('component')\n    expect(result3).to.be.equal('app')\n\n  })\n\n  it('npmRefPathToRelative', function() {\n    let context = path.join(__dirname, './testlib/demo-project');\n    let npmRef = '/npm/cml-ui/button/button';\n    let notNpmRef = './npm/cml-ui';\n\n    let file1 = path.join(context, 'src/pages/pagea/pagea.cml') // ./../../npm\n    let file2 = path.join(context, 'src/pages/pagea.cml') // ./../npm\n    let file3 = path.join(context, 'src/pages.cml') // ./npm\n\n    let result1 = _.npmRefPathToRelative(npmRef, file1, context);\n    let result2 = _.npmRefPathToRelative(npmRef, file2, context);\n    let result3 = _.npmRefPathToRelative(npmRef, file3, context);\n    let result4 = _.npmRefPathToRelative(notNpmRef, file3, context);\n    expect(result1).to.be.equal('./../../npm/cml-ui/button/button');\n    expect(result2).to.be.equal('./../npm/cml-ui/button/button');\n    expect(result3).to.be.equal('./npm/cml-ui/button/button');\n    expect(result4).to.be.equal(notNpmRef);\n\n  })\n\n  it('handleSpecialChar', function() {\n    let result = _.handleSpecialChar('npm/@didi/name');\n    expect(result).to.be.equal('npm/_didi/name')\n  })\n\n  it(`getJsonFileContent cli app`, function () {\n    global.cml = {};\n    cml.projectRoot = path.join(__dirname, './testlib/demo-project');\n    cml.config = {\n      get() {\n        return {}\n      }\n    }\n    _.setCli(true);\n    let result = _.getJsonFileContent(path.join(__dirname, './testlib/demo-project/src/app/app.cml'), 'wx');\n    expect(typeof result).to.equal('object');\n  })\n\n  it(`getJsonFileContent cli page`, function () {\n    global.cml = {};\n    cml.projectRoot = path.join(__dirname, './testlib/demo-project');\n    cml.config = {\n      get() {\n        return {}\n      }\n    }\n    _.setCli(true);\n    let result = _.getJsonFileContent(path.join(__dirname, './testlib/demo-project/src/pages/pagea/pagea.cml'), 'wx');\n    expect(typeof result).to.equal('object');\n  })\n\n  it(`getJsonFileContent cli component`, function () {\n    global.cml = {};\n    cml.projectRoot = path.join(__dirname, './testlib/demo-project');\n    cml.config = {\n      get() {\n        return {}\n      }\n    }\n    _.setCli(true);\n    let result = _.getJsonFileContent(path.join(__dirname, './testlib/demo-project/src/components/coma/coma.cml'), 'wx');\n    expect(typeof result).to.equal('object');\n  })\n\n  it(`mkdir`, function () {\n    let pathdir = path.join(__dirname, 'temp')\n    _.mkdir(pathdir)\n    expect(_.isDir(pathdir)).to.be.equal(true)\n  })\n\n  it(`copyNpm and subProject`, function () {\n    global.cml = {};\n    cml.projectRoot = path.join(__dirname, './testlib/demo-project');\n    cml.config = {\n      get() {\n        return {\n          subProject: [{npmName: 'cml-pages'}],\n          copyNpm: {\n            wx: ['copy-npm']\n          }\n        }\n      }\n    }\n    _.setCli(true);\n    let result = _.getJsonFileContent(path.join(__dirname, './testlib/demo-project/src/app/app.cml'), 'wx');\n    expect(typeof result).to.equal('object');\n\n  })\n\n  it(`getNpmComponents`, function () {\n    global.cml = {};\n    cml.projectRoot = path.join(__dirname, './testlib/demo-project');\n    cml.config = {\n      get() {\n        return {\n          cmlComponents: ['npm-components']\n        }\n      }\n    }\n    _.setCli(true);\n    cml.utils = _;\n    let result = _.getNpmComponents('wx', cml.projectRoot);\n    expect(typeof result).to.equal('object');\n\n  })\n\n  it(`getBuildinComponents`, function () {\n    global.cml = {};\n    cml.projectRoot = path.join(__dirname, './testlib/demo-project');\n    cml.config = {\n      get() {\n        return {\n          cmlComponents: ['npm-components']\n        }\n      }\n    }\n    _.setCli(true);\n    cml.utils = _;\n    let result = _.getBuildinComponents('wx', cml.projectRoot);\n    expect(typeof result).to.equal('object');\n\n  })\n\n  it(`getTargetInsertComponents`, function () {\n    global.cml = {};\n    cml.projectRoot = path.join(__dirname, './testlib/demo-project');\n    cml.config = {\n      get() {\n        return {\n          cmlComponents: ['npm-components']\n        }\n      }\n    }\n    _.setCli(true);\n    cml.utils = _;\n    let result = _.getTargetInsertComponents(path.join(path.join(__dirname, './testlib/demo-project/src/pages/pagea/pagea.cml')), 'wx', cml.projectRoot);\n    expect(typeof result).to.equal('object');\n\n  })\n\n  it(`addNpmComponents`, function () {\n    global.cml = {};\n    cml.projectRoot = path.join(__dirname, './testlib/demo-project');\n    cml.config = {\n      get() {\n        return {\n          cmlComponents: ['npm-components']\n        }\n      }\n    }\n    cml.event = new EventEmitter();\n    _.setCli(true);\n    cml.utils = _;\n    var obj = {};\n    _.addNpmComponents(obj, path.join(path.join(__dirname, './testlib/demo-project/src/pages/pagea/pagea.cml')), 'wx', cml.projectRoot);\n    console.log(obj)\n    expect(obj).to.has.property('usingComponents');\n\n  })\n\n  it(`getSubProjectRouter`, function () {\n    global.cml = {};\n    _.setCli(true);\n    cml.projectRoot = path.join(__dirname, './testlib/demo-project');\n    cml.config = {\n      get() {\n        return {\n          subProject: ['cml-subproject']\n        }\n      }\n    }\n\n    let result = _.getSubProjectRouter();\n\n    expect(Object.keys(result).length).to.be.equal(1);\n\n  })\n\n  it(`deleteExt`, function () {\n    global.cml = {};\n    _.setCli(true);\n    global.cml.event = new EventEmitter();\n    let path1 = '/src/pages/name.web.cml';\n    let path2 = '/src/pages/name.cml';\n    let path3 = 'name.cml';\n    let result1 = _.deleteExt(path1);\n    let result2 = _.deleteExt(path2);\n    let result3 = _.deleteExt(path3);\n    expect(result1).to.be.equal('/src/pages/name');\n    expect(result2).to.be.equal('/src/pages/name');\n    expect(result3).to.be.equal('name');\n\n  })\n\n  it(`getExportEntry`, function () {\n    global.cml = {};\n    _.setCli(true);\n    global.cml.event = new EventEmitter();\n    global.cml.utils = _;\n    global.projectRoot = path.join(__dirname, 'testlib/demo-project');\n    let result = _.getExportEntry('web', global.projectRoot, [\n      'src/components',\n      'src/notfinr.cml',\n      'src/components/com2/com2.interface'\n    ]);\n    console.log(result)\n    expect(result.length).to.be.equal(2);\n  })\n\n  it(`creatMD5`, function () {\n    let source = '12345678';\n    let result = _.createMd5(source);\n    expect(result).to.be.equal('25d55ad283aa400af464c76d713c07ad');\n  })\n\n  it(`delQueryPath`, function () {\n    let filePath = '/user/cml/name.png?__inline';\n    let result = _.delQueryPath(filePath);\n    expect(result).to.be.equal('/user/cml/name.png');\n  })\n\n\n  it(`splitFileName`, function () {\n    let filePath = '/user/cml/name.web.cml?__inline';\n    let result = _.splitFileName(filePath);\n    expect(!!~result.indexOf('name')).to.be.equal(true);\n    expect(!!~result.indexOf('web')).to.be.equal(true);\n    expect(!!~result.indexOf('cml')).to.be.equal(true);\n  })\n\n  it(`isInline`, function () {\n    let filePath = '/user/cml/name.web.cml?__inline';\n    let result = _.isInline(filePath);\n    let filePath2 = '/user/cml/name.web.cml';\n    let result2 = _.isInline(filePath2);\n    expect(result).to.be.equal(true);\n    expect(result2).to.be.equal(false);\n\n  })\n\n  it(`addHashName has ext`, function () {\n    let filePath = '/user/cml/name.web.cml';\n    let result = _.addHashName(filePath, '3123123123123sd');\n    expect(result).to.be.equal('/user/cml/name.web_3123123123123sd.cml');\n\n  })\n\n  it(`addHashName no ext`, function () {\n    let filePath = '/user/cml/name';\n    let result = _.addHashName(filePath, '3123123123123sd');\n    expect(result).to.be.equal('/user/cml/name_3123123123123sd');\n\n  })\n  it(`addHashName multi .`, function () {\n    let filePath = '/user/cml/name.web.cml';\n    let result = _.addHashName(filePath, '3123123123123sd');\n    expect(result).to.be.equal('/user/cml/name.web_3123123123123sd.cml');\n\n  })\n\n  it(`resolveSync relativePath`, function () {\n    let filePath = path.join(__dirname, 'index.test.js');\n    let relativePath = './testlib/index.cml';\n    let result = _.resolveSync(filePath, relativePath);\n\n    expect(result).to.be.equal(path.join(__dirname, './testlib/index.cml'));\n\n  })\n\n  it(`resolveSync npmPath`, function () {\n    let filePath = path.join(__dirname, 'index.test.js');\n    let relativePath = 'glob';\n    let result = _.resolveSync(filePath, relativePath);\n    console.log(result)\n    expect(!!~result.indexOf('glob')).to.be.equal(true);\n\n  })\n\n  it(`resolveInterfaceRequire npmPath`, function () {\n    let oldFilePath = path.join(__dirname, 'index.test.js');\n    let relativePath = 'glob';\n    let result = _.resolveInterfaceRequire(oldFilePath, '', relativePath);\n    expect(result).to.be.equal(relativePath);\n  })\n\n  it(`resolveInterfaceRequire relativePath1`, function () {\n    let oldFilePath = path.join(__dirname, 'index.test.js');\n    let newFilePath = path.join(__dirname, '../index.test.js');\n    let relativePath = './glob';\n    let result = _.resolveInterfaceRequire(oldFilePath, newFilePath, relativePath);\n    expect(result).to.be.equal('./test/glob');\n  })\n\n  it(`resolveInterfaceRequire relativePath2`, function () {\n    let oldFilePath = path.join(__dirname, 'index.test.js');\n    let newFilePath = path.join(__dirname, 'temp/index.test.js');\n    let relativePath = './glob';\n    let result = _.resolveInterfaceRequire(oldFilePath, newFilePath, relativePath);\n    expect(result).to.be.equal('../glob');\n  })\n\n\n})\n"
  },
  {
    "path": "packages/chameleon-tool-utils/test/log.test.js",
    "content": "var log = require('../src/log.js');\nvar expect = require('chai').expect;\n\ndescribe('log.js', function () {\n  it('it should console debug', function () {\n    expect(log.debug('log.debug')).to.equal(undefined);\n  })\n  it('it should console notice', function () {\n    expect(log.notice('log.notice')).to.equal(undefined);\n  })\n  it('it should console warn', function () {\n    expect(log.warn('log.warn')).to.equal(undefined);\n  })\n  it('it should console error', function () {\n    expect(log.error('log.error')).to.equal(undefined);\n  })\n})\n"
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/alipay/alipay.axml",
    "content": ""
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/alipay/alipay.json",
    "content": "{\n  \"name\": \"unit-test\"\n}"
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/baidu/baidu.json",
    "content": "{\n  \"name\": \"unit-test\"\n}"
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/baidu/baidu.swan",
    "content": ""
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/cli/config.js",
    "content": "\n/*\nmoduleIdType 决定webpack打包模块的id  \n  number，默认的id \n  hash 利用 webpack.HashedModuleIdsPlugin()\n  name 利用webpack.NamedModulesPlugin()\n  chameleon 利用chameleon-webpack-plugin 中开启moduleid的处理\n*/\nvar miniappConfig = {\n  dev: {\n    moduleIdType: 'name',\n    definePlugin: {\n      'process.env.NODE_ENV': JSON.stringify('dev')\n    }\n  },\n  build: {\n    hash: true,\n    minimize: true,\n    definePlugin: {\n      'process.env.NODE_ENV': JSON.stringify('production')\n    }\n  },\n  export: {\n    hash: true,\n    minimize: true,\n    definePlugin: {\n      'process.env.NODE_ENV': JSON.stringify('production')\n    },\n    entry: [\n      './components'\n    ],\n    publicPath: '../../'\n  }\n};\n\nvar chameleonConfig = {\n  platforms: [\"web\", \"weex\", \"wx\"],\n  // devPort: 8000,\n  // projectName: undefined,\n  templateType: 'smarty', // 模板类型 smarty or html，决定web页面的格式与devweb服务器的类型\n  isBuildInProject: false, // 是否是内置组件项目,该项目不嵌入内置组件\n  devOffPlatform: [], // dev 命令关闭的端\n  buildOffPlatform: [], // build 命令关闭的端\n  builtinNpmName: 'chameleon-ui-builtin', // 内置组件npm包的名称\n  check: {  \n    enable: true,  // 是否开启接口校验\n    enableTypes: []  // 接口校验支持的类型 可以开启[\"Object\",\"Array\",\"Nullable\"]\n  },\n  cmlComponents: [   //配置node_modules中cml组件库\n  ],\n  proxy: {\n    enable: false,\n    mapremote:[]\n  },\n  // entry: {\n  //   template: 'entry_test/entry.html',\n  //   web: 'entry_test/web.js',\n  //   weex: 'entry_test/weex.js'\n  // },\n  buildInfo: {  // 打包信息\n    wxAppId: '',\n    wxEntryPage: '',\n    webPath: ''\n  },\n  enableLinter: true,\n  enableGlobalCheck: false,\n  globalCheckWhiteList:[ //全局校验的白名单文件 后缀匹配\n  ],\n  postcss: {\n    rem: true,\n    scale: 0.5,\n    remOptions: {\n      // base on 750px standard.\n      rootValue: 75,\n      // to leave 1px alone.\n      minPixelValue: 1.01\n    }\n  },\n  wx: miniappConfig,\n  alipay: miniappConfig,\n  baidu: miniappConfig,\n  web: {\n    dev: {\n      moduleIdType: 'name',\n      hot: false,\n      analysis: false,\n      // apiPrefix: ,\n      definePlugin: {\n        'process.env.NODE_ENV': JSON.stringify('dev')\n      }\n    },\n    build: {\n      hash: true,\n      minimize: true,\n      moduleIdType: 'chameleon', \n      definePlugin: {\n        'process.env.NODE_ENV': JSON.stringify('production')\n      }\n    },\n    export: {\n      hash: true,\n      minimize: true,\n      moduleIdType: 'chameleon', \n      entry: [\n        './components'\n      ],\n      definePlugin: {\n        'process.env.NODE_ENV': JSON.stringify('production')\n      }\n    }\n  },\n  weex: {\n    dev: {\n      moduleIdType: 'name',\n      definePlugin: {\n        'process.env.NODE_ENV': JSON.stringify('dev')\n      }\n    },\n    build: {\n      minimize: true,\n      hash: true,\n      moduleIdType: 'chameleon', \n      definePlugin: {\n        'process.env.NODE_ENV': JSON.stringify('production')\n      }\n    },\n    export: {\n      hash: true,\n      minimize: true,\n      moduleIdType: 'chameleon', \n      entry: [\n        './components'\n      ],\n      definePlugin: {\n        'process.env.NODE_ENV': JSON.stringify('production')\n      }\n    }\n  }\n}\n\nvar utils = require('../../../src/index.js');\n\n\nconst _ = {};\nmodule.exports = _;\n\n_.get = function() {\n  return chameleonConfig;\n}\n\n\n_.merge = function( mergeConfig) {\n  chameleonConfig =  utils.merge(chameleonConfig, mergeConfig);\n  return chameleonConfig;\n}\n\n_.assign = function( mergeConfig) {\n  chameleonConfig =  Object.assign(chameleonConfig, mergeConfig);\n  return chameleonConfig;\n}\n\n\n\n\n\n"
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/demo-project/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n.vscode\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\n# dist\ndist/\noutput/\n.temp\n"
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/demo-project/chameleon.config.js",
    "content": "\n// 设置静态资源的线上路径\nconst publicPath = '//www.static.chameleon.com/cml';\n// 设置api请求前缀\nconst apiPrefix = 'https://api.chameleon.com'; \ncml.config.merge({\n  templateLang: 'cml',\n  templateType: 'html',\n  subProject: ['cml-subproject'],\n  platforms: ['web', 'weex', 'wx', 'baidu', 'alipay'],\n  buildInfo: {\n    wxAppId: '123456'\n  },\n  wx: {\n    dev: {\n    },\n    build: {\n      apiPrefix\n    }\n  },\n  web: {\n    dev: {\n      analysis: false,\n      console: false\n    },\n    build: {\n      analysis: false,\n      publicPath: `${publicPath}/web/`,\n      apiPrefix\n    }\n  },\n  weex: {\n    dev: {\n    },\n    build: {\n      publicPath: `${publicPath}/weex/`,\n      apiPrefix\n    },\n    custom: {\n      publicPath: `${publicPath}/wx/`,\n      apiPrefix\n    }\n  }\n})\n\n"
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/demo-project/coma/coma.interface",
    "content": ""
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/demo-project/comb/comb.cml",
    "content": ""
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/demo-project/index.cml",
    "content": ""
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/demo-project/package.json",
    "content": "{\n  \"name\": \"fse\",\n  \"version\": \"1.0.0\",\n  \"description\": \"A chameleon project\",\n  \"author\": \"\",\n  \"private\": true,\n  \"scripts\": {},\n  \"license\": \"MIT\",\n  \"dependencies\": {\n    \"chameleon-runtime\": \"~1.1.0\",\n    \"chameleon-store\": \"~1.0.0\",\n    \"cml-ui\": \"~1.0.0\",\n    \"chameleon-ui-builtin\": \"~1.0.0\",\n    \"chameleon-api\": \"~0.1.0\",\n    \"chameleon-bridge\": \"~0.1.1\"\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/demo-project/src/app/app.cml",
    "content": "<template>\n  <app store=\"{{store}}\" router-config=\"{{routerConfig}}\"></app>\n</template>\n\n<script>\nimport store from '../store/index.js'\nimport routerConfig from '../router.config.json';\n\nclass App {\n  data = {\n    store,\n    routerConfig\n  }\n  created(res) {\n\n    \n    \n\n\n\n\n  }\n}\n\n\n\nexport default new App();\n</script>\n\n<style>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\":\"light\",\n      \"navigationBarBackgroundColor\": \"#fff\",\n      \"navigationBarTitleText\": \"Chameleon\",\n      \"navigationBarTextStyle\":\"black\"\n    }\n  },\n  \"baidu\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"light\",\n      \"navigationBarBackgroundColor\": \"#ffffff\",\n      \"navigationBarTitleText\": \"Chameleon\",\n      \"navigationBarTextStyle\": \"black\"\n    }\n  },\n  \"alipay\": {\n      \"window\": {\n        \"defaultTitle\": \"Chameleon\"\n      }\n  }\n}\n</script>"
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/demo-project/src/components/com1/com1.cml",
    "content": "<template>\n  <view class=\"demo-com\">\n    <text class=\"title\">{{title}}</text>\n    <image src=\"{{imageSrc}}\" class=\"logo\"></image>  \n  </view>\n</template>\n\n<script>\nimport cml from '@didi/chameleon-api'\n\nclass DemoCom {\n  props = {\n    title: {\n      type: String,\n      default: ''\n    },\n    imageSrc: {\n      type: String,\n      default: ''\n    },\n  }\n  \n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new DemoCom();\n</script>\n<style>\n.demo-com {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n.title {\n  align-self: center;\n  color: #61c7fc;\n  font-size: 72cpx;\n  margin-top: 160cpx;\n  margin-bottom: 20cpx;\n}\n.logo {\n  width: 150cpx;\n  height: 150cpx;\n  margin-top: 100cpx;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {}\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/demo-project/src/components/com2/com2.interface",
    "content": "<script cml-type=\"web\" src=\"./com2.web.cml\"></script>\n<script cml-type=\"wx\" src=\"./com2.wx.cml\"></script>"
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/demo-project/src/components/com2/com2.web.cml",
    "content": ""
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/demo-project/src/components/com2/com2.wx.cml",
    "content": ""
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/demo-project/src/components/com3/com3.interface",
    "content": ""
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/demo-project/src/pages/pagea/pagea.cml",
    "content": "<template>\n  <page title=\"chameleon\">\n      <scroller height=\"{{-1}}\">\n        <view class=\"scroller-wrap\">\n          <demo-com title=\"{{title}}\" image-src=\"{{chameleonSrc}}\"></demo-com>\n        </view>\n      </scroller>\n  </page>\n</template>\n\n<script>\nimport cml from '@didi/chameleon-api'\nclass Index  {\n  data = {\n    title: \"chameleon\",\n    chameleonSrc: require('../../assets/images/chameleon.png')\n  }\n}\n\nexport default new Index();\n\n</script>\n<style>\n\n.scroller-wrap {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n\n\n\n\n\n\n\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"demo-com\": \"/components/coma/coma\"\n    }\n  },\n  \"wx\": {\n    \"navigationBarTitleText\": \"index\",\n    \"backgroundTextStyle\": \"dark\",\n    \"backgroundColor\": \"#E2E2E2\"\n  },\n  \"alipay\": {\n    \"defaultTitle\": \"index\",\n    \"pullRefresh\": false,\n    \"allowsBounceVertical\": \"YES\",\n    \"titleBarColor\": \"#ffffff\"\n  },\n  \"baidu\": {\n    \"navigationBarBackgroundColor\": \"#ffffff\",\n    \"navigationBarTextStyle\": \"white\",\n    \"navigationBarTitleText\": \"index\",\n    \"backgroundColor\": \"#ffffff\",\n    \"backgroundTextStyle\": \"dark\",\n    \"enablePullDownRefresh\": false,\n    \"onReachBottomDistance\": 50\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/demo-project/src/pages/pageb/pageb.cml",
    "content": ""
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/demo-project/src/router.config.json",
    "content": "{\n  \"mode\": \"history\",\n  \"domain\": \"https://www.chameleon.com\",\n  \"routes\":[\n    {\n      \"url\": \"/cml/h5/index\",\n      \"path\": \"/pages/pagea/pagea\",\n      \"name\": \"首页\",\n      \"mock\": \"index.php\"\n    }\n  ]\n}"
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/index.cml",
    "content": "<template>\n  <page title=\"TodoMVC\">\n    <view class=\"page-container\">\n      <scroller>\n        <view class=\"scroller-wrap\">\n          <text class=\"title\">{{title}}</text>\n          <view class=\"main\">\n            <view class=\"input-wrap\">\n              <input class=\"input-area\"\n                          placeholder=\"What needs to be done?\"\n                          input-style=\"{{inputStyle}}\"\n                          type=\"text\"\n                          value=\"{{value}}\"\n                          c-bind:inputevent=\"inputHandle\"\n                          c-bind:blurevent=\"addHandle\" />\n              <view class=\"add-btn\" c-bind:tap=\"addHandle\">\n                <view class=\"black-arrow\" style=\"{{btnStyle}}\"></view>\n                <view class=\"white-arrow\"></view>\n              </view>\n            </view>\n            <view class=\"list-wrap\">\n              <c-todoitem c-for=\"{{showTodos}}\"\n                        c-key=\"{{todoLength + index}}\"\n                        completed=\"{{item.completed}}\"\n                        index=\"{{item.index}}\"\n                        text=\"{{item.text}}\"\n                        c-bind:changestatus=\"changeStatus\"\n                        c-bind:delete=\"delete\"\n                        c-bind:top=\"top\"></c-todoitem>\n            </view>\n            <view class=\"option-wrap\">\n              <text class=\"count\">{{countText}}</text>\n              <view class=\"filter\">\n                <text class=\"{{filter === 0 ? 'filter-active' : 'filter-default'}}\"\n                      c-bind:tap=\"changeFilter0\">All</text>\n                <text class=\"{{filter === 1 ? 'filter-active' : 'filter-default'}}\"\n                      c-bind:tap=\"changeFilter1\">Active</text>\n                <text class=\"{{filter === 2 ? 'filter-active' : 'filter-default'}}\"\n                      c-bind:tap=\"changeFilter2\">Completed</text>\n              </view>\n              <text class=\"clear-completed\" c-bind:tap=\"clear\">Clear completed</text>\n            </view>\n          </view>\n        </view>\n      </scroller>\n    </view>\n  </page>\n</template>\n\n<script>\n\nimport store from \"../../store\";\nconst {mapGetters, mapMutations, mapActions, mapState} = store;\n\nimport  getterTypes from '../../store/getter-types.js';\nimport  mutationTypes from '../../store/mutation-types.js';\nimport  actionTypes from '../../store/action-types.js';\n// import cml from 'chameleon-api';\n\nclass Index  {\n  data = {\n    title: 'todos',\n    chameleon: require(\"../../assets/images/chameleon.png\"),\n    checked: false,\n    value: '',\n    filter: 0 // 0:all,1:active,2:completed\n  }\n  computed ={\n    ...mapGetters({\n      todos: getterTypes.INDEX_DESC_TODOS\n    }),\n    inputStyle() {\n      return this.$cmlStyle('border-width: 0;height:100px;line-height:100px;font-size:32px;color:#333;padding-left: 80px;');\n    },\n    btnStyle() {\n      if (!this.value) {\n        return this.$cmlStyle({\n          background: '#999999'\n        })\n      } else {\n        return this.$cmlStyle({\n          background: '#333333'\n        })\n      }\n    },\n    countText() {\n      let count = 0;\n      this.todos.forEach(item => {\n        if (!item.completed) {\n          count ++;\n        }\n      })\n      return `${count} items left`;\n    },\n    showTodos() {\n      if (this.filter === 0) {\n        let t = this.todos.map((item, index) => {\n          item.index = index;\n          return item;\n        });\n        return t;\n      }\n      if (this.filter === 1) {\n        let t = [];\n        this.todos.forEach((item, index) => {\n          if (!item.completed) {\n            item.index = index;\n            t.push(item);\n          }\n        })\n        return t;\n      }\n      if (this.filter === 2) {\n        let t = [];\n        this.todos.forEach((item, index) => {\n          if (item.completed) {\n            item.index = index;\n            t.push(item);\n          }\n        })\n        return t;\n      }\n    },\n    todoLength() {\n      return this.showTodos.length + '';\n    }\n  }\n  watch = {\n\n  }\n  methods = {\n    ...mapActions([\n      actionTypes.INDEX_ADD_TODOS,\n      actionTypes.INDEX_CHANGE_TODOS_STATUS,\n      actionTypes.INDEX_DELETE_TODOS,\n      actionTypes.INDEX_TOP_TODOS,\n      actionTypes.INDEX_CHANGE_TODOS_CLEAR_COMPLETED\n    ]),\n    changeStatus(e) {\n      let { index, status } = e.detail;\n      this[actionTypes.INDEX_CHANGE_TODOS_STATUS]({\n        index,\n        status\n      })\n    },\n    inputHandle(e) {\n      this.value = e.detail.value;\n    },\n    addHandle() {\n      if (!this.value) {\n        return;\n      }\n      this[actionTypes.INDEX_ADD_TODOS](this.value);\n      this.value = '';\n    },\n    delete(e) {\n      this[actionTypes.INDEX_DELETE_TODOS](e.detail.index)\n    },\n    top(e) {\n      this[actionTypes.INDEX_TOP_TODOS](e.detail.index)\n    },\n    clear() {\n      this[actionTypes.INDEX_CHANGE_TODOS_CLEAR_COMPLETED]();\n    },\n    changeFilter0() {\n      this.filter = 0;\n    },\n    changeFilter1() {\n      this.filter = 1;\n    },\n    changeFilter2() {\n      this.filter = 2;\n    }\n  }\n  beforeCreate(res) {\n  }\n  created(res) {\n  }\n  beforeMount(res) {\n  }\n  mounted(res) {\n  }\n  beforeDestroy(res) {\n  }\n  destroyed(res) {\n  }\n\n}\n\nexport default new Index();\n\n</script>\n<style scoped>\n\n.page-container {\n  position: absolute;\n  top: 0;\n  right: 0;\n  bottom: 0;\n  left: 0;\n}\n.title {\n  align-self: center;\n  color: #61c7fc;\n  font-size: 72px;\n  margin-top: 160px;\n  margin-bottom: 20px;\n}\n.scroller-wrap {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n.main {\n  width: 600px;\n}\n.input-wrap {\n  position: relative;\n  height: 102px;\n  border-bottom: 1px solid #ccc;\n}\n.input-area {\n  position: absolute;\n  left: 0;\n  top: 0;\n  width: 600px;\n  height: 100px;\n  font-size: 32px;\n}\n.add-btn {\n  position: absolute;\n  left: 10px;\n  top: 42px;\n  width: 40px;\n  height: 22px;\n  overflow: hidden;\n}\n.add-btn::after{\n  content: \"\";\n  position: absolute;\n  left: -10px;\n  right: -10px;\n  bottom: -10px;\n  top: -10px;\n}\n.black-arrow {\n  position: absolute;\n  left: -20px;\n  top: -80px;\n  width: 80px;\n  height: 80px;\n  background: #333;\n  transform: rotate(45deg);\n  transition-property: background;\n  transition-duration: .2s;\n  transition-delay: 0s;\n  transition-timing-function: ease-in-out;\n}\n.white-arrow {\n  position: absolute;\n  left: -15px;\n  top: -74px;\n  width: 70px;\n  height: 70px;\n  background: #fff;\n  transform: rotate(45deg);\n}\n.option-wrap {\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  height: 100px;\n}\n.count {\n  font-size: 24px;\n  color: #999;\n}\n.filter {\n  flex: 1;\n  display: flex;\n  flex-direction: row;\n  justify-content: center;\n}\n.filter-default {\n  font-size: 24px;\n  color: #999;\n  margin: 0 10px;\n}\n.filter-active {\n  font-size: 24px;\n  color: #999;\n  border: 1px solid #999;\n  border-radius: 8px;\n  padding: 0 5px;\n}\n.clear-completed {\n  font-size: 24px;\n  color: #999;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"c-checkbox\": \"/components/c-checkbox/c-checkbox\"\n    }\n  },\n  \"weex\": {\n    \"attrweex\": \"2\"\n  },\n  \"web\": {\n    \"attrweb\": \"2\"\n  },\n  \"wx\": {\n    \"attrwx\": \"2\"\n  },\n  \"alipay\": {\n    \"attralipay\": \"2\"\n  },\n  \"baidu\": {\n    \"attrbaidu\": \"2\"\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/index.interface",
    "content": "<script cml-type=\"interface\">\ninterface ReplaceInterface {\n  getMsg(msg: string): void;\n}\n\n</script>\n\n<script cml-type=\"web\">\n\nclass Method implements ReplaceInterface {\n  getMsg(msg) {\n    return 'web:' + msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"weex\">\n\nclass Method implements ReplaceInterface {\n  getMsg(msg) {\n    return 'weex:' + msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"wx\">\n\nclass Method implements ReplaceInterface {\n  getMsg(msg) {\n    return 'wx:' + msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"alipay\">\n\nclass Method implements ReplaceInterface {\n  getMsg(msg) {\n    return 'alipay:' + msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"baidu\">\n\nclass Method implements ReplaceInterface {\n  getMsg(msg) {\n    return 'baidu:' + msg;\n  }\n}\n\nexport default new Method();\n</script>\n"
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/wx/wx.json",
    "content": "{\n  \"name\": \"unit-test\"\n}"
  },
  {
    "path": "packages/chameleon-tool-utils/test/testlib/wx/wx.wxml",
    "content": ""
  },
  {
    "path": "packages/chameleon-vue-precompiler/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n.vscode\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\n# dist\ndist/\n"
  },
  {
    "path": "packages/chameleon-vue-precompiler/.npmignore",
    "content": ".scripts\nnode_modules/"
  },
  {
    "path": "packages/chameleon-vue-precompiler/lib/index.js",
    "content": "\nconst Precompiler = require('./precompiler')\n\n/**\n * \n * @param {Object} config \n */\nmodule.exports = function getPrecompiler (config) {\n  const precompiler = new Precompiler(config)\n  return precompiler.compile.bind(precompiler)\n}\n"
  },
  {
    "path": "packages/chameleon-vue-precompiler/lib/precompiler/components/div.js",
    "content": "exports.processDiv = function (\n  el,\n  attrsMap,\n  attrsList,\n  attrs,\n  staticClass\n) {\n  // const finalClass = staticClass + ' cml-flx cml-view'\n  el.staticClass = `\"${staticClass}\"`\n  attrs.push({\n    name: `cml-type`,\n    value: '\"div\"'\n  })\n  el.plain = false\n}\n"
  },
  {
    "path": "packages/chameleon-vue-precompiler/lib/precompiler/components/index.js",
    "content": "const div = require('./div')\nconst span = require('./span')\n\nconst cmpMaps = { div, span }\n\nmodule.exports = {\n  div: div.processDiv,\n  span: span.processSpan,\n  // get ast compiler for binding styles.\n  getCompiler: function (tag) {\n    const cmp = cmpMaps[tag]\n    const compile = cmp && cmp.compile\n    return compile ? { compile } : undefined\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-vue-precompiler/lib/precompiler/components/span.js",
    "content": "exports.processSpan = function (\n    el,\n    attrsMap,\n    attrsList,\n    attrs,\n    staticClass\n  ) {\n    // const finalClass = staticClass + ' cml-bk cml-text'\n    el.staticClass = `\"${staticClass}\"`\n    attrs.push({\n      name: `cml-type`,\n      value: '\"span\"'\n    })\n    delete el.ns\n    el.plain = false\n  }"
  },
  {
    "path": "packages/chameleon-vue-precompiler/lib/precompiler/config.js",
    "content": "const util = require('./util')\n\nconst vendorReg = /webkit|moz/i\nfunction hyphen (key) {\n  return util.hyphenate(key.replace(vendorReg, function ($0) {\n    return `-${$0.toLowerCase()}-`\n  }))\n}\n\nfunction formatStyleNames (scaleStyles) {\n  return Object.keys(scaleStyles.reduce(function (pre, key) {\n    pre[key] = 1\n    pre[hyphen(key)] = 1\n    return pre\n  }, {}))\n}\n\nconst COM_FIELDS = [\n  'cmlRegisteredComponents',\n  'cmlBuiltInComponents',\n  'cmlComponents'\n]\n\nconst EXTRA_FIELDS = {\n  px2rem: function (config, usrConf) {\n    const { px2rem } = usrConf\n    const { px2rem: thisPx2rem } = config\n    if (px2rem) {\n      for (let k in px2rem) {\n        if (k === 'rootValue') {\n          // ignore rootValue. Always use 750. Why? We use meta[name=cml-viewport] and\n          // meta.setViewport API to set design viewport width, and they would be broken if\n          // we use other rootValue here.\n          continue\n        }\n        else if (px2rem.hasOwnProperty(k)) {\n          thisPx2rem[k] = px2rem[k]\n        }\n      }\n    }\n    return thisPx2rem\n  }\n}\n\nlet config = {\n  eventMap: {\n    click: 'cml$tap',\n    scroll: 'cml$scroll'\n  },\n  // these components should not bind events with .native.\n  cmlBuiltInComponents: [\n    'div',\n    'container',\n    'text',\n    'image',\n    'img',\n    'cell',\n    'a'\n  ],\n  // these components should auto bind events with .native.\n  cmlRegisteredComponents: [\n    'input',\n    'switch',\n    'list',\n    'scroller',\n    'waterfall',\n    'header',\n    'loading',\n    'refresh',\n    'loading-indicator',\n    'slider',\n    'cycleslider',\n    'slider-neighbor',\n    'indicator',\n    'textarea',\n    'video',\n    'web'\n  ],\n  cmlComponents: [\n    // cml components\n    'tabheader',\n    'mask',\n    'richtext',\n    'appbar',\n    'parallax'\n  ],\n  // add .stop to stop propagation for cml native events only.\n  // user defined events may not have the stopPropagation method.\n  cmlEvents: [\n    'click',\n    'tap',\n    'scroll',\n    // gesture\n    'touchstart',\n    'touchend',\n    'touchmove',\n    'swipe',\n    'panstart',\n    'panmove',\n    'panend',\n    'longpress',\n    'long',\n    // input & switch & slider\n    'input',\n    'key',\n    'keyup',\n    'keydown',\n    'return',\n    'change',\n    'focus',\n    'blur',\n    'active',\n    // appear series.\n    'appear',\n    'disappear',\n    'offsetAppear',\n    'offsetDisappear',\n    // refresh & loading\n    'refresh',\n    'pullingdown',\n    'loading',\n    // video\n    'start',\n    'pause',\n    'finish',\n    'fail'\n  ],\n  autoprefixer: {\n    browsers: ['> 0.1%', 'ios >= 8', 'not ie < 12']\n  },\n  px2rem: {\n    rootValue: 75,\n    minPixelValue: 1.01\n  },\n  bindingStyleNamesForPx2Rem: formatStyleNames([\n    'width',\n    'height',\n    'left',\n    'right',\n    'top',\n    'bottom',\n    'border',\n    'borderRadius',\n    'borderWidth',\n    'borderLeft',\n    'borderRight',\n    'borderTop',\n    'borderBottom',\n    'borderLeftWidth',\n    'borderRightWidth',\n    'borderTopWidth',\n    'borderBottomWidth',\n    'margin',\n    'marginLeft',\n    'marginRight',\n    'marginTop',\n    'marginBottom',\n    'padding',\n    'paddingLeft',\n    'paddingRight',\n    'paddingTop',\n    'paddingBottom',\n    'fontSize',\n    'lineHeight',\n    'transform',\n    'webkitTransform',\n    'WebkitTransform',\n    'mozTransform',\n    'MozTransform',\n    'itemSize'\n  ])\n}\n\nexports.get = function() {\n  return config\n}\n\nconfig.preservedTags = config.cmlBuiltInComponents.concat(config.cmlRegisteredComponents)\n\nexports.merge = function(usrConf) {\n  if (!usrConf) {\n    return\n  }\n\n  // merge COM_FIELDS fields.\n  mergeComponentField(usrConf)\n\n  // merge all fields except COM_FIELDS.\n  mergeExtra(usrConf)\n}\n\nfunction mergeComponentField(usrConf) {\n  COM_FIELDS.forEach(function (name) {\n    const vals = usrConf[name]\n    if (util.isArray(vals)) {\n      config[name] = util.mergeStringArray(\n        config[name],\n        vals\n      )\n    }\n  })\n}\n\nfunction mergeExtra(usrConf) {\n  for (const k in usrConf) {\n    if (COM_FIELDS.indexOf(k) <= -1) {\n      config[k] = EXTRA_FIELDS[k] ? EXTRA_FIELDS[k](config, usrConf): usrConf[k]\n    }\n  }\n}\n\n"
  },
  {
    "path": "packages/chameleon-vue-precompiler/lib/precompiler/hooks/events.js",
    "content": "const { extend } = require('../util')\nconst transEvtsMap = {\n  appear: 'appear',\n  offsetAppear: 'offset-appear',\n  disappear: 'disappear',\n  offsetDisappear: 'offset-disappear'\n}\n\n/**\n * check whether has a parent that meet the check-condition.\n * @param {Array<String>} flags a flag is to put on the parent node to\n *    opertimize the next travelsal's efficiency.\n * @param {Array<Function>} checks condition funtions to return true or false.\n * @returns {Array<Boolean>} returns a array with boolean values.\n */\nfunction checkParents (el, flags, checks) {\n  let marks\n  const len = checks.length\n  const results = []\n  let cnts = 0  // count for results that already checked out.\n  if (!Array.isArray(flags)) {\n    flags = [flags]\n  }\n  if (!Array.isArray(checks)) {\n    checks = [checks]\n  }\n  marks = flags.map((flag) => `_${flag}`)\n  let parent = el.parent\n  while (parent) {\n    if (cnts === len) {\n      return results\n    }\n    checks.forEach((check, idx) => {\n      if (typeof results[idx] === 'boolean') {\n        return\n      }\n      const mark = marks[idx]\n      let res\n      if (check(parent) || parent[mark] === true) {\n        res = true\n      }\n      else if (parent[mark] === false) {\n        res = false\n      }\n      else {\n        return\n      }\n      results[idx] = res\n      el[mark] = res\n      cnts++\n    })\n    parent = parent.parent\n  }\n  for (let i = 0; i < len; i++) {\n    if (typeof results[i] !== 'boolean') {\n      results[i] = false\n      el[marks[i]] = false\n      cnts++\n      if (cnts === len) {\n        return results\n      }\n    }\n  }\n  return results\n}\n\nfunction checkBubble (el) {\n  return checkParents(\n    el,\n    ['hasBubbleParent'],\n    [function (el) {\n      return !!el._bubble\n    }]\n  )[0]\n}\n\n/**\n * bind events and nativeEvents:\n *  - with appear events: cml-appear, data-evt-xxx\n *  - with all cml events: stop propagation by default.\n *  - with click and scroll events: cml$tap and cml$scroll.\n */\nfunction bindEvents(evts, el, attrs, cmlEvents, appearAttached) {\n\n  const evtKeys = Object.keys(evts)\n  for (let i = 0, l = evtKeys.length; i < l; i++) {\n    const key = evtKeys[i]\n    const transKey = transEvtsMap[key]\n    const evtName = transKey || key\n    if (transKey && !appearAttached.value) {\n      appearAttached.value = true\n      attrs.push({\n        name: `cml-appear`,\n        value: '\"\"'\n      })\n    }\n    attrs.push({\n      name: `data-evt-${evtName}`,\n      value: '\"\"'\n    })\n  }\n\n  // const hasBubbleParent = checkBubble(el)\n  const hasBubbleParent = true;\n\n  /**\n   * stop propagation by default unless attr 'bubble' is set to true.\n   * only for cml events, user defined events should not be stopped\n   * by default.\n   */\n  if (!hasBubbleParent) {\n    for (const k in evts) {\n      if (cmlEvents.indexOf(k) > -1) {\n        const evt = evts[k]\n        const modifiers = evt.modifiers || (evt.modifiers = {})\n        modifiers.stop = true\n      }\n    }\n  }\n\n  /**\n   * map event handlers.\n   * - click -> cml$tap\n   * - scroll -> cml$scroll\n   */\n  if (evts.tap) { //这里取到tap事件进行代理，而不是原来的click事件，区分了tap和click\n    evts['cml$tap'] = extend({}, evts.tap);\n    delete evts.tap; //zepto，scroller等可能会在touchend阶段创建tap事件并触发它所以要删除；\n    if (!hasBubbleParent) {\n      evts.click = {\n        value: '$stopOuterA'\n      }\n    }\n  }\n  if (evts.scroll) {\n    evts['cml$scroll'] = evts.scroll\n    delete evts.scroll\n  }\n}\n\nmodule.exports = function eventsHook (\n  el,\n  attrsMap,\n  attrsList,\n  attrs,\n  staticClass\n) {\n  // bind _bubble attr for every node.\n  const bubble = attrsMap.bubble\n  if (bubble === 'true' || bubble === true) {\n    el._bubble = true\n  }\n\n  const { cmlEvents } = this.config\n  let evts = el.events\n  let nativeEvts = el.nativeEvents\n\n  if (nativeEvts && el._builtIn) {\n    /**\n     * for div, image, text, cell, a, ...\n     * user should bind all events without .native.\n     */\n    nativeEvts = null\n    delete el.nativeEvents\n  }\n  if (el._cmlRegistered) {\n    /**\n     * for slider, list, ...\n     * user should bind events without .native.\n     * in our events handling, all events should transfer to\n     * .native binding.\n     */\n    delete el.nativeEvents\n    nativeEvts = null\n    if (evts) {\n      nativeEvts = el.nativeEvents = evts\n    }\n    evts = null\n    delete el.events\n  }\n\n  const appearAttached = {\n    value: false\n  }\n  if (evts) {\n    bindEvents(evts, el, attrs, cmlEvents, appearAttached)\n  }\n  if (nativeEvts) {\n    bindEvents(nativeEvts, el, attrs, cmlEvents, appearAttached)\n  }\n  else {\n    delete el.nativeEvents\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-vue-precompiler/lib/precompiler/hooks/index.js",
    "content": "module.exports = {\n  'events': require('./events'),\n  // 'style': require('./style'),\n  // 'style-binding': require('./style-binding')\n}\n"
  },
  {
    "path": "packages/chameleon-vue-precompiler/lib/precompiler/hooks/style-binding.js",
    "content": "/**\n * @fileOverview to wrap object leterals with _px2rem()\n */\n\nconst escodegen = require('escodegen')\nconst config = require('../config')\nconst bindingStyleNamesForPx2Rem = config.get()['bindingStyleNamesForPx2Rem']\n\nconst { ast } = require('../util')\nconst { getCompiler } = require('../components')\nconst { getTransformer } = require('wxv-transformer')\n\nfunction transformArray (ast, tagName, rootValue) {\n  const elements = ast.elements\n  for (let i = 0, l = elements.length; i < l; i++) {\n    const element = elements[i]\n    const result = transformNode(element, tagName, rootValue)\n    if (result) {\n      elements[i] = result\n    }\n  }\n  return ast\n}\n\n/**\n * transform ConditionalExpressions. e.g.:\n *  :style=\"a ? b : c\" => :style=\"_px2rem(a, rootValue) ? _px2rem(b, rootValue) : _px2rem(c, rootValue)\"\n * @param {ConditionalExpression} ast\n */\nfunction transformConditional (ast, tagName, rootValue) {\n  ast.consequent = transformNode(ast.consequent, tagName, rootValue)\n  ast.alternate = transformNode(ast.alternate, tagName, rootValue)\n  return ast\n}\n\n/**\n * transform :style=\"{width:w}\" => :style=\"{width:_px2rem(w, rootValue)}\"\n * This kind of style binding with object literal is a good practice.\n * @param {ObjectExpression} ast\n */\nfunction transformObject (ast, tagName, rootValue) {\n  const compiler = getCompiler(tagName)\n  if (compiler) {\n    return compiler.compile(ast, bindingStyleNamesForPx2Rem, rootValue, transformNode)\n  }\n  const properties = ast.properties\n  for (let i = 0, l = properties.length; i < l; i++) {\n    const prop = properties[i]\n    const keyNode = prop.key\n    const keyType = keyNode.type\n    const key = keyType === 'Literal' ? keyNode.value : keyNode.name\n    if (bindingStyleNamesForPx2Rem.indexOf(key) > -1) {\n      prop.value = transformNode(prop.value, tagName, rootValue, true/*asPropValue*/)\n    }\n  }\n  return ast\n}\n\nfunction transformLiteral (...args) {\n  // not to transform literal string directly since we don't know\n  // if we could use 0.5px to support hairline unless in runtime.\n  return transformAsWhole(...args)\n}\n\n/**\n * type = 'Identifier'\n * @param {Identifier} ast\n */\nfunction transformIdentifier (...args) {\n  return transformAsWhole(...args)\n}\n\n/**\n * transform MemberExpression like :styles=\"myData.styles\"\n */\nfunction transformMember (...args) {\n  return transformAsWhole(...args)\n}\n\n/**\n * transform CallExpression like :stylles=\"getMyStyles()\"\n */\nfunction transformCall (ast, ...args) {\n  const name = ast.callee.name\n  if (name && name.match(/_processExclusiveStyle|_px2rem/)) {\n    return ast // already transformed.\n  }\n  return transformAsWhole(ast, ...args)\n}\n\n/**\n * transform a value object for a property in a object expression.\n * @param {Literal || Identifier} ast a value expression in object literal.\n */\nfunction transformAsValue (ast, tagName, rootValue) {\n  return {\n    type: 'CallExpression',\n    callee: {\n      type: 'Identifier',\n      name: '_px2rem'\n    },\n    arguments: [ast, { type: 'Literal', value: rootValue }]\n  }\n}\n\n/**\n * transform :style=\"expression\" => :style=\"_px2rem(expression, opts)\" directly\n * wrapping with _px2rem or _processExclusiveStyle function.\n * //////////////////////\n * support node type:\n *  - MemberExpression\n *  - Identifier\n *  - CallExpression\n * //////////////////////\n * not support:\n *  - ObjectExpression\n *  - ConditionalExpression\n *  - ArrayExpression\n */\nfunction transformAsWhole (ast, tagName, rootValue) {\n  let callName = '_px2rem'\n  const args = [ast, { type: 'Literal', value: rootValue }]\n  const transformer = getTransformer(tagName)\n  if (transformer) {\n    // special treatment for exclusive styles, such as text-lines\n    callName = '_processExclusiveStyle'\n    args.push({\n      type: 'Literal',\n      value: tagName,\n    })\n  }\n  return {\n    type: 'CallExpression',\n    callee: {\n      type: 'Identifier',\n      name: callName\n    },\n    arguments: args\n  }\n}\n\n/**\n * @param {boolean} asPropValue: whether this ast node is a value node for a style\n * object. If it is, we shouldn't use _processExclusiveStyle.\n */\nfunction transformNode (ast, tagName, rootValue, asPropValue) {\n  if (asPropValue) {\n    return transformAsValue(ast, tagName, rootValue)\n  }\n  const type = ast.type\n  switch (type) {\n    // not as whole types.\n    case 'ArrayExpression':\n      return transformArray(ast, tagName, rootValue)\n    case 'ConditionalExpression':\n      return transformConditional(ast, tagName, rootValue)\n    case 'ObjectExpression':\n      return transformObject(ast, tagName, rootValue)\n    // as whole types.\n    case 'Identifier':\n      return transformIdentifier(ast, tagName, rootValue)\n    case 'CallExpression':\n      return transformCall(ast, tagName, rootValue)\n    case 'MemberExpression':\n      return transformMember(ast, tagName, rootValue)\n    case 'Literal':\n      return transformLiteral(ast, tagName, rootValue)\n    default: {\n      console.warn('[weex-vue-precompiler]: current expression not in transform lists:', type)\n      console.log('[weex-vue-precomiler]: current ast node:', ast)\n      return transformAsWhole(ast, tagName, rootValue)\n    }\n  }\n}\n\nfunction styleBindingHook (\n  el,\n  attrsMap,\n  attrsList,\n  attrs,\n  staticClass\n) {\n  try {\n    const styleBinding = el.styleBinding\n    if (!styleBinding) {\n      return\n    }\n    const parsedAst = ast.parseAst(styleBinding.trim())\n    const { rootValue } = this.config.px2rem\n    const transformedAst = transformNode(parsedAst, el._origTag || el.tag, rootValue)\n    const res = escodegen.generate(transformedAst, {\n      format: {\n        indent: {\n          style: ' '\n        },\n        newline: '',\n      }\n    })\n    el.styleBinding = res\n  } catch (err) {\n    console.log(`[weex-vue-precompiler] ooops! There\\'s a err`)\n  }\n}\n\nmodule.exports = styleBindingHook\n"
  },
  {
    "path": "packages/chameleon-vue-precompiler/lib/precompiler/hooks/style.js",
    "content": "const postcss = require('postcss')\nconst autoprefixer = require('autoprefixer')\nconst px2rem = require('postcss-plugin-px2rem')\n\nconst util = require('../util')\nconst { getStaticStyleObject } = util\n\nconst styleProcessors = [\n  function position (styleObj, el) {\n    const value = styleObj['position']\n    if (value === 'sticky') {\n      el.attrs.push({\n        name: 'cml-sticky',\n        value: '\"\"'\n      })\n    }\n  }\n]\n\n/**\n * for test.\n */\n// const testStyle = '{\"width\":\"750px\",\"height\":\"120px\",\"display\":\"flex\",\"background-color\":\"red\",\"background-size\":\"cover\"}'\n// var res = postcss([\n//   autoprefixer({\n//     browsers: ['> 0.1%', 'ios >= 8', 'not ie < 12']\n//   }),\n//   px2rem({\n//     rootValue: 75\n//   })\n// ])\n// .process(testStyle\n//   .replace(/\\s/g, '')\n//   .replace(/,/g, ';')\n//   .replace(/\"/g, '')\n// ).css\n//   .replace(/[{}]/g, '')\n//   .split(';')\n//   .map(statement => statement.split(':').map(part => `\"${part}\"`).join(':'))\n//   .join(\",\")\n// res = `{${res}}`\n// console.log('res=>', res)\n\nmodule.exports = function styleHook (\n  el,\n  attrsMap,\n  attrsList,\n  attrs,\n  staticClass\n) {\n  const staticStyle = el.staticStyle\n  if (!staticStyle) {\n    return\n  }\n  \n  let styleObj = getStaticStyleObject(staticStyle)\n  for (let i = 0, l = styleProcessors.length; i < l; i++) {\n    const process = styleProcessors[i]\n    process(styleObj, el)\n  }\n\n  const config = this.config\n  const before = staticStyle\n    .trim()\n    .replace(/\",/g, '\";')\n    .replace(/\"/g, '')\n  // console.log('before:', staticStyle)\n  const after = postcss([\n      autoprefixer(config.autoprefixer),\n      px2rem(config.px2rem)\n    ])\n    .process(before)\n    .css\n    .replace(/[{}]/g, '')\n    .split(';')\n    .map(statement => statement\n      .split(':')\n      .map(part => {\n        return '\"' + part.replace(\n          /([+-]?\\d+(?:.\\d*)?)(wx)/g,\n          function ($0, $1, $2) {\n            return $1 + 'px'\n          }\n        ) + '\"'\n      })\n      .join(':'))\n    .join(\",\")\n  // console.log('res=>', after)\n  el.staticStyle = `{${after}}`\n}\n"
  },
  {
    "path": "packages/chameleon-vue-precompiler/lib/precompiler/index.js",
    "content": "const { transformTag } = require('./node/tag')\nconst components = require('./components')\nconst hooks = require('./hooks')\nconst conf = require('./config')\n\nclass Precompiler {\n    /**\n     * usrConf:\n     *  - preservedTags: the preserved cml components tag list. The default\n     *    value is: ['a','container','div','image','img','text','input',\n     *    'switch','list','scroller','waterfall','slider','indicator',\n     *    'loading-indicator','loading','refresh','textarea','video','web'].\n     *    If you have other components as plugins installed in cml, you\n     *    should add them to this lists, add pass the whole list to this.\n     *  - autoprefixer: options for autoprefixer. default is { browsers:\n     *    ['> 0.1%', 'ios >= 8', 'not ie < 12'] }.\n     *  - px2rem: options for postcss-plugin-px2rem. default is: { rootValue: 75 }\n     * @param {*} options\n     */\n    constructor (usrConf) {\n      conf.merge(usrConf)\n      this.config = conf.get()\n    }\n  \n    compile (el) {\n      const attrsMap = el.attrsMap ? el.attrsMap : (el.attrsMap = {})\n      const attrsList = el.attrsList ? el.attrsList : (el.attrsList = [])\n      const attrs = el.attrs ? el.attrs : (el.attrs = [])\n      const staticClass = (el.staticClass || '').replace(/\"/g, '')\n      const args = [el, attrsMap, attrsList, attrs, staticClass]\n      \n      const tag = transformTag(el)\n  \n      const {\n        cmlBuiltInComponents,\n        cmlRegisteredComponents,\n        cmlComponents\n      } = this.config\n\n      if (cmlBuiltInComponents.indexOf(el._origTag || el.tag) > -1) {\n        el._cmlBuiltIn = true\n      }\n      else if (\n        cmlRegisteredComponents.indexOf(el.tag) > -1\n        || cmlComponents.indexOf(el.tag) > -1\n      ) {\n        el._cmlRegistered = true\n      }\n      else {\n        el._userRegistered = true\n      }\n  \n      // use component processors to process components' special attrs.\n      // const processor = components[tag]\n      // if (processor) {\n      //   processor.apply(this, args)\n      // }\n  \n      // process hooks.\n      for (const k in hooks) {\n        hooks[k].apply(this, args)\n      }\n    }\n  }\n\n  module.exports = Precompiler"
  },
  {
    "path": "packages/chameleon-vue-precompiler/lib/precompiler/node/tag.js",
    "content": "const map = {\n    span: ['text', 'span'],\n    div: ['view', 'cell', 'cover-view', 'button', 'slider-item', 'div'],\n    template: ['block', 'template'],\n    img: ['image', 'img']\n  }\n  \n  const tagMap = Object.keys(map).reduce(function (pre, toTag) {\n    const tagArr = map[toTag]\n    tagArr.forEach(function (fromTag) {\n      pre[fromTag] = toTag\n    })\n    return pre\n  }, {})\n  \n  exports.transformTag = function (el) {\n    const toTag = tagMap[el.tag]\n    if (toTag) {\n      el._origTag = el.tag\n      el.tag = toTag\n    }\n    return el.tag\n  }\n  "
  },
  {
    "path": "packages/chameleon-vue-precompiler/lib/precompiler/util/ast.js",
    "content": "const esprima = require('esprima')\n\nexports.parseAst = (function () {\n  const _cached = {}\n  return function (val) {\n    let statement = 'a = '\n    if (typeof val === 'object') {\n      statement += `${JSON.stringify(val)}`\n    }\n    else {\n      statement += val\n    }\n    const cached = _cached[statement]\n    if (cached) {\n      return cached\n    }\n    const ast = esprima.parse(statement)\n      .body[0].expression.right\n    _cached[statement] = ast\n    return ast\n  }\n})()\n"
  },
  {
    "path": "packages/chameleon-vue-precompiler/lib/precompiler/util/index.js",
    "content": "const ast = require('./ast')\nexports.ast = ast\n\nexports.extend = function (to, from) {\n  if (!to) { return }\n  const args = Array.prototype.slice.call(arguments, 1)\n  for (let i = 0, l = args.length; i < l; i++) {\n    const from = args[i]\n    if (!from) { continue }\n    for (const k in from) {\n      if (from.hasOwnProperty(k)) {\n        to[k] = from[k]\n      }\n    }\n  }\n  return to\n}\n\nconst ARRAY_STRING = '[object Array]'\nexports.isArray = function (arr) {\n  return toString.call(arr) === ARRAY_STRING\n}\n\nconst camelizeRE = /-(\\w)/g\nexports.camelize = str => {\n  return str.replace(camelizeRE, (_, c) => c.toUpperCase())\n}\n\nconst hyphenateRE = /([^-])([A-Z])/g\nexports.hyphenate = str => {\n  return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase()\n}\n\nexports.getStaticStyleObject = function (el) {\n  let staticStyle = el.staticStyle\n  try {\n    staticStyle = JSON.parse(staticStyle)\n  }\n  catch (e) {\n    staticStyle = {}\n  }\n  return staticStyle || {}\n}\n\nexports.mergeStringArray = function () {\n  const arrs = Array.prototype.slice.call(arguments)\n  const arrMap = {}\n  for (let i = 0, l = arrs.length; i < l; i++) {\n    const arr = arrs[i]\n    for (let j = 0, len = arr.length; j < len; j++) {\n      arrMap[arr[j]] = true\n    }\n  }\n  return Object.keys(arrMap)\n}\n"
  },
  {
    "path": "packages/chameleon-vue-precompiler/package.json",
    "content": "{\n  \"name\": \"chameleon-vue-precompiler\",\n  \"version\": \"1.0.8\",\n  \"description\": \"为chameleon提供 vue-loader 的模板预编译处理能力\",\n  \"author\": \"Chameleon-Team\",\n  \"scripts\": {},\n  \"license\": \"Apache\",\n  \"main\": \"lib/index.js\",\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"dependencies\": {\n    \"esprima\": \"^4.0.1\"\n  },\n  \"gitHead\": \"5ddcde4330774710f7646559446e008f7785ce00\"\n}"
  },
  {
    "path": "packages/chameleon-webpack-plugin/.eslintrc",
    "content": "/* eslint-enable */\n{\n  \"globals\": {\n      \"cml\": false\n  },\n  \"env\": {\n      \"browser\": true,\n      \"node\": true,\n      \"commonjs\": true,\n      \"amd\": true,\n      \"es6\": true,\n      \"mocha\": true\n  },\n  \"parserOptions\": {\n      \"ecmaVersion\": 6,\n      \"sourceType\": \"module\", \n      \"ecmaFeatures\": {\n          \"globalReturn\": true,\n          \"impliedStrict\": true,\n          \"jsx\": true,\n          \"modules\": true\n      }\n  },\n  \"plugins\": [\n\n  ],\n  \"extends\": [\n      \"eslint:recommended\"\n  ],\n\n\n  \"rules\": {\n\n     \n      \"no-cond-assign\": 2,\n      \"no-console\": 0,\n      \n      \"no-constant-condition\": 2,\n      \"no-control-regex\": 2,\n      \"comma-dangle\": [1, \"never\"],\n      \"no-debugger\": 2,\n      \"no-dupe-args\": 2,\n      \"no-dupe-keys\": 2,\n      \"no-duplicate-case\": 2,\n      \"no-empty\": 2,\n      \"no-empty-character-class\": 2,\n      \"no-ex-assign\": 2,\n      \"no-extra-boolean-cast\": 2,\n      \"no-extra-parens\": 0,\n      \"no-extra-semi\": 2,\n      \"no-func-assign\": 2,\n      \"no-inner-declarations\": [2, \"functions\"],\n      \"no-invalid-regexp\": 2,\n      \"no-irregular-whitespace\": 2,\n      \"no-negated-in-lhs\": 2,\n      \"no-obj-calls\": 2,\n      \"no-prototype-builtins\": 0,\n      \"no-regex-spaces\": 2,\n      \"no-sparse-arrays\": 2,\n      \"no-unexpected-multiline\": 2,\n      \"no-unreachable\": 2,\n      \"use-isnan\": 2,\n      \"valid-jsdoc\": 0,\n      \"valid-typeof\": 2,\n\n\n      \"accessor-pairs\": 2,\n      \"array-callback-return\": 0,\n      \"block-scoped-var\": 0,\n      \"complexity\": [2, 30],\n      \"consistent-return\": 0,\n      \"curly\": [2, \"all\"],\n      \"default-case\": 2,\n      \"dot-location\": [2, \"property\"],\n      \"dot-notation\": [2, {\n          \"allowKeywords\": false\n      }],\n      \"eqeqeq\": [0, \"allow-null\"],\n      \"guard-for-in\": 2,\n      \"no-alert\": 0,\n      \"no-caller\": 2,\n      \"no-case-declarations\": 2,\n      \"no-div-regex\": 2,\n      \"no-else-return\": 0,\n      \"no-empty-function\": 2,\n      \"no-empty-pattern\": 2,\n      \"no-eq-null\": 1,\n      \"no-eval\": 2,\n      \"no-extend-native\": 2,\n      \"no-extra-bind\": 2,\n      \"no-extra-label:\": 0,\n      \"no-fallthrough\": 2,\n      \"no-floating-decimal\": 2,\n      \"no-implicit-coercion\": 0,\n      \"no-implicit-globals\": 1,\n      \"no-implied-eval\": 2,\n      \"no-invalid-this\": 0,\n      \"no-iterator\": 2,\n      \"no-labels\": 2,\n      \"no-lone-blocks\": 2,\n      \"no-loop-func\": 1,\n      \"no-magic-numbers\": [1, {\n          \"ignore\": [0, -1, 1]\n      }],\n      \"no-multi-spaces\": 2,\n      \"no-multi-str\": 2,\n      \"no-native-reassign\": 2,\n      \"no-new\": 2,\n      // 禁止对 Function 对象使用 new 操作符\n      \"no-new-func\": 0,\n      // 禁止对 String，Number 和 Boolean 使用 new 操作符\n      \"no-new-wrappers\": 2,\n      // 禁用八进制字面量\n      \"no-octal\": 2,\n      // 禁止在字符串中使用八进制转义序列\n      \"no-octal-escape\": 2,\n      // 不允许对 function 的参数进行重新赋值\n      \"no-param-reassign\": 0,\n      // 禁用 __proto__ 属性\n      \"no-proto\": 2,\n      // 禁止使用 var 多次声明同一变量\n      \"no-redeclare\": 2,\n      // 禁用指定的通过 require 加载的模块\n      \"no-return-assign\": 0,\n      // 禁止使用 javascript: url\n      \"no-script-url\": 0,\n      // 禁止自我赋值\n      \"no-self-assign\": 2,\n      // 禁止自身比较\n      \"no-self-compare\": 2,\n      // 禁用逗号操作符\n      \"no-sequences\": 2,\n      // 禁止抛出非异常字面量\n      \"no-throw-literal\": 2,\n      // 禁用一成不变的循环条件\n      \"no-unmodified-loop-condition\": 2,\n      // 禁止出现未使用过的表达式\n      \"no-unused-expressions\": 0,\n      // 禁用未使用过的标签\n      \"no-unused-labels\": 2,\n      // 禁止不必要的 .call() 和 .apply()\n      \"no-useless-call\": 2,\n      // 禁止不必要的字符串字面量或模板字面量的连接\n      \"no-useless-concat\": 0,\n      // 禁用不必要的转义字符\n      \"no-useless-escape\": 0,\n      // 禁用 void 操作符\n      \"no-void\": 0,\n      // 禁止在注释中使用特定的警告术语\n      \"no-warning-comments\": 0,\n      // 禁用 with 语句\n      \"no-with\": 2,\n      // 强制在parseInt()使用基数参数\n      \"radix\": 2,\n      // 要求所有的 var 声明出现在它们所在的作用域顶部\n      \"vars-on-top\": 0,\n      // 要求 IIFE 使用括号括起来\n      \"wrap-iife\": [2, \"any\"],\n      // 要求或禁止 “Yoda” 条件\n      \"yoda\": [2, \"never\"],\n      // 要求或禁止使用严格模式指令\n      \"strict\": 0,\n\n\n      //////////////\n      // 变量声明 //\n      //////////////\n\n      // 要求或禁止 var 声明中的初始化(初值)\n      \"init-declarations\": 0,\n      // 不允许 catch 子句的参数与外层作用域中的变量同名\n      \"no-catch-shadow\": 0,\n      // 禁止删除变量\n      \"no-delete-var\": 2,\n      // 不允许标签与变量同名\n      \"no-label-var\": 2,\n      // 禁用特定的全局变量\n      \"no-restricted-globals\": 0,\n      // 禁止 var 声明 与外层作用域的变量同名\n      \"no-shadow\": 0,\n      // 禁止覆盖受限制的标识符\n      \"no-shadow-restricted-names\": 2,\n      // 禁用未声明的变量，除非它们在 /*global */ 注释中被提到\n      \"no-undef\": 2,\n      // 禁止将变量初始化为 undefined\n      \"no-undef-init\": 2,\n      // 禁止将 undefined 作为标识符\n      \"no-undefined\": 0,\n      // 禁止出现未使用过的变量\n      \"no-unused-vars\": [2, {\n          \"vars\": \"all\",\n          \"args\": \"none\"\n      }],\n      // 不允许在变量定义之前使用它们\n      \"no-use-before-define\": 0,\n\n      //////////////////////////\n      // Node.js and CommonJS //\n      //////////////////////////\n\n      // require return statements after callbacks\n      \"callback-return\": 0,\n      // 要求 require() 出现在顶层模块作用域中\n      \"global-require\": 1,\n      // 要求回调函数中有容错处理\n      \"handle-callback-err\": [2, \"^(err|error)$\"],\n      // 禁止混合常规 var 声明和 require 调用\n      \"no-mixed-requires\": 0,\n      // 禁止调用 require 时使用 new 操作符\n      \"no-new-require\": 2,\n      // 禁止对 __dirname 和 __filename进行字符串连接\n      \"no-path-concat\": 0,\n      // 禁用 process.env\n      \"no-process-env\": 0,\n      // 禁用 process.exit()\n      \"no-process-exit\": 0,\n      // 禁用同步方法\n      \"no-sync\": 0,\n\n      //////////////\n      // 风格指南 //\n      //////////////\n\n      // 指定数组的元素之间要以空格隔开(, 后面)， never参数：[ 之前和 ] 之后不能带空格，always参数：[ 之前和 ] 之后必须带空格\n      \"array-bracket-spacing\": [2, \"never\"],\n      // 禁止或强制在单行代码块中使用空格(禁用)\n      \"block-spacing\": [1, \"never\"],\n      //强制使用一致的缩进 第二个参数为 \"tab\" 时，会使用tab，\n      // if while function 后面的{必须与if在同一行，java风格。\n      \"brace-style\": [2, \"1tbs\", {\n          \"allowSingleLine\": true\n      }],\n      // 双峰驼命名格式\n      \"camelcase\": 2,\n      // 控制逗号前后的空格\n      \"comma-spacing\": [2, {\n          \"before\": false,\n          \"after\": true\n      }],\n      // 控制逗号在行尾出现还是在行首出现 (默认行尾)\n      // http://eslint.org/docs/rules/comma-style\n      \"comma-style\": [2, \"last\"],\n      //\"SwitchCase\" (默认：0) 强制 switch 语句中的 case 子句的缩进水平\n      // 以方括号取对象属性时，[ 后面和 ] 前面是否需要空格, 可选参数 never, always\n      \"computed-property-spacing\": [2, \"never\"],\n      // 用于指统一在回调函数中指向this的变量名，箭头函数中的this已经可以指向外层调用者，应该没卵用了\n      // e.g [0,\"that\"] 指定只能 var that = this. that不能指向其他任何值，this也不能赋值给that以外的其他值\n      \"consistent-this\": [1, \"that\"],\n      // 强制使用命名的 function 表达式\n      \"func-names\": 0,\n      // 文件末尾强制换行\n      \"eol-last\": 2,\n      \"indent\": [2, 2, {\n          \"SwitchCase\": 1\n      }],\n      // 强制在对象字面量的属性中键和值之间使用一致的间距\n      \"key-spacing\": [2, {\n          \"beforeColon\": false,\n          \"afterColon\": true\n      }],\n      // 强制使用一致的换行风格\n      \"linebreak-style\": [1, \"unix\"],\n      // 要求在注释周围有空行 ( 要求在块级注释之前有一空行)\n      \"lines-around-comment\": [1, {\n          \"beforeBlockComment\": true\n      }],\n      // 强制一致地使用函数声明或函数表达式，方法定义风格，参数：\n      // declaration: 强制使用方法声明的方式，function f(){} e.g [2, \"declaration\"]\n      // expression：强制使用方法表达式的方式，var f = function() {} e.g [2, \"expression\"]\n      // allowArrowFunctions: declaration风格中允许箭头函数。 e.g [2, \"declaration\", { \"allowArrowFunctions\": true }]\n      \"func-style\": 0,\n      // 强制回调函数最大嵌套深度 5层\n      \"max-nested-callbacks\": [1, 5],\n      // 禁止使用指定的标识符\n      \"id-blacklist\": 0,\n      // 强制标识符的最新和最大长度\n      \"id-length\": 0,\n      // 要求标识符匹配一个指定的正则表达式\n      \"id-match\": 0,\n      // 强制在 JSX 属性中一致地使用双引号或单引号\n      \"jsx-quotes\": 0,\n      // 强制在关键字前后使用一致的空格 (前后腰需要)\n      \"keyword-spacing\": 2,\n      // 强制一行的最大长度\n      \"max-len\": [1, 200],\n      // 强制最大行数\n      \"max-lines\": 0,\n      // 强制 function 定义中最多允许的参数数量\n      \"max-params\": [1, 7],\n      // 强制 function 块最多允许的的语句数量\n      \"max-statements\": [1, 200],\n      // 强制每一行中所允许的最大语句数量\n      \"max-statements-per-line\": 0,\n      // 要求构造函数首字母大写 （要求调用 new 操作符时有首字母大小的函数，允许调用首字母大写的函数时没有 new 操作符。）\n      \"new-cap\": [2, {\n          \"newIsCap\": true,\n          \"capIsNew\": false\n      }],\n      // 要求调用无参构造函数时有圆括号\n      \"new-parens\": 2,\n      // 要求或禁止 var 声明语句后有一行空行\n      \"newline-after-var\": 0,\n      // 禁止使用 Array 构造函数\n      \"no-array-constructor\": 2,\n      // 禁用按位运算符\n      \"no-bitwise\": 0,\n      // 要求 return 语句之前有一空行\n      \"newline-before-return\": 0,\n      // 要求方法链中每个调用都有一个换行符\n      \"newline-per-chained-call\": 1,\n      // 禁用 continue 语句\n      \"no-continue\": 0,\n      // 禁止在代码行后使用内联注释\n      \"no-inline-comments\": 0,\n      // 禁止 if 作为唯一的语句出现在 else 语句中\n      \"no-lonely-if\": 0,\n      // 禁止混合使用不同的操作符\n      \"no-mixed-operators\": 0,\n      // 不允许空格和 tab 混合缩进\n      \"no-mixed-spaces-and-tabs\": 2,\n      // 不允许多个空行\n      \"no-multiple-empty-lines\": [2, {\n          \"max\": 2\n      }],\n      // 不允许否定的表达式\n      \"no-negated-condition\": 0,\n      // 不允许使用嵌套的三元表达式\n      \"no-nested-ternary\": 0,\n      // 禁止使用 Object 的构造函数\n      \"no-new-object\": 2,\n      // 禁止使用一元操作符 ++ 和 --\n      \"no-plusplus\": 0,\n      // 禁止使用特定的语法\n      \"no-restricted-syntax\": 0,\n      // 禁止 function 标识符和括号之间出现空格\n      \"no-spaced-func\": 2,\n      // 不允许使用三元操作符\n      \"no-ternary\": 0,\n      // 禁用行尾空格\n      \"no-trailing-spaces\": 2,\n      // 禁止标识符中有悬空下划线_bar\n      \"no-underscore-dangle\": 0,\n      // 禁止可以在有更简单的可替代的表达式时使用三元操作符\n      \"no-unneeded-ternary\": 2,\n      // 禁止属性前有空白\n      \"no-whitespace-before-property\": 0,\n      // 强制花括号内换行符的一致性\n      \"object-curly-newline\": 0,\n      // 强制在花括号中使用一致的空格\n      \"object-curly-spacing\": 0,\n      // 强制将对象的属性放在不同的行上\n      \"object-property-newline\": 0,\n      // 强制函数中的变量要么一起声明要么分开声明\n      \"one-var\": [2, {\n          \"initialized\": \"never\"\n      }],\n      // 要求或禁止在 var 声明周围换行\n      \"one-var-declaration-per-line\": 0,\n      // 要求或禁止在可能的情况下要求使用简化的赋值操作符\n      \"operator-assignment\": 0,\n      // 强制操作符使用一致的换行符\n      \"operator-linebreak\": [2, \"after\", {\n          \"overrides\": {\n              \"?\": \"before\",\n              \":\": \"before\"\n          }\n      }],\n      // 要求或禁止块内填充\n      \"padded-blocks\": 0,\n      // 要求对象字面量属性名称用引号括起来\n      \"quote-props\": 0,\n      // 强制使用一致的反勾号、双引号或单引号\n      // \"quotes\": [2, \"single\", \"avoid-escape\"],\n      // 要求使用 JSDoc 注释\n      \"require-jsdoc\": 0,\n      // 要求或禁止使用分号而不是 ASI（这个才是控制行尾部分号的，）\n      \"semi\": [0, \"always\"],\n      // 强制分号之前和之后使用一致的空格\n      \"semi-spacing\": 0,\n      // 要求同一个声明块中的变量按顺序排列\n      \"sort-vars\": 0,\n      // 强制在块之前使用一致的空格\n      \"space-before-blocks\": [2, \"always\"],\n      // 强制在 function的左括号之前使用一致的空格\n      \"space-before-function-paren\": [0, \"always\"],\n      // 强制在圆括号内使用一致的空格\n      \"space-in-parens\": [2, \"never\"],\n      // 要求操作符周围有空格\n      \"space-infix-ops\": 2,\n      // 强制在一元操作符前后使用一致的空格\n      \"space-unary-ops\": [2, {\n          \"words\": true,\n          \"nonwords\": false\n      }],\n      // 强制在注释中 // 或 /* 使用一致的空格\n      \"spaced-comment\": [2, \"always\", {\n          \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n      }],\n      // 要求或禁止 Unicode BOM\n      \"unicode-bom\": 0,\n      // 要求正则表达式被括号括起来\n      \"wrap-regex\": 0,\n\n      //////////////\n      // ES6.相关 //\n      //////////////\n\n      // 要求箭头函数体使用大括号\n      \"arrow-body-style\": 2,\n      // 要求箭头函数的参数使用圆括号\n      \"arrow-parens\": 0,\n      \"arrow-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 强制在子类构造函数中用super()调用父类构造函数，TypeScrip的编译器也会提示\n      \"constructor-super\": 0,\n      // 强制 generator 函数中 * 号周围使用一致的空格\n      \"generator-star-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 禁止修改类声明的变量\n      \"no-class-assign\": 2,\n      // 不允许箭头功能，在那里他们可以混淆的比较\n      \"no-confusing-arrow\": 0,\n      // 禁止修改 const 声明的变量\n      \"no-const-assign\": 2,\n      // 禁止类成员中出现重复的名称\n      \"no-dupe-class-members\": 2,\n      // 不允许复制模块的进口\n      \"no-duplicate-imports\": 0,\n      // 禁止 Symbol 的构造函数\n      \"no-new-symbol\": 2,\n      // 允许指定模块加载时的进口\n      \"no-restricted-imports\": 0,\n      // 禁止在构造函数中，在调用 super() 之前使用 this 或 super\n      \"no-this-before-super\": 2,\n      // 禁止不必要的计算性能键对象的文字\n      \"no-useless-computed-key\": 0,\n      // 要求使用 let 或 const 而不是 var\n      \"no-var\": 0,\n      // 要求或禁止对象字面量中方法和属性使用简写语法\n      \"object-shorthand\": 0,\n      // 要求使用箭头函数作为回调\n      \"prefer-arrow-callback\": 0,\n      // 要求使用 const 声明那些声明后不再被修改的变量\n      \"prefer-const\": 0,\n      // 要求在合适的地方使用 Reflect 方法\n      \"prefer-reflect\": 0,\n      // 要求使用扩展运算符而非 .apply()\n      \"prefer-spread\": 0,\n      // 要求使用模板字面量而非字符串连接\n      \"prefer-template\": 0,\n      // Suggest using the rest parameters instead of arguments\n      \"prefer-rest-params\": 0,\n      // 要求generator 函数内有 yield\n      \"require-yield\": 0,\n      // enforce spacing between rest and spread operators and their expressions\n      \"rest-spread-spacing\": 0,\n      // 强制模块内的 import 排序\n      \"sort-imports\": 0,\n      // 要求或禁止模板字符串中的嵌入表达式周围空格的使用\n      \"template-curly-spacing\": 1,\n      // 强制在 yield* 表达式中 * 周围使用空格\n      \"yield-star-spacing\": 2\n  }\n}\n/* eslint-enable */"
  },
  {
    "path": "packages/chameleon-webpack-plugin/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\n"
  },
  {
    "path": "packages/chameleon-webpack-plugin/index.js",
    "content": "\nconst moduleIdHandler = require('./lib/moduleId.js');\nconst chunkhashHandler = require('./lib/chunkhash.js');\nclass ChameleonWebpackPlugin {\n  constructor(options) {\n    this.options = Object.assign({\n      openModuleHash: false, // 是否处理moduleId\n      openChunkHash: false,\n      hashFunction: \"md5\",\n      hashDigest: \"base64\",\n      hashDigestLength: 4,\n      cliName: 'chameleon-tool' // 替换moduleName的正则\n    }, options);\n    this.algorithm = options.algorithm || 'md5';\n    this.digest = options.digest || 'hex';\n    this.additionalHashContent = options.additionalHashContent || function() {return '';};\n\n  }\n\n  apply(compiler) {\n    const options = this.options;\n    if (options.openModuleHash) {\n      moduleIdHandler.call(this, compiler, options);\n    }\n    if (options.openChunkHash) {\n      chunkhashHandler.call(this, compiler);\n    }\n  }\n}\n\nmodule.exports = ChameleonWebpackPlugin;\n"
  },
  {
    "path": "packages/chameleon-webpack-plugin/lib/chunkhash.js",
    "content": "\nconst crypto = require('crypto');\nconst {chameleonHandle} = require('./utils.js');\n\nmodule.exports = function(compiler) {\n  // eslint-disable-next-line\n  var _plugin = this;\n  var compilerPlugin;\n  var compilationPlugin;\n  if (compiler.hooks) {\n    compilerPlugin = function (fn) {\n      compiler.hooks.compilation.tap('chameleon-plugin', fn);\n    };\n    compilationPlugin = function (compilation, fn) {\n      compilation.hooks.chunkHash.tap('chameleon-plugin', fn);\n    }\n  } else {\n    compilerPlugin = function (fn) {\n      compiler.plugin('compilation', fn);\n    };\n    compilationPlugin = function (compilation, fn) {\n      compilation.plugin('chunk-hash', fn);\n    }\n  }\n  // eslint-disable-next-line\n  let i = 0;\n  compilerPlugin(function(compilation) {\n    compilationPlugin(compilation, function(chunk, chunkHash) {\n      var modules;\n      if (chunk.modulesIterable) {\n        modules = Array.from(chunk.modulesIterable, getModuleSource);\n      } else if (chunk.mapModules) {\n        modules = chunk.mapModules(getModuleSource);\n      } else {\n        modules = chunk.modules.map(getModuleSource);\n      }\n      // 解决manifest的modules为0 source为空字符串 导致hash相同\n      if (modules.length > 0) {\n        var source = modules.sort(sortById).reduce(concatenateSource, '')\n        source = chameleonHandle(source, _plugin.options.cliName); \n        var hash = crypto.createHash(_plugin.algorithm).update(source + _plugin.additionalHashContent(chunk));\n        chunkHash.digest = function(digest) {\n          return hash.digest(digest || _plugin.digest);\n        };\n      }\n    });\n  });\n}\n\n\n// helpers\n\nfunction sortById(a, b) {\n  if (a < b) {\n    return -1;\n  } else {\n    return 1;\n  }\n}\n\nfunction getModuleSource(module) {\n  return {\n    id: module.id,\n    source: (module._source || {})._value || '',\n    dependencies: (module.dependencies || []).map(function(d) {return d.module ? d.module.id : '';})\n  };\n}\n\nfunction concatenateSource(result, module) {\n  return result + '#' + module.id + ':!' + module.source + '$' + (module.dependencies.join(','));\n}\n"
  },
  {
    "path": "packages/chameleon-webpack-plugin/lib/moduleId.js",
    "content": "\n/**\n * 处理chameleon-cli构建项目中的module id\n * @param {*} compiler\n */\n\nconst createHash = require(\"crypto\").createHash;\nconst {chameleonHandle} = require('./utils.js');\n\n\nmodule.exports = function(compiler, options) {\n\n  if (compiler.hooks) {\n    compiler.hooks.compilation(\"chameleon-plugin\", (compilation) => {\n      const usedIds = new Set();\n      compilation.hooks.beforeModuleIds(\"chameleon-plugin\", (modules) => {\n        modules.forEach((module) => {\n          moduleIdHandle.call(this, module, usedIds)\n        });\n      });\n    });\n\n  } else {\n\n    compiler.plugin(\"compilation\", (compilation) => {\n      const usedIds = new Set();\n      compilation.plugin(\"before-module-ids\", (modules) => {\n        modules.forEach((module) => {\n          moduleIdHandle.call(this, module, usedIds)\n        });\n      });\n    });\n  }\n\n\n  function moduleIdHandle(module, usedIds) {\n    if (module.id === null && module.libIdent) {\n      let id = module.libIdent({\n        context: this.options.context || compiler.options.context\n      });\n\n      id = chameleonHandle(id, this.options.cliName);\n\n      const hash = createHash(this.options.hashFunction);\n      hash.update(id);\n      const hashId = hash.digest(this.options.hashDigest);\n      let len = this.options.hashDigestLength;\n      while (usedIds.has(hashId.substr(0, len))) {len++;}\n      module.id = hashId.substr(0, len);\n      usedIds.add(module.id);\n    }\n  }\n\n\n}\n"
  },
  {
    "path": "packages/chameleon-webpack-plugin/lib/utils.js",
    "content": "\n\n\nmodule.exports.chameleonHandle = function (content, cliName) {\n  // 首先是把chameleon-cli前面的删除，然后就是loader中的\n  let reg = new RegExp(`[\\\\.\\\\/]+?([^\\\\\"\\\\'\\\\/\\\\?\\\\!\\\\&]+\\/)*?${cliName}`, 'g')\n  content = content.replace(reg, function(m, s1) {\n    return `${cliName}`\n  })\n  return content;\n}\n"
  },
  {
    "path": "packages/chameleon-webpack-plugin/package.json",
    "content": "{\n  \"name\": \"chameleon-webpack-plugin\",\n  \"version\": \"1.0.8\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"mocha --recursive --reporter spec\",\n    \"cover\": \"istanbul cover --report lcov node_modules/mocha/bin/_mocha -- -R spec --recursive\",\n    \"eslint:fix\": \"eslint index.js --ext .js  lib --fix\",\n    \"eslint\": \"eslint index.js ./lib\"\n  },\n  \"devDependencies\": {\n    \"chai\": \"^4.2.0\",\n    \"coveralls\": \"^2.11.9\",\n    \"eslint\": \"^5.9.0\",\n    \"gulp\": \"^3.9.1\",\n    \"gulp-uglify-es\": \"^1.0.4\",\n    \"istanbul\": \"^0.4.5\",\n    \"mocha\": \"^5.2.0\"\n  },\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"gitHead\": \"5ddcde4330774710f7646559446e008f7785ce00\"\n}"
  },
  {
    "path": "packages/chameleon-webpack-plugin/test/utils.test.js",
    "content": "\nconst {chameleonHandle} = require('../lib/utils.js');\nconst { expect } = require('chai');\n\ndescribe('test chameleonHandle function', function () {\n  it('', function () {\n    let content = `../../chameleon-tool/node_modules/babel-loader/lib/index.js?{\\\"filename\\\":\\\"/Users/didi/Documents/code/chameleon-tool/package.json\\\"}!../../chameleon-tool/node_modules/vue-loader/lib/selector.js?type=script&index=0!../../chameleon-tool/node_modules/chameleon-loader/index.js??ref--11-1!../../chameleon-tool/node_modules/replace-loader/index.js??ref--11-2!./node_modules/cml-ui/components/c-header/c-header.cml`;\n    let cliName = 'chameleon-tool';\n    let result = chameleonHandle(content, cliName);\n    console.log(result)\n    expect(result).to.be.equal(`chameleon-tool/node_modules/babel-loader/lib/index.js?{\"filename\":\"chameleon-tool/package.json\"}!chameleon-tool/node_modules/vue-loader/lib/selector.js?type=script&index=0!chameleon-tool/node_modules/chameleon-loader/index.js??ref--11-1!chameleon-tool/node_modules/replace-loader/index.js??ref--11-2!./node_modules/cml-ui/components/c-header/c-header.cml`)\n\n  })\n})\n\n\n"
  },
  {
    "path": "packages/chameleon-weex-vue-loader/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n.vscode\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\n"
  },
  {
    "path": "packages/chameleon-weex-vue-loader/index.js",
    "content": "module.exports = require('./lib/loader')\n\n"
  },
  {
    "path": "packages/chameleon-weex-vue-loader/lib/gen-id.js",
    "content": "// utility for generating a uid for each component file\n// used in scoped CSS rewriting\nvar hash = require('hash-sum')\nvar cache = Object.create(null)\n\nmodule.exports = function genId (file) {\n  return cache[file] || (cache[file] = hash(file))\n}\n"
  },
  {
    "path": "packages/chameleon-weex-vue-loader/lib/loader.js",
    "content": "// @todo: support hot reload\n// @todo: support functional check\n// @tips: not support CSS Modules\n// @tips: not support CssSourceMap\n// @tips: not support isServer\n// @tips: not support isScoped\n\nvar loaderUtils = require('loader-utils')\nvar assign = require('object-assign')\nvar parse = require('./parser')\nvar path = require('path')\nvar normalize = require('./normalize')\nvar genId = require('./gen-id')\n\n// internal lib loaders\nvar selectorPath = normalize.lib('selector')\nvar templateLoaderPath = normalize.lib('template-loader')\nvar templateCompilerPath = normalize.lib('template-compiler')\nvar styleRewriterPath = normalize.lib('style-rewriter')\nvar styleLoaderPath = normalize.lib('style-loader')\nvar scriptLoaderPath = normalize.lib('script-loader')\n\n// dep loaders\n// var styleLoaderPath = normalize.dep('vue-style-loader')\n// var hotReloadAPIPath = normalize.dep('vue-hot-reload-api')\n\nvar hasBabel = false\ntry {\n  hasBabel = !!require('babel-loader')\n} catch (e) {}\n\nvar hasBuble = false\ntry {\n  hasBuble = !!require('buble-loader')\n} catch (e) {}\n\nvar rewriterInjectRE = /\\b(css(?:-loader)?(?:\\?[^!]+)?)(?:!|$)/\n\nvar defaultLang = {\n  template: 'html',\n  styles: 'css',\n  script: 'js'\n}\n\nvar checkNamedExports =\n  'if (Object.keys(__vue_exports__).some(function (key) { return key !== \"default\" && key !== \"__esModule\" })) {' +\n  'console.error(\"named exports are not supported in *.vue files.\")}\\n'\n\nfunction hasRecyclable (template) {\n  return !!(template && template.attrs && template.attrs.recyclable)\n}\n\n// When extracting parts from the source vue file, we want to apply the\n// loaders chained before vue-loader, but exclude some loaders that simply\n// produces side effects such as linting.\nfunction getRawRequest (\n  { resource, loaderIndex, loaders },\n  excludedPreLoaders = /eslint-loader/\n) {\n  return loaderUtils.getRemainingRequest({\n    resource: resource,\n    loaderIndex: loaderIndex,\n    loaders: loaders.filter(loader => !excludedPreLoaders.test(loader.path))\n  })\n}\n\n\nmodule.exports = function (content) {\n  this.cacheable()\n  // var isServer = (this.options || this._compiler.options).target === 'node'\n  // var isServer = false\n  var loaderContext = this\n  var query = loaderUtils.getOptions(this) || {}\n  var params = this.resourceQuery && loaderUtils.parseQuery(this.resourceQuery)\n  var options = (this.options || this._compiler.options).__vueOptions__ = Object.assign({}, (this.options || this._compiler.options).vue, query)\n  var filePath = this.resourcePath\n  var fileName = path.basename(filePath)\n  var moduleId = 'data-v-' + genId(path.relative(process.cwd(), filePath))\n  var styleRewriter = styleRewriterPath + '?id=' + moduleId\n\n  var isProduction = this.minimize || process.env.NODE_ENV === 'production'\n\n  // var needCssSourceMap =\n  //   !isProduction &&\n  //   this.sourceMap &&\n  //   options.cssSourceMap !== false\n  // var needCssSourceMap = false\n\n  var babelOptions = hasBabel && options.babel && options.babel.query ? '?' + JSON.stringify(options.babel.query) : ''\n  var bubleOptions = hasBuble && options.buble ? '?' + JSON.stringify(options.buble) : ''\n  var defaultLoaders = {\n    html: templateCompilerPath + '?id=' + moduleId,\n    // css: (isServer ? '' : styleLoaderPath + '!') + 'css-loader' + (needCssSourceMap ? '?sourceMap' : ''),\n    css: styleLoaderPath,\n    js: scriptLoaderPath + '!' + (hasBuble ? ('buble-loader' + bubleOptions) : hasBabel ? ('babel-loader' + babelOptions) : ''),\n    scss: ['sass-loader'],\n    sass: [{\n      loader: 'sass-loader',\n      options: {\n        indentedSyntax: true\n      }\n    }],\n    less: ['less-loader'],\n    stylus: ['stylus-loader'],\n    styl: ['stylus-loader']\n  }\n  // check if there are custom loaders specified via\n  // webpack config, otherwise use defaults\n  var loaders = assign({}, defaultLoaders, options.loaders)\n\n  const rawRequest = getRawRequest(loaderContext, options.excludedPreLoaders)\n  function getRequire (type, part, index, scoped) {\n    return 'require(' +\n      getRequireString(type, part, index, scoped) +\n    ')\\n'\n  }\n\n  function getRequireString (type, part, index, scoped) {\n    return loaderUtils.stringifyRequest(loaderContext,\n      // disable all configuration loaders\n      '!!' +\n      // get loader string for pre-processors\n      getLoaderString(type, part, index, scoped) +\n      // select the corresponding part from the vue file\n      getSelectorString(type, index || 0) +\n      // the url to the actual vuefile\n      rawRequest\n      // filePath\n    )\n  }\n\n  function getRequireForImport (type, impt, scoped) {\n    return 'require(' +\n      getRequireForImportString(type, impt, scoped) +\n    ')\\n'\n  }\n\n  function getRequireForImportString (type, impt, scoped) {\n    return loaderUtils.stringifyRequest(loaderContext,\n      '!!' +\n      getLoaderString(type, impt, -1, scoped) +\n      impt.src\n    )\n  }\n\n  function addCssModulesToLoader (loader, part, index) {\n    if (!part.module) return loader\n    var option = options.cssModules || {}\n    var DEFAULT_OPTIONS = {\n      modules: true,\n      importLoaders: true\n    }\n    var OPTIONS = {\n      localIdentName: '[hash:base64]'\n    }\n    return loader.replace(/((?:^|!)css(?:-loader)?)(\\?[^!]*)?/, function (m, $1, $2) {\n      // $1: !css-loader\n      // $2: ?a=b\n      var query = loaderUtils.parseQuery($2)\n      Object.assign(query, OPTIONS, option, DEFAULT_OPTIONS)\n      if (index !== -1) {\n        // Note:\n        //   Class name is generated according to its filename.\n        //   Different <style> tags in the same .vue file may generate same names.\n        //   Append `_[index]` to class name to avoid this.\n        query.localIdentName += '_' + index\n      }\n      return $1 + '?' + JSON.stringify(query)\n    })\n  }\n\n  function stringifyLoaders (loaders) {\n    return loaders.map(function (obj) {\n      return obj && typeof obj === 'object' && typeof obj.loader === 'string'\n        ? obj.loader + (obj.options ? '?' + JSON.stringify(obj.options) : '')\n        : obj\n    }).join('!')\n  }\n\n  function getLoaderString (type, part, index, scoped) {\n    var lang = part.lang\n    var loader = loaders[defaultLang[type]]\n    var rewriter = type === 'styles' ? styleRewriter + (scoped ? '&scoped=true!' : '!') : ''\n    var injectString = (type === 'script' && query.inject) ? 'inject!' : ''\n    if (loader !== undefined) {\n      if (Array.isArray(loader)) {\n        loader = stringifyLoaders(loader)\n      } else {\n        loader = stringifyLoaders([loader])        \n      }\n      // add css modules\n      if (type === 'styles') {\n        let stylelang = part.lang || defaultLang[type]\n        let styleLoader = options.loaders[stylelang]\n        //如果有传入loader，则用style-compile + rewrite + 传入的loader\n        if(styleLoader) {\n          if (Array.isArray(styleLoader)) {\n            styleLoader = stringifyLoaders(styleLoader)\n          }\n          styleLoader = addCssModulesToLoader(styleLoader, part, index)\n          styleLoader =  ensureBang(defaultLoaders.css) + ensureBang(rewriter) + styleLoader\n\n          return ensureBang(styleLoader)\n        } \n        //如果没有传入的loader 就走之前的逻辑\n        else {\n          loader = addCssModulesToLoader(loader, part, index)\n         \n          // while lang existed, the `style-loader` is also needed.\n          if (lang && Array.isArray(loaders[lang])) {\n            loader += '!' + stringifyLoaders(loaders[lang])\n          }\n        }\n\n      }\n      if (type === 'template') {\n        if (hasRecyclable(part)) {\n          loader += '&recyclable=true'\n        }\n        if (lang) {\n          loader += '!' + templateLoaderPath + '?raw&engine=' + lang + '!'\n        }\n      }\n      // inject rewriter before css/html loader for\n      // extractTextPlugin use cases\n      if (rewriterInjectRE.test(loader)) {\n        loader = loader.replace(rewriterInjectRE, function (m, $1) {\n          return ensureBang($1) + rewriter\n        })\n      } else {\n\n        loader = ensureBang(loader) + rewriter\n      }\n      return injectString + ensureBang(loader)\n    } else {\n      // unknown lang, infer the loader to be used\n      switch (type) {\n        case 'template':\n          return defaultLoaders.html + '!' + templateLoaderPath + '?raw&engine=' + lang + '!'\n        case 'styles':\n          loader = addCssModulesToLoader(defaultLoaders.css, part, index)\n          return loader + '!' + rewriter + ensureBang(ensureLoader(lang))\n        case 'script':\n          return injectString + ensureBang(ensureLoader(lang))\n      }\n    }\n  }\n\n  // sass => sass-loader\n  // sass-loader => sass-loader\n  // sass?indentedsyntax!css => sass-loader?indentedSyntax!css-loader\n  function ensureLoader (lang) {\n    return lang.split('!').map(function (loader) {\n      return loader.replace(/^([\\w-]+)(\\?.*)?/, function (_, name, query) {\n        return (/-loader$/.test(name) ? name : (name + '-loader')) + (query || '')\n      })\n    }).join('!')\n  }\n\n  function getSelectorString (type, index) {\n    return selectorPath +\n      '?type=' + type +\n      '&index=' + index + '!'\n  }\n\n  function ensureBang (loader) {\n    if (loader.charAt(loader.length - 1) !== '!') {\n      return loader + '!'\n    } else {\n      return loader\n    }\n  }\n\n  var parts = parse(content, fileName, this.sourceMap)\n  // var hasGlobal = parts.styles.some(function (s) { return !!s.global })\n  // var scopeId = hasGlobal ? '@GLOBAL' : ('data-v-' + genId(filePath))\n  var scopeId = 'data-v-' + genId(filePath)\n  var output = 'var __vue_exports__, __vue_options__\\n'\n\n  // css modules\n  // output += 'var __vue_styles__ = {}\\n'\n  output += 'var __vue_styles__ = []\\n'\n  // var cssModules = {}\n\n  // add requires for styles\n  if (parts.styles.length) {\n    output += '\\n/* styles */\\n'\n    parts.styles.forEach(function (style, i) {\n      // var moduleName = (style.module === true) ? '$style' : style.module\n      // var moduleName\n\n      // require style\n      // if (isServer && !moduleName) return\n      // var requireString = style.src\n      //   ? getRequireForImport('styles', style, style.scoped)\n      //   : getRequire('styles', style, i, style.scoped)\n      var requireString = style.src\n        ? getRequireForImport('styles', style)\n        : getRequire('styles', style, i)\n\n      // setCssModule\n      // if (moduleName) {\n      //   if (moduleName in cssModules) {\n      //     loaderContext.emitError('CSS module name \"' + moduleName + '\" is not unique!')\n      //     output += requireString\n      //   } else {\n      //     cssModules[moduleName] = true\n\n      //     // `style-loader` exposes the name-to-hash map directly\n      //     // `css-loader` exposes it in `.locals`\n      //     // We drop `style-loader` in SSR, and add `.locals` here.\n      //     // if (isServer) {\n      //     //   requireString += '.locals'\n      //     // }\n\n      //     output += '__vue_styles__[\"' + moduleName + '\"] = ' + requireString + '\\n'\n      //   }\n      // } else {\n      //   output += requireString\n      // }\n\n      // output += requireString\n      output += '__vue_styles__.push(' + requireString + ')\\n'\n    })\n  }\n\n  // add require for script\n  var script = parts.script\n  if (script) {\n    output += '\\n/* script */\\n'\n    output +=\n      '__vue_exports__ = ' + (\n        script.src\n          ? getRequireForImport('script', script)\n          : getRequire('script', script)\n      )\n  }\n\n  var exports =\n    '__vue_options__ = __vue_exports__ = __vue_exports__ || {}\\n' +\n    // ES6 modules interop\n    'if (\\n' +\n    '  typeof __vue_exports__.default === \"object\" ||\\n' +\n    '  typeof __vue_exports__.default === \"function\"\\n' +\n    ') {\\n' +\n      (isProduction ? '' : checkNamedExports) +\n      '__vue_options__ = __vue_exports__ = __vue_exports__.default\\n' +\n    '}\\n' +\n    // constructor export interop\n    'if (typeof __vue_options__ === \"function\") {\\n' +\n    '  __vue_options__ = __vue_options__.options\\n' +\n    '}\\n' +\n    // add filename in dev\n    (isProduction ? '' : ('__vue_options__.__file = ' + JSON.stringify(filePath))) + '\\n'\n\n  // add require for template\n  var template = parts.template\n  if (template) {\n    output += '\\n/* template */\\n'\n    output += 'var __vue_template__ = ' + (\n      template.src\n        ? getRequireForImport('template', template)\n        : getRequire('template', template)\n    )\n    // attach render functions to exported options\n    exports +=\n      '__vue_options__.render = __vue_template__.render\\n' +\n      (hasRecyclable(template) ? '__vue_options__[\"@render\"] = __vue_template__[\"@render\"]\\n' : '') +\n      '__vue_options__.staticRenderFns = __vue_template__.staticRenderFns\\n'\n  }\n\n  // attach scoped id\n  if (parts.styles.length) {\n    exports += '__vue_options__._scopeId = \"' + scopeId + '\"\\n'\n  }\n\n  // if (Object.keys(cssModules).length) {\n  //   // inject style modules as computed properties\n  //   exports +=\n  //     'if (!__vue_options__.computed) __vue_options__.computed = {}\\n' +\n  //     'Object.keys(__vue_styles__).forEach(function (key) {\\n' +\n  //       'var module = __vue_styles__[key]\\n' +\n  //       '__vue_options__.computed[key] = function () { return module }\\n' +\n  //     '})\\n'\n  // }\n\n  exports += '__vue_options__.style = __vue_options__.style || {}\\n' +\n  '__vue_styles__.forEach(function (module) {\\n' +\n  '  for (var name in module) {\\n' +\n  '    __vue_options__.style[name] = module[name]\\n' +\n  '  }\\n' +\n  '})\\n'\n\n  // support to register static styles\n  exports += 'if (typeof __register_static_styles__ === \"function\") {\\n' +\n  '  __register_static_styles__(__vue_options__._scopeId, __vue_styles__)\\n' +\n  '}\\n'\n\n  if (!query.inject) {\n    output += exports\n    // hot reload\n    // if (\n    //   !isServer &&\n    //   !isProduction &&\n    //   (parts.script || parts.template)\n    // ) {\n    //   output +=\n    //     '\\n/* hot reload */\\n' +\n    //     'if (module.hot) {(function () {\\n' +\n    //     '  var hotAPI = require(\"' + hotReloadAPIPath + '\")\\n' +\n    //     '  hotAPI.install(require(\"vue\"), false)\\n' +\n    //     '  if (!hotAPI.compatible) return\\n' +\n    //     '  module.hot.accept()\\n' +\n    //     '  if (!module.hot.data) {\\n' +\n    //     // initial insert\n    //     '    hotAPI.createRecord(\"' + moduleId + '\", __vue_options__)\\n' +\n    //     '  } else {\\n' +\n    //     // update\n    //     '    hotAPI.reload(\"' + moduleId + '\", __vue_options__)\\n' +\n    //     '  }\\n' +\n    //     '})()}\\n'\n    // }\n    // check functional\n    // if (!isProduction) {\n    //   output +=\n    //     'if (__vue_options__.functional) {console.error(\"' +\n    //       '[vue-loader] ' + fileName + ': functional components are not ' +\n    //       'supported and should be defined in plain js files using render ' +\n    //       'functions.' +\n    //     '\")}\\n'\n    // }\n    // final export\n    if (options.esModule) {\n      output += '\\nexports.__esModule = true;\\nexports[\"default\"] = __vue_exports__\\n'\n    } else {\n      output += '\\nmodule.exports = __vue_exports__\\n'\n    }\n  } else {\n    // inject-loader support\n    output +=\n      '\\n/* dependency injection */\\n' +\n      'module.exports = function (injections) {\\n' +\n      '  __vue_exports__ = __vue_exports__(injections)\\n' +\n      exports +\n      '  return __vue_exports__\\n' +\n      '}'\n  }\n\n  if (params && params.entry) {\n    output += 'module.exports.el = \\'' + params.entry + '\\'\\n' +\n      'new Vue(module.exports)\\n'\n  }\n  // done\n  return output\n}\n"
  },
  {
    "path": "packages/chameleon-weex-vue-loader/lib/normalize.js",
    "content": "var IS_TEST = !!process.env.VUE_LOADER_TEST\nvar fs = require('fs')\nvar path = require('path')\n\n// var hasWeexLoader = false\n// try {\n//   hasWeexLoader = !!require('weex-loader')\n// } catch (e) {}\n\nexports.lib = function (file) {\n  if (IS_TEST) {\n    return path.resolve(__dirname, file)\n  }\n  if (fs.existsSync(path.resolve('.', 'node_modules', 'weex-loader', 'node_modules', 'weex-vue-loader'))) {\n    return 'weex-loader/node_modules/weex-vue-loader/lib/' + file\n  }\n  return path.resolve(__dirname, file)\n}\n\nexports.dep = function (dep) {\n  if (IS_TEST) {\n    return dep\n  } else if (fs.existsSync(path.resolve(__dirname, '../node_modules', dep))) {\n    // npm 2 or npm linked\n    var res = fs.existsSync('weex-loader/node_modules/weex-vue-loader/node_modules/' + dep)\n      ? ('weex-loader/node_modules/weex-vue-loader/node_modules/' + dep)\n      : ('weex-loader/node_modules/' + dep)\n    return res\n  } else {\n    // npm 3\n    return dep\n  }\n}\n"
  },
  {
    "path": "packages/chameleon-weex-vue-loader/lib/parser.js",
    "content": "// TODO: use weex-tempalte-compiler\nvar compiler = require('vue-template-compiler')\nvar cache = require('lru-cache')(100)\nvar hash = require('hash-sum')\nvar SourceMapGenerator = require('source-map').SourceMapGenerator\n\nvar splitRE = /\\r?\\n/g\nvar emptyRE = /^(?:\\/\\/)?\\s*$/\n\nmodule.exports = function (content, filename, needMap) {\n  var cacheKey = hash(filename + content)\n  // source-map cache busting for hot-reloadded modules\n  var filenameWithHash = filename + '?' + cacheKey\n  var output = cache.get(cacheKey)\n  if (output) return output\n  // TODO: support to use \"global\" in <style>\n  output = compiler.parseComponent(content, { pad: true })\n  if (needMap) {\n    if (output.script && !output.script.src) {\n      output.script.map = generateSourceMap(\n        filenameWithHash,\n        content,\n        output.script.content\n      )\n    }\n    if (output.styles) {\n      output.styles.forEach(style => {\n        if (!style.src) {\n          style.map = generateSourceMap(\n            filenameWithHash,\n            content,\n            style.content\n          )\n        }\n      })\n    }\n  }\n  cache.set(cacheKey, output)\n  return output\n}\n\nfunction generateSourceMap (filename, source, generated) {\n  var map = new SourceMapGenerator()\n  map.setSourceContent(filename, source)\n  generated.split(splitRE).forEach((line, index) => {\n    if (!emptyRE.test(line)) {\n      map.addMapping({\n        source: filename,\n        original: {\n          line: index + 1,\n          column: 0\n        },\n        generated: {\n          line: index + 1,\n          column: 0\n        }\n      })\n    }\n  })\n  return map.toJSON()\n}\n"
  },
  {
    "path": "packages/chameleon-weex-vue-loader/lib/script-loader.js",
    "content": "var REQUIRE_REG = /require\\(([\"'])@weex\\-module\\/([^\\)\\1]+)\\1\\)/g\n\nmodule.exports = function (content) {\n  this.cacheable && this.cacheable()\n  return content.replace(REQUIRE_REG, '__weex_require_module__($1$2$1)')\n}\n"
  },
  {
    "path": "packages/chameleon-weex-vue-loader/lib/selector.js",
    "content": "var path = require('path')\nvar parse = require('./parser')\nvar loaderUtils = require('loader-utils')\n\nmodule.exports = function (content) {\n  this.cacheable()\n\n  var query = loaderUtils.getOptions(this) || {}\n  var filename = path.basename(this.resourcePath)\n  var parts = parse(content, filename, this.sourceMap)\n  var part = parts[query.type]\n  if (Array.isArray(part)) {\n    part = part[query.index]\n  }\n\n  this.callback(null, part.content, part.map)\n}\n"
  },
  {
    "path": "packages/chameleon-weex-vue-loader/lib/style-loader.js",
    "content": "var styler = require('weex-styler')\n\nmodule.exports = function (content) {\n  this.cacheable && this.cacheable()\n  return 'module.exports = ' + genStyleString(content, this)\n}\n\n// @todo:\n// font-relative lengths: em, ex, ch, ic\n// viewport-relative lengths: vi, vb\n// https://drafts.csswg.org/css-values/#lengths\nvar REGEXP_LENGTH = /^([-+]?[0-9]*\\.?[0-9]+)(rem|vw|vh|vmin|vmax|cm|mm|q|in|pt|pc|px)$/\n\nfunction convertLength (k, v) {\n  if (typeof v !== 'string') {\n    return v\n  }\n  var result = v.match(REGEXP_LENGTH)\n  if (result) {\n    if (result[2] === 'px') {\n      return result[1]\n    }\n    return result[1] + 'CSS_UNIT_' + result[2].toUpperCase()\n  }\n  return v\n}\n\nfunction genStyleString (input, loader) {\n  var output = '{}'\n  styler.parse(input, function (err, obj) {\n    if (err) {\n      console.log('-----------------styleloader parse err');\n      loader.emitError(err)\n      return\n    }\n    if (obj && obj.jsonStyle) {\n      if (obj.log) {\n        obj.log.map((log) => {\n          if (log.selectors) {\n            loader.emitWarning(`${log.selectors}: ${log.reason}`)\n          } else {\n            loader.emitWarning(`${log.reason}`)\n          }\n        })\n      }\n      try {\n        output = JSON.stringify(obj.jsonStyle, convertLength, 2)\n          .replace(/\"([-+]?[0-9]*\\.?[0-9]+)CSS_UNIT_([A-Z]+)\"/g, '$1 * CSS_UNIT.$2')\n      } catch (e) {}\n    }\n  })\n  return output\n}\n"
  },
  {
    "path": "packages/chameleon-weex-vue-loader/lib/style-rewriter.js",
    "content": "var postcss = require('postcss')\nvar selectorParser = require('postcss-selector-parser')\nvar loaderUtils = require('loader-utils')\n\npostcss.plugin('add-id', function (opts) {\n  return function (root) {\n    root.each(function rewriteSelector (node) {\n      if (!node.selector) {\n        // handle media queries\n        if (node.type === 'atrule' && node.name === 'media') {\n          node.each(rewriteSelector)\n        }\n        return\n      }\n      node.selector = selectorParser(function (selectors) {\n        selectors.each(function (selector) {\n          var node = null\n          selector.each(function (n) {\n            if (n.type !== 'pseudo') node = n\n          })\n          selector.insertAfter(node, selectorParser.attribute({\n            attribute: opts.id\n          }))\n        })\n      }).process(node.selector).result\n    })\n  }\n})\n\nvar trim = postcss.plugin('trim', function (opts) {\n  return function (css) {\n    css.walk(function (node) {\n      if (node.type === 'rule' || node.type === 'atrule') {\n        node.raws.before = node.raws.after = '\\n'\n      }\n    })\n  }\n})\n\nmodule.exports = function (css, map) {\n  this.cacheable()\n  var cb = this.async()\n\n  var query = loaderUtils.getOptions(this) || {}\n  var options = (this.options || this._compiler.options).__vueOptions__\n  var postcssOptions = options.postcss\n\n  // postcss plugins\n  var plugins\n  if (Array.isArray(postcssOptions)) {\n    plugins = postcssOptions\n  } else if (typeof postcssOptions === 'function') {\n    plugins = postcssOptions.call(this, this)\n  } else if (isObject(postcssOptions) && postcssOptions.plugins) {\n    plugins = postcssOptions.plugins\n  }\n  plugins = [trim].concat(plugins || [])\n\n  // // scoped css\n  // if (query.scoped) {\n  //   plugins.push(addId({ id: query.id }))\n  // }\n\n  // postcss options, for source maps\n  var file = this.resourcePath\n  var opts\n  opts = {\n    from: file,\n    to: file,\n    map: false\n  }\n  if (\n    this.sourceMap &&\n    !this.minimize &&\n    options.cssSourceMap !== false &&\n    process.env.NODE_ENV !== 'production' &&\n    !(isObject(postcssOptions) && postcssOptions.options && postcssOptions.map)\n  ) {\n    opts.map = {\n      inline: false,\n      annotation: false,\n      prev: map\n    }\n  }\n\n  // postcss options from configuration\n  if (isObject(postcssOptions) && postcssOptions.options) {\n    for (var option in postcssOptions.options) {\n      if (!opts.hasOwnProperty(option)) {\n        opts[option] = postcssOptions.options[option]\n      }\n    }\n  }\n\n  postcss(plugins)\n    .process(css, opts)\n    .then(function (result) {\n      var map = result.map && result.map.toJSON()\n    \n      cb(null, result.css, map)\n    })\n    .catch(function (e) {\n      console.log(e)\n      console.log('eeeeeeee==============')\n      cb(e)\n    })\n}\n\nfunction isObject (val) {\n  return val && typeof val === 'object'\n}\n"
  },
  {
    "path": "packages/chameleon-weex-vue-loader/lib/template-compiler.js",
    "content": "// @todo: support hot reload\n// @tips: not support isServer\n// @tips: not support img[src]\n// @tips: not support vueOptions.transformToRequire\n// @tips: not support vueOptions.preserveWhitespace\n\nvar compiler = require('weex-template-compiler')\nvar transpile = require('vue-template-es2015-compiler')\nvar loaderUtils = require('loader-utils')\nvar beautify = require('js-beautify').js_beautify\n// var normalize = require('./normalize')\n// var hotReloadAPIPath = normalize.dep('vue-hot-reload-api')\n\n// // vue compiler module for using transforming `<tag>:<attribute>` to `require`\n// var defaultTransformToRequire = {\n//   img: 'src'\n// }\n// var transformToRequire = defaultTransformToRequire\n// var defaultCompileOptions = {\n//   modules: [{\n//     postTransformNode (el) {\n//       for (var tag in transformToRequire) {\n//         if (el.tag === tag && el.attrs) {\n//           var attributes = transformToRequire[tag]\n//           if (typeof attributes === 'string') {\n//             el.attrs.some(attr => rewrite(attr, attributes))\n//           } else if (Array.isArray(attributes)) {\n//             attributes.forEach(item => el.attrs.some(attr => rewrite(attr, item)))\n//           }\n//         }\n//       }\n//     }\n//   }]\n// }\n\n// function rewrite (attr, name) {\n//   if (attr.name === name) {\n//     var value = attr.value\n//     var isStatic = value.charAt(0) === '\"' && value.charAt(value.length - 1) === '\"'\n//     if (!isStatic) {\n//       return\n//     }\n//     var firstChar = value.charAt(1)\n//     if (firstChar === '.' || firstChar === '~') {\n//       if (firstChar === '~') {\n//         value = '\"' + value.slice(2)\n//       }\n//       attr.value = `require(${value})`\n//     }\n//     return true\n//   }\n// }\n\nmodule.exports = function (html) {\n  // console.log(html);\n  this.cacheable()\n  var isProduction = this.minimize || process.env.NODE_ENV === 'production'\n  var query = loaderUtils.getOptions(this) || {}\n  // var isServer = (this.options || this._compiler.options).target === 'node'\n  // var isServer = false\n  var vueOptions = (this.options || this._compiler.options).__vueOptions__\n  // if (vueOptions.transformToRequire) {\n  //   transformToRequire = Object.assign(\n  //     {},\n  //     defaultTransformToRequire,\n  //     vueOptions.transformToRequire\n  //   )\n  // }\n  // var compiled = compiler.compile(html, Object.assign({\n  //   preserveWhitespace: vueOptions.preserveWhitespace\n  // }, defaultCompileOptions))\n  var compiled = compiler.compile(html, {\n    recyclable: query.recyclable\n  })\n  var code\n  if (compiled.errors.length) {\n    var self = this\n    compiled.errors.forEach(function (err) {\n      self.emitError('template syntax error ' + err)\n    })\n    code = 'module.exports={render:function(){},staticRenderFns:[]}'\n  } else {\n    var bubleOptions = vueOptions.buble\n    code = transpile('module.exports={' +\n      'render:' + toFunction(compiled.render) + ',' +\n      (compiled['@render'] ? ('\"@render\":' + toFunction(compiled['@render']) + ',') : '') +\n      'staticRenderFns: [' + compiled.staticRenderFns.map(toFunction).join(',') + ']' +\n    '}', bubleOptions)\n    // mark with stripped (this enables Vue to use correct runtime proxy detection)\n    if (!isProduction && (\n      !bubleOptions ||\n      !bubleOptions.transforms ||\n      bubleOptions.transforms.stripWith !== false\n    )) {\n      code += `\\nmodule.exports.render._withStripped = true`\n    }\n  }\n  // hot-reload\n  // if (!isServer &&\n  //     !this.minimize &&\n  //     process.env.NODE_ENV !== 'production') {\n  //   code +=\n  //     '\\nif (module.hot) {\\n' +\n  //     '  module.hot.accept()\\n' +\n  //     '  if (module.hot.data) {\\n' +\n  //     '     require(\"' + hotReloadAPIPath + '\").rerender(\"' + query.id + '\", module.exports)\\n' +\n  //     '  }\\n' +\n  //     '}'\n  // }\n  return code\n}\n\nfunction toFunction (code) {\n  return 'function (){' + beautify(code, { indent_size: 2 }) + '}'\n}\n"
  },
  {
    "path": "packages/chameleon-weex-vue-loader/lib/template-loader.js",
    "content": "var cons = require('consolidate')\nvar loaderUtils = require('loader-utils')\nvar extname = require('path').extname\n\nmodule.exports = function (content) {\n  this.cacheable && this.cacheable()\n  var callback = this.async()\n  var opt = loaderUtils.getOptions(this) || {}\n  var vue = (this.options || this._compiler.options).__vueOptions__\n  if (vue && vue.template) {\n    for (var key in vue.template) {\n      opt[key] = vue.template[key]\n    }\n  }\n\n  function exportContent (content) {\n    if (opt.raw) {\n      callback(null, content)\n    } else {\n      callback(null, 'module.exports = ' + JSON.stringify(content))\n    }\n  }\n\n  // with no engine given, use the file extension as engine\n  if (!opt.engine) {\n    opt.engine = extname(this.request).substr(1).toLowerCase()\n  }\n\n  if (!cons[opt.engine]) {\n    return callback(new Error(\n      'Template engine \\'' + opt.engine + '\\' ' +\n      'isn\\'t available in Consolidate.js'\n    ))\n  }\n\n  // for relative includes\n  opt.filename = this.resourcePath\n\n  cons[opt.engine].render(content, opt, function (err, html) {\n    if (err) {\n      return callback(err)\n    }\n    exportContent(html)\n  })\n}\n"
  },
  {
    "path": "packages/chameleon-weex-vue-loader/package.json",
    "content": "{\n  \"name\": \"chameleon-weex-vue-loader\",\n  \"version\": \"1.0.8\",\n  \"license\": \"Apache\",\n  \"main\": \"index.js\",\n  \"dependencies\": {\n    \"consolidate\": \"^0.14.0\",\n    \"hash-sum\": \"^1.0.2\",\n    \"he\": \"^1.1.0\",\n    \"js-beautify\": \"^1.6.3\",\n    \"loader-utils\": \"^1.1.0\",\n    \"lru-cache\": \"^4.0.1\",\n    \"object-assign\": \"^4.0.0\",\n    \"postcss\": \"^6.0.8\",\n    \"postcss-selector-parser\": \"^2.2.0\",\n    \"source-map\": \"^0.5.6\",\n    \"vue-hot-reload-api\": \"^2.0.1\",\n    \"vue-style-loader\": \"^3.0.0\",\n    \"vue-template-compiler\": \"^2.5.16\",\n    \"vue-template-es2015-compiler\": \"^1.2.2\",\n    \"weex-styler\": \"^0.3.0\",\n    \"weex-template-compiler\": \"^2.5.16-weex.0\"\n  },\n  \"description\": \"Vue.js component loader for Webpack\",\n  \"devDependencies\": {\n    \"babel-core\": \"^6.8.0\",\n    \"babel-loader\": \"^6.2.4\",\n    \"babel-preset-es2015\": \"^6.6.0\",\n    \"chai\": \"^3.0.0\",\n    \"coffee-loader\": \"^0.7.2\",\n    \"coffee-script\": \"^1.10.0\",\n    \"css-loader\": \"^0.23.1\",\n    \"eslint\": \"^2.9.0\",\n    \"eslint-config-vue\": \"^1.0.0\",\n    \"eslint-plugin-html\": \"^1.5.2\",\n    \"expose-loader\": \"^0.7.1\",\n    \"extract-text-webpack-plugin\": \"^1.0.1\",\n    \"file-loader\": \"^0.8.5\",\n    \"inject-loader\": \"^2.0.1\",\n    \"jsdom\": \"^9.2.1\",\n    \"memory-fs\": \"^0.3.0\",\n    \"mkdirp\": \"^0.5.1\",\n    \"mocha\": \"^2.2.5\",\n    \"node-libs-browser\": \"^1.0.0\",\n    \"postcss\": \"^5.0.21\",\n    \"pug\": \"^2.0.0-beta6\",\n    \"rimraf\": \"^2.4.0\",\n    \"stylus\": \"^0.54.5\",\n    \"stylus-loader\": \"^2.0.0\",\n    \"sugarss\": \"^0.1.3\",\n    \"vue\": \"^2.5.16\",\n    \"webpack\": \"^1.12.2\"\n  },\n  \"files\": [\n    \"index.js\",\n    \"lib\"\n  ],\n  \"homepage\": \"https://github.com/vuejs/vue-loader\",\n  \"keywords\": [\n    \"vue\",\n    \"webpack\",\n    \"loader\"\n  ],\n  \"peerDependencies\": {\n    \"css-loader\": \"*\"\n  },\n  \"scripts\": {\n    \"docs\": \"cd docs && gitbook serve\",\n    \"docs:deploy\": \"bash ./docs/deploy.sh\",\n    \"lint\": \"eslint lib\",\n    \"test\": \"echo \\\"Error: no test specified\\\"\"\n  },\n  \"author\": \"Chameleon-Team\",\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"gitHead\": \"5ddcde4330774710f7646559446e008f7785ce00\"\n}"
  },
  {
    "path": "packages/cml-component-parser/.eslintrc",
    "content": "{\n  \"parser\": \"babel-eslint\",\n  \"env\": {\n    \"browser\": true,\n    \"node\": true,\n    \"commonjs\": true,\n    \"amd\": true,\n    \"es6\": true,\n    \"mocha\": true\n  },\n  \"parserOptions\": {\n    \"ecmaVersion\": 6,\n    \"sourceType\": \"module\",\n    \"ecmaFeatures\": {\n      \"globalReturn\": true,\n      \"impliedStrict\": true,\n      \"jsx\": true,\n      \"modules\": true\n    }\n  },\n  \"extends\": [\n    \"eslint:recommended\"\n  ],\n\n  \"rules\": {\n    \"no-cond-assign\": 2,\n    \"no-console\": 0,\n    \"no-constant-condition\": 2,\n    \"no-control-regex\": 2,\n    \"comma-dangle\": [1, \"never\"],\n    \"no-debugger\": 2,\n    \"no-dupe-args\": 2,\n    \"no-dupe-keys\": 2,\n    \"no-duplicate-case\": 2,\n    \"no-empty\": 2,\n    \"no-empty-character-class\": 2,\n    \"no-ex-assign\": 2,\n    \"no-extra-boolean-cast\": 2,\n    \"no-extra-parens\": 0,\n    \"no-extra-semi\": 2,\n    \"no-func-assign\": 2,\n    \"no-inner-declarations\": [2, \"functions\"],\n    \"no-invalid-regexp\": 2,\n    \"no-irregular-whitespace\": 2,\n    \"no-negated-in-lhs\": 2,\n    \"no-obj-calls\": 2,\n    \"no-prototype-builtins\": 0,\n    \"no-regex-spaces\": 2,\n    \"no-sparse-arrays\": 2,\n    \"no-unexpected-multiline\": 2,\n    \"no-unreachable\": 2,\n    \"use-isnan\": 2,\n    \"valid-jsdoc\": 0,\n    \"valid-typeof\": 2,\n\n\n\n    \"accessor-pairs\": 2,\n    \"array-callback-return\": 0,\n    \"block-scoped-var\": 0,\n    \"complexity\": [2, 20],\n    \"consistent-return\": 0,\n    \"curly\": [2, \"all\"],\n    \"default-case\": 2,\n    \"dot-location\": [2, \"property\"],\n    \"dot-notation\": [2, {\n      \"allowKeywords\": true\n    }],\n    \"eqeqeq\": [0, \"allow-null\"],\n    \"guard-for-in\": 0,\n    \"no-alert\": 0,\n    \"no-caller\": 2,\n    \"no-case-declarations\": 2,\n    \"no-div-regex\": 2,\n    \"no-else-return\": 0,\n    \"no-empty-function\": 2,\n    \"no-empty-pattern\": 2,\n    \"no-eq-null\": 1,\n    \"no-eval\": 2,\n    \"no-extend-native\": 2,\n    \"no-extra-bind\": 2,\n    \"no-extra-label:\": 0,\n    \"no-fallthrough\": 2,\n    \"no-floating-decimal\": 2,\n    \"no-implicit-coercion\": 0,\n    \"no-implicit-globals\": 1,\n    \"no-implied-eval\": 2,\n    \"no-invalid-this\": 0,\n    \"no-iterator\": 2,\n    \"no-labels\": 2,\n    \"no-lone-blocks\": 2,\n    \"no-loop-func\": 0,\n    \"no-magic-numbers\": [1, {\n      \"ignore\": [0, -1, 1]\n    }],\n    \"no-multi-spaces\": 2,\n    \"no-multi-str\": 2,\n    \"no-native-reassign\": 2,\n    \"no-new\": 2,\n    \"no-new-func\": 0,\n    \"no-new-wrappers\": 2,\n    \"no-octal\": 2,\n    \"no-octal-escape\": 2,\n    \"no-param-reassign\": 0,\n    \"no-proto\": 2,\n    \"no-redeclare\": 2,\n    \"no-return-assign\": 0,\n    \"no-script-url\": 0,\n    \"no-self-assign\": 2,\n    \"no-self-compare\": 2,\n    \"no-sequences\": 2,\n    \"no-throw-literal\": 2,\n    \"no-unmodified-loop-condition\": 2,\n    \"no-unused-expressions\": 0,\n    \"no-unused-labels\": 2,\n    \"no-useless-call\": 2,\n    \"no-useless-concat\": 0,\n    \"no-useless-escape\": 0,\n    \"no-void\": 0,\n    \"no-warning-comments\": 0,\n    \"no-with\": 2,\n    \"radix\": 2,\n    \"vars-on-top\": 0,\n    \"wrap-iife\": [2, \"any\"],\n    \"yoda\": [2, \"never\"],\n    \"strict\": 0,\n\n\n\n    \"init-declarations\": 0,\n    \"no-catch-shadow\": 0,\n    \"no-delete-var\": 2,\n    \"no-label-var\": 2,\n    \"no-restricted-globals\": 0,\n    \"no-shadow\": 0,\n    \"no-shadow-restricted-names\": 2,\n    \"no-undef\": 2,\n    \"no-undef-init\": 2,\n    \"no-undefined\": 0,\n    \"no-unused-vars\": [2, {\n      \"vars\": \"all\",\n      \"args\": \"none\"\n    }],\n    \"no-use-before-define\": 0,\n\n\n    \"callback-return\": 0,\n    \"global-require\": 0,\n    \"handle-callback-err\": [2, \"^(err|error)$\"],\n    \"no-mixed-requires\": 0,\n    \"no-new-require\": 2,\n    \"no-path-concat\": 0,\n    \"no-process-env\": 0,\n    \"no-process-exit\": 0,\n    \"no-sync\": 0,\n\n\n    \"array-bracket-spacing\": [2, \"never\"],\n    \"block-spacing\": [1, \"never\"],\n    \"brace-style\": [0, \"1tbs\", {\n      \"allowSingleLine\": true\n    }],\n    \"camelcase\": 2,\n    \"comma-spacing\": [2, {\n      \"before\": false,\n      \"after\": true\n    }],\n    \"comma-style\": [2, \"last\"],\n    \"computed-property-spacing\": [2, \"never\"],\n    \"consistent-this\": [1, \"that\"],\n    \"func-names\": 0,\n    \"eol-last\": 2,\n    \"indent\": [2, 2, {\n      \"SwitchCase\": 1\n    }],\n    \"key-spacing\": [2, {\n      \"beforeColon\": false,\n      \"afterColon\": true\n    }],\n    \"linebreak-style\": [1, \"unix\"],\n    \"lines-around-comment\": [1, {\n      \"beforeBlockComment\": true\n    }],\n    \"func-style\": 0,\n    \"max-nested-callbacks\": [1, 5],\n    \"id-blacklist\": 0,\n    \"id-length\": 0,\n    \"id-match\": 0,\n    \"jsx-quotes\": 0,\n    \"keyword-spacing\": 2,\n    \"max-len\": [1, 200],\n    \"max-lines\": 0,\n    \"max-params\": [1, 7],\n    \"max-statements\": [1, 200],\n    \"max-statements-per-line\": 0,\n    \"new-cap\": [2, {\n      \"newIsCap\": true,\n      \"capIsNew\": false\n    }],\n    \"new-parens\": 2,\n    \"newline-after-var\": 0,\n    \"no-array-constructor\": 2,\n    \"no-bitwise\": 0,\n    \"newline-before-return\": 0,\n    \"newline-per-chained-call\": 1,\n    \"no-continue\": 0,\n    \"no-inline-comments\": 0,\n    \"no-lonely-if\": 0,\n    \"no-mixed-operators\": 0,\n    \"no-mixed-spaces-and-tabs\": 2,\n    \"no-multiple-empty-lines\": [2, {\n      \"max\": 2\n    }],\n    \"no-negated-condition\": 0,\n    \"no-nested-ternary\": 0,\n    \"no-new-object\": 2,\n    \"no-plusplus\": 0,\n    \"no-restricted-syntax\": 0,\n    \"no-spaced-func\": 2,\n    \"no-ternary\": 0,\n    \"no-trailing-spaces\": 2,\n    \"no-underscore-dangle\": 0,\n    \"no-unneeded-ternary\": 2,\n    \"no-whitespace-before-property\": 0,\n    \"object-curly-newline\": 0,\n    \"object-curly-spacing\": 0,\n    \"object-property-newline\": 0,\n    \"one-var\": [2, {\n      \"initialized\": \"never\"\n    }],\n    \"one-var-declaration-per-line\": 0,\n    \"operator-assignment\": 0,\n    \"operator-linebreak\": [2, \"after\", {\n      \"overrides\": {\n        \"?\": \"before\",\n        \":\": \"before\"\n      }\n    }],\n    \"padded-blocks\": 0,\n    \"quote-props\": 0,\n    \"quotes\": [2, \"single\", \"avoid-escape\"],\n    \"require-jsdoc\": 0,\n    \"semi\": [0, \"always\"],\n    \"semi-spacing\": 0,\n    \"sort-vars\": 0,\n    \"space-before-blocks\": [2, \"always\"],\n    \"space-before-function-paren\": [0, \"always\"],\n    \"space-in-parens\": [2, \"never\"],\n    \"space-infix-ops\": 2,\n    \"space-unary-ops\": [2, {\n      \"words\": true,\n      \"nonwords\": false\n    }],\n    \"spaced-comment\": [2, \"always\", {\n      \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n    }],\n    \"unicode-bom\": 0,\n    \"wrap-regex\": 0,\n\n\n    \"arrow-body-style\": 0,\n    \"arrow-parens\": 0,\n    \"arrow-spacing\": [2, {\n      \"before\": true,\n      \"after\": true\n    }],\n    \"constructor-super\": 0,\n    \"generator-star-spacing\": [2, {\n      \"before\": true,\n      \"after\": true\n    }],\n    \"no-class-assign\": 2,\n    \"no-confusing-arrow\": 0,\n    \"no-const-assign\": 2,\n    \"no-dupe-class-members\": 2,\n    \"no-duplicate-imports\": 0,\n    \"no-new-symbol\": 2,\n    \"no-restricted-imports\": 0,\n    \"no-this-before-super\": 2,\n    \"no-useless-computed-key\": 0,\n    \"no-var\": 0,\n    \"object-shorthand\": 0,\n    \"prefer-arrow-callback\": 0,\n    \"prefer-const\": 0,\n    \"prefer-reflect\": 0,\n    \"prefer-spread\": 0,\n    \"prefer-template\": 0,\n    \"prefer-rest-params\": 0,\n    \"require-yield\": 0,\n    \"rest-spread-spacing\": 0,\n    \"sort-imports\": 0,\n    \"template-curly-spacing\": 1,\n    \"yield-star-spacing\": 2\n  }\n}\n"
  },
  {
    "path": "packages/cml-component-parser/.gitignore",
    "content": ""
  },
  {
    "path": "packages/cml-component-parser/bin/cli.js",
    "content": "#!/usr/bin/env node\nconst path = require('path');\nconst program = require('commander');\nconst packageJson = require('../package.json');\nconst Parser = require('../index');\n\nprogram\n  .version(packageJson.version)\n  .usage('-i <dir> -o <dir> -f [format] -n [fileName]')\n  .option('-i, --in-dir <dir>', 'The directory which contians components with interface files.')\n  .option('-o, --out-dir <dir>', 'The directory which is used as output readme files folder.')\n  .option('-f, --out-format [format]', 'The file format for output files, default type is markdown. valid values are: markdown or json.')\n  .option('-n, --file-name [fileName]', 'If this option is set, then all outputs will be written into one single file named with file name value.')\n  .parse(process.argv);\n\nlet inDir = program.inDir;\nlet outDir = program.outDir;\nlet outFormat = program.outFormat || 'markdown';\nlet fileName = program.fileName || '';\nlet isSingleFile = !!fileName;\nlet isMarkdown = outFormat === 'markdown';\nlet parser = new Parser();\n\nif (inDir.indexOf('components') === -1) {\n  inDir = path.resolve(process.cwd(), inDir, 'components');\n} else {\n  inDir = path.resolve(process.cwd(), inDir);\n}\n\noutDir = path.resolve(process.cwd(), outDir);\n\nlet singleFileContent = isMarkdown ? [] : {};\n\nParser.flatEntrance(inDir).forEach(async (interfaceFile) => {\n  if (isSingleFile) {\n    let content = parser.resetPath(interfaceFile)[isMarkdown ? 'getReadmeContent' : 'getJsonResultsWithComponentName']();\n    isMarkdown ? singleFileContent.push(content) : (singleFileContent[content.name] = content.content);\n  } else {\n    await parser.resetPath(interfaceFile)[isMarkdown ? 'writeReadmeFileToDir' : 'writeJsonFileToDir'](outDir, fileName);\n  }\n});\n\n// If output is targeted as single file, then write all content at this point once.\nif (isSingleFile) {\n  isMarkdown && (singleFileContent = singleFileContent.join(outFormat === 'json' ? ',\\n' : '\\n\\n'));\n  !isMarkdown && (singleFileContent = JSON.stringify(singleFileContent, null, '\\t'));\n  parser[outFormat === 'markdown' ? 'writeReadmeFileToDir' : 'writeJsonFileToDir'](outDir, fileName, singleFileContent)\n    .then((res) => {\n      console.info(`write ${outFormat} content into file ${fileName} ` + res);\n      return res;\n    })\n    .catch((err) => {\n      console.error(err.message);\n    });\n}\n"
  },
  {
    "path": "packages/cml-component-parser/config/parse-config.js",
    "content": "module.exports = {\n  sourceType: 'module',\n  allowImportExportEverywhere: true, // consistent with espree\n  allowReturnOutsideFunction: true,\n  allowSuperOutsideMethod: true,\n  ranges: true,\n  tokens: true,\n  plugins: [\n    'flow',\n    'asyncGenerators',\n    'bigInt',\n    'classProperties',\n    'classPrivateProperties',\n    'classPrivateMethods',\n    'doExpressions',\n    'dynamicImport',\n    'exportDefaultFrom',\n    'exportNamespaceFrom',\n    'functionBind',\n    'functionSent',\n    'importMeta',\n    'logicalAssignment',\n    'nullishCoalescingOperator',\n    'numericSeparator',\n    'objectRestSpread',\n    'optionalCatchBinding',\n    'optionalChaining',\n    'throwExpressions'\n  ]\n}\n"
  },
  {
    "path": "packages/cml-component-parser/index.js",
    "content": "const path = require('path');\nconst fs = require('fs');\nconst readmeBuilder = require('./src/readme-builder');\nconst CmlAstTreeParser = require('cml-js-parser');\nconst InterfaceAstTreeParser = require('cml-interface-parser');\nconst entranceFlat = require('./src/entrance-flat');\n\n\nclass ComponentParser {\n  constructor(filePath = '', options = null, currentWorkspace = '') {\n    this._paseResults = {props: [], events: []};\n    this._options = options;\n    this._currentWorkspace = currentWorkspace;\n    filePath && this.resetPath(filePath);\n  }\n\n  resetPath(filePath) {\n    if (path.extname(filePath) === '.cml') {\n      let cmlTreeParser = new CmlAstTreeParser({filePath}, this._options);\n      this._paseResults = cmlTreeParser.getParseResults();\n      this._fileName = path.basename(filePath, '.cml');\n    } else {\n      let interfaceTreeParser = new InterfaceAstTreeParser({filePath}, this._options, this._currentWorkspace);\n      this._paseResults = interfaceTreeParser.getParseResults();\n      this._fileName = path.basename(filePath, '.interface');\n    }\n\n    return this;\n  }\n\n  getParseResults() {\n    return this._paseResults;\n  }\n\n  isResultsEmpty() {\n    return !this._paseResults || (this._paseResults.props.length === 0 && this._paseResults.events.length === 0);\n  }\n\n  getJsonContent() {\n    return this._paseResults && (JSON.stringify(this._paseResults, null, '\\t'));\n  }\n\n  getJsonResultsWithComponentName() {\n    return {\n      name: this._fileName,\n      content: this._paseResults\n    };\n  }\n\n  writeJsonFileToDir(dirPath, fileName = '', content = '') {\n    fileName = path.resolve(dirPath, (fileName || this._fileName) + '.json');\n    return new Promise((resolve, reject) => {\n      fs.writeFile(fileName, content || this.getJsonContent(), {\n        flag: 'w'\n      }, (err) => {\n        if (err) {return reject(err);}\n        resolve('success');\n      });\n    });\n  }\n\n  getReadmeContent() {\n    return !this.isResultsEmpty() ? readmeBuilder.getReadmeFileContent({\n      name: this._fileName,\n      props: this._paseResults.props,\n      events: this._paseResults.events\n    }) : '';\n  }\n\n\n  writeReadmeFileToDir(dirPath, fileName = '', content = '') {\n    fileName = path.resolve(dirPath, (fileName || this._fileName) + '.md');\n    return new Promise((resolve, reject) => {\n      fs.writeFile(fileName, content || this.getReadmeContent(), {\n        flag: 'w'\n      }, (err) => {\n        if (err) {return reject(err);}\n        resolve('success');\n      });\n    });\n  }\n\n  static flatEntrance(entrance) {\n    return entranceFlat.getEntrances(entrance);\n  }\n}\n\nmodule.exports = ComponentParser;\n"
  },
  {
    "path": "packages/cml-component-parser/package.json",
    "content": "{\n  \"name\": \"cml-component-parser\",\n  \"version\": \"1.0.8\",\n  \"description\": \"A tool that can parse interface file and return all properties and methods it has.\",\n  \"main\": \"index.js\",\n  \"scripts\": {},\n  \"bin\": {\n    \"cml-parser\": \"./bin/cli.js\"\n  },\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"dependencies\": {\n    \"@babel/parser\": \"^7.1.3\",\n    \"@babel/traverse\": \"^7.2.2\",\n    \"chameleon-tool-utils\": \"1.0.8\",\n    \"cml-interface-parser\": \"1.0.8\",\n    \"cml-js-parser\": \"1.0.8\",\n    \"commander\": \"^2.19.0\"\n  },\n  \"devDependencies\": {\n    \"chai\": \"^4.2.0\",\n    \"mocha\": \"^5.2.0\",\n    \"nyc\": \"^13.1.0\"\n  },\n  \"gitHead\": \"5ddcde4330774710f7646559446e008f7785ce00\"\n}"
  },
  {
    "path": "packages/cml-component-parser/src/entrance-flat.js",
    "content": "const path = require('path');\nconst fs = require('fs');\nlet _entrances = [];\n\nfunction _clean() {\n  _entrances = [];\n}\n\nfunction _getAllEntrances() {\n  return [..._entrances];\n}\n\nfunction _tryAppendEntrance(entrance) {\n  let subEntrances = fs.readdirSync(entrance);\n  let subFiles = subEntrances.filter((subEntrance) => {\n    return fs.lstatSync(path.resolve(entrance, subEntrance)).isFile();\n  });\n  if (subFiles.length) {\n    let interfaceFiles = subFiles.filter((subFile) => {\n      return path.extname(subFile) === '.interface';\n    });\n\n    if (interfaceFiles.length) {\n      _entrances.push(path.resolve(entrance, interfaceFiles[0]));\n    }\n\n    if (!interfaceFiles.length) {\n      subFiles = subFiles.filter((subFile) => {\n        return /^[\\w-]+\\.cml/.test(path.basename(subFile));\n      });\n      subFiles.length && _entrances.push(path.resolve(entrance, subFiles[0]));\n    }\n  }\n}\n\nfunction getEntrances(entrance) {\n  let results = [];\n  _recursive(entrance);\n  results = _getAllEntrances();\n  _clean();\n  return results;\n}\n\nfunction _recursive(entrance) {\n  if (fs.lstatSync(entrance).isDirectory()) {\n    _tryAppendEntrance(entrance);\n    fs.readdirSync(entrance, {encoding: 'utf8'}).forEach((subEntrance) => {\n      subEntrance = path.resolve(entrance, subEntrance);\n      fs.lstatSync(subEntrance).isDirectory() && _recursive(subEntrance);\n    });\n  }\n}\n\nmodule.exports = {\n  getEntrances\n}\n"
  },
  {
    "path": "packages/cml-component-parser/src/readme-builder.js",
    "content": "const flowTypeSperetorMap = new Map([\n  ['ObjectTypeAnnotation', ' , '],\n  ['UnionTypeAnnotation', ' | '],\n  ['IntersectionTypeAnnotation', ' & '],\n  ['TupleTypeAnnotation', ' , ']\n]);\n\nfunction getDescWithTypeChain(typeChain = [], options = {offsetTabNum: 0}) {\n  const tabStr = '&emsp;';\n  return typeChain.map((typeItem) => {\n    // using ES6 syntax to make a copy of typeItem object.\n    let mapTypeItem = {...typeItem};\n    if (mapTypeItem.flowType === 'ObjectTypeAnnotation') {\n      mapTypeItem.props = typeItem.props.map((propItem) => [propItem.name, propItem.valueType].join(': '));\n    } else {\n      mapTypeItem.props = typeItem.props.map((propItem) => propItem.valueType);\n    }\n    return mapTypeItem;\n  }).map((typeItem) => {\n    let desc = typeItem.props.join(flowTypeSperetorMap.get(typeItem.flowType));\n    if (typeItem.flowType === 'ObjectTypeAnnotation') {desc = ['{', desc, '}'].join('');}\n    if (typeItem.flowType === 'TupleTypeAnnotation') {desc = ['[', desc, ']'].join('');}\n    desc = tabStr.repeat(options.offsetTabNum) + `其中 ${typeItem.typeName} 的定义为 <br/>` + tabStr.repeat(options.offsetTabNum + 1) + desc;\n    return desc;\n  })\n    .join('<br/>');\n}\n\n\n/**\n * Get a formatted readme file content.\n * @param {Object} param\n * {\n *  name: 'c-button', //generally, it's the file name,\n *  nameZh: '按钮', // The component's name in chinese\n *  props: [], // An array contains all the properties that this component file has.\n *  events: [] // An array contains all the events that this component may emit.\n * }\n */\nfunction getReadmeFileContent(param = {}) {\n  let fileContent = '';\n  fileContent = `# ${param.name} \\n`;\n  fileContent = fileContent.concat('---\\n\\n');\n  param.nameZh && (fileContent = fileContent.concat(`\\n ${param.nameZh} \\n`));\n  fileContent += '|属性名|类型|说明|' + '\\n| ------ | ------ | ------ |';\n  param.props && param.props.forEach((prop) => {\n    let notes = '';\n    if (prop.typeChain) {notes = getDescWithTypeChain(prop.typeChain);}\n    fileContent += `\\n|${prop.name}|${prop.valueType}|${notes || ' '}|`;\n  });\n  param.events && param.events.forEach((event) => {\n    let notes = '';\n    event.params && event.params.forEach((paramItem, index) => {\n      index != 0 && (notes += '<br/>');\n      if (paramItem.props) {\n        notes += `事件返回参数 ${paramItem.varName} [类型: ${paramItem.typeName}] <br/> `;\n        notes += getDescWithTypeChain([paramItem]) + '<br/>';\n        if (paramItem.typeChain) {notes += getDescWithTypeChain(paramItem.typeChain, {offsetTabNum: 1});}\n      } else if (paramItem.typeName) {\n        notes += `事件返回参数 ${paramItem.varName} [类型: ${paramItem.typeName}]`;\n      }\n    });\n\n    if (event.paramNum === -1)\n    {!notes && (notes = '待填写');}\n    else\n    {!notes && (notes = '事件未定义返回参数');}\n\n    fileContent += `\\n|c-bind:${event.name}|EventHandle|${notes}|`;\n  });\n  return fileContent;\n}\n\nmodule.exports = {\n  getReadmeFileContent\n}\n"
  },
  {
    "path": "packages/cml-component-parser/test/docs/built-in-components/input/input.interface",
    "content": "<script cml-type=\"interface\">\n/*\n定义一个inteface用于描述组件的属性和事件\n1、 如果区分组件属性和事件？\n通过类型来区分，事件为函数类型，属性为非函数类型\n2、 如何定义组件属性\n给interface添加同名的属性即可，指定类型\n3、 如何定义组件事件\n以事件名称为key值给interface定义属性，该属性是一个函数类型，返回值为void，\n定义函数的第一个参数为自定义事件传递的detail对象类型\n*/\n\n//定义事件detail对象的参数\ntype inputEventDetail = {\n  value: String\n}\ntype blurEventDetail = {}\ntype focusEventDetail = {}\ntype confirEventDetail = {}\n\ninterface InputInterface {\n  value: String,\n  type: String,\n  placeholder: String,\n  disabled: Boolean,\n  focus: Boolean,\n  maxlength: Number,\n  returnKeyType: String,\n  placerHolderColor: String,\n  inputStyle: String,\n  inputevent(eventDetail: inputEventDetail): void;\n  blurevent(eventDetail: void): void;\n  focusevent(eventDetail: void): void;\n  confirmevent(eventDetail: void): void;\n}\n</script>\n"
  },
  {
    "path": "packages/cml-component-parser/test/docs/built-in-components/input/input.web.cml",
    "content": "<template>\n<view>\n  <html:input\n    value=\"{{value}}\"\n    type=\"{{type}}\"\n    placeholder=\"{{placeholder}}\"\n    disabled=\"{{disabled}}\"\n    maxlength=\"{{maxlength}}\"\n\n    c-bind:input=\"inputEvent\"\n    c-bind:blur=\"blurEvent\"\n    c-bind:focus=\"focusEvent\"\n    c-bind:keyup=\"keyupEvent\"\n\n    pattern=\"{{typePattern}}\"\n    ref=\"c-input\"\n    style=\"{{weexStyle}}\"\n  />\n</view>\n</template>\n<script>\n/*\nevent: inputevent blurevent focusevent cconfirmevent\n*/\nimport inputable from '../../assets/js/mixins/inputable/inputable'\n\n class Input implements InputInterface {\n    mixins = [inputable]\n    data = {\n      defaultStyle: \"line-height: normal;font-size: 33px; height: 80px;padding-left:20px; padding-right:20px; color: #000; border-width:1px; border-style:solid; border-color:#999;border-radius: 8px; text-align: left; background-color: #fff;\",\n      typePattern: '*'\n    }\n\n    props = {\n      //类型\n      type: {\n        type: String,\n        default: 'text'  //枚举值 text number password\n      }\n    }\n    watch = {\n      value: function (val) {\n        this.$refs['c-input'].value = val\n      }\n    }\n    computed = {\n      weexStyle() {\n        return this.defaultStyle + this.inputStyle\n      }\n    }\n\n    methods = {\n      changeFocus(focus) {\n        if(focus) {\n          this.$refs['c-input'].focus();\n        } else {\n          this.$refs['c-input'].blur();\n        }       \n      },\n    }\n    beforeCreate(){}\n    created() {}\n    beforeMount() {}\n    mounted() {\n      this.changeFocus(this.focus);\n      // ios端 type为number不生效，需要加入pattern\"[0-9]*\"\n      if (this.type === 'number') {\n        this.typePattern = '[0-9]*'\n      }\n    }\n    beforeDestroy() {}\n    destroyed() {}\n  }\n\n  export default new Input();\n\n</script>\n\n<style scoped>\ninput::-webkit-input-placeholder {\n  line-height: normal;\n}\n</style>\n\n<script cml-type=\"json\">\n{\n  \"web\": {\n    \"component\": true\n  }\n}\n</script>\n\n\n\n"
  },
  {
    "path": "packages/cml-component-parser/test/docs/built-in-components/input/input.weex.cml",
    "content": "<template>\n  <input\n      value=\"{{value}}\"\n      type=\"{{type}}\"\n      placeholder=\"{{placeholder}}\"\n      disabled=\"{{disabled}}\"\n      maxlength=\"{{maxlength}}\"\n\n      c-bind:input=\"inputEvent\"\n      c-bind:blur=\"blurEvent\"\n      c-bind:focus=\"focusEvent\"\n      c-bind:confirm=\"confirmEvent\"\n\n      ref=\"weexinput\"\n      return-key-type=\"{{returnKeyType}}\"\n      style=\"{{weexStyle}}\"\n  />\n</template>\n<script>\n/*\nevent: inputevent blurevent focusevent cconfirmevent\n*/\n class Input implements InputInterface {\n    props = {\n      //input的内容\n      value: {\n        type: String,\n        default: ''\n      },\n      //input的类型\n      type: {\n        type: String,\n        default: 'text'  //枚举值 text number password\n      },\n      //input的placerholder\n      placeholder: {\n        type: String,\n        default: ''\n      },\n      //是否禁用input输入\n      disabled: {\n        type: Boolean,\n        default: false\n      },\n      //控制input是否聚焦\n      focus: {\n        type: Boolean,\n        default: false\n      },\n      //最大长度\n      maxlength: {\n        type: Number,\n        default: 140\n      },\n      //右下角返回键类型\n      returnKeyType: { //枚举值 done search next go\n        type: String,\n        default: 'done'\n      },\n      placerHolderColor: {\n        type: String,\n        default: '#bebebe'\n      },\n      inputStyle: {\n        type: String,\n        default: ''\n      }\n    }\n    data = {\n      defaultStyle: \"font-size: 33px; height: 80px; line-height: 80px; padding-left:20px; padding-right:20px; color: #000; border-width:1px; border-style:solid; border-color:#999;border-radius: 8px; text-align: left; background-color: #fff;\"\n    }\n    computed ={\n      weexStyle() {\n        let style = this.defaultStyle + this.inputStyle;\n        if(style[style.length-1] !== ';') {\n          style +=';'\n        }\n        style += `placeholder-color: ${this.placerHolderColor};`\n        return style\n      }\n    }\n    watch = {\n      focus: function(newVal, oldVal) {\n        this.changeFocus(newVal);\n      }\n    }\n    methods = {\n      changeFocus(focus) {\n        if(focus) {\n          this.$refs['weexinput'].focus();\n        } else {\n          this.$refs['weexinput'].blur();\n        }       \n      },\n\n      inputEvent(e) {\n        this.$cmlEmit('inputevent',{\n          value: e.detail.value || ''\n        })\n      },\n      blurEvent(e) {\n        this.$cmlEmit('blurevent');\n      },\n      focusEvent(e) {\n        this.$cmlEmit('focusevent');\n      },\n      confirmEvent(e) {\n        this.$cmlEmit('confirmevent')\n      }\n    }\n    mounted() {\n      this.changeFocus(this.focus);\n    }  \n  }\n  export default new Input();\n</script>\n\n<style scoped>\n</style>\n\n<script cml-type=\"json\">\n{\n  \"weex\": {\n    \"component\": true\n  }\n}\n</script>"
  },
  {
    "path": "packages/cml-component-parser/test/docs/built-in-components/input/input.wx.cml",
    "content": "<template>\n  <input\n      value=\"{{value}}\"\n      type=\"{{type}}\"\n      placeholder=\"{{placeholder}}\"\n      disabled=\"{{disabled}}\"\n      maxlength=\"{{maxlength}}\"\n      style=\"{{wxStyle}}\"\n\n      c-bind:input=\"inputEvent\"\n      c-bind:blur=\"blurEvent\"\n      c-bind:focus=\"focusEvent\"\n      c-bind:confirm=\"confirmEvent\"\n\n      focus=\"{{focus}}\"\n      confirm-type=\"{{returnKeyType}}\"\n      placeholder-style=\"{{wxPlaceHolderStyle}}\"\n  />\n</template>\n<script>\n class Input implements InputInterface {\n    props = {\n      value: {\n        type: String,\n        default: ''\n      },\n      //input的类型\n      type: {\n        type: String,\n        default: 'text'  //枚举值 text number password\n      },\n      //input的placerholder\n      placeholder: {\n        type: String,\n        default: ''\n      },\n      //是否禁用input输入\n      disabled: {\n        type: Boolean,\n        default: false\n      },\n      //控制input是否聚焦\n      focus: {\n        type: Boolean,\n        default: false\n      },\n      //最大长度\n      maxlength: {\n        type: Number,\n        default: 140\n      },\n      //右下角返回键类型\n      returnKeyType: { //枚举值 done search next go\n        type: String,\n        default: 'done'\n      },\n      placerHolderColor: {\n        type: String,\n        default: '#bebebe'\n      },\n      inputStyle: {\n        type: String,\n        default: ''\n      }\n    }\n    data = {\n      defaultStyle: \"font-size: 33px; height: 80px; line-height: 80px; padding-left:20px; padding-right:20px; color: #000; border: 1px solid #999;border-radius: 8px; text-align: left; background-color: #fff;\"\n    }\n    computed ={\n      wxPlaceHolderStyle() {\n        return `color: ${this.placerHolderColor};`\n      },\n      wxStyle() {\n        let style = this.defaultStyle + this.inputStyle;\n        return style\n      }\n    }\n    watch = {\n      focus: function(newVal, oldVal) {\n      }\n    }\n    methods = {\n      inputEvent(e) {\n        this.$cmlEmit('inputevent',{\n          value: e.detail.value || ''\n        })\n      },\n      blurEvent(e) {\n        this.$cmlEmit('blurevent');\n      },\n      focusEvent(e) {\n        this.$cmlEmit('focusevent');\n      },\n      confirmEvent(e) {\n        this.$cmlEmit('confirmevent')\n      }\n    }\n    beforeCreate(){}\n    created() {}\n    beforeMount() {}\n    mounted() {}\n    beforeDestroy() {}\n    destroyed() {}\n  }\n  export default new Input();\n</script>\n\n<style scoped>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"wx\": {\n    \"component\": true\n  }\n}\n</script>"
  },
  {
    "path": "packages/cml-component-parser/test/docs/built-in-components/layout/aside/aside.cml",
    "content": "<template>\n<view class=\"c-aside\" style=\"{{mergeAsideStyle}}\">\n  <slot></slot>\n</view>\n</template>\n<script>\nclass CAside {\n\n  props = {\n    asideStyle:{\n      type:String,\n      default:'',\n    },\n  }\n  data = {\n    defaultStyle:'width:200px;',\n  }\n  computed = {\n    mergeAsideStyle(){\n      return this.defaultStyle + this.asideStyle;\n    }\n  }\n\n}\n\nexport default new CAside()\n</script>\n<style scoped>\n.c-aside{\n    display: flex;\n    background-color: #d3dce6;\n    color: #333;\n    line-height: 60px;\n    flex-shrink:0;\n}\n\n</style>\n<script cml-type=\"json\">\n{\n    \"base\": {\n        \"component\": true\n    }\n}\n</script>\n"
  },
  {
    "path": "packages/cml-component-parser/test/docs/built-in-components/layout/col/col.cml",
    "content": "<template>\n<view class=\"flex-item\" style=\"{{ colStyle }}\">\n  <slot></slot>\n</view>\n</template>\n<script>\n  class CCol   {\n    props = {\n      width: {\n        type: Number,\n        default: 0\n      },\n      height: {\n        type: Number,\n        default: 0\n      },\n      backgroundColor: {\n        type: String,\n        default: ''\n      },\n      margin: {\n        type: Number,\n        default: 0\n      }\n    }\n    data = {\n    }\n\n    computed = {\n      colStyle () {\n        let style = '';\n        if (this.height) {\n          style = `height:${this.height}px;`;\n        }\n        if (this.width) {\n          style += `width:${this.width}px;`;\n        }\n        if (this.backgroundColor) {\n          style += `background-color:${this.backgroundColor};`;\n        }\n        if (this.margin) {\n          let mr = this.margin/2;\n          style += `margin-right:${mr}px;margin-left:${mr}px;`;\n        }\n        return style;\n      }\n    }\n\n    watch  = {\n    }\n\n    methods = {\n    }\n\n    beforeCreate() {\n    }\n\n    created() {\n    }\n\n    beforeMount() {\n    }\n\n    mounted() {\n      // let parent = this.$parent;\n      // while (parent && parent.$options._componentTag !== 'c-row') {\n      //   parent = parent.$parent;\n      // }\n      // this.gutter = parent ? parent.gutter : 0;\n      // this.grow = parent? parent.grow : false;\n      // this.styleHeight = this.height? height: parent? parent.height: 0\n    }\n\n    beforeDestroy() {\n    }\n\n    destroyed() {\n    }\n}\n\nexport default new CCol();\n</script>\n<style scoped>\n</style>\n<script cml-type=\"json\">\n{\n    \"base\": {\n        \"component\": true\n    }\n}\n</script>\n"
  },
  {
    "path": "packages/cml-component-parser/test/docs/built-in-components/layout/container/container.cml",
    "content": "<template>\n  <view class=\"c-container\"  style=\"{{containerStyle}}\">\n    <slot></slot>\n  </view>\n</template>\n<script>\nclass CContainer {\n\n  props = {\n    direction: {\n      type: String,\n      default: 'row'\n    }\n  }\n  data = {\n  }\n  computed = {\n    isVertical(){\n      if(this.direction === 'column'){\n        return true;\n      }else if(this.direction === 'row'){\n        return false;\n      }\n    },\n    containerStyle(){\n      let finalStyle = '';\n\n      if(this.isVertical){\n        finalStyle = \"flex-direction:column\"\n      }\n      return finalStyle;\n    }\n  }\n}\nexport default new CContainer()\n</script>\n<style scoped>\n.c-container{\n  flex:1;\n  display: flex;\n  flex-direction:row;\n}\n\n</style>\n<script cml-type=\"json\">\n{\n    \"base\": {\n      \"component\": true\n    }\n}\n</script>\n"
  },
  {
    "path": "packages/cml-component-parser/test/docs/built-in-components/layout/foot/foot.cml",
    "content": "<template>\n<view class=\"c-foot\" style=\"{{mergeFootStyle}}\">\n  <slot></slot>\n</view>\n</template>\n<script>\nclass CFoot {\n\n  props = {\n    footStyle:{\n      type:String,\n      default:'',\n    },\n  }\n  data = {\n    defaultStyle:'height:80px;',\n  }\n  computed = {\n    mergeFootStyle(){\n      return this.defaultStyle + this.footStyle;\n    }\n  }\n}\nexport default new CFoot()\n</script>\n<style scoped>\n.c-foot{\n    display: flex;\n    background-color: #b3c0d1;\n    color: #333;\n    line-height: 60px;\n    flex-shrink:0;\n}\n\n</style>\n<script cml-type=\"json\">\n{\n    \"base\": {\n        \"component\": true\n    }\n}\n</script>\n"
  },
  {
    "path": "packages/cml-component-parser/test/docs/export-default.cml",
    "content": "<template lang=\"cml\">\n  <view></view>\n</template>\n\n<script>\n  import { mapGetters } from 'chameleon-store';\n  import { gettersShow, getterHide } from 'getter-types';\n\n  export default {\n    props: {\n      propOne:{\n        type:Object,\n        default(){\n          return {}\n        }\n      },\n      propTwo: {\n        type: Boolean,\n        default: true\n      }\n    },\n    data: {\n      dataOne: true,\n      dataTwo: ''\n    },\n    created(res) {\n      this.$cmlEmit('eventOne');\n    },\n    computed: {\n      computedOne() {\n        return true;\n      },\n      ...mapGetters({\n        computedShow: gettersShow,\n        getterHide\n      })\n    },\n    methods:  {\n      onTap() {\n        return true;\n      }\n    }\n  };\n</script>\n\n<style scoped>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  },\n  \"weex\": {\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/cml-component-parser/test/docs/index.interface",
    "content": "<script cml-type=\"interface\">\n/*\n定义一个inteface用于描述组件的属性和事件\n1、 如果区分组件属性和事件？\n通过类型来区分，事件为函数类型，属性为非函数类型\n2、 如何定义组件属性\n给interface添加同名的属性即可，指定类型\n3、 如何定义组件事件\n以事件名称为key值给interface定义属性，该属性是一个函数类型，返回值为void，\n定义函数的第一个参数为自定义事件传递的detail对象类型\n*/\n\n//定义事件detail对象的参数\ntype scrollEventDetail = {\n  deltaX: Number,\n  deltaY: Number,\n  scrollHeight: Number,\n  scrollLeft: Number,\n  scrollTop: Number,\n  scrollWidth: Number\n}\n\ntype scrolltobottomEventDetail = {\n  direction: String\n}\n\ninterface ScrollerInterface {\n  cstyle: String,\n  bottomOffset: Number,\n  scrollDirection: String,\n  customscroll(eventDetail: scrollEventDetail): void;\n  scrolltobottom(eventDetail: scrolltobottomEventDetail): void;\n}\n</script>"
  },
  {
    "path": "packages/cml-component-parser/test/test.js",
    "content": "const fs = require('fs');\nconst path = require('path');\nconst chai = require('chai');\nconst expect = chai.expect;\nconst Parser = require('../index');\n\ndescribe('component check', function() {\n  it('should pass static flatEntrance', function() {\n    const mainEntrance = path.resolve(__dirname, './docs/built-in-components');\n    let results = Parser.flatEntrance(mainEntrance);\n\n    expect(results).to.be.deep.equal([\n      'docs/built-in-components/input/input.interface',\n      'docs/built-in-components/layout/aside/aside.cml',\n      'docs/built-in-components/layout/col/col.cml',\n      'docs/built-in-components/layout/container/container.cml',\n      'docs/built-in-components/layout/foot/foot.cml'\n    ].map((fileName) => {\n      return path.resolve(__dirname, fileName);\n    }));\n  });\n  describe('should pass interface file parser', function() {\n    let parser = new Parser();\n    it('should fail isResultsEmpty', function() {\n      expect(parser.isResultsEmpty()).to.be.true;\n    });\n    it('should pass getParseResults check', function() {\n      parser.resetPath(path.resolve(__dirname, './docs/index.interface'));\n      let results = parser.getParseResults();\n      expect(results).to.have.deep.property('vars', ['cstyle', 'bottomOffset', 'scrollDirection']);\n      expect(results).to.have.deep.property('methods', ['customscroll', 'scrolltobottom']);\n      expect(results).to.have.deep.property('props', [{\n        name: 'cstyle', valueType: 'String', props: [], typeChain: []\n      }, {\n        name: 'bottomOffset', valueType: 'Number', props: [], typeChain: []\n      }, {\n        name: 'scrollDirection', valueType: 'String', props: [], typeChain: []\n      }]);\n    });\n    it('should pass isResultsEmpty', function() {\n      expect(parser.isResultsEmpty()).to.be.false;\n    });\n    it('should pass getReadmeContent', function() {\n      let readme = parser.getReadmeContent();\n      expect(readme).to.be.equal('# index \\n---\\n\\n|属性名|类型|说明|\\n| ------ | ------ | ------ |\\n|cstyle|String| |\\n|bottomOffset|Number| |\\n|scrollDirection|String| |\\n|c-bind:customscroll|EventHandle|事件返回参数 eventDetail [类型: scrollEventDetail] <br/> 其中 scrollEventDetail 的定义为 <br/>&emsp;{deltaX: Number , deltaY: Number , scrollHeight: Number , scrollLeft: Number , scrollTop: Number , scrollWidth: Number}<br/>|\\n|c-bind:scrolltobottom|EventHandle|事件返回参数 eventDetail [类型: scrolltobottomEventDetail] <br/> 其中 scrolltobottomEventDetail 的定义为 <br/>&emsp;{direction: String}<br/>|');\n    });\n    it('should pass getJsonContent', function() {\n      let json = parser.getJsonContent();\n      expect(json).to.equal('{\\n\\t\"vars\": [\\n\\t\\t\"cstyle\",\\n\\t\\t\"bottomOffset\",\\n\\t\\t\"scrollDirection\"\\n\\t],\\n\\t\"methods\": [\\n\\t\\t\"customscroll\",\\n\\t\\t\"scrolltobottom\"\\n\\t],\\n\\t\"props\": [\\n\\t\\t{\\n\\t\\t\\t\"name\": \"cstyle\",\\n\\t\\t\\t\"valueType\": \"String\",\\n\\t\\t\\t\"props\": [],\\n\\t\\t\\t\"typeChain\": []\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\"name\": \"bottomOffset\",\\n\\t\\t\\t\"valueType\": \"Number\",\\n\\t\\t\\t\"props\": [],\\n\\t\\t\\t\"typeChain\": []\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\"name\": \"scrollDirection\",\\n\\t\\t\\t\"valueType\": \"String\",\\n\\t\\t\\t\"props\": [],\\n\\t\\t\\t\"typeChain\": []\\n\\t\\t}\\n\\t],\\n\\t\"events\": [\\n\\t\\t{\\n\\t\\t\\t\"name\": \"customscroll\",\\n\\t\\t\\t\"paramsNum\": 1,\\n\\t\\t\\t\"params\": [\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\"typeName\": \"scrollEventDetail\",\\n\\t\\t\\t\\t\\t\"flowType\": \"ObjectTypeAnnotation\",\\n\\t\\t\\t\\t\\t\"props\": [\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\"name\": \"deltaX\",\\n\\t\\t\\t\\t\\t\\t\\t\"valueType\": \"Number\"\\n\\t\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\"name\": \"deltaY\",\\n\\t\\t\\t\\t\\t\\t\\t\"valueType\": \"Number\"\\n\\t\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\"name\": \"scrollHeight\",\\n\\t\\t\\t\\t\\t\\t\\t\"valueType\": \"Number\"\\n\\t\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\"name\": \"scrollLeft\",\\n\\t\\t\\t\\t\\t\\t\\t\"valueType\": \"Number\"\\n\\t\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\"name\": \"scrollTop\",\\n\\t\\t\\t\\t\\t\\t\\t\"valueType\": \"Number\"\\n\\t\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\"name\": \"scrollWidth\",\\n\\t\\t\\t\\t\\t\\t\\t\"valueType\": \"Number\"\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t],\\n\\t\\t\\t\\t\\t\"varName\": \"eventDetail\",\\n\\t\\t\\t\\t\\t\"typeChain\": []\\n\\t\\t\\t\\t}\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\"name\": \"scrolltobottom\",\\n\\t\\t\\t\"paramsNum\": 1,\\n\\t\\t\\t\"params\": [\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\"typeName\": \"scrolltobottomEventDetail\",\\n\\t\\t\\t\\t\\t\"flowType\": \"ObjectTypeAnnotation\",\\n\\t\\t\\t\\t\\t\"props\": [\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\"name\": \"direction\",\\n\\t\\t\\t\\t\\t\\t\\t\"valueType\": \"String\"\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t],\\n\\t\\t\\t\\t\\t\"varName\": \"eventDetail\",\\n\\t\\t\\t\\t\\t\"typeChain\": []\\n\\t\\t\\t\\t}\\n\\t\\t\\t]\\n\\t\\t}\\n\\t]\\n}');\n    });\n    it('should pass writeReadmeFileToDir', function(done) {\n      parser.writeReadmeFileToDir(__dirname, 'interface')\n        .then((res) => {\n          expect(res).to.equal('success');\n          expect(fs.readFileSync(path.resolve(__dirname, 'interface.md'), 'utf8')).to.equal('# index \\n---\\n\\n|属性名|类型|说明|\\n| ------ | ------ | ------ |\\n|cstyle|String| |\\n|bottomOffset|Number| |\\n|scrollDirection|String| |\\n|c-bind:customscroll|EventHandle|事件返回参数 eventDetail [类型: scrollEventDetail] <br/> 其中 scrollEventDetail 的定义为 <br/>&emsp;{deltaX: Number , deltaY: Number , scrollHeight: Number , scrollLeft: Number , scrollTop: Number , scrollWidth: Number}<br/>|\\n|c-bind:scrolltobottom|EventHandle|事件返回参数 eventDetail [类型: scrolltobottomEventDetail] <br/> 其中 scrolltobottomEventDetail 的定义为 <br/>&emsp;{direction: String}<br/>|');\n          done();\n        })\n        .catch(err => {\n          done(err);\n        })\n        .then((res) => {\n          fs.unlinkSync(path.resolve(__dirname, 'interface.md'));\n        });\n    });\n    it('should pass writeJsonFileToDir', function(done) {\n      parser.writeJsonFileToDir(__dirname, 'interface')\n        .then((res) => {\n          expect(res).to.be.equal('success');\n          expect(fs.readFileSync(path.resolve(__dirname, 'interface.json'), 'utf8')).to.equal('{\\n\\t\"vars\": [\\n\\t\\t\"cstyle\",\\n\\t\\t\"bottomOffset\",\\n\\t\\t\"scrollDirection\"\\n\\t],\\n\\t\"methods\": [\\n\\t\\t\"customscroll\",\\n\\t\\t\"scrolltobottom\"\\n\\t],\\n\\t\"props\": [\\n\\t\\t{\\n\\t\\t\\t\"name\": \"cstyle\",\\n\\t\\t\\t\"valueType\": \"String\",\\n\\t\\t\\t\"props\": [],\\n\\t\\t\\t\"typeChain\": []\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\"name\": \"bottomOffset\",\\n\\t\\t\\t\"valueType\": \"Number\",\\n\\t\\t\\t\"props\": [],\\n\\t\\t\\t\"typeChain\": []\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\"name\": \"scrollDirection\",\\n\\t\\t\\t\"valueType\": \"String\",\\n\\t\\t\\t\"props\": [],\\n\\t\\t\\t\"typeChain\": []\\n\\t\\t}\\n\\t],\\n\\t\"events\": [\\n\\t\\t{\\n\\t\\t\\t\"name\": \"customscroll\",\\n\\t\\t\\t\"paramsNum\": 1,\\n\\t\\t\\t\"params\": [\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\"typeName\": \"scrollEventDetail\",\\n\\t\\t\\t\\t\\t\"flowType\": \"ObjectTypeAnnotation\",\\n\\t\\t\\t\\t\\t\"props\": [\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\"name\": \"deltaX\",\\n\\t\\t\\t\\t\\t\\t\\t\"valueType\": \"Number\"\\n\\t\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\"name\": \"deltaY\",\\n\\t\\t\\t\\t\\t\\t\\t\"valueType\": \"Number\"\\n\\t\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\"name\": \"scrollHeight\",\\n\\t\\t\\t\\t\\t\\t\\t\"valueType\": \"Number\"\\n\\t\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\"name\": \"scrollLeft\",\\n\\t\\t\\t\\t\\t\\t\\t\"valueType\": \"Number\"\\n\\t\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\"name\": \"scrollTop\",\\n\\t\\t\\t\\t\\t\\t\\t\"valueType\": \"Number\"\\n\\t\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\"name\": \"scrollWidth\",\\n\\t\\t\\t\\t\\t\\t\\t\"valueType\": \"Number\"\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t],\\n\\t\\t\\t\\t\\t\"varName\": \"eventDetail\",\\n\\t\\t\\t\\t\\t\"typeChain\": []\\n\\t\\t\\t\\t}\\n\\t\\t\\t]\\n\\t\\t},\\n\\t\\t{\\n\\t\\t\\t\"name\": \"scrolltobottom\",\\n\\t\\t\\t\"paramsNum\": 1,\\n\\t\\t\\t\"params\": [\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\"typeName\": \"scrolltobottomEventDetail\",\\n\\t\\t\\t\\t\\t\"flowType\": \"ObjectTypeAnnotation\",\\n\\t\\t\\t\\t\\t\"props\": [\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\"name\": \"direction\",\\n\\t\\t\\t\\t\\t\\t\\t\"valueType\": \"String\"\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t],\\n\\t\\t\\t\\t\\t\"varName\": \"eventDetail\",\\n\\t\\t\\t\\t\\t\"typeChain\": []\\n\\t\\t\\t\\t}\\n\\t\\t\\t]\\n\\t\\t}\\n\\t]\\n}');\n          done();\n        })\n        .catch(err => {\n          done(err);\n        })\n        .then((res) => {\n          fs.unlinkSync(path.resolve(__dirname, 'interface.json'));\n        });\n    });\n  });\n\n  describe('should pass single cml file parser', function() {\n    let parser = new Parser(path.resolve(__dirname, './docs/export-default.cml'));\n    it('should pass getParseResults check', function() {\n      let results = parser.getParseResults();\n      expect(results).to.have.deep.property('vars', ['propOne', 'propTwo', 'dataOne', 'dataTwo', 'computedOne', 'computedShow', 'getterHide'], 'failed at checking vars');\n      expect(results).to.have.deep.property('methods', ['onTap'], 'failed on checking methods');\n      expect(results).to.have.deep.property('props', [{\n        name: 'propOne', valueType: 'Object', default: ''\n      }, {\n        name: 'propTwo', valueType: 'Boolean', default: true\n      }], 'failed at checking props');\n      expect(results).to.have.deep.property('events', [{\n        name: 'eventOne', paramsNum: -1, params: []\n      }]);\n    });\n  });\n});\n"
  },
  {
    "path": "packages/cml-extract-css-webpack-plugin/LICENSE",
    "content": "Copyright JS Foundation and other contributors\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "packages/cml-extract-css-webpack-plugin/README.md",
    "content": "- 基于 extract-text-webpack-plugin@3.0.2 改造\n- 修复提取vue和cml文件css的组合顺序。"
  },
  {
    "path": "packages/cml-extract-css-webpack-plugin/dist/cjs.js",
    "content": "'use strict';\n\nmodule.exports = require('./index').default;"
  },
  {
    "path": "packages/cml-extract-css-webpack-plugin/dist/helper.js",
    "content": "\n// 根据依赖的map 生成顺序的数组\nexports.getAllFileSort = function (depsMap) {\n  let result = [];\n  let currentStack = []; //记录当前处理的文件 防止循环依赖\n  let allKeys = Object.keys(depsMap);\n  for(let i = 0; i < allKeys.length; i++) {\n    entry(allKeys[i])\n  }\n\n  function entry(filePath) {\n    // 已经存在 不操作\n    if(~result.indexOf(filePath)) {\n      return;\n    }\n\n    // 在栈中 不操作\n    if(~currentStack.indexOf(filePath)) {\n      return;\n    }\n    // 不存在依赖\n    if(!depsMap[filePath]) {\n      result.push(filePath);\n    } else {\n      // 存在依赖   先入栈\n      currentStack.push(filePath);\n\n      let deps = depsMap[filePath];\n      deps.forEach(item=>{\n        entry(item);\n      })\n      result.push(filePath);\n      // 处理完了出站\n      currentStack.pop(filePath);\n    }\n\n    \n  }\n\n  return result;\n\n} \n\nexports.sortChunk = function(extractedChunk, allFileSort) {\n  let modules = Array.from(extractedChunk._modules);\n\n  let cssmodule = []; // 普通css 就是按照引用顺序 先引用的放在前面 css的module放前面 只有web端会引用\n  let cmlmodule = [];\n  let result = [];\n  modules.forEach(item=>{\n    if(/(\\.cml|\\.vue)$/.test(item._originalModule.resource)) {\n      cmlmodule.push(item);\n    } else {\n      cssmodule.push(item);\n    }\n  });\n\n\n  // 排序\n  cmlmodule.sort(function(a, b) {\n    let aIndex = allFileSort.indexOf(a._originalModule.resource);\n    let bIndex = allFileSort.indexOf(b._originalModule.resource);\n    return aIndex - bIndex;\n  })\n\n  result = result.concat(cssmodule, cmlmodule);\n\n\n  extractedChunk._modules = new Set(result);\n\n}"
  },
  {
    "path": "packages/cml-extract-css-webpack-plugin/dist/index.js",
    "content": "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _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; }; }();\n\nvar _fs = require('fs');\n\nvar _fs2 = _interopRequireDefault(_fs);\n\nvar _path = require('path');\n\nvar _path2 = _interopRequireDefault(_path);\n\nvar _Chunk = require('webpack/lib/Chunk');\n\nvar _Chunk2 = _interopRequireDefault(_Chunk);\n\nvar _webpackSources = require('webpack-sources');\n\nvar _async = require('async');\n\nvar _async2 = _interopRequireDefault(_async);\n\nvar _loaderUtils = require('loader-utils');\n\nvar _loaderUtils2 = _interopRequireDefault(_loaderUtils);\n\nvar _schemaUtils = require('schema-utils');\n\nvar _schemaUtils2 = _interopRequireDefault(_schemaUtils);\n\nvar _ExtractTextPluginCompilation = require('./lib/ExtractTextPluginCompilation');\n\nvar _ExtractTextPluginCompilation2 = _interopRequireDefault(_ExtractTextPluginCompilation);\n\nvar _OrderUndefinedError = require('./lib/OrderUndefinedError');\n\nvar _OrderUndefinedError2 = _interopRequireDefault(_OrderUndefinedError);\n\nvar _helpers = require('./lib/helpers');\n\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar NS = _path2.default.dirname(_fs2.default.realpathSync(__filename));\n\nvar nextId = 0;\n\n\nvar cmlHelper = require('./helper');\n\nvar ExtractTextPlugin = function () {\n  function ExtractTextPlugin(options) {\n    _classCallCheck(this, ExtractTextPlugin);\n\n    if ((0, _helpers.isString)(options)) {\n      options = { filename: options };\n    } else {\n      (0, _schemaUtils2.default)(_path2.default.resolve(__dirname, '../schema/plugin.json'), options, 'Extract Text Plugin');\n    }\n    this.filename = options.filename;\n    this.id = options.id != null ? options.id : ++nextId;\n    this.options = {};\n    (0, _helpers.mergeOptions)(this.options, options);\n    delete this.options.filename;\n    delete this.options.id;\n  }\n\n  _createClass(ExtractTextPlugin, [{\n    key: 'applyAdditionalInformation',\n    value: function applyAdditionalInformation(source, info) {\n      if (info) {\n        return new _webpackSources.ConcatSource(`@media ${info[0]} {`, source, '}');\n      }\n      return source;\n    }\n  }, {\n    key: 'loader',\n    value: function loader(options) {\n      return ExtractTextPlugin.loader((0, _helpers.mergeOptions)({ id: this.id }, options));\n    }\n  }, {\n    key: 'mergeNonInitialChunks',\n    value: function mergeNonInitialChunks(chunk, intoChunk, checkedChunks) {\n      var _this = this;\n\n      if (!intoChunk) {\n        checkedChunks = [];\n        chunk.chunks.forEach(function (c) {\n          if ((0, _helpers.isInitialOrHasNoParents)(c)) return;\n          _this.mergeNonInitialChunks(c, chunk, checkedChunks);\n        }, this);\n      } else if (checkedChunks.indexOf(chunk) < 0) {\n        checkedChunks.push(chunk);\n        chunk.forEachModule(function (module) {\n          intoChunk.addModule(module);\n          module.addChunk(intoChunk);\n        });\n        chunk.chunks.forEach(function (c) {\n          if ((0, _helpers.isInitialOrHasNoParents)(c)) return;\n          _this.mergeNonInitialChunks(c, intoChunk, checkedChunks);\n        }, this);\n      }\n    }\n  }, {\n    key: 'renderExtractedChunk',\n    value: function renderExtractedChunk(chunk) {\n      var _this2 = this;\n      var source = new _webpackSources.ConcatSource();\n      chunk.forEachModule(function (module) {\n        var moduleSource = module.source();\n        source.add(_this2.applyAdditionalInformation(moduleSource, module.additionalInformation));\n      }, this);\n      return source;\n    }\n  }, {\n    key: 'extract',\n    value: function extract(options) {\n      if (Array.isArray(options) || (0, _helpers.isString)(options) || typeof options.options === 'object' || typeof options.query === 'object') {\n        options = { use: options };\n      } else {\n        (0, _schemaUtils2.default)(_path2.default.resolve(__dirname, '../schema/loader.json'), options, 'Extract Text Plugin (Loader)');\n      }\n      var loader = options.use;\n      var before = options.fallback || [];\n      if ((0, _helpers.isString)(loader)) {\n        loader = loader.split('!');\n      }\n      if ((0, _helpers.isString)(before)) {\n        before = before.split('!');\n      } else if (!Array.isArray(before)) {\n        before = [before];\n      }\n      options = (0, _helpers.mergeOptions)({ omit: before.length, remove: true }, options);\n      delete options.use;\n      delete options.fallback;\n      return [this.loader(options)].concat(before, loader).map(_helpers.getLoaderObject);\n    }\n  }, {\n    key: 'apply',\n    value: function apply(compiler) {\n      var _this3 = this;\n\n      var options = this.options;\n      compiler.plugin('this-compilation', function (compilation) {\n        var extractCompilation = new _ExtractTextPluginCompilation2.default();\n        compilation.plugin('normal-module-loader', function (loaderContext, module) {\n          loaderContext[NS] = function (content, opt) {\n            if (options.disable) {\n              return false;\n            }\n            if (!Array.isArray(content) && content != null) {\n              throw new Error(`Exported value was not extracted as an array: ${JSON.stringify(content)}`);\n            }\n            module[NS] = {\n              content,\n              options: opt || {}\n            };\n            return options.allChunks || module[`${NS}/extract`]; // eslint-disable-line no-path-concat\n          };\n        });\n        var filename = _this3.filename;\n        var id = _this3.id;\n        var extractedChunks = void 0;\n        compilation.plugin('optimize-tree', function (chunks, modules, callback) {\n          extractedChunks = chunks.map(function () {\n            return new _Chunk2.default();\n          });\n          chunks.forEach(function (chunk, i) {\n            var extractedChunk = extractedChunks[i];\n            extractedChunk.index = i;\n            extractedChunk.originalChunk = chunk;\n            extractedChunk.name = chunk.name;\n            extractedChunk.entrypoints = chunk.entrypoints;\n            chunk.chunks.forEach(function (c) {\n              extractedChunk.addChunk(extractedChunks[chunks.indexOf(c)]);\n            });\n            chunk.parents.forEach(function (c) {\n              extractedChunk.addParent(extractedChunks[chunks.indexOf(c)]);\n            });\n          });\n          _async2.default.forEach(chunks, function (chunk, callback) {\n            // eslint-disable-line no-shadow\n            var extractedChunk = extractedChunks[chunks.indexOf(chunk)];\n            var shouldExtract = !!(options.allChunks || (0, _helpers.isInitialOrHasNoParents)(chunk));\n            chunk.sortModules();\n            _async2.default.forEach(chunk.mapModules(function (c) {\n              return c;\n            }), function (module, callback) {\n              // eslint-disable-line no-shadow\n              var meta = module[NS];\n              if (meta && (!meta.options.id || meta.options.id === id)) {\n                var wasExtracted = Array.isArray(meta.content);\n                // A stricter `shouldExtract !== wasExtracted` check to guard against cases where a previously extracted\n                // module would be extracted twice. Happens when a module is a dependency of an initial and a non-initial\n                // chunk. See issue #604\n                if (shouldExtract && !wasExtracted) {\n                  module[`${NS}/extract`] = shouldExtract; // eslint-disable-line no-path-concat\n                  compilation.rebuildModule(module, function (err) {\n                    if (err) {\n                      compilation.errors.push(err);\n                      return callback();\n                    }\n                    meta = module[NS];\n                    // Error out if content is not an array and is not null\n                    if (!Array.isArray(meta.content) && meta.content != null) {\n                      err = new Error(`${module.identifier()} doesn't export content`);\n                      compilation.errors.push(err);\n                      return callback();\n                    }\n                    if (meta.content) {\n                      extractCompilation.addResultToChunk(module.identifier(), meta.content, module, extractedChunk);\n                    }\n                    callback();\n                  });\n                } else {\n                  if (meta.content) {\n                    extractCompilation.addResultToChunk(module.identifier(), meta.content, module, extractedChunk);\n                  }\n                  callback();\n                }\n              } else callback();\n            }, function (err) {\n              if (err) return callback(err);\n              callback();\n            });\n          }, function (err) {\n            if (err) return callback(err);\n            extractedChunks.forEach(function (extractedChunk) {\n              if ((0, _helpers.isInitialOrHasNoParents)(extractedChunk)) {\n                _this3.mergeNonInitialChunks(extractedChunk);\n              }\n            }, _this3);\n            extractedChunks.forEach(function (extractedChunk) {\n              if (!(0, _helpers.isInitialOrHasNoParents)(extractedChunk)) {\n                extractedChunk.forEachModule(function (module) {\n                  extractedChunk.removeModule(module);\n                });\n              }\n            });\n            compilation.applyPlugins('optimize-extracted-chunks', extractedChunks);\n            callback();\n          });\n        });\n        compilation.plugin('additional-assets', function (callback) {\n          // const \n          let cmlDepsMap = compiler._cmlDepsMap ||  {};\n          let allFileSort = cmlHelper.getAllFileSort(cmlDepsMap);\n          \n\n          extractedChunks.forEach(function (extractedChunk) {\n            if (extractedChunk.getNumberOfModules()) {\n              extractedChunk.sortModules(function (a, b) {\n                if (!options.ignoreOrder && (0, _helpers.isInvalidOrder)(a, b)) {\n                  compilation.errors.push(new _OrderUndefinedError2.default(a.getOriginalModule()));\n                  compilation.errors.push(new _OrderUndefinedError2.default(b.getOriginalModule()));\n                }\n                return (0, _helpers.getOrder)(a, b);\n              });\n              var chunk = extractedChunk.originalChunk;\n\n              //重新排列vue和cml文件中的css顺序\n              // sortStyleModule(extractedChunk);\n              cmlHelper.sortChunk(extractedChunk, allFileSort);\n\n              var source = _this3.renderExtractedChunk(extractedChunk);\n              var getPath = function getPath(format) {\n                return compilation.getPath(format, {\n                  chunk\n                }).replace(/\\[(?:(\\w+):)?contenthash(?::([a-z]+\\d*))?(?::(\\d+))?\\]/ig, function () {\n                  // eslint-disable-line func-names\n                  return _loaderUtils2.default.getHashDigest(source.source(), arguments[1], arguments[2], parseInt(arguments[3], 10));\n                });\n              };\n\n              var file = (0, _helpers.isFunction)(filename) ? filename(getPath) : getPath(filename);\n\n              compilation.assets[file] = source;\n              chunk.files.push(file);\n            }\n          }, _this3);\n          callback();\n        });\n      });\n    }\n  }], [{\n    key: 'loader',\n    value: function loader(options) {\n      return { loader: require.resolve('./loader'), options };\n    }\n  }]);\n\n  return ExtractTextPlugin;\n}();\n\nExtractTextPlugin.extract = ExtractTextPlugin.prototype.extract.bind(ExtractTextPlugin);\n\nexports.default = ExtractTextPlugin;\n\n/**\n * extractChunk中提起的vue和cml文件中的css module是按照编译的顺序放入的，拼接在一起的时候顺序应该相反，让父组件在后面，同时要忽略普通css的处理，只处理vue和cml文件\n * 算法是从前面开始查找 找到cml或者vue文件 和从后面查找的进行交换\n * @param {*} extractChunk \n */\nfunction sortStyleModule(extractedChunk) {\n  let modules = Array.from(extractedChunk._modules);\n\n  let j = modules.length - 1; \n  for (let i = 0; i < modules.length; i++) {\n    if (i >= j) {\n      break;\n    }\n    if (/(\\.vue|\\.cml)$/.test(modules[i]._identifier)) {\n      while (j > i) {\n        if (/(\\.vue|\\.cml)$/.test(modules[j]._identifier)) {\n          // swap\n          let temp = modules[i];\n          modules[i] =modules[j];\n          modules[j] = temp;\n          j--;\n          break;\n        } else {\n          j--;\n        }\n      }\n    }\n  }\n\n  extractedChunk._modules = new Set(modules);\n}\n\n"
  },
  {
    "path": "packages/cml-extract-css-webpack-plugin/dist/lib/ExtractTextPluginCompilation.js",
    "content": "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _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; }; }(); /* eslint-disable no-multi-assign */\n\n\nvar _ExtractedModule = require('./ExtractedModule');\n\nvar _ExtractedModule2 = _interopRequireDefault(_ExtractedModule);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ExtractTextPluginCompilation = function () {\n  function ExtractTextPluginCompilation() {\n    _classCallCheck(this, ExtractTextPluginCompilation);\n\n    this.modulesByIdentifier = {};\n  }\n\n  _createClass(ExtractTextPluginCompilation, [{\n    key: 'addModule',\n    value: function addModule(identifier, originalModule, source, additionalInformation, sourceMap, prevModules) {\n      var m = void 0;\n      if (!this.modulesByIdentifier[identifier]) {\n        m = this.modulesByIdentifier[identifier] = new _ExtractedModule2.default(identifier, originalModule, source, sourceMap, additionalInformation, prevModules);\n      } else {\n        m = this.modulesByIdentifier[identifier];\n        m.addPrevModules(prevModules);\n        if (originalModule.index2 < m.getOriginalModule().index2) {\n          m.setOriginalModule(originalModule);\n        }\n      }\n      return m;\n    }\n  }, {\n    key: 'addResultToChunk',\n    value: function addResultToChunk(identifier, result, originalModule, extractedChunk) {\n      var _this = this;\n      if (!Array.isArray(result)) {\n        result = [[identifier, result]];\n      }\n      var counterMap = {};\n      var prevModules = [];\n      result.forEach(function (item) {\n        var c = counterMap[item[0]];\n        var module = _this.addModule.call(_this, item[0] + (c || ''), originalModule, item[1], item[2], item[3], prevModules.slice());\n        extractedChunk.addModule(module);\n        module.addChunk(extractedChunk);\n        counterMap[item[0]] = (c || 0) + 1;\n        prevModules.push(module);\n      }, this);\n    }\n  }]);\n\n  return ExtractTextPluginCompilation;\n}();\n\nexports.default = ExtractTextPluginCompilation;"
  },
  {
    "path": "packages/cml-extract-css-webpack-plugin/dist/lib/ExtractedModule.js",
    "content": "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _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; }; }();\n\nvar _webpackSources = require('webpack-sources');\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar ExtractedModule = function () {\n  function ExtractedModule(identifier, originalModule, source, sourceMap, addtitionalInformation, prevModules) {\n    _classCallCheck(this, ExtractedModule);\n\n    this._identifier = identifier;\n    this._originalModule = originalModule;\n    this._source = source;\n    this._sourceMap = sourceMap;\n    this._prevModules = prevModules;\n    this.addtitionalInformation = addtitionalInformation;\n    this.chunks = [];\n  }\n\n  _createClass(ExtractedModule, [{\n    key: 'getOrder',\n    value: function getOrder() {\n      // http://stackoverflow.com/a/14676665/1458162\n      return (/^@import url/.test(this._source) ? 0 : 1\n      );\n    }\n  }, {\n    key: 'addChunk',\n    value: function addChunk(chunk) {\n      var idx = this.chunks.indexOf(chunk);\n      if (idx < 0) {\n        this.chunks.push(chunk);\n      }\n    }\n  }, {\n    key: 'removeChunk',\n    value: function removeChunk(chunk) {\n      var idx = this.chunks.indexOf(chunk);\n      if (idx >= 0) {\n        this.chunks.splice(idx, 1);\n        chunk.removeModule(this);\n        return true;\n      }\n      return false;\n    }\n  }, {\n    key: 'rewriteChunkInReasons',\n    value: function rewriteChunkInReasons(oldChunk, newChunks) {} // eslint-disable-line\n\n  }, {\n    key: 'identifier',\n    value: function identifier() {\n      return this._identifier;\n    }\n  }, {\n    key: 'source',\n    value: function source() {\n      if (this._sourceMap) {\n        return new _webpackSources.SourceMapSource(this._source, null, this._sourceMap);\n      }\n      return new _webpackSources.RawSource(this._source);\n    }\n  }, {\n    key: 'getOriginalModule',\n    value: function getOriginalModule() {\n      return this._originalModule;\n    }\n  }, {\n    key: 'getPrevModules',\n    value: function getPrevModules() {\n      return this._prevModules;\n    }\n  }, {\n    key: 'addPrevModules',\n    value: function addPrevModules(prevModules) {\n      var _this = this;\n\n      prevModules.forEach(function (m) {\n        if (_this._prevModules.indexOf(m) < 0) {\n          _this._prevModules.push(m);\n        }\n      }, this);\n    }\n  }, {\n    key: 'setOriginalModule',\n    value: function setOriginalModule(originalModule) {\n      this._originalModule = originalModule;\n    }\n  }]);\n\n  return ExtractedModule;\n}();\n\nexports.default = ExtractedModule;"
  },
  {
    "path": "packages/cml-extract-css-webpack-plugin/dist/lib/OrderUndefinedError.js",
    "content": "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nfunction OrderUndefinedError(module) {\n  Error.call(this);\n  Error.captureStackTrace(this, OrderUndefinedError);\n  this.name = 'OrderUndefinedError';\n  this.message = 'Order in extracted chunk undefined';\n  this.module = module;\n}\nexports.default = OrderUndefinedError;\n\n\nOrderUndefinedError.prototype = Object.create(Error.prototype);"
  },
  {
    "path": "packages/cml-extract-css-webpack-plugin/dist/lib/helpers.js",
    "content": "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.isInitialOrHasNoParents = isInitialOrHasNoParents;\nexports.isInvalidOrder = isInvalidOrder;\nexports.getOrder = getOrder;\nexports.getLoaderObject = getLoaderObject;\nexports.mergeOptions = mergeOptions;\nexports.isString = isString;\nexports.isFunction = isFunction;\nexports.isType = isType;\nfunction isInitialOrHasNoParents(chunk) {\n  return chunk.isInitial() || chunk.parents.length === 0;\n}\n\nfunction isInvalidOrder(a, b) {\n  var bBeforeA = a.getPrevModules().indexOf(b) >= 0;\n  var aBeforeB = b.getPrevModules().indexOf(a) >= 0;\n  return aBeforeB && bBeforeA;\n}\n\nfunction getOrder(a, b) {\n  var aOrder = a.getOrder();\n  var bOrder = b.getOrder();\n  if (aOrder < bOrder) return -1;\n  if (aOrder > bOrder) return 1;\n  var aIndex = a.getOriginalModule().index2;\n  var bIndex = b.getOriginalModule().index2;\n  if (aIndex < bIndex) return -1;\n  if (aIndex > bIndex) return 1;\n  var bBeforeA = a.getPrevModules().indexOf(b) >= 0;\n  var aBeforeB = b.getPrevModules().indexOf(a) >= 0;\n  if (aBeforeB && !bBeforeA) return -1;\n  if (!aBeforeB && bBeforeA) return 1;\n  var ai = a.identifier();\n  var bi = b.identifier();\n  if (ai < bi) return -1;\n  if (ai > bi) return 1;\n  return 0;\n}\n\nfunction getLoaderObject(loader) {\n  if (isString(loader)) {\n    return { loader };\n  }\n  return loader;\n}\n\nfunction mergeOptions(a, b) {\n  if (!b) return a;\n  Object.keys(b).forEach(function (key) {\n    a[key] = b[key];\n  });\n  return a;\n}\n\nfunction isString(a) {\n  return typeof a === 'string';\n}\n\nfunction isFunction(a) {\n  return typeof a === 'function';\n}\n\nfunction isType(type, obj) {\n  return Object.prototype.toString.call(obj) === `[object ${type}]`;\n}"
  },
  {
    "path": "packages/cml-extract-css-webpack-plugin/dist/loader.js",
    "content": "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.pitch = pitch;\n\nvar _fs = require('fs');\n\nvar _fs2 = _interopRequireDefault(_fs);\n\nvar _path = require('path');\n\nvar _path2 = _interopRequireDefault(_path);\n\nvar _loaderUtils = require('loader-utils');\n\nvar _loaderUtils2 = _interopRequireDefault(_loaderUtils);\n\nvar _NodeTemplatePlugin = require('webpack/lib/node/NodeTemplatePlugin');\n\nvar _NodeTemplatePlugin2 = _interopRequireDefault(_NodeTemplatePlugin);\n\nvar _NodeTargetPlugin = require('webpack/lib/node/NodeTargetPlugin');\n\nvar _NodeTargetPlugin2 = _interopRequireDefault(_NodeTargetPlugin);\n\nvar _LibraryTemplatePlugin = require('webpack/lib/LibraryTemplatePlugin');\n\nvar _LibraryTemplatePlugin2 = _interopRequireDefault(_LibraryTemplatePlugin);\n\nvar _SingleEntryPlugin = require('webpack/lib/SingleEntryPlugin');\n\nvar _SingleEntryPlugin2 = _interopRequireDefault(_SingleEntryPlugin);\n\nvar _LimitChunkCountPlugin = require('webpack/lib/optimize/LimitChunkCountPlugin');\n\nvar _LimitChunkCountPlugin2 = _interopRequireDefault(_LimitChunkCountPlugin);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar NS = _path2.default.dirname(_fs2.default.realpathSync(__filename));\n\nexports.default = function (source) {\n  return source;\n};\n\nfunction pitch(request) {\n  var _this = this;\n\n  var query = _loaderUtils2.default.getOptions(this) || {};\n  var loaders = this.loaders.slice(this.loaderIndex + 1);\n  this.addDependency(this.resourcePath);\n  // We already in child compiler, return empty bundle\n  if (this[NS] === undefined) {\n    // eslint-disable-line no-undefined\n    throw new Error('\"extract-text-webpack-plugin\" loader is used without the corresponding plugin, ' + 'refer to https://github.com/webpack/extract-text-webpack-plugin for the usage example');\n  } else if (this[NS] === false) {\n    return '';\n  } else if (this[NS](null, query)) {\n    if (query.omit) {\n      this.loaderIndex += +query.omit + 1;\n      request = request.split('!').slice(+query.omit).join('!');\n      loaders = loaders.slice(+query.omit);\n    }\n    var resultSource = void 0;\n    if (query.remove) {\n      resultSource = '// removed by extract-text-webpack-plugin';\n    } else {\n      resultSource = undefined; // eslint-disable-line no-undefined\n    }\n\n    var childFilename = 'extract-text-webpack-plugin-output-filename'; // eslint-disable-line no-path-concat\n    var publicPath = typeof query.publicPath === 'string' ? query.publicPath : this._compilation.outputOptions.publicPath;\n    var outputOptions = {\n      filename: childFilename,\n      publicPath\n    };\n    var childCompiler = this._compilation.createChildCompiler(`extract-text-webpack-plugin ${NS} ${request}`, outputOptions);\n    childCompiler.apply(new _NodeTemplatePlugin2.default(outputOptions));\n    childCompiler.apply(new _LibraryTemplatePlugin2.default(null, 'commonjs2'));\n    childCompiler.apply(new _NodeTargetPlugin2.default());\n    childCompiler.apply(new _SingleEntryPlugin2.default(this.context, `!!${request}`));\n    childCompiler.apply(new _LimitChunkCountPlugin2.default({ maxChunks: 1 }));\n    // We set loaderContext[NS] = false to indicate we already in\n    // a child compiler so we don't spawn another child compilers from there.\n    childCompiler.plugin('this-compilation', function (compilation) {\n      compilation.plugin('normal-module-loader', function (loaderContext, module) {\n        loaderContext[NS] = false;\n        if (module.request === request) {\n          module.loaders = loaders.map(function (loader) {\n            return {\n              loader: loader.path,\n              options: loader.options\n            };\n          });\n        }\n      });\n    });\n\n    var source = void 0;\n    childCompiler.plugin('after-compile', function (compilation, callback) {\n      source = compilation.assets[childFilename] && compilation.assets[childFilename].source();\n\n      // Remove all chunk assets\n      compilation.chunks.forEach(function (chunk) {\n        chunk.files.forEach(function (file) {\n          delete compilation.assets[file];\n        });\n      });\n\n      callback();\n    });\n    var callback = this.async();\n    childCompiler.runAsChild(function (err, entries, compilation) {\n      if (err) return callback(err);\n\n      if (compilation.errors.length > 0) {\n        return callback(compilation.errors[0]);\n      }\n      compilation.fileDependencies.forEach(function (dep) {\n        _this.addDependency(dep);\n      }, _this);\n      compilation.contextDependencies.forEach(function (dep) {\n        _this.addContextDependency(dep);\n      }, _this);\n      if (!source) {\n        return callback(new Error(\"Didn't get a result from child compiler\"));\n      }\n      try {\n        var text = _this.exec(source, request);\n        if (typeof text === 'string') {\n          text = [[compilation.entries[0].identifier(), text]];\n        } else {\n          text.forEach(function (item) {\n            var id = item[0];\n            compilation.modules.forEach(function (module) {\n              if (module.id === id) {\n                item[0] = module.identifier();\n              }\n            });\n          });\n        }\n        _this[NS](text, query);\n        if (text.locals && typeof resultSource !== 'undefined') {\n          resultSource += `\\nmodule.exports = ${JSON.stringify(text.locals)};`;\n        }\n      } catch (e) {\n        return callback(e);\n      }\n      if (resultSource) {\n        callback(null, resultSource);\n      } else {\n        callback();\n      }\n    });\n  }\n}"
  },
  {
    "path": "packages/cml-extract-css-webpack-plugin/package.json",
    "content": "{\n  \"name\": \"cml-extract-css-webpack-plugin\",\n  \"version\": \"1.0.8\",\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"dependencies\": {\n    \"async\": \"^2.4.1\",\n    \"loader-utils\": \"^1.1.0\",\n    \"schema-utils\": \"^0.3.0\",\n    \"webpack-sources\": \"^1.0.1\"\n  },\n  \"description\": \"Extract css from cml and vue\",\n  \"devDependencies\": {\n    \"babel-cli\": \"^6.26.0\",\n    \"babel-jest\": \"^21.2.0\",\n    \"babel-plugin-transform-object-rest-spread\": \"^6.26.0\",\n    \"babel-polyfill\": \"^6.26.0\",\n    \"babel-preset-env\": \"^1.6.1\",\n    \"cross-env\": \"^5.1.0\",\n    \"css-loader\": \"^0.28.7\",\n    \"del-cli\": \"^1.1.0\",\n    \"eslint\": \"^4.9.0\",\n    \"eslint-config-webpack\": \"^1.2.5\",\n    \"eslint-plugin-import\": \"^2.8.0\",\n    \"file-loader\": \"^1.1.5\",\n    \"jest\": \"^21.2.1\",\n    \"lint-staged\": \"^4.3.0\",\n    \"nsp\": \"^2.8.1\",\n    \"pre-commit\": \"^1.2.2\",\n    \"raw-loader\": \"^0.5.1\",\n    \"standard-version\": \"^4.2.0\",\n    \"style-loader\": \"^0.19.0\",\n    \"webpack\": \"^3.8.1\",\n    \"webpack-defaults\": \"^1.6.0\"\n  },\n  \"engines\": {\n    \"node\": \">= 4.8 < 5.0.0 || >= 5.10\"\n  },\n  \"files\": [\n    \"dist\",\n    \"schema\"\n  ],\n  \"main\": \"dist/cjs.js\",\n  \"peerDependencies\": {\n    \"webpack\": \"^3.1.0\"\n  }\n}"
  },
  {
    "path": "packages/cml-extract-css-webpack-plugin/schema/loader.json",
    "content": "{\n\t\"type\": \"object\",\n\t\"additionalProperties\": false,\n\t\"properties\": {\n\t\t\"allChunks\": {\n\t\t\t\"type\": \"boolean\"\n\t\t},\n\t\t\"disable\": {\n\t\t\t\"type\": \"boolean\"\n\t\t},\n\t\t\"omit\": {\n\t\t\t\"type\": \"boolean\"\n\t\t},\n\t\t\"remove\": {\n\t\t\t\"type\": \"boolean\"\n\t\t},\n\t\t\"fallback\": {\n\t\t\t\"type\": [\"string\", \"array\", \"object\"]\n\t\t},\n\t\t\"filename\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"use\": {\n\t\t\t\"type\": [\"string\", \"array\", \"object\"]\n\t\t},\n\t\t\"publicPath\": {\n\t\t\t\"type\": \"string\"\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "packages/cml-extract-css-webpack-plugin/schema/plugin.json",
    "content": "{\n  \"type\": \"object\",\n  \"additionalProperties\": false,\n  \"properties\": {\n    \"allChunks\": {\n      \"description\": \"\",\n      \"type\": \"boolean\"\n    },\n    \"disable\": {\n      \"description\": \"\",\n      \"type\": \"boolean\"\n    },\n    \"fallback\": {\n      \"description\": \"A loader that webpack can fall back to if the original one fails.\",\n      \"modes\": {\n        \"type\": [\"string\", \"object\", \"array\"]\n      }\n    },\n    \"filename\": {\n      \"description\": \"The filename and path that ExtractTextPlugin will extract to\",\n      \"modes\": {\n        \"type\": [\"string\", \"function\"]\n      }\n    },\n    \"ignoreOrder\": {\n      \"description\": \"Ignore dependency order (useful for CSS Modules)\",\n      \"type\": \"boolean\"\n    },\n    \"loader\": {\n      \"description\": \"The loader that ExtractTextPlugin will attempt to load through.\",\n      \"modes\": {\n        \"type\": [\"string\", \"object\", \"array\"]\n      }\n    },\n    \"publicPath\": {\n      \"description\": \"\",\n      \"type\": \"string\"\n    }\n  }\n}\n"
  },
  {
    "path": "packages/cml-extract-css-webpack-plugin/test/index.js",
    "content": "const {getAllFileSort} = require('../dist/helper');\nconst map  = {\n  'a': ['b','c','d'],\n  'b': ['a','e','f']\n}\n\nlet result = getAllFileSort(map);\n// [ 'e', 'f', 'b', 'c', 'd', 'a' ]\nconsole.log(result);"
  },
  {
    "path": "packages/cml-htmllinter/AUTHORS",
    "content": "Michael Coleman <tehcoalman@gmail.com> (http://github.com/coalman)\nAndrew Messier <andrewmess93@gmail.com> (http://github.com/messman)\nMarshall Lochbaum <mwlochbaum@gmail.com> (http://github.com/mlochbaum)\nRoman Myers <romnempire@gmail.com> (http://github.com/romnempire)"
  },
  {
    "path": "packages/cml-htmllinter/HISTORY",
    "content": "Release History\n---------------\n\n### v0.7.2\n\n* fix catastrophic backtracking (a potential DoS issue) in the BEM style\nRegExp and make it more accurately represent the BEM specification\n\n### v0.7.1\n\n* recognize void elements regardless of case\n* add `indent-delta` option to require indentation to change by only one\nindent width per line\n* add `line-no-trailing-whitespace` rule (disabled by default)\n\n### v0.7.0\n\n* add option \"none\" to disable `class-style` while leaving `id-style` enabled\n* require a truthy value for `href-style` to be either \"absolute\" or \"relative\"\n* ignore leading and trailing whitespace in classes for `class-no-dup`\n* ensure that the default preset has values for all options\n* miscellaneous corrections to error messages\n* allow options taking a RegExp to use a string specifying one instead\n* correct line and column numbers for attributes and in `spec-char-escape`\nand `doctype-first`\n* change default value for `attr-name-style` to \"dash\"\n* remove CR and LF from the list of characters banned by `attr-no-unsafe-char`\n* allow regular expression input in `attr-order`\n* add `text-ignore-regex` and `raw-ignore-regex` options\n* fix error handling in inline configuration, and use issues instead of\nthrowing errors for invalid configuration\n* output issues for nonexistent options in initial configuration\n* allow `preset=$previous` to undo last inline configuration\n* add `attr-validate` option\n\n### v0.6.0\n\n* fix errors when optional closing tags are omitted\n* improve handling of some kinds of malformed input\n* add `attr-order` rule\n* add `html-valid-content-model` and `head-valid-content-model` rules\n* fix some errors in default preset (causing `spec-char-escape` and\n`attr-no-unsafe-char` to be on by default as intended)\n* add verification of option values, with errors for invalid values\n\n### v0.5.0\n\n* add `class-no-dup-split-separator` option\n* change `tag-self-close` options from boolean to \"always\" and \"never\"\n* fix bugs in `tag-self-close` and `tag-name-match`\n\n### v0.4.0\n\n* add \"allownull\" as an option for `img-req-alt`\n* add `class-no-dup` option\n* allow inline configurations to use - and _ interchangeably\n* add \"smart\" as an option for `doctype-first`\n* update dependencies\n* add `tag-close` option\n* add `indent-width-cont` option\n\n### v0.3.0\n\n* updated to current versions of all dependencies\n* corrected `id-style` bug\n* unified handling of `req` options (now fail on empty tag value)\n* added `attr-name-ignore-regex` option\n* corrected `head-req-title` to fail on empty title\n* added language tag verification (`lang-style`)\n* `none` preset is now dynamically generated\n* added line length testing (`max-line-len`)\n\n### v0.2.7\n\n* fixed an issue where attributes were processed out of order\n* changed doctype-first rule to match !DOCTYPE case-insensitive (issue #116)\n* added class-style option (essentially the same as id-class-style, but only\non class, not ids)\n\n### v0.2.6\n\n* added attr-new-line rule (special thanks to @knyga #115)\n* fixed attr-name-style issue #104 and #103\n* fixed html-req-lang issue #102\n* added id-class-ignore-regex option\n* added script to the list of tags to ban by default\n\n### v0.2.5\n\n* fixed some bugs with tag-name-match (#102)\n* added script to the list of tags checked by tag-bans\n* made error messages more consistent in style (#103)\n* fixed focusable-tabindex-style (#104)\n\n### v0.2.4\n\n* renamed \"attr-no-duplication\" to \"attr-no-dup\"\n\n### v0.2.3\n\n* added some svg void elements\n* a few bug fixes\n\n### v0.2.2\n\n* added table-req-header rule\n* added indent-width rule\n\n### v0.2.1\n\n* changed maxerr to allow a value of `false` to disable error\nthrottling\n* fixed some ambiguity issues with inline configuration\n* added some rules\n\n### v0.2.0\n\n* added html-req-lang rule\n* added error codes\n* added keywords to the npm package\n* changed linter so that rules can emit issues on `end` calls\n\n### v0.0.12\n\n* allows custom regex for formats in most rules\n* removed `linter.addRule(rule)` in favor of `linter.use(plugin)`\n* raised test coverage back up to near 100%\n\n### v0.0.11\n\n* added plugin support\n\n### v0.0.10\n\n* added inline configuration\n* changed `Linter.lint` to return a promise, allowing async rules\n\n### v0.0.9\n\n* added no-unsafe-char rule\n* corrected some (line, col) for attribute rules\n\n### v0.0.8\n\n* added more rules\n* should be browserifiable\n* renamed rules to fit a better convention\n\n### v0.0.7\n\n* added rules:\n  * attr-value-quotes\n  * img-src-not-empty\n  * label-for\n  * tag-self-close\n* fixed tag-name-lowercase bug\n\n### v0.0.6\n\n* fixed some runtime errors in a few rules\n* fixed index errors that would occur on multiple runs\nof the parser\n\n### v0.0.5\n\n* fixed line,col output bug\n* added label-for rule\n\n### v0.0.4\n\n* added id-unique rule\n* extended parser output\n* refactored rules to fit new rule processing framework\n* added presets (envs)\n\n### v0.0.3\n\n* added jsdoc\n* added more rules\n* added functional test suite\n\n### v0.0.2\n\n* added more rules\n* added htmlparser2, rules run on an AST now\n\n### v0.0.1\n\n* added basic scraper for inline styles using regex\n"
  },
  {
    "path": "packages/cml-htmllinter/LICENSE",
    "content": "ISC License\n\nCopyright (c) 2014, Michael Coleman <tehcoalman@gmail.com>\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n"
  },
  {
    "path": "packages/cml-htmllinter/docs/gen_options.js",
    "content": "#!/usr/bin/env node\n\n// Generate the wiki Options.md page and send to stdout.\n\nvar htmllint = require('../lib'),\n    presets = require('../lib/presets');\n\nvar options = htmllint.defaultLinter.rules.options,\n    def = presets.presets.default;\n\nvar preamble = [\n'Valid option values are listed in bullet points, or explicitly specified.',\n'If no values are specified, then the option is boolean and has only the',\n'valid values `true` and `false`. If no default is specified, the default',\n'value is `true`.',\n'',\n'The value `false` is valid for any option. If used, that option does not',\n'provide restrictions on the html input.',\n'',\n'The following values may be used for format specifiers. A format',\n'specifier is a requirement on the form of a string.',\n'* \"lowercase\": Consists of lowercase letters.',\n'* \"underscore\": Lowercase and underscore-separated.',\n'* \"dash\": Lowercase and separated by hyphens.',\n'* \"camel\": camelCase (or CamelCase).',\n'* \"bem\": The BEM (block, element, modifier) syntax.',\n'* An arbitrary Javascript RegExp object.',\n'* A string matching Javascript\\'s RegExp format (like \\'/^[a-z]+$/g\\').',\n'',\n'Each of the named formats allows digits to be used in addition to letters',\n'after the first letter in each word. See `lib/process_option.js`',\n'for the actual regular expressions attached to these options.'\n].join('\\n');\n\nfunction printVal(v) {\n    if (v === true) { return '' };\n    var f;\n    switch (typeof v) {\n        case 'string': f = '\"' + v + '\"'; break;\n        case 'number': f = v; break;\n        case 'object': f = '`[\\'' + v.join('\\', \\'') + '\\']`'; break;\n        default:       f = '`' + v + '`'; break;\n    }\n    return '\\n\\nDefault: ' + f;\n}\n\nvar out = Object.keys(options).sort().map(function(name){\n    return '## ' + name\n         + printVal(def[name])\n         + '\\n\\n' + options[name].desc;\n}).join('\\n\\n');\n\nconsole.log(preamble + '\\n\\n\\n' + out);\n"
  },
  {
    "path": "packages/cml-htmllinter/gulpfile.js",
    "content": "var gulp = require('gulp'),\n    coveralls = require('gulp-coveralls'),\n    eslint = require('gulp-eslint'),\n    jscs = require('gulp-jscs'),\n    istanbul = require('gulp-istanbul'),\n    mocha = require('gulp-mocha'),\n    publish = require('gulp-gh-pages');\n\nvar paths = {\n    src: ['./lib/**/*.js'],\n    testUnit: './test/unit/*.js',\n    testFunc: './test/functional/*.js',\n    site: ['./site/**/*']\n};\npaths.test = [].concat(paths.testUnit, paths.testFunc);\n\ngulp.task('jscs', function () {\n    gulp.src(paths.src\n             .concat(paths.test))\n        .pipe(jscs())\n        .pipe(jscs.reporter());\n});\n\n// lints javascript files with eslint\n// edit .eslintrc for configuration\ngulp.task('lint', ['jscs'], function () {\n    return gulp.src(paths.src\n             .concat(paths.test)\n             .concat('./gulpfile.js'))\n        .pipe(eslint())\n        .pipe(eslint.format());\n});\n\n// instruments js source code for coverage reporting\ngulp.task('istanbul', function (done) {\n    gulp.src(paths.src)\n        .pipe(istanbul())\n        .pipe(istanbul.hookRequire())\n        .on('finish', done);\n});\n\n// runs mocha tests\ngulp.task('test', ['istanbul'], function (done) {\n    // expose globals here for now\n    // move these into their own file if they grow\n    global.chai = require('chai');\n    global.chai.use(require('chai-as-promised'));\n    global.expect = global.chai.expect;\n\n    gulp.src(paths.test, {read:false})\n        .pipe(mocha({\n            reporter: 'list'\n        }))\n        .pipe(istanbul.writeReports())\n        .on('end', done);\n});\n\n// plato report\n// TODO: think bout this a bit more\ngulp.task('plato', function () {\n    var plato = require('plato');\n    gulp.src(paths.src)\n        .pipe(plato('report', {}));\n});\n\n// jsdoc generation\ngulp.task('jsdoc', function () {\n    var jsdoc = require('gulp-jsdoc');\n    gulp.src(paths.src.concat('README.md'))\n        .pipe(jsdoc.parser({\n            plugins: [\n                'plugins/escapeHtml',\n                'plugins/markdown'\n            ],\n            markdown: {\n                parser: 'gfm',\n                githubRepoOwner: 'htmllint',\n                githubRepoName: 'htmllint'\n            }\n        }))\n        .pipe(jsdoc.generator('./site/api', {\n            // template\n            path: 'ink-docstrap',\n            theme: 'cerulean',\n            systemName: 'htmllint',\n            navType: 'vertical',\n            linenums: true,\n            inverseNav: true,\n            outputSourceFiles: true\n        }));\n});\n\ngulp.task('doc:gen', ['jsdoc']);\n\ngulp.task('doc:pub', ['doc:gen'], function () {\n    gulp.src(paths.site)\n        .pipe(publish({\n            cacheDir: '.tmp'\n        }));\n});\n\n// runs on travis ci (lints, tests, and uploads to coveralls)\ngulp.task('travis', ['lint', 'test'], function () {\n    gulp.src('coverage/**/lcov.info')\n        .pipe(coveralls());\n});\n\ngulp.task('default', [\n    'lint',\n    'test'\n]);\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/config.js",
    "content": "var lodash = require('lodash'),\n    Issue = require('./issue'),\n    proc = require('./process_option'),\n    presets = require('./presets').presets;\n\n    \n/**\n * The config object stores all possible rules and options and manages\n * dependencies based on which options are enabled.\n * As it runs, it updates the subscribers array for each rule to indicate\n * the active rules and options depending on it.\n * @constructor\n * @param {Object[]} rules - The rules to use.\n * @param {Object[]} options - The options.\n */\nfunction Config(rules, options) {\n    this.options = {};\n    if (options) { options.forEach(this.addOption.bind(this)); }\n    this.rulesMap = {};\n    if (rules) { rules.forEach(this.addRule.bind(this)); }\n}\nmodule.exports = Config;\n\n/**\n * Get a rule by name.\n * @param {string} ruleName\n * @returns {Object}\n */\nConfig.prototype.getRule = function (ruleName) {\n    return this.rulesMap[ruleName];\n};\n\n/**\n * Add a rule.\n * @param {Object} rule\n * @param {string} rule.name\n * @param {string[]} [rule.on=[]] - The rules called by rule.\n * @param {string[]} [rule.options] - Options to add with the rule.\n * Options in this list that have no name use the rule's name.\n */\nConfig.prototype.addRule = function (rule) {\n    var oldRule = this.rulesMap[rule.name];\n    if (rule === oldRule) { return; }\n\n    if (!rule.on) { rule.on = []; }\n    rule.subscribers = [];\n    this.rulesMap[rule.name] = rule;\n\n    if (oldRule && oldRule.subscribers.length) {\n        this.deactivateRule(oldRule);\n        this.activateRule(rule);\n        rule.subscribers = oldRule.subscribers;\n    }\n\n    if (rule.options) {\n        rule.options.forEach(function (o) {\n            if (!o.name) { o.name = rule.name; }\n            if (!o.rules) { o.rules = [rule.name]; }\n            this.addOption(o);\n        }.bind(this));\n    } else if (rule.desc) {\n        this.addOption({\n            name: rule.name,\n            rules: [rule.name],\n            desc: rule.desc,\n            process: rule.process || proc.bool\n        });\n    }\n};\n\n/**\n * Remove a rule by name.\n * @param {string} ruleName\n */\nConfig.prototype.removeRule = function (ruleName) {\n    var rule = this.rulesMap[ruleName];\n    if (rule) {\n        this.deactivateRule(rule);\n        delete this.rulesMap[ruleName];\n    }\n};\n\n/**\n * Return a list of all rules.\n * @returns {Object[]}\n */\nConfig.prototype.getAllRules = function () {\n    return Object.values(this.rulesMap);\n};\n\n/**\n * Add an option.\n * @param {Object} option\n * @param {string} option.name\n * @param {string[]} [option.rules=[option.name]] - The rules using option.\n */\nConfig.prototype.addOption = function (option) {\n    var oldOption = this.options[option.name];\n    if (option === oldOption) { return; }\n\n    if (!option.rules) { option.rules = [option.name]; }\n    option.active = false;\n    this.options[option.name] = option;\n\n    if (oldOption && oldOption.active) {\n        this.setOptionObj(oldOption, false);\n        this.setOptionObj(option, true);\n    }\n};\n\n/**\n * Remove an option by name.\n * @param {string} optionName\n */\nConfig.prototype.removeOption = function (optionName) {\n    var option = this.options[optionName];\n    if (option) {\n        this.setOptionObj(option, false);\n        delete this.options[optionName];\n    }\n};\n\n/**\n * Set the values of all options.\n * @param {Object} opts - Option values by name.\n * Values will be replaced with parsed versions.\n * @returns {Object[]} A list of issues\n */\nConfig.prototype.initOptions = function (opts) {\n    this.getAllRules().forEach(function (rule) {\n        rule.subscribers = [];\n    });\n    Object.values(this.options).forEach(function (o) {\n        o.active = false;\n    });\n    var issues = [];\n    Object.keys(opts).forEach(function (name) {\n        if (!(name in this.options) && !(name in presets.global)) {\n            issues.push(new Issue('E054', [0, 0], { name: name }));\n            return;\n        }\n\n        if (name in presets.global) {\n            this.addOption({\n                name: name,\n                rules: [],\n                desc: presets.global[name]['desc'] || '',\n                process: presets.global[name]['process'] || proc.bool\n            });\n        }\n\n        if (name in this.options) {\n            var val = opts[name],\n            parsed = this.setOption(name, val);\n            if (parsed === undefined) {\n                issues.push(new Issue('E048', [0, 0], { option: name, value: val }));\n                parsed = false;\n            }\n            opts[name] = parsed;\n        }\n    }.bind(this));\n    return issues;\n};\n\n/**\n * Set an option's value given the option name.\n * @param {string} optionName\n * @param value - The new value. Only its truthiness is used.\n * @param noprocess - true if the value should used as is and not parsed.\n * @returns The value, possibly parsed according to the option.\n */\nConfig.prototype.setOption = function (optionName, value, noprocess) {\n    var option = this.options[optionName];\n    value = noprocess ? value\n          : value !== false ? option.process(value) : false;\n    this.setOptionObj(option, value);\n    return value;\n}\n\n/**\n * Update rule subscriptions according to a new option value.\n * @param {Object} option\n * @param value - The new value. Only its truthiness is used.\n */\nConfig.prototype.setOptionObj = function (option, value) {\n    var active = value !== false && value !== undefined;\n    if (active !== option.active) {\n        this.onAllSubs(\n            option,\n            option.rules,\n            (active ? this.addSubscriber : this.removeSubscriber).bind(this)\n        );\n        option.active = active;\n    }\n};\n\nConfig.prototype.onAllSubs = function (obj, subs, action) {\n    subs.forEach(function (parentName) {\n        if (this.rulesMap[parentName]) {\n            action(this.rulesMap[parentName], obj);\n        }\n    }.bind(this));\n};\n\nConfig.prototype.activateRule = function (rule) {\n    this.onAllSubs(rule, rule.on, this.addSubscriber.bind(this));\n}\n\nConfig.prototype.addSubscriber = function (rule, sub) {\n    if (!rule.subscribers.length) {\n        this.activateRule(rule);\n    }\n    (typeof sub.lint === 'function') && !~rule.subscribers.indexOf(sub) && rule.subscribers.push(sub);\n};\n\nConfig.prototype.deactivateRule = function (rule) {\n    this.onAllSubs(rule, rule.on, this.removeSubscriber.bind(this));\n};\n\nConfig.prototype.removeSubscriber = function (rule, sub) {\n    if (!lodash.pull(rule.subscribers, sub).length) {\n        this.deactivateRule(rule);\n    }\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/hook/index.js",
    "content": "var bulk = require('bulk-require');\nvar lodash = require('lodash');\n\n// import all the js files in the directory\nvar hookExports = bulk(__dirname, '!(index).js');\nvar hook = {};\n\n// mixin all the functions from the exports into hook\nlodash.values(hookExports).forEach(function (u) {\n    hook[u.name] = u;\n});\n\n// export hook\nmodule.exports = hook;\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/hook/skip-empty-text.js",
    "content": "\nmodule.exports = {\n    name: 'skip-empty-text',\n    breakOff: true,\n    /**\n     * The arguments must match with rules' lint function.\n     * @param {Object} element \n     * @param {Object} opts \n     * @return {Array} An array, the first element works together with breakOff to determine\n     * whether to break the process before running rules' lint functions and the second element\n     * contains the information that you wish to pass down on the way to rule's lint function, which\n     * will be the third argument of lint.\n     */\n    run: function(element, opts) {\n        return [element.data && /^\\s+$/.test(element.data), null];\n    }\n}\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/hook/skip-normal-tag.js",
    "content": "\nconst Tools = require('../tools');\n\nmodule.exports = {\n    name: 'skip-normal-tag',\n    breakOff: true,\n    /**\n     * The arguments must match with rules' lint function.\n     * @param {Object} element \n     * @param {Object} opts \n     * @return {Array} An array, the first element works together with breakOff to determine\n     * whether to break the process before running rules' lint functions and the second element\n     * contains the information that you wish to pass down on the way to rule's lint function, which\n     * will be the third argument of lint.\n     */\n    run: function(element, opts) {\n        return [!Tools.isOriginComponent(element) && !~opts['origin-tag-list'].indexOf(element.name), null];\n    }\n}\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/hook/skip_origin_tag.js",
    "content": "\nconst Tools = require('../tools');\n\nmodule.exports = {\n    name: 'skip-origin-tag',\n    breakOff: true,\n    /**\n     * The arguments must match with rules' lint function.\n     * @param {Object} element\n     * @param {Object} opts\n     * @return {Array} An array, the first element works together with breakOff to determine\n     * whether to break the process before running rules' lint functions and the second element\n     * contains the information that you wish to pass down on the way to rule's lint function, which\n     * will be the third argument of lint.\n     */\n    run: function(element, opts) {\n        return [Tools.isOriginComponent(element) || ~(opts['origin-tag-list'] || []).indexOf(element.name), null];\n    }\n}\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/index.js",
    "content": "var lodash = require('lodash'),\n    Linter = require('./linter');\n\n/* istanbul ignore next */\nObject.values = Object.values || function (obj) {\n    return Object.keys(obj)\n        .reduce(function (values, key) {\n            values.push(obj[key]);\n            return values;\n        }, []);\n};\n\n/**\n * The htmllint namespace.\n * @namespace\n */\nvar htmllint = function () {\n    var linter = htmllint.defaultLinter;\n\n    return linter.lint.apply(linter, arguments);\n};\n\nmodule.exports = htmllint;\n\nhtmllint.Linter = Linter;\nhtmllint.rules = require('./rules');\nhtmllint.messages = require('./messages');\nhtmllint.defaultLinter = new Linter(htmllint.rules);\n\nhtmllint.use = function (plugins) {\n    plugins.forEach(function (plugin) {\n        if (lodash.isString(plugin)) {\n            plugin = require(plugin);\n        }\n\n        htmllint.defaultLinter.use(plugin);\n    });\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/inline_config.js",
    "content": "var lodash = require('lodash'),\n    knife = require('./knife'),\n    presets = require('./presets'),\n    Issue = require('./issue');\n\n// Private vars,\nvar index = 0; // index used for making sure configs are sent in order\n\n/**\n * An inline configuration class is created to hold each inline configuration\n * and report back what the options should be at a certain index.\n * @constructor\n * @param {Object} config - an option parser\n * If not given here, it must be set with inlineConfig.reset(basis).\n */\nvar inlineConfig = function (config) {\n    this.setOption = config.setOption.bind(config);\n    this.isOption = function (name) { return name in config.options; };\n    this.clear();\n};\nmodule.exports = inlineConfig;\n\n/**\n * Reset the current opts to the basis. if newBasis is supplied, use that as our new basis.\n * @param {Object} newBasis - the new options to use.\n */\ninlineConfig.prototype.reset = function (newBasis) {\n    this.current = lodash.cloneDeep(newBasis);\n    index = 0;\n};\n\n/**\n * Clears the indexConfigs object, then calls reset with 'null' - to be called after linting finishes.\n * @param {Object} newBasis - the new options to use.\n */\ninlineConfig.prototype.clear = function () {\n    this.indexConfigs = [];\n    this.previous = {};\n    this.previousPreset = {};\n};\n\n/**\n * Apply the given cofiguration to this.current. Returns true if the operation resulted in any changes, false otherwise.\n * @param {Object} config - the new config to write onto the current options.\n */\nfunction applyConfig(config) {\n    var previous = {};\n\n    config.rules.forEach(function (rule) {\n        var isprev = (rule.value === '$previous');\n        var setOption = function (name, value) {\n            previous[name] = this.current[name];\n            this.current[name] = this.setOption(name, value, isprev);\n        }.bind(this);\n        if (rule.type === 'rule') {\n            setOption(rule.name, isprev ? this.previous[rule.name]\n                                        : rule.value);\n        /* istanbul ignore else */\n        } else if (rule.type === 'preset') {\n            var preset = isprev ? this.previousPreset\n                                : presets.presets[rule.value];\n            Object.keys(preset).forEach(function (name) {\n                setOption(name, preset[name]);\n            });\n        }\n    }.bind(this));\n\n    lodash.merge(this.previous, this.previousPreset = previous);\n}\n\n/**\n * Get the options object to use at this index. Indices must be given in order, or an error is thrown (much speedier).\n * If you must get them out of order, use 'reset' first. Sets the opts to this.current.\n * @param {number} newIndex - The index to get opts for.\n */\ninlineConfig.prototype.getOptsAtIndex = function (newIndex) {\n    if (newIndex !== 0 && newIndex <= index) {\n        throw new Error('Cannot get options for index ' + newIndex + ' when index ' + index + ' has already been checked');\n    } else {\n        lodash.compact(this.indexConfigs.slice(index + 1, newIndex + 1))\n            .forEach(applyConfig, this);\n        index = newIndex;\n    }\n};\n\n/**\n * Add the config when it was given to us from feedComment.\n * @param {Object} config - The config to add.\n */\ninlineConfig.prototype.addConfig = function (config) {\n    if (this.indexConfigs[config.end]) {\n        throw new Error('config exists at index already!');\n    }\n\n    this.indexConfigs[config.end] = config;\n};\n\n/**\n * Take the comment element and check it for the proper structure.\n * Add it to our array indexConfigs.\n * Return a list of issues encountered.\n * @param {number} newIndex - The index to get opts for.\n */\ninlineConfig.prototype.feedComment = function (element) {\n    var line = element.data,\n        match = line.match(/[\\s]*htmllint[\\s]+(.*)/);\n\n    if (!match) {\n        return [];\n    }\n\n    var keyvals = knife.parseHtmlAttrs(match[1]);\n\n    var settings = [],\n        issues = [];\n    keyvals.forEach(function (pair) {\n        // TODO More precise line/column numbers\n        var r = parsePair(pair.name, pair.valueRaw, element.lineCol,\n                          this.isOption);\n        (r.code ? issues : settings).push(r);\n    }.bind(this));\n    if (settings.length > 0) {\n        this.addConfig({\n            start: element.index,\n            end:   element.index + element.data.length + 6, // 7 for '<!--' and '-->' minus one for last index\n            rules: settings\n        });\n    }\n    return issues;\n};\n\n/**\n * Accept an attribute and return either a parsed config pair object\n * or an error string.\n * @param {string} name - The attribute name.\n * @param {string} value - The attribute raw value.\n */\nfunction parsePair(name, value, pos, isOption) {\n    if (!name || !value || !name.length || !value.length) {\n        return new Issue('E050', pos);\n    }\n\n    var nameRegex = /^[a-zA-Z0-9-_]+$/;\n    if (!nameRegex.test(name)) {\n        return new Issue('E051', pos, {name: name});\n    }\n\n    // Strip quotes and replace single quotes with double quotes\n    var squote = '\\'', dquote = '\"'; // Single and double quote, for sanity\n    if (value[0] === squote  ||  value[0] === dquote) {\n        value = value.substr(1, value.length - 2);\n    }\n    value = value.replace(/\\'/g, dquote);\n\n    // Treat _ and - interchangeably\n    name = name.replace(/_/g, '-');\n\n    // check if our value is for a preset.\n    if (name === 'preset') {\n        if (value !== '$previous' && !presets.presets[value]) {\n            return new Issue('E052', pos, {preset: value});\n        } else {\n            return { type: 'preset', value: value };\n        }\n    }\n\n    // it's not a preset.\n    var parsed = null;\n    if (value === '$previous') {\n        parsed = '$previous';\n    } else if (value[0] === '$') {\n        var vs = value.substr(1);\n        if (!presets.presets[vs]) {\n            return new Issue('E052', pos, {preset: vs});\n        }\n        parsed = presets.presets[vs][name];\n    } else {\n        if (!isOption(name)) {\n            return new Issue('E054', pos, {name: name});\n        }\n        try {\n            parsed = JSON.parse(value);\n        } catch (e) {\n            if (!nameRegex.test(value)) {\n                return new Issue('E053', pos, {rule: name, value: value});\n            }\n            parsed = value;\n        }\n    }\n\n    return { type: 'rule', name: name, value: parsed };\n}\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/issue.js",
    "content": "function Issue(code, pos, data) {\n    this.line = pos[0];\n    this.column = pos[1];\n    this.code = code;\n    this.data = data || {};\n}\nmodule.exports = Issue;\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/knife/README.md",
    "content": "knife\n=====\n\nPut any utility functions in this directory. Each file should export an object\nwith functions like this:\n\n```javascript\n// lib/knife/some_util.js\nmodule.exports = {\n  some_util: function () {\n    console.log('HELLO WORLD');\n  },\n\n  some_util2: function (msg) {\n    console.log(msg);\n  }\n};\n```\n\nAll of the files in this directory (excluding `index.js`) will have the functions\non their exports merged and then exported by `index.js`. You can then use knife in\nother parts of the code base like so:\n\n```javascript\n// lib/some_file.js\n\nvar knife = require('./knife');\n\nknife.dice(' some text ');\n```\n\n> NOTE: only functions will be copied from exports, variables will not be. Do not\n> rely on the this context in your utility functions to have certain properties,\n> etc.\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/knife/apply_rules.js",
    "content": "var lodash = require('lodash');\nvar hooks = require('../hook');\n\nfunction addRuleToIssue(issue, ruleName) {\n\n    if (Array.isArray(issue)) {\n        issue.forEach(function (issue) {\n            addRuleToIssue(issue, ruleName);\n        });\n    } else {\n        issue.rule = issue.rule || ruleName;\n    }\n\n}\n\n\nfunction runHooks(rules, element, opts) {\n    let hookResults = {}, ruleHooks = [];\n    rules.forEach((rule) => {\n        rule.hooks && (ruleHooks = lodash.union(ruleHooks, rule.hooks));\n    });\n    if (Array.isArray(ruleHooks) && ruleHooks.length) {\n        ruleHooks.forEach((hookName) => {\n            let matchHook = hooks[hookName];\n            if (matchHook) {\n                hookResults[hookName] = matchHook.run(element, opts);\n                hookResults[hookName].push(matchHook.breakOff);\n            }\n        });\n    }\n\n    return {\n        isRulebreakOff: (rule) => {\n            let breakOff = false;\n            rule.hooks && rule.hooks.forEach((hook) => {\n                !breakOff && (breakOff = hookResults[hook] && hookResults[hook][2] && hookResults[hook][0]);\n            });\n            return breakOff;\n        },\n        gethookResults: (rule) => {\n            let results = {};\n            rule.hooks && rule.hooks.forEach((hook) => {\n                results[hook] = hookResults[hook] && hookResults[hook][1];\n            }); \n            return results;\n        }\n    };\n}\n\nmodule.exports = {\n    applyRules: function (rules, element, opts) {\n        if (!rules) {\n            return [];\n        }\n\n        var { isRulebreakOff, gethookResults } = runHooks(rules, element, opts);\n\n        return lodash.flattenDeep(rules.map(function (rule) {   \n            var issues = [];\n\n            if (!rule.hooks ||  !isRulebreakOff(rule))\n                issues = rule.lint.call(rule, element, opts, rule.hooks && gethookResults(rule));\n\n            addRuleToIssue(issues, rule.name);\n\n            return issues;\n        }));\n\n    }\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/knife/attr_parse.js",
    "content": "// Parse the attributes in an opening tag's text.\n// First five capture groups:\n// 1: Leading spaces\n// 2: Attribute name\n// 3: Everything after the name\n// 4: Text between matches 2 and 3\n// 5: Attribute value, including any quotation marks\nvar attrRegex = /(\\s*)([^ \"'>=\\^]+)((\\s*=\\s*)((?:\"[^\"]*\")|(?:'[^']*')|(?:\\S+)))?/g;\n\nmodule.exports.parseHtmlAttrs = function (attrs) {\n    var ret = [],\n        match;\n\n    while (match = attrRegex.exec(attrs)) {\n        ret.push({\n            name: match[2],\n            valueRaw: match[5]\n        });\n    }\n\n    return ret;\n};\n\n// Find the indices for attribute names and values.\n// If an attribute is duplicated, use the first instance that has a value,\n// or the first instance if there is no value.\nmodule.exports.inputIndices = function (attributes, openTag, openIndex) {\n    var nameLen = openTag.indexOf(' ');\n    openTag = openTag.slice(nameLen); // Remove tag name\n    openIndex += nameLen + 1; // Open bracket and name\n    var match;\n    while (match = attrRegex.exec(openTag)) {\n        var name = match[2].trim();\n        if (name && attributes.hasOwnProperty(name)) {\n            var attr = attributes[name];\n\n            if (attr.valueIndex !== undefined\n                || (!match[5] && attr.nameIndex !== undefined)) {\n                continue;\n            }\n\n            var nameIndex = openIndex + match.index + match[1].length;\n            attr.nameIndex = nameIndex;\n            attr.rawEqValue = match[3];\n            attr.rawValue = match[5];\n\n            if (match[5]) {\n                attr.valueIndex = nameIndex\n                                + match[2].length + match[4].length;\n            }\n        }\n    }\n    Object.keys(attributes).forEach(function (name) {\n        var attr = attributes[name];\n        if (attr.valueIndex === undefined) {\n            attr.valueIndex = attr.nameIndex;\n        }\n    });\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/knife/boolean_attrs.js",
    "content": "var booleanAttrs = [\n    'allowfullscreen',\n    'async',\n    'autofocus',\n    'autoplay',\n    'checked',\n    'compact',\n    'controls',\n    'declare',\n    'default',\n    'defaultchecked',\n    'defaultmuted',\n    'defaultselected',\n    'defer',\n    'disabled',\n    'draggable',\n    'enabled',\n    'formnovalidate',\n    'hidden',\n    'indeterminate',\n    'inert',\n    'ismap',\n    'itemscope',\n    'loop',\n    'multiple',\n    'muted',\n    'nohref',\n    'noresize',\n    'noshade',\n    'novalidate',\n    'nowrap',\n    'open',\n    'pauseonexit',\n    'readonly',\n    'required',\n    'reversed',\n    'scoped',\n    'seamless',\n    'selected',\n    'sortable',\n    'spellcheck',\n    'translate',\n    'truespeed',\n    'typemustmatch',\n    'visible'\n];\n\nmodule.exports = {\n    isBooleanAttr:\n        function (name) {\n            return booleanAttrs.indexOf(name.toLowerCase()) >= 0;\n        }\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/knife/index.js",
    "content": "var bulk = require('bulk-require');\nvar lodash = require('lodash');\n\n// import all the js files in the directory\nvar utilExports = bulk(__dirname, '!(index).js');\nvar utils = {};\n\n// mixin all the functions from the exports into utils\nlodash.values(utilExports).forEach(function (u) {\n    lodash.mixin(utils, u);\n});\n\n// export utils\nmodule.exports = utils;\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/knife/is_cml_directives.js",
    "content": "const isCmlDirectiveRegex = /^c-(?!bind)/;\n\nmodule.exports.isCmlDirective = function(attrName) {\n    return isCmlDirectiveRegex.test(attrName);\n}\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/knife/is_common_attrs.js",
    "content": "const isCommonAttrRegex = /^(id|class|style|ref|(data-.+))$/;\n/**\n * Using a regex to recognize whether an attribute is a common attribute that all tags have.\n * @param {String} attrName  the name of an attribute\n * @return {Boolean}\n */\nmodule.exports.isCommonAttr = function(attrName) {\n    return isCommonAttrRegex.test(attrName);\n}\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/knife/is_common_events.js",
    "content": "const commonEvents = ['tap', 'click', 'touchstart', 'touchmove', 'touchend'];\n\nmodule.exports.isCommonEvent = function(eventName) {\n    return ~commonEvents.indexOf(eventName);\n}\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/knife/is_labeable.js",
    "content": "var lodash = require('lodash');\n\n// these elements are *labelable elements* according to the HTML spec\nvar elems = [\n    'button',\n    'input', // if not in the hidden state\n    'keygen',\n    'meter',\n    'output',\n    'progress',\n    'select',\n    'textarea'\n];\n\n/**\n * Returns whether or not an html element can be associated with a\n * label element.\n * @param {Object} ele - an html element from the htmlparser2 parser\n * @returns {Boolean} whether or not `ele` is labelable\n */\nmodule.exports.isLabeable = function (ele) {\n    if (ele.type !== 'tag' || !lodash.includes(elems, ele.name)) {\n        // element isn't a tag or isn't a labeable element\n        return false;\n    }\n\n    if (ele.name === 'input' && ele.attribs && ele.attribs.type &&\n        ele.attribs.type.value === 'hidden') {\n        // inputs that are hidden are not labeable elements\n        return false;\n    }\n\n    // element passed all the tests\n    return true;\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/knife/is_origin_tag.js",
    "content": "const originReg = /^origin-([^-]+)/;\n\nmodule.exports.isOriginTag = function(name) {\n    return originReg.test(name);\n}\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/knife/is_void_element.js",
    "content": "var elems = [\n    'area',\n    'base',\n    'br',\n    'col',\n    'embed',\n    'hr',\n    'img',\n    'image',\n    'input',\n    'keygen',\n    'link',\n    'menuitem',\n    'meta',\n    'param',\n    'source',\n    'track',\n    'wbr',\n\n    //common self closing svg elements\n    'path',\n    'circle',\n    'ellipse',\n    'line',\n    'rect',\n    'use',\n    'stop',\n    'polyline',\n    'polygon'\n];\n\n/**\n * Returns whether or not an html tag name is a void element.\n * @param {String} tagName - a name of a html tag\n * @returns {Boolean} whether or not `tagName` is a void element\n */\nmodule.exports.isVoidElement = function (tagName) {\n    return elems.indexOf(tagName.toLowerCase()) !== -1;\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/knife/lang_tag.js",
    "content": "// List of ISO 639-1 language codes\nvar langCodes = [\n    'ab', 'aa', 'af', 'sq', 'am', 'ar', 'an', 'hy', 'as', 'ay',\n    'az', 'ba', 'eu', 'bn', 'dz', 'bh', 'bi', 'br', 'bg', 'my',\n    'be', 'km', 'ca', 'zh', 'co', 'hr', 'cs', 'da', 'nl', 'en',\n    'eo', 'et', 'fo', 'fa', 'fj', 'fi', 'fr', 'fy', 'gl', 'gd',\n    'gv', 'ka', 'de', 'el', 'kl', 'gn', 'gu', 'ht', 'ha', 'he',\n    'iw', 'hi', 'hu', 'is', 'io', 'id', 'in', 'ia', 'ie', 'iu',\n    'ik', 'ga', 'it', 'ja', 'jv', 'kn', 'ks', 'kk', 'rw', 'ky',\n    'rn', 'ko', 'ku', 'lo', 'la', 'lv', 'li', 'ln', 'lt', 'mk',\n    'mg', 'ms', 'ml', 'mt', 'mi', 'mr', 'mo', 'mn', 'na', 'ne',\n    'no', 'oc', 'or', 'om', 'ps', 'pl', 'pt', 'pa', 'qu', 'rm',\n    'ro', 'ru', 'sm', 'sg', 'sa', 'sr', 'sh', 'st', 'tn', 'sn',\n    'ii', 'sd', 'si', 'ss', 'sk', 'sl', 'so', 'es', 'su', 'sw',\n    'sv', 'tl', 'tg', 'ta', 'tt', 'te', 'th', 'bo', 'ti', 'to',\n    'ts', 'tr', 'tk', 'tw', 'ug', 'uk', 'ur', 'uz', 'vi', 'vo',\n    'wa', 'cy', 'wo', 'xh', 'yi', 'ji', 'yo', 'zu',\n    // Chinese scripts\n    'zh-Hans', 'zh-Hant'\n];\n\nfunction checkLang(code) {\n    return code.length === 0  ||  langCodes.indexOf(code) !== -1;\n}\n\n// List of ISO country codes\nvar countryCodes = [\n    'AF', 'AL', 'DZ', 'AS', 'AD', 'AO', 'AQ', 'AG', 'AR', 'AM',\n    'AW', 'AU', 'AT', 'AZ', 'BS', 'BH', 'BD', 'BB', 'BY', 'BE',\n    'BZ', 'BJ', 'BM', 'BT', 'BO', 'BA', 'BW', 'BV', 'BR', 'IO',\n    'BN', 'BG', 'BF', 'BI', 'KH', 'CM', 'CA', 'CV', 'KY', 'CF',\n    'TD', 'CL', 'CN', 'CX', 'CC', 'CO', 'KM', 'CG', 'CD', 'CK',\n    'CR', 'CI', 'HR', 'CU', 'CY', 'CZ', 'DK', 'DJ', 'DM', 'DO',\n    'EC', 'EG', 'SV', 'GQ', 'ER', 'EE', 'ET', 'FK', 'FO', 'FJ',\n    'FI', 'FR', 'GF', 'PF', 'TF', 'GA', 'GM', 'GE', 'DE', 'GH',\n    'GI', 'GR', 'GL', 'GD', 'GP', 'GU', 'GT', 'GN', 'GW', 'GY',\n    'HT', 'HM', 'HN', 'HK', 'HU', 'IS', 'IN', 'ID', 'IR', 'IQ',\n    'IE', 'IL', 'IT', 'JM', 'JP', 'JO', 'KZ', 'KE', 'KI', 'KP',\n    'KR', 'KW', 'KG', 'LA', 'LV', 'LB', 'LS', 'LR', 'LY', 'LI',\n    'LT', 'LU', 'MO', 'MK', 'MG', 'MW', 'MY', 'MV', 'ML', 'MT',\n    'MH', 'MQ', 'MR', 'MU', 'YT', 'MX', 'FM', 'MD', 'MC', 'MN',\n    'ME', 'MS', 'MA', 'MZ', 'MM', 'NA', 'NR', 'NP', 'NL', 'AN',\n    'NC', 'NZ', 'NI', 'NE', 'NG', 'NU', 'NF', 'MP', 'NO', 'OM',\n    'PK', 'PW', 'PS', 'PA', 'PG', 'PY', 'PE', 'PH', 'PN', 'PL',\n    'PT', 'PR', 'QA', 'RE', 'RO', 'RU', 'RW', 'SH', 'KN', 'LC',\n    'PM', 'VC', 'WS', 'SM', 'ST', 'SA', 'SN', 'RS', 'SC', 'SL',\n    'SG', 'SK', 'SI', 'SB', 'SO', 'ZA', 'GS', 'ES', 'LK', 'SD',\n    'SR', 'SJ', 'SZ', 'SE', 'CH', 'SY', 'TW', 'TJ', 'TZ', 'TH',\n    'TL', 'TG', 'TK', 'TO', 'TT', 'TN', 'TR', 'TM', 'TC', 'TV',\n    'UG', 'UA', 'AE', 'GB', 'US', 'UM', 'UY', 'UZ', 'VU', 'VE',\n    'VN', 'VG', 'VI', 'WF', 'EH', 'YE', 'ZM', 'ZW'\n];\n\nfunction checkCountry(code) {\n    return code.length === 0  ||  countryCodes.indexOf(code) !== -1;\n}\n\n// Check if a language tag has the form xx-YY, where xx is a valid\n// language code and YY is a valid country code.\n// Return 1 if the tag is invalid, or 2 if it is valid but has\n// unconventional capitalization.\nmodule.exports.checkLangTag = function (l) {\n    if (!l || l.length === 0) { return 0; }\n    var n = l.lastIndexOf('-');\n    var lang = '', country = '';\n    if (n === -1) {\n        lang = l;\n    } else {\n        lang = l.slice(0,n); country = l.slice(n + 1, l.length);\n    }\n    return (checkLang(lang) && checkCountry(country)) ? 0\n      : (checkLang(lang.toLowerCase()) && checkCountry(country.toUpperCase())) ? 2\n      : 1;\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/knife/match_filter.js",
    "content": "module.exports.matchFilter = function (data, rule) {\n    if (!rule.filter) {\n        return true;\n    }\n\n    return rule.filter.indexOf(data.toLowerCase()) > -1;\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/knife/relative_line_col.js",
    "content": "// Given the raw html text, produce a function that transforms an index\n// into a line and column number. Indices must be passed to the resulting\n// function in order.\nmodule.exports.getLineColFunc = function (htmlText, lineCol, offset) {\n    if (offset === undefined) { offset = 1; }\n    var lastInd = 0,\n        line = 0,\n        col = 0;\n    if (lineCol && lineCol[0] && lineCol[1]) {\n        line = lineCol[0];\n        col = lineCol[1];\n    }\n    return function (i) {\n        if (i < lastInd) {\n            throw new Error('Index passed to line/column' + ' function (' + i + ') does not keep with order (last was ' + lastInd + ')');\n        }\n        while (lastInd < i) {\n            if (htmlText[lastInd] === '\\n') {\n                col = 0;\n                line++;\n            } else {\n                col++;\n            }\n            lastInd++;\n        }\n        return [line + offset, col + offset];\n    };\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/knife/shred.js",
    "content": "/**\n * 'Shreds' the html by line for linting by line.\n * @param {String} html - your html.\n * @returns {String[]} the array of line objects.\n */\nmodule.exports.shred = function (html) {\n    // Take the HTML string\n    // Return an array of {line, line number, index}\n    var row = 1,\n        ind = 0,\n        shredded = [];\n\n    while (html) {\n        var len = html.search('[\\r\\n]') + 1;\n        if (len === 0) { len = html.length; }\n        else if (html[len - 1] === '\\r' && html[len] === '\\n') { len++; }\n        shredded[row] = {\n            line: html.substr(0, len),\n            index: ind,\n            row: row\n        };\n        row++; ind += len;\n        html = html.slice(len);\n    }\n\n    return shredded;\n};"
  },
  {
    "path": "packages/cml-htmllinter/lib/knife/tag_utils.js",
    "content": "module.exports.isSelfClosing = function (element) {\n    var openRaw = element.open;\n\n    return openRaw[openRaw.length - 1] === '/';\n};\n\n// Check whether the given tag has a non-empty attribute with the given\n// name. Count \"\" as a non-empty attribute value only if optional\n// parameter allowNull is true,\nmodule.exports.hasNonEmptyAttr = function(tag, attr, allowNull) {\n    var a = tag.attribs[attr];\n    return (a && (allowNull || (a.value && a.value.length > 0)));\n};\n\n/**\n * Go through all child elements and find those that match the given type.\n * @param {Object} tag element object\n * @param {String} type 'tag' | 'text' etc.\n */\nmodule.exports.getChildrenByType = function(tag, type) {\n    return tag.children ? tag.children.filter((ele) => ele.type === type).map(ele => ele.name): [];\n}"
  },
  {
    "path": "packages/cml-htmllinter/lib/linter.js",
    "content": "var Promise = require('promise');\nvar lodash = require('lodash'),\n    Parser = require('./parser'),\n    knife = require('./knife'),\n    presets = require('./presets'),\n    Config = require('./config'),\n    InlineConfig = require('./inline_config');\n\n/**\n * A linter is configured with a set of rules that are fed the raw\n * html and ast nodes.\n * @constructor\n */\nvar Linter = function (rules, options) {\n    this.rules = new Config(rules, options);\n    this.parser = new Parser();\n    this.inlineConfig = new InlineConfig(this.rules);\n};\nmodule.exports = Linter;\n\n/**\n * Adds a plugin to the linter.\n * @param {Object} plugin - the plugin to add to the linter.\n */\nLinter.prototype.use = function (plugin) {\n    if (plugin.rules) {\n        plugin.rules.forEach(function (rule) {\n            this.rules.addRule(rule);\n        }.bind(this));\n    }\n};\n\n/**\n * Apply the raw-ignore-regex option.\n * Return the modified html, and a function that recovers line/column\n * numbers of issues.\n */\nfunction rawIgnoreRegex(html, opts) {\n    var ignore = opts['raw-ignore-regex'];\n    if (!ignore) { return [html, function (issue) { return issue; }]; }\n\n    var origLineCol = knife.getLineColFunc(html),\n        l = 1, // Current line in the modified string\n        d = 0; // Difference between original and modified line numbers\n    var lines = [],\n        cols = [];\n    var total = html.length;\n    html = html.replace(ignore, function (match) {\n        var offset = arguments[arguments.length - 2],\n            start = origLineCol(offset),\n            end = origLineCol(offset + match.length),\n            linediff = end[0] - start[0],\n            newcol = start[0] - d;\n        if (linediff) {\n            for (; l < newcol; l++) { lines[l] = l + d; }\n            d += linediff;\n        }\n        if (!cols[newcol]) { cols[newcol] = [[1,0,start[0]]]; }\n        var col = cols[newcol],\n            st = start[1] - col[col.length - 1][1];\n        col.push([st, end[1] - st, end[0]]);\n        return '';\n    });\n\n    var recoverLineCol;\n    function findInCol(col, i) {\n        var lo = 0, hi = col.length;\n        while (lo < hi - 1) {\n            var mid = Math.floor((lo + hi) / 2),\n                v = col[mid][0];\n            if (v === i) {\n                return col[mid];\n            } else if (v < i) {\n                lo = mid;\n            } else {\n                hi = mid;\n            }\n        }\n        return col[lo];\n    }\n    if (d === 0) { // No multi-line ignores\n        recoverLineCol = function (issue) {\n            var col = cols[issue.line];\n            if (col) {\n                issue.column += findInCol(col, issue.column)[1];\n            }\n            return issue;\n        };\n    } else {\n        for (; l < total - d; l++) { lines[l] = l + d; }\n        recoverLineCol = function (issue) {\n            var col = cols[issue.line];\n            if (col) {\n                var c = findInCol(col, issue.column);\n                issue.column += c[1];\n                issue.line = c[2];\n            } else {\n                issue.line = lines[issue.line];\n            }\n            return issue;\n        };\n    }\n    return [html, recoverLineCol];\n}\n\n/**\n * Lints the HTML with the options supplied in the environments setup.\n * @param {String} html - the html as a string to lint.\n */\nLinter.prototype.lint = function (html) {\n    var opts = Linter.getOptions(arguments),\n        issues = this.rules.initOptions(opts);\n\n    var hf = rawIgnoreRegex(html, opts),\n        recoverLineCol = hf[1];\n    html = hf[0];\n\n    var lines = knife.shred(html),\n        dom = this.parser.parse(html);\n    issues = issues.concat(this.setupInlineConfigs(dom));\n\n    try {\n        issues = issues.concat(this.lintByLine(lines, opts));\n        issues = issues.concat(this.lintDom(dom, opts));\n    } finally {\n        issues = issues.concat(this.resetRules(opts));\n        this.inlineConfig.clear();\n    }\n\n    if (opts.maxerr) {\n        issues = lodash.take(issues, opts.maxerr);\n    }\n\n    return Promise.all(issues)\n        .then(function (resolved) {\n            return lodash.flattenDeep(resolved).map(recoverLineCol);\n        });\n};\nLinter.prototype.lint = Promise.nodeify(Linter.prototype.lint);\n\nLinter.getOptions = function (args) {\n    var optList = Array.prototype.slice.call(args, 1);\n    optList = lodash.flattenDeep(optList);\n\n    if (optList[optList.length - 1] !== 'nodefault') {\n        optList.unshift('default');\n    }\n\n    return presets.flattenOpts(optList);\n};\n\nLinter.prototype.lintByLine = function (lines, opts) {\n    return this.rules.getRule('line').lint(lines, opts, this.inlineConfig);\n};\n\nLinter.prototype.lintDom = function (dom, opts) {\n    return this.rules.getRule('dom').lint(dom, opts, this.inlineConfig);\n};\n\nLinter.prototype.resetRules = function (opts) {\n    return lodash.flattenDeep(\n        this.rules.getAllRules().map(function (rule) {\n            var r = rule.end && rule.end(opts);\n            return r ? r : [];\n        })\n    );\n};\n\nLinter.prototype.setupInlineConfigs = function (dom) {\n    var issues = [];\n    var feedComments = function (element) {\n        if (element.type === 'comment') {\n            issues = issues.concat(this.inlineConfig.feedComment(element));\n        }\n        if (element.children) {\n            element.children.map(feedComments);\n        }\n    }.bind(this);\n    dom.forEach(feedComments);\n    return issues;\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/messages.js",
    "content": "var lodash = require('lodash');\n\nvar errors = {\n    E000: 'not a valid error code',\n    E001: 'the `<%= attribute %>` attribute is banned',\n    E002: 'attribute names must match the format: <%= format %>',\n    E003: 'duplicate attribute: <%= attribute %>',\n    E004: 'attribute values must not include unsafe characters',\n    E005: 'the `<%= attribute %>` attribute is not <%= format %>',\n    E006: 'attribute \"<%= name %>\" value is empty or is not well-formed',\n    E007: '<!DOCTYPE> should be the first element seen',\n    E008: 'the doctype must conform to the HTML5 standard',\n    E009: 'use only <%= format %> links',\n    E010: 'ids and classes may not use the word: <%= word %>',\n    E011: '<%= attribute %> value must match the format: <%= format %>',\n    E012: 'the id \"<%= id %>\" is already in use',\n    E013: 'the `alt` property must be set for image tags',\n    E014: 'a source must be given for each `img` tag',\n    E015: 'line ending does not match format: <%= format %>',\n    E016: 'the <%= tag %> tag is banned',\n    E017: 'tag names must be lowercase',\n    E018: 'void element should <%= expect %> close itself',\n    E019: 'all labels should have a `for` attribute',\n    E020: 'label does not have a `for` attribute or a labeable child',\n    E021: 'an element with the id \"<%= id %>\" does not exist (should match `for` attribute)',\n    E022: 'the linked element is not labeable (id: <%= id %>)',\n    E023: '<%= part %> contains <%= desc %>: <%= chars %>',\n    E024: '<%= type %> not allowed',\n    E025: 'html element should specify the language of the page',\n    E026: '<%= op %> (all focusable elements on a page must either have a positive tabindex or none at all)',\n    E027: 'the <head> tag must contain a title',\n    E028: 'the <head> tag can only contain one title; <%= num %> given',\n    E029: 'title \"<%= title %>\" exceeds maximum length of <%= maxlength %>',\n    E030: 'tag start and end must match',\n    E031: 'table must have a caption for accessibility',\n    E032: 'figure must have a figcaption, figcaption must be in a figure (for accessibility)',\n    E033: 'input with id: <%= idValue %> (or if type is text, name: <%= nameValue %>) is not associated with a label for accessibility',\n    E034: 'radio input must have an associated name',\n    E035: 'table must have a header for accessibility',\n    E036: 'indenting spaces must be used in groups of <%= width %>',\n    E037: 'attributes for one tag on the one line should be limited to <%= limit %>',\n    E038: 'lang attribute <%= lang %> is not valid',\n    E039: 'lang attribute <%= lang %> in not properly capitalized',\n    E040: 'line length should not exceed <%= maxlength %> characters (current: <%= length %>)',\n    E041: 'duplicate class: <%= classes %>',\n    E042: 'tag \"<%= name %>\" is not closed',\n    E043: 'attribute <%= attribute %> should come before <%= previous %>',\n    E044: 'only <head> and <body> may be children of <html>',\n    E045: 'tags in <html> may not be duplicated',\n    E046: '<head> tag must come before <body> in <html>',\n    E047: 'the only tags allowed in the <head> are base, link, meta, noscript, script, style, template, and title',\n    E048: 'invalid value for option <%= option %>: <%= value %>',\n    E049: 'tag attributes are malformed',\n    E050: 'invalid configuration',\n    E051: 'invalid option or preset name: <%= name %>',\n    E052: 'not a preset: <%= preset %>',\n    E053: 'invalid value for option <%= rule %>: <%= value %>',\n    E054: 'option <%= name %> does not exist',\n    E055: 'line contains trailing whitespace',\n    E056: 'expected from <%= expectedMin %> to <%= expectedMax %> levels of indentation. <%= value %> levels instead',\n    E057: 'tag has missing or empty attributes',\n    E058: 'rel=\"noopener\" required for links with target=\"blank\"',\n    E059: 'the root tag template must has \"lang\" attribute and it must be \"cml\" or \"vue\"',\n    E060: 'the tag template lang attribute: \"<%= lang %>\" is not valid',\n    E061: 'tag: \"<%= tag %>\" is either not allowed in this template or not referenced as a component',\n    E062: 'directive \"<%= attribute %>\" is not allowed to be used in this template, as the template language is set to \"<%= lang %>\"',\n    E063: 'component \"<%= name %>\" doesn\\'t have a defined property named \"<%= prop %>\"',\n    E064: 'component \"<%= name %>\" doesn\\'t have a defined event named \"<%= prop %>\"',\n    // tag embed rule. E065 for required child elements, E066| E067 for includes child elements, E068 for excludes child elements.\n    E065: 'tag \"<%= parent %>\" must have \"<%= elements %>\" as it\\'s direct children',\n    E066: 'tag \"<%= parent %>\" can not have any child nodes, therefor tag \"<%= forbiddenTag %>\" is not allowed as it\\'s children',\n    E067: 'tag \"<%= parent %>\" can only have \"<%= elements %>\" as it\\'s direct children or descendant(s), therefor tag \"<%= forbiddenTag %>\" is not allowed as it\\'s direct children or descendant(s)',\n    E068: 'tag \"<%= parent %>\" can not have  \"<%= forbiddenTag %>\" as it\\'s direct children or descendant(s), and element in this list: \"<%= elements %>\" is forbidden as well',\n    // origin tags assoicated rules\n    E069: 'tag \"<%= name %>\" is prefixed with \"origin-\" directive, so it\\'s not allowed to use a chameleon built-in directive:\"<%= directive %>\"',\n    E070: 'tag \"<%= name %>\" is a third party imported component, so it\\'s not allowed to use a chameleon built-in directive:\"<%= directive %>\"',\n    E071: 'no raw text is allowed in the template, you should always wrap it under a text tag',\n    // format check for directives' value\n    E072: 'value of directive \"<%= name %>\" is not well formatted, you should fellow instructions of template language:\"<%= lang %>\"',\n    E073: 'component \"<%= element %>\": missing required property \"<%= prop %>\"'\n};\n\nmodule.exports.errors = {};\n\nlodash.forOwn(errors, function (format, code) {\n    module.exports.errors[code] = {\n        format: format,\n        code: code\n    };\n});\n\nmodule.exports.guessToken = function (issue) {\n    const guessPool = ['attribute','tag','name','id','part'];\n\n    return issue.data?(issue.data[Object.keys(issue.data).filter((item) => {\n        return ~guessPool.indexOf(item);\n    })[0]] || ''):'';\n}\n\nmodule.exports.renderMsg = function (code, data) {\n    var format = errors[code];\n\n    return lodash.template(format)(data);\n};\n\nmodule.exports.renderIssue = function (issue) {\n    return this.renderMsg(issue.code, issue.data);\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/parser/dom_builder.js",
    "content": "var htmlparser2 = require('htmlparser2'),\n    util = require('util'),\n    knife = require('../knife');\nvar DomHandler = htmlparser2.DomHandler,\n    DomBuilder = function () {\n        this.parser = null;\n        this.attributes = {};\n        this.attribArr = [];\n        this.dupes = [];\n        DomHandler.apply(this, Array.prototype.slice.call(arguments));\n    };\nmodule.exports = DomBuilder;\n\nutil.inherits(DomBuilder, DomHandler);\n\n// NOTE: this must be called before parsing begins\nDomBuilder.prototype.initialize = function (parser) {\n    this.parser = parser;\n};\n\nDomBuilder.prototype.start = function (htmlText) {\n    this.htmlText = htmlText;\n    this.lineColFunc = knife.getLineColFunc(htmlText);\n    // When a tag has no close, startIndex is too large by 3 for the\n    // next calls to onopentag and _addDomElement. Keep track of this.\n    this.wasClosed = true;\n};\n\nDomBuilder.prototype.onerror = function (error) {\n    // TODO: actually bubble this up or queue errors\n    throw error;\n};\n\nDomBuilder.prototype.onattribute = function (name, value) {\n    if (!this.attributes[name]) {\n        this.attributes[name] = {\n            value: value\n        };\n        this.attribArr.push(name);\n    } else {\n        this.dupes.push(name);\n    }\n};\n\n/*eslint-disable no-underscore-dangle*/\nDomBuilder.prototype.onopentag = function (name, attribs) {\n    DomHandler.prototype.onopentag.call(this, name, attribs);\n\n    var ele = this._tagStack[this._tagStack.length - 1];\n    ele.openIndex = this.parser.startIndex;\n    if (!this.wasClosed) { ele.openIndex -= 3; }\n    this.wasClosed = true;\n    ele.open = this.htmlText.slice(ele.openIndex + 1, this.parser.endIndex);\n    ele.openLineCol = this.lineColFunc(ele.openIndex);\n    // remove duplicate data\n    delete ele.lineCol;\n\n    ele.attribs = this.attributes;\n    //ele.attribsArr = this.attribArr;\n    knife.inputIndices(ele.attribs, ele.open, ele.openIndex);\n\n    this.attribArr\n        .sort(function (a, b) {\n            return ele.attribs[a].nameIndex - ele.attribs[b].nameIndex;\n        })\n        .forEach(function (attrib) {\n            var a = ele.attribs[attrib];\n            a.nameLineCol = this.lineColFunc(a.nameIndex);\n            a.valueLineCol = this.lineColFunc(a.valueIndex);\n        }, this);\n\n    this.attribArr = [];\n    this.attributes = {};\n\n    ele.dupes = this.dupes;\n    this.dupes = [];\n};\n\nDomBuilder.prototype.onclosetag = function () {\n    var ele = this._tagStack[this._tagStack.length - 1];\n    //&& !knife.isVoidElement(ele.name)\n    if (ele) {\n        // Mercifully, no whitespace is allowed between < and /\n        this.wasClosed = this.htmlText[this.parser.startIndex + 1] === '/';\n        ele.close = this.wasClosed\n            ? this.htmlText.slice(this.parser.startIndex + 2, this.parser.endIndex)\n            : '';\n        ele.closeIndex = this.parser.startIndex;\n        if (!this.wasClosed && ele.closeIndex == ele.openIndex) {\n            ele.closeIndex += ele.open.length + 1;\n            this.wasClosed = true;\n        }\n        ele.closeLineCol = this.lineColFunc(ele.closeIndex);\n    }\n\n    DomHandler.prototype.onclosetag.call(this);\n};\n\nDomBuilder.prototype.onprocessinginstruction = function (name, data) {\n    // htmlparser2 doesn't normally update the position when processing\n    // declarations or processing directives (<!doctype ...> or <?...> elements)\n    this.parser._updatePosition(2);\n    DomHandler.prototype.onprocessinginstruction.call(this, name, data);\n};\n\nDomBuilder.prototype._addDomElement = function (ele) {\n    if (!this.parser) {\n        // TODO: rewrite error msg\n        throw new Error('stop being a bone head >.<');\n    }\n    ele.index = this.parser.startIndex;\n    if (!this.wasClosed) { ele.index -= 3; }\n    ele.lineCol = this.lineColFunc(ele.index);\n    DomHandler.prototype._addDomElement.call(this, ele);\n};\n/*eslint-enable no-underscore-dangle*/\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/parser/index.js",
    "content": "var htmlparser2 = require('htmlparser2');\nvar DomBuilder = require('./dom_builder'),\n    knife = require('../knife');\n\nvar Parser = function () {\n    this.domBuilder = new DomBuilder();\n\n    // more information for these options can be found at:\n    // https://github.com/fb55/htmlparser2/wiki/Parser-options\n    this.parser = new htmlparser2.Parser(this.domBuilder, {\n        decodeEntities: false,\n        lowerCaseAttributeNames: false,\n        lowerCaseTags: false,\n        recognizeCDATA: false,\n        recognizeSelfClosing: false,\n        xmlMode: true\n    });\n    this.domBuilder.initialize(this.parser);\n};\nmodule.exports = Parser;\n\nParser.prototype.parse = function (htmlText) {\n    var dom = null;\n\n    // expose the raw html text to the dom builder and initialize\n    this.domBuilder.start(htmlText);\n\n    try {\n        // write to the parser\n        this.parser.write(htmlText);\n        this.parser.end();\n    } finally {\n        // htmlparser2 is insane >.>\n        this.parser.startIndex = 0;\n        this.parser.endIndex = -1;\n\n        // store the dom and reset the parser/handler\n        dom = this.domBuilder.dom;\n        this.parser.reset();\n    }\n\n    return dom;\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/presets/accessibility.js",
    "content": "module.exports = {\n    'fig-req-figcaption': true,\n    'focusable-tabindex-style': true,\n    'input-radio-req-name': true,\n    'input-req-label': true,\n    'page-title': true,\n    'table-req-caption': true,\n    'table-req-header': true,\n    'tag-name-match':true\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/presets/default.js",
    "content": "module.exports = {\n    'maxerr': false,\n    'raw-ignore-regex': false,\n    'attr-bans': [\n        'align',\n        'background',\n        'bgcolor',\n        'border',\n        'frameborder',\n        'longdesc',\n        'marginwidth',\n        'marginheight',\n        'scrolling',\n        'style',\n        'width'\n    ],\n    'indent-delta': false,\n    'indent-style': 'nonmixed',\n    'indent-width': 4,\n    'indent-width-cont': false,\n    'spec-char-escape': true,\n    'text-ignore-regex': false,\n    'tag-bans': ['style', 'b', 'i'],\n    'tag-close': true,\n    'tag-name-lowercase': true,\n    'tag-name-match': true,\n    'tag-self-close': false,\n    'doctype-first': false,\n    'doctype-html5': false,\n    'attr-name-style': 'dash',\n    'attr-name-ignore-regex': false,\n    'directive-name-forbidden-regex': false,\n    'attr-no-dup': true,\n    'attr-no-unsafe-char': true,\n    'attr-order': false,\n    'attr-quote-style': 'double',\n    'attr-req-value': true,\n    'attr-new-line': false,\n    'attr-validate': false,\n    'id-no-dup': true,\n    'id-class-no-ad': false,\n    'id-class-style': false,\n    'class-no-dup': false,\n    'class-style': false,\n    'id-class-ignore-regex': false,\n    'img-req-alt': false,\n    'img-req-src': false,\n    'html-valid-content-model': false,\n    'head-valid-content-model': false,\n    'href-style': false,\n    'link-req-noopener': true,\n    'label-req-for': false,\n    'line-end-style': 'lf',\n    'line-no-trailing-whitespace': false,\n    'line-max-len': false,\n    'line-max-len-ignore-regex': false,\n    'head-req-title': false,\n    'title-no-dup': false,\n    'title-max-len': 60,\n    'html-req-lang': false,\n    'lang-style': 'case',\n    'fig-req-figcaption' : false,\n    'focusable-tabindex-style' : false,\n    'input-radio-req-name': false,\n    'input-req-label': false,\n    'table-req-caption': false,\n    'table-req-header': false,\n    'tag-req-attr': false,\n    'component-prop-regex': false,\n    'component-event-regex': false,\n    'component-allow-attr': {},\n    'tag-embed-tags': false,\n    'template-lang': '',\n    'origin-tag-list': [],\n    'text-forbid-raw': true\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/presets/global.js",
    "content": "var proc = require('../process_option');\n\nmodule.exports = {\n  'template-lang': {\n    process: proc.str\n  },\n  'platform-lang': {\n    process: proc.str\n  },\n  'origin-tag-list': {\n    process: proc.arrayOfStr\n  }\n}"
  },
  {
    "path": "packages/cml-htmllinter/lib/presets/index.js",
    "content": "var lodash = require('lodash');\nvar bulk = require('bulk-require');\n\nvar presets = bulk(__dirname, '!(index).js');\npresets.none = lodash.mapValues(presets.default, function(){return false;});\nmodule.exports.presets = presets;\n\nmodule.exports.flattenOpts = function (optList) {\n    var options = {};\n\n    optList.forEach(function (opt) {\n        if (lodash.isString(opt)) {\n            opt = presets[opt];\n        }\n\n        lodash.assign(options, opt);\n    });\n\n    return options;\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/presets/validate.js",
    "content": "module.exports = {\n    'doctype-first': true,\n    'doctype-html5': true,\n    'attr-no-dup': true,\n    'id-no-dup': true,\n    'img-req-alt': 'allownull',\n    'img-req-src': true,\n    'label-req-for': 'strict',\n    'title-no-dup': true,\n    'tag-close': true,\n    'html-valid-content-model': true,\n    'head-valid-content-model': true,\n    'attr-validate': true\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/process_option.js",
    "content": "var lodash = require('lodash');\n\nvar formats = {\n    lowercase: /^[a-z][a-z\\d]*$/,\n    underscore: /^[a-z][a-z\\d]*(_[a-z\\d]+)*$/,\n    dash: /^[a-z][a-z\\d]*(-[a-z\\d]+)*$/,\n    camel: /^[a-zA-Z][a-zA-Z\\d]*$/,\n    bem: /^[a-z][a-z\\d]*(-[a-z\\d]+)*(__[a-z\\d]+(-[a-z\\d]+)*)?(--[a-z\\d]+(-[a-z\\d]+)*)?$/\n};\n\nfunction getRegExp(val, strFn) {\n    if (lodash.isRegExp(val)) {\n        return val;\n    } else if (lodash.isString(val)) {\n        var match = /^\\/(.*?)\\/([gim]*)$/.exec(val);\n        return match ? new RegExp(match[1], match[2]) : strFn(val);\n    } else {\n        return undefined;\n    }\n}\n\nmodule.exports = {\n    bool: function (option) {\n        return option ? true : false;\n    },\n    boolPlus: function (option) {\n        return function (o) {\n            return o === option ? option : o ? true : false;\n        }\n    },\n    str: function(o) {\n        return lodash.isString(o) ? o : '';\n    },\n    arrayOfStr: function (o) {\n        return lodash.isArray(o) && lodash.every(o, lodash.isString)\n            ? o : undefined;\n    },\n    options: function (opts) {\n        return function (o) {\n            return opts.indexOf(o) > -1 ? o : undefined;\n        }\n    },\n    regex: function (regex) {\n        return getRegExp(regex, function (s) { return new RegExp(s); });\n    },\n    regexGlobal: function (r) {\n        r = module.exports.regex(r);\n        return r && new RegExp(r.source, r.ignoreCase ? 'gi' : 'g');\n    },\n    posInt: function (i) {\n        return (lodash.isInteger(i) && i >= 0) ? i : undefined;\n    },\n    format: function (name) {\n        var regex = getRegExp(name, function (s) { return formats[s]; });\n\n        return regex && { desc: name, test: regex.test.bind(regex) };\n    },\n    object: function (o) {\n        return Object.keys(o).length > 0 ? o : {};\n    },\n    getRegExp: getRegExp\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/attr-bans.js",
    "content": "var Issue = require('../issue'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'attr-bans',\n    on: ['tag'],\n    options: [{\n        name: 'attr-bans',\n        desc: [\n            'The value of this option is a list of strings, each of which is an',\n            'attribute name.',\n            'Attributes with any of the given names are disallowed.'\n            ].join('\\n'),\n        process: proc.arrayOfStr\n    }]\n};\n\nmodule.exports.lint = function (element, opts) {\n    var bannedAttrs = opts[this.name];\n\n    var issues = [];\n\n    var attrs = element.attribs;\n    bannedAttrs.forEach(function (name) {\n        if (attrs.hasOwnProperty(name)) {\n            issues.push(new Issue('E062',\n                attrs[name].nameLineCol, { attribute: name, lang: opts['template-lang'] }));\n        }\n    });\n\n    return issues;\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/attr-name-style.js",
    "content": "var Issue = require('../issue'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'attr-name-style',\n    on: ['attr'],\n    options: [{\n        desc: [\n'A format specifier, or `false`. If set, attribute names must conform to',\n'the given format.'\n].join('\\n'),\n        process: proc.format\n    }, {\n        name: 'attr-name-ignore-regex',\n        desc: [\n'A string giving a regular expression, a RegExp object, or `false`. If',\n'set, `attr`s with names matching the given regular expression are ignored',\n'for the `attr-name-style` rule. For example, excluding `{{...}}` names',\n'used by Angular and other templating methods can be done with the regex',\n'`{{.*?}}`.'\n].join('\\n'),\n        process: proc.regex,\n        rules: []\n    }]\n};\n\nmodule.exports.lint = function (attr, opts) {\n    var format = opts[this.name];\n\n    var ignore = opts['attr-name-ignore-regex'];\n    if (ignore && ignore.test(attr.name)) { return []; }\n\n    return format.test(attr.name) ? [] :\n        new Issue('E002', attr.nameLineCol, { format: format.name });\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/attr-new-line.js",
    "content": "var Issue = require('../issue'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'attr-new-line',\n    on: ['tag'],\n    desc: [\n'A non-negative integer, or \"+0\". If set, no more than this number of',\n'attributes may be on the same row.',\n'A value of 0 applies only to the first row, restricting subsequent rows',\n'to one element, and a value of \"+0\" is the same but allows an attribute',\n'to be on the first row if there is only one attribute.'\n].join('\\n'),\n    process: function (o) {\n        return o === '+0' ? o : proc.posInt(o);\n    }\n};\n\nmodule.exports.lint = function(element, opts) {\n    var option = opts[this.name];\n\n    var total = Object.keys(element.attribs).length;\n    if (total === 0 || (option === '+0' && total === 1)) {\n        return [];\n    }\n\n    var rowLimit = Math.floor(option);\n\n    var rows = Object.values(element.attribs).map(function (attr) {\n        return attr.nameLineCol[0];\n    }).sort();\n\n    var firstRow = element.openLineCol[0],\n        curRow = firstRow,\n        n = 0,\n        max = -1,\n        first;\n\n    rows.push(rows[rows.length - 1] + 1);\n    rows.forEach(function (r) {\n        if (r !== curRow) {\n            if (curRow === firstRow) { first = n; }\n            curRow = r;\n            if (n > max) { max = n; }\n            n = 0;\n        }\n        n++;\n    });\n\n    return (first <= rowLimit && max <= Math.max(1,rowLimit))\n        ? []\n        : new Issue('E037', element.openLineCol, { limit: rowLimit });\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/attr-no-dup.js",
    "content": "var Issue = require('../issue');\n\nmodule.exports = {\n    name: 'attr-no-dup',\n    on: ['tag'],\n    desc: 'If set, the same attribute name cannot be repeated within a single tag.'\n};\n\nmodule.exports.lint = function (element, opts) {\n    return element.dupes.map(function (n) {\n        var a = element.attribs[n];\n\n        return new Issue('E003', a.nameLineCol, { attribute: n });\n    });\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/attr-no-unsafe-char.js",
    "content": "var Issue = require('../issue');\nvar regUnsafe = /[\\u0000-\\u0009\\u000b\\u000c\\u000e-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/;\n\nmodule.exports = {\n    name: 'attr-no-unsafe-char',\n    on: ['attr'],\n    desc: [\n'If set, unsafe characters may not be used in attribute values.',\n'The unsafe characters are those whose unicode values lie in the ranges',\n'0000-0009, 000b-000c, 000e-001f, 007f-009f, 00ad, 0600-0604, 070f,',\n'17b4, 17b5, 200c-200f, 2028-202f, 2060-206f, feff, fff0-ffff.'\n].join('\\n')\n};\n\nmodule.exports.lint = function (attr, opts) {\n    return regUnsafe.test(attr.value)\n        ? new Issue('E004', attr.valueLineCol)\n        : [];\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/attr-order.js",
    "content": "var lodash = require('lodash'),\n    Issue = require('../issue'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'attr-order',\n    on: ['tag'],\n    desc: [\n'A list of attribute names, or `false`. If set, any attributes present in',\n'the list must be ordered as they are in the list.'\n].join('\\n'),\n    process: function (strs) {\n        if (!lodash.isArray(strs)) return undefined;\n        for (var i = 0; i < strs.length; i++) {\n            strs[i] = proc.getRegExp(strs[i], function(a) { return a; });\n            if (!strs[i]) return undefined;\n        }\n        return strs;\n    }\n};\n\nmodule.exports.lint = function (element, opts) {\n    var order = opts[this.name],\n        attrs = element.attribs,\n        lastpos = 0,\n        lastname,\n        issues = [],\n        matched = {};\n    order.forEach(function(name) {\n        if (lodash.isRegExp(name)) {\n            var prevpos = lastpos,\n                prevname = lastname;\n            Object.keys(attrs).forEach(function(n) {\n                if (matched[n] || !name.test(n)) return;\n                var a = attrs[n];\n                matched[n] = true;\n                var pos = a.nameIndex;\n                n += ' (' + name + ')'; // For error output\n                if (pos > lastpos) {\n                    lastpos = pos;\n                    lastname = n;\n                // Check only fails if keys are not ordered by insertion\n                /* istanbul ignore else */\n                } else if (pos < prevpos) {\n                    issues.push(new Issue('E043', a.nameLineCol,\n                        { attribute: prevname, previous: n }));\n                }\n            });\n        } else {\n            if (!attrs.hasOwnProperty(name)) return;\n            var a = attrs[name];\n            matched[name] = true;\n            var pos = a.nameIndex;\n            if (pos > lastpos) {\n                lastpos = pos;\n                lastname = name;\n            } else {\n                issues.push(new Issue('E043', a.nameLineCol,\n                    { attribute: lastname, previous: name }));\n            }\n        }\n    });\n\n    return issues;\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/attr-quote-style.js",
    "content": "var Issue = require('../issue');\n\nmodule.exports = {\n    name: 'attr-quote-style',\n    on: ['attr'],\n    desc: [\n'* \"double\": Attribute values must be quoted using double quotes.',\n'* \"single\": Attribute values must be quoted using single quotes.',\n'* \"quoted\": Attribute values must be quoted.',\n'* `false`: No restriction.',\n'',\n'Applies only to attributes with values (including the empty quoted values',\n'`\\'\\'` and `\"\"`). To catch attributes with no values, use `attr-req-value`.'\n].join('\\n'),\n    process: function (o) {\n        var formats = {\n            'double': { regex: /^\"/, desc: 'double quoted' },\n            'single': { regex: /^'/, desc: 'single quoted' },\n            'quoted': { regex: /^['\"]/, desc: 'quoted' }\n        };\n        return formats.hasOwnProperty(o) ? formats[o] : undefined;\n    }\n};\n\nmodule.exports.lint = function (attr, opts) {\n    var format = opts[this.name],\n        issues = [];\n\n    var v = attr.rawValue;\n    if (v && !format.regex.test(v)) {\n        var msgData = {\n            attribute: attr.name,\n            format: format.desc\n        };\n        return new Issue('E005', attr.valueLineCol, msgData);\n    }\n\n    return [];\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/attr-req-value.js",
    "content": "var knife = require('../knife'),\n    Issue = require('../issue');\n\nmodule.exports = {\n    name: 'attr-req-value',\n    on: ['attr'],\n    desc: [\n'If set, attribute values cannot be empty.',\n'This does not disallow the value `\"\"`.',\n'',\n'Boolean attributes such as `hidden` and `checked` do not require values,',\n'but no attribute may have an equals sign but no value after it, like',\n'`<div class=></div>`, as this is invalid html.'\n].join('\\n')\n};\n\nmodule.exports.lint = function (attr, opts) {\n    var v = attr.rawEqValue;\n    if (v ? /^[^'\"]+=/.test(v) : !knife.isBooleanAttr(attr.name)) {\n        return new Issue('E006', attr.valueLineCol, {name: attr.name});\n    }\n\n    return [];\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/attr-validate.js",
    "content": "var Issue = require('../issue');\n\nmodule.exports = {\n    name: 'attr-validate',\n    on: ['tag'],\n    desc: 'If set, attributes in a tag must be well-formed.'\n};\n\nmodule.exports.lint = function (ele, opts) {\n    var attrRegex = /^\\s*([^ \"'>=\\^]+(\\s*=\\s*((\"[^\"]*\")|('[^']*')|([^ \\t\\n\"']+)))?\\s+)*$/,\n        open = ele.open.slice(ele.name.length).replace(/\\/$/,'');\n    return attrRegex.test(open + ' ') ? [] : new Issue('E049', ele.openLineCol);\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/attr.js",
    "content": "var knife = require('../knife');\n\nmodule.exports = {\n    name: 'attr',\n    on: ['tag']\n};\n\nmodule.exports.lint = function(element, opts) {\n    var subs = this.subscribers,\n        as = element.attribs,\n        issues = [];\n\n    Object.keys(as).forEach(function(name) {\n        var a = as[name];\n        a.name = name;\n\n        var matcher = knife.matchFilter.bind(knife, name);\n        var s = subs.filter(matcher);\n\n        issues = issues.concat(knife.applyRules(s, a, opts));\n    });\n\n    return issues;\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/class-no-dup.js",
    "content": "var Issue = require('../issue');\n\nmodule.exports = {\n    name: 'class-no-dup',\n    on: ['class'],\n    desc: 'If set, the same class name cannot be repeated within a `class` attribute.'\n};\n\nmodule.exports.lint = function (classes, opts) {\n    var issues = [];\n    classes = classes.sort();\n    for (var i = 0; i < classes.length - 1; i++) {\n        if (classes[i + 1] === classes[i]) {\n            issues.push(new Issue('E041', classes.lineCol,\n                                  { classes: classes[i] }));\n        }\n    }\n    return issues;\n}\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/class-style.js",
    "content": "var Issue = require('../issue'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'class-style',\n    on: ['class'],\n    desc: [\n'A format specifier, \"none\", or `false`. If set, `class`es must fit the',\n'given format. If `false`, the value for `id-class-style` is used',\n'instead (use `\\'none\\'` to avoid matching anything).',\n'',\n'Note that there is no symmetric `id-style` option. This maintains',\n'compatibility with older versions of htmllint and allows a user to set',\n'both `id` and `class` styles with a single option in the common case',\n'that they are the same. To use different styles, set the `class` style',\n'with `class-style` and the `id` style with `id-class-style`.'\n].join('\\n'),\n    process: function (o) {\n        return o === 'none'\n            ? { desc: 'none', test: function(s) { return true; } }\n            : proc.format(o);\n    }\n    // 'id-class-style'\n};\n\nmodule.exports.lint = function (classes, opts) {\n    var format = opts[this.name] || opts['id-class-style'],\n        ignore_class = classes.ignore_class;\n\n    return classes.filter(function(c, i) {\n        return !(ignore_class[i] || format.test(c));\n    }).map(function(c, i) {\n        return new Issue('E011', classes.lineCol,\n                         { attribute: 'class', format: format.desc, value: c });\n    });\n}\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/class.js",
    "content": "var Issue = require('../issue'),\n    knife = require('../knife');\n\nmodule.exports = {\n    name: 'class',\n    on: ['attr'],\n    filter: ['class']\n    // 'id-class-ignore-regex' (non-dependent)\n};\n\nmodule.exports.lint = function (attr, opts) {\n    var nodup = opts['class-no-dup'];\n\n    var issues = [];\n    var v = attr.value.trim();\n\n    var ignore = opts['id-class-ignore-regex'];\n    var classes = [];\n    // Parallel to classes; which classes are ignored\n    var ignore_class = false;\n    if (ignore) {\n        var res;\n        var start = 0;\n        ignore_class = [false];\n        while (start < v.length && (res = ignore.exec(v)) !== null) {\n            if (res[1] === undefined) {\n                classes.push(v.slice(start, res.index));\n                start = ignore.lastIndex;\n                ignore_class.push(false);\n            } else {\n                ignore_class[ignore_class.length - 1] = true;\n            }\n        }\n        ignore_class.pop();\n    } else {\n        classes = v.split(/\\s+/);\n    }\n\n    classes.ignore_class = ignore_class;\n    classes.lineCol = attr.valueLineCol;\n    classes.all = v;\n    return knife.applyRules(this.subscribers, classes, opts);\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/component-attr-check.js",
    "content": "var knife = require('../knife');\nvar Issue = require('../issue');\nvar proc = require('../process_option');\n\nmodule.exports = {\n  name: 'component-attr-check',\n  on: ['tag'],\n  options: [{\n    name: 'component-event-regex',\n    desc: 'If set, tag\\'s attributes that match this regex will be considered as an evnet listener.',\n    process: proc.regex\n  }, {\n    name: 'component-prop-regex',\n    desc: 'If set, tag\\'s attributes that match this regex will be recognized as a component\\'s property.',\n    process: proc.regex\n  }, {\n    name: 'component-allow-attr',\n    desc: 'A configuration object that holds all the components\\' information of properties and events. All tags that are list in this object will go through this ruler.',\n    process: proc.object\n  }]\n};\n\nfunction toCamelcase(str = '') {\n  return (typeof str === 'string') ? str.split('-').map((seg, index) => {\n    return index != 0 ? seg[0].toUpperCase() + seg.substring(1) : seg;\n  })\n    .join('') : '';\n}\n\nfunction toDash(str = '') {\n  return (typeof str === 'string') ? str.replace(/([A-Z])/g, (match, caps) => {\n    return '-' + caps.toLowerCase();\n  }) : '';\n}\n\nfunction getRegExecRes(reg, str) {\n  let res = str;\n  if (reg && reg.exec(str)) {\n    res = reg.exec(str)[1];\n  }\n  return res;\n}\n\nmodule.exports.lint = function (element, opts) {\n  let components = opts['component-allow-attr'];\n  let propRegex = opts['component-prop-regex'];\n  let eventRegex = opts['component-event-regex'];\n  let issueAttrs = [];\n  let issues = [];\n\n  if (components && components[element.name] && element.attribs) {\n\n    let matchComponent = components[element.name];\n    let propNames = matchComponent.props.map((prop) => prop.name);\n    let requiredProps = matchComponent.props.filter((node) => node.required).map((node) => node.name);\n    let events = matchComponent.events.map((method) => method.name);\n\n    Object.entries(element.attribs).filter((attrib) => {     \n      // verify events\n      if (eventRegex && eventRegex.test(attrib[0])) {\n        let eventName = eventRegex.exec(attrib[0])[1];\n        if (knife.isCommonEvent(eventName)) {\n          return false;\n        }\n        return !~events.indexOf(eventName);\n      }      \n\n      if (!eventRegex && events.indexOf(attrib[0]) > -1) {\n        return false;\n      }\n\n      // verify normal attributes\n      let attribProp = attrib[0];\n\n      if (propRegex && propRegex.test(attribProp)) {\n        attribProp = propRegex.exec(attribProp)[1];\n      }\n\n      if (knife.isCommonAttr(attribProp) || knife.isCmlDirective(attribProp)) {\n        return false;\n      }\n\n      if (propNames.indexOf(toCamelcase(attribProp)) > -1) {\n        return false;\n      } \n\n      return true;\n    })\n    .forEach(attrib => {\n      issueAttrs.push({\n        ...attrib[1],\n        _isEvent: eventRegex.test(attrib[0])\n      });\n    });\n\n    if (requiredProps.length) {\n      let attrKeys = Object.keys(element.attribs); \n      attrKeys = attrKeys.map(attr => {\n        if (propRegex && propRegex.exec(attr))  {\n          return propRegex.exec(attr)[1];\n        } else {\n          return attr;\n        }\n      });\n      requiredProps.forEach((propName) => {\n        if (!~attrKeys.indexOf(toDash(propName))) {\n          issues.push(new Issue('E073', element.openLineCol, {\n            element: element.name,\n            prop: toDash(propName)\n          }));\n        }\n      });\n    }\n  }\n\n  issues = issues.concat(issueAttrs ? issueAttrs.map((issueAttr) => {\n    let propName = issueAttr._isEvent ? (eventRegex ? getRegExecRes(eventRegex, issueAttr.name) : issueAttr.name) : (propRegex ? getRegExecRes(propRegex, issueAttr.name) : issueAttr.name);\n    return new Issue(issueAttr._isEvent ? 'E064' : 'E063', issueAttr.nameLineCol.map((lineCol) => {\n      lineCol[1] = issueAttr.name.indexOf(propName) + 1;\n      return lineCol;\n    }), {\n      name: element.name,\n      prop: propName\n    })\n  }) : []);\n\n  return issues;\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/directive-cml-valid-value.js",
    "content": "var Issue = require('../issue'),\n    knife = require('../knife'),\n    proc = require('../process_option');\n\nmodule.exports = {\n  name: 'directive-cml-valid-value',\n  on: ['directive-cml'],\n  filter: ['is', 'c-if', 'c-else-if', 'c-for', 'c-model', 'c-text', 'c-show', 'c-animation'],\n  options: [{\n    name: 'cml-valid-value-regex',\n    desc: 'If set, all diretives that can have values will be checked.',\n    process: proc.regex\n  }]\n}\n\nmodule.exports.lint = function(attr, opts) {\n  if(opts['cml-valid-value-regex']) {\n    return opts['cml-valid-value-regex'].test(attr.value) ? [] : new Issue('E072', attr.valueLineCol, {\n      name: attr.name,\n      lang: opts['template-lang']\n    });\n  }\n  return [];\n}\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/directive-cml.js",
    "content": "var knife = require('../knife'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'directive-cml',\n    on: ['tag'],\n    options: [{\n      name: 'cml-directives',\n      desc: 'This option holds all the directives that Chameleon framework has.',\n      process: proc.arrayOfStr\n    }]\n};\n\nmodule.exports.lint = function(element, opts) {\n    var subs = this.subscribers,\n        as = element.attribs,\n        issues = [];\n\n    Object.keys(as).filter(function(name) {\n      return ~opts['cml-directives'].indexOf(name);\n    }).forEach(function(name) {\n        var a = as[name];\n        a.name = name;\n\n        var matcher = knife.matchFilter.bind(knife, name);\n        var s = subs.filter(matcher);\n\n        issues = issues.concat(knife.applyRules(s, a, opts));\n    });\n\n    return issues;\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/directive-name-forbiden.js",
    "content": "var Issue = require('../issue'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'directive-name-forbiden',\n    on: ['attr'],\n    options: [{\n        name: 'directive-name-forbidden-regex',\n        desc: [\n'A format specifier, or `false`.',\n'If set, attribute names match the given format is disallowed.'\n].join('\\n'),\n        process: proc.regex\n    }]\n};\n\nmodule.exports.lint = function (attr, opts) {\n    let format = opts['directive-name-forbidden-regex'];\n    if (format && format.test(attr.name)) {\n        let directive =  format.exec(attr.name);\n        return new Issue('E062', attr.nameLineCol, { attribute: directive[1], lang: opts['template-lang'] });\n    }\n    return [];\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/doctype-first.js",
    "content": "var Issue = require('../issue'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'doctype-first',\n    on: ['dom'],\n    desc: [\n'* `true`: The doctype (`<!DOCTYPE ... >`) must be the first element in',\n'    the file, excluding comments and whitespace.',\n'* \"smart\": If a `head` tag is present in the document, then the doctype',\n'    must come first.',\n'* `false`: No restriction.'\n].join('\\n'),\n    process: proc.boolPlus('smart'),\n\n    passedFirst: false\n};\n\nmodule.exports.end = function () {\n    this.passedFirst = false;\n};\n\nmodule.exports.lint = function (element, opts) {\n    var option = opts[this.name];\n\n    if (this.passedFirst ||\n        element.type === 'comment' || isWhitespace(element)) {\n        return [];\n    }\n    this.passedFirst = true;\n\n    if (element.type === 'directive' &&\n        element.name.toUpperCase() === '!DOCTYPE') {\n        return [];\n    }\n\n    // If the option is 'smart', fail only if a head tag is present.\n    if (option === 'smart' &&\n        !(element.type === 'tag' &&\n          element.name.toLowerCase() === 'head')) {\n        return [];\n    }\n\n    return new Issue('E007', element.openLineCol || element.lineCol);\n};\n\nfunction isWhitespace(element) {\n    return element.type === 'text' && /^[ \\t\\n\\f\\r]*$/.test(element.data);\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/doctype-html5.js",
    "content": "var Issue = require('../issue');\n\nmodule.exports = {\n    name: 'doctype-html5',\n    on: ['dom'],\n    filter: ['directive'],\n    desc: 'If set, the doctype element must specify html5.'\n};\n\nmodule.exports.lint = function (ele, opts) {\n    // NOTE: this does not support legacy strings or obsolete permitted doctypes\n    var doctype = /^!DOCTYPE[ \\t\\n\\f]+html[ \\t\\n\\f]*$/i;\n    var name = /!doctype/i;\n\n    return name.test(ele.name) && !(ele.data && doctype.test(ele.data))\n        ? new Issue('E008', ele.lineCol)\n        : [];\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/dom.js",
    "content": "var lodash = require('lodash'),\n    knife = require('../knife');\n\nmodule.exports = {\n    name: 'dom'\n};\n\nmodule.exports.lint = function(dom, opts, inlineConfigs) {\n    var subs = this.subscribers;\n\n    /*\n     * Reset our inline configuration object to be what opts is.\n     * Does a deep copy so as to not change opts in the future.\n     */\n    inlineConfigs.reset(opts);\n\n    var getIssues = function (element) {\n        var matcher = knife.matchFilter.bind(knife, element.type);\n\n        // fast-forwards inlineConfig.current to whatever it should be at this index.\n        inlineConfigs.getOptsAtIndex(element.index);\n\n        var s = subs.filter(matcher);\n        var ret = knife.applyRules(s, element, inlineConfigs.current);\n\n        if (element.children && element.children.length > 0) {\n            element.children.forEach(function (child) {\n                ret = ret.concat(getIssues(child));\n            });\n        }\n        return ret;\n    };\n\n    var issues = dom.length ? dom.map(getIssues) : [];\n    return lodash.flattenDeep(issues);\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/fig-req-figcaption.js",
    "content": "var Issue = require('../issue');\n\nmodule.exports = {\n    name: 'fig-req-figcaption',\n    on: ['tag'],\n    filter: ['figure', 'figcaption'],\n    desc: [\n'If set, each `figure` tab must contain a `figcaption` child and each',\n'`figcaption` tag\\'s parent must be a `figure`.'\n].join('\\n')\n};\n\nmodule.exports.lint = function (ele, opts) {\n    if (ele.name === 'figure') {\n        // get the children of this figure\n        var children = ele.children;\n\n        // check for a figcaption element\n        for (var i = 0; i < children.length; i++) {\n            if (children[i].name === 'figcaption') {\n                return [];\n            }\n        }\n    } else { // ele.name === 'figcaption'\n        if (ele.parent && ele.parent.name === 'figure'){\n            return [];\n        }\n    }\n    //return an issue\n    return new Issue('E032', ele.openLineCol);\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/focusable-tabindex-style.js",
    "content": "var Issue = require('../issue');\n\nmodule.exports = {\n    name: 'focusable-tabindex-style',\n    on: ['tag'],\n    filter: ['a', 'area', 'button', 'input', 'img', 'select', 'textarea'],\n    desc: [\n'If set, all focusable elements',\n'(`a`, `area`, `button`, `input`, `img`, `select`, `textarea`)',\n'must have a positive `tabindex` attribute, if any.',\n'',\n'Reasoning: [IITAA, 10.3 and 10.4](http://www.dhs.state.il.us/IITAA/IITAAWebImplementationGuidelines.html)'\n].join('\\n'),\n\n    detectedStyle: null\n};\n\nmodule.exports.end = function () {\n    this.detectedStyle = null;\n};\n\nmodule.exports.lint = function (element, opts) {\n    if (this.isDisabled(element)) {\n        return [];\n    }\n\n    var tabIndexStyle = this.getTabIndexStyle(element);\n\n    if (this.detectedStyle !== null &&\n        this.detectedStyle !== tabIndexStyle) {\n\n        var msg = tabIndexStyle ? 'remove the tabindex'\n                                : 'add a positive tabindex';\n        return new Issue('E026', element.openLineCol, {op: msg});\n    }\n\n    this.detectedStyle = tabIndexStyle;\n    return [];\n};\n\nmodule.exports.isDisabled = function (element) {\n    return element.attribs && element.attribs.hasOwnProperty('disabled');\n};\n\nmodule.exports.getTabIndexStyle = function (element) {\n    var a = element.attribs;\n\n    if (a && a.hasOwnProperty('tabindex') && typeof a !== 'undefined') {\n        return a.tabindex.value > 0;\n    }\n\n    return false;\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/free-options.js",
    "content": "/*\n * Some options are used directly by the linter and do not control any\n * rules. Since we still want to process the values for these options\n * and generate documentation for them, we use a dummy rule which is\n * never called to contain them. It will be imported with the other\n * rules.\n */\nvar lodash = require('lodash'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'free-options',\n    options: [{\n        name: 'maxerr',\n        desc: [\n'A nonnegative integer, or `false`. If it is a positive integer, limit',\n'output to at most that many issues.'\n].join('\\n'),\n        process: function (i) {\n            return lodash.isInteger(i) ? (i > 0 && i) : undefined;\n        }\n    }, {\n        name: 'raw-ignore-regex',\n        desc: [\n'A string giving a regular expression, a RegExp object, or `false`. If',\n'set, text matching the given regular expression is removed before any',\n'parsing or linting occurs.',\n'This option cannot be configured in-line, but it can be set to a value',\n'such as `/\\\\<\\\\!-- htmllint ignore --\\\\>[^]*?\\\\<\\\\!-- htmllint unignore --\\\\>/`',\n'to allow some control using comment tags.'\n].join('\\n'),\n        process: proc.regexGlobal\n    }]\n};\n\nmodule.exports.options.forEach(function (option) { option.rules = []; });\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/head-req-title.js",
    "content": "var Issue = require('../issue');\n\nmodule.exports = {\n    name: 'head-req-title',\n    on: ['title'],\n    desc: 'If set, any `head` tag in the page must contain a non-empty `title` tag.'\n};\n\nmodule.exports.lint = function (titles, opts) {\n    return titles.some(function(t) { return t.children.length > 0; })\n        ? []\n        : new Issue('E027', titles.head.openLineCol);\n}\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/head-valid-content-model.js",
    "content": "var Issue = require('../issue');\n\nmodule.exports = {\n    name: 'head-valid-content-model',\n    on: ['tag'],\n    filter: ['head'],\n    desc: [\n'If set, the content-model of the HEAD element will be enforced:',\n'only `base`, `link`, `meta`, `noscript`, `script`, `style`, `template`,',\n'and `title` tags are legal children.'\n].join('\\n')\n};\n\nmodule.exports.lint = function (elt, opts) {\n    var legal_children = ['base', 'link', 'meta', 'noscript', 'script', 'style', 'template', 'title'];\n\n    return elt.children.filter(function (e) {\n        return e.type === 'tag' && legal_children.indexOf(e.name) < 0;\n    }).map(function(e) {\n        return new Issue('E047', e.openLineCol);\n    });\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/href-style.js",
    "content": "var Issue = require('../issue'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'href-style',\n    on: ['tag'],\n    filter: ['a'],\n    desc: [\n'* \"absolute\": All `href` tags must use absolute URLs.',\n'* \"relative\": All `href` tags must use relative URLs.',\n'* `false`: No restriction.'\n].join('\\n'),\n    process: proc.options(['absolute', 'relative'])\n};\n\nmodule.exports.lint = function (element, opts) {\n    var format = opts[this.name],\n        attr = element.attribs;\n\n    // Should return an issue, since a without href is bad\n    if (!attr.hasOwnProperty('href')) {\n        return [];\n    }\n\n    // Link must be absolute iff specified format is absolute\n    var isAbsolute = attr.href.value.search('://') !== -1;\n    return (isAbsolute === (format === 'absolute'))\n        ? []\n        : new Issue('E009', element.openLineCol, { format: format });\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/html-valid-content-model.js",
    "content": "var Issue = require('../issue');\n\nmodule.exports = {\n    name: 'html-valid-content-model',\n    on: ['tag'],\n    filter: ['html'],\n    desc: [\n'If set, the content-model of the `html` element will be enforced:',\n'at most one `head` and one `body` tag may appear, in that order.',\n'No other tags are allowed.'\n].join('\\n')\n};\n\nmodule.exports.lint = function (elt, opts) {\n    var output = [],\n        has_head = false,\n        has_body = false;\n\n    elt.children.forEach(function (e) {\n        if (e.type !== 'tag') {\n            return;\n        }\n        // E044: Illegal element\n        // E045: Duplicated tag\n        // E046: Head and body tags out of order\n        var err;\n        if (e.name === 'head') {\n            err = has_body ? 'E046' : has_head ? 'E045' : false;\n            has_head = true;\n        } else if (e.name === 'body') {\n            err = has_body ? 'E045' : false;\n            has_body = true;\n        } else {\n            err = 'E044';\n        }\n        if (err) {\n            output.push(new Issue(err, e.openLineCol));\n        }\n    });\n\n    return output;\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/id-class-no-ad.js",
    "content": "var knife = require('../knife'),\n    Issue = require('../issue');\n\nmodule.exports = {\n    name: 'id-class-no-ad',\n    on: ['attr'],\n    filter: ['id', 'class'],\n    desc: [\n'If set, values for the `id` and `class` attributes may not use the word',\n'\"ad\", \"banner\", or \"social\".',\n'This rule only bans those words when not adjacent to other alphanumeric',\n'characters. Thus words like \"gradient\" are still allowed.'\n].join('\\n')\n};\n\nmodule.exports.lint = function (attr, opts) {\n    var regex = /(^|[^a-zA-Z0-9])(ad|banner|social)(?![a-zA-Z0-9])/;\n    var match = regex.exec(attr.value);\n    if (!match) { return []; }\n    var ind = match.index + match[1].length,\n        lc = knife.getLineColFunc(attr.value, attr.valueLineCol)(ind);\n    return new Issue('E010', lc, { word: match[2] });\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/id-no-dup.js",
    "content": "var Issue = require('../issue');\n\nmodule.exports = {\n    name: 'id-no-dup',\n    table: {},\n    on: ['tag'],\n    desc: 'If set, values for the `id` attribute may not be duplicated across elements.'\n};\n\nmodule.exports.end = function () {\n    // wipe previous table\n    this.table = {};\n};\n\nmodule.exports.lint = function (element, opts) {\n    // don't process the element if it doesn't have an id\n    if (!element.attribs.hasOwnProperty('id')) {\n        return [];\n    }\n\n    var id = element.attribs.id;\n\n    // if we haven't seen the id before, remember it\n    // and pass the element\n    if (!this.table.hasOwnProperty(id.value)) {\n        this.table[id.value] = element;\n        return [];\n    }\n\n    // element has a duplicate id\n    return new Issue('E012', id.valueLineCol, { id: id.value });\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/id-style.js",
    "content": "var lodash = require('lodash'),\n    Issue = require('../issue'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'id-style',\n    on: ['attr'],\n    filter: ['id'],\n    options: [{\n        name: 'id-class-style',\n        desc: [\n'A format specifier, or `false`. If set, `id`s and `class`es must fit the',\n'given format. May be overridden by `class-style` for `class`es.'\n].join('\\n'),\n        process: proc.format,\n        rules: ['class-style', 'id-style']\n    }, {\n        name: 'id-class-ignore-regex',\n        desc: [\n'The value is either a string giving a regular expression or `false`. If',\n'set, `id`s and `class`es matching the given regular expression are ignored',\n'for the `id-class-style` rule. For example, excluding `{{...}}` classes',\n'used by Angular and other templating methods can be done with the regex',\n'`{{.*?}}`.'\n].join('\\n'),\n        process: function (ignore) {\n            return ignore && lodash.isString(ignore)\n                ? new RegExp('(' + ignore + ')|\\\\s*$|\\\\s+', 'g')\n                : undefined;\n        },\n        rules: [] // 'class', 'id-style'\n    }]\n};\n\nmodule.exports.lint = function (attr, opts) {\n    var format = opts['id-class-style'],\n        ignore = opts['id-class-ignore-regex'],\n        v = attr.value;\n\n    return (ignore && ignore.test(v)) || format.test(v)\n        ? []\n        : new Issue('E011', attr.valueLineCol, { attribute: 'id', format: format.desc, value: v });\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/img-req-alt.js",
    "content": "var knife = require('../knife'),\n    Issue = require('../issue'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'img-req-alt',\n    on: ['tag'],\n    filter: ['img'],\n    desc: [\n'* `true`: Each `img` tag must have a non-empty `alt` property.',\n'* \"allownull\": Each `img` tag must have an `alt` property with a value,',\n'    but value may be null (equal to `\"\"`).',\n'* `false`: No restriction.'\n].join('\\n'),\n    process: proc.boolPlus('allownull')\n};\n\nmodule.exports.lint = function (element, opts) {\n    var opt = opts[this.name];\n    if (knife.hasNonEmptyAttr(element, 'alt', opt === 'allownull')) {\n        return [];\n    }\n\n    return new Issue('E013', element.openLineCol);\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/img-req-src.js",
    "content": "var knife = require('../knife'),\n    Issue = require('../issue');\n\nmodule.exports = {\n    name: 'img-req-src',\n    on: ['tag'],\n    filter: ['img'],\n    desc: 'If set, a source must be given for each `img` tag.'\n};\n\nmodule.exports.lint = function (element, opts) {\n    return knife.hasNonEmptyAttr(element, 'src')\n        ? []\n        : new Issue('E014', element.openLineCol);\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/indent-style.js",
    "content": "var Issue = require('../issue'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'indent-style',\n    on: ['line'],\n    options: [{\n        desc: [\n'* \"tabs\": Only tabs may be used for indentation.',\n'* \"spaces\": Only spaces may be used for indentation.',\n'* \"nonmixed\": Either tabs or spaces may be used, but not both',\n'    in the same file.',\n'* `false`: No restriction.'\n].join('\\n'),\n        process: proc.options(['tabs', 'spaces', 'nonmixed'])\n    }, {\n        name: 'indent-width',\n        desc: [\n'The value of this option is either `false` or a positive integer. If it',\n'is a number and spaces are used for indentation, then spaces used to',\n'indent must come in multiples of that number.'\n].join('\\n'),\n        process: proc.posInt,\n    }, {\n        name: 'indent-width-cont',\n        desc: [\n'If set, ignore `indent-width` for lines whose first non-whitespace',\n'character is not `<`. This is known as continuation indent because it',\n'enables the user to continue tags onto multiple lines while aligning the',\n'attribute names.'\n].join('\\n'),\n        process: proc.bool,\n    }, {\n        name: 'indent-delta',\n        desc: [\n'If set, check wether or not two consecutive lines have an indentation delta',\n'in the range [-1, 1].'\n].join('\\n'),\n        process: proc.bool,\n    }]\n};\n\nmodule.exports.end = function () {\n    delete this.current;\n};\n\nvar previousLineIndentCount = 0;\n\nmodule.exports.lint = function (line, opts) {\n    // The indent, that is, the whitespace characters before the first\n    // non-whitespace character.\n    var matches = /[^ \\t]/.exec(line.line);\n    var sliceEnd = matches !== null ? matches.index : line.line.length;\n    var indent = line.line.slice(0, sliceEnd);\n\n    // Ignore empty lines\n    if (/^[\\n\\r]*$/.test(line.line)) {\n        return [];\n    }\n\n    var output = [];\n\n    var width = opts['indent-width'];\n    var deltaEnabled = opts['indent-delta'];\n\n    if (deltaEnabled) {\n        var currentLineIndentCount = 0,\n            l = 0;\n        if (width <= 1) {\n            currentLineIndentCount = indent.length;\n        } else {\n            for (var i = 0; i < indent.length; i++) {\n                if (indent[i] === '\\t' || ++l === width) {\n                    currentLineIndentCount++;\n                    l = 0;\n                }\n            }\n        }\n        var expectedMin = Math.max(previousLineIndentCount - 1, 0);\n        var expectedMax = previousLineIndentCount + 1;\n        if ( !(expectedMin <= currentLineIndentCount && currentLineIndentCount <= expectedMax) ) {\n            output.push(new Issue(\n                'E056',\n                [line.row],\n                {\n                    expectedMin: expectedMin,\n                    expectedMax: expectedMax,\n                    value: currentLineIndentCount,\n                }\n            ));\n        }\n        previousLineIndentCount = currentLineIndentCount;\n    }\n\n    // if there are no tabs or spaces on this line, don't bother\n    if (indent.length === 0) {\n        return output;\n    }\n\n    var cont = opts['indent-width-cont']\n            && !/[\\r\\n<]/.test(line.line[indent.length]);\n\n    if (width && !cont) {\n        var i, l = 0;\n        for (i = 0; i < indent.length; i++) {\n            var c = indent[i];\n            if (c === ' ') {\n                l++;\n            } else {\n                if (l % width !== 0) { break; }\n                l = 0;\n            }\n        }\n\n        if (l % width !== 0) {\n            output.push(new Issue('E036', [line.row, i - l + 1],\n                                    { width: width }));\n        }\n    }\n\n    var format = opts['indent-style'];\n    if (format) {\n        var space = / /.test(indent);\n        var tab  = /\\t/.test(indent);\n\n        if (!this.current) {\n            this.current = space ? 'spaces' : 'tabs';\n        }\n\n        // true if we require spaces, false if we require tabs\n        var type = ((format === 'spaces') ||\n                    (format === 'nonmixed' && this.current === 'spaces'));\n        var error = type ? tab : cont ? / \\t/.test(indent) : space;\n\n        if (error) {\n            output.push(new Issue('E024', [line.row, error.index + 1],\n                                    { type: type ? 'Tabs' : 'Spaces' }));\n        }\n    }\n\n    return output;\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/index.js",
    "content": "// Export an array of all rules.\n\nvar bulk = require('bulk-require');\n\n// All modules in this directory excluding this file\nvar rulesExport = bulk(__dirname, '!(index).js');\n\nmodule.exports = Object.values(rulesExport);\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/input-radio-req-name.js",
    "content": "var knife = require('../knife'),\n    Issue = require('../issue');\n\nmodule.exports = {\n    name: 'input-radio-req-name',\n    on: ['tag'],\n    filter: ['input'],\n    desc: 'If set, each radio-type input must have a nonempty name attribute.'\n};\n\nmodule.exports.lint = function (element, opts) {\n    // if it's not a radio-type input, ignore it\n    var a = element.attribs;\n    if (!(a.type && a.type.value === 'radio')) {\n        return [];\n    }\n\n    if (knife.hasNonEmptyAttr(element, 'name')) {\n        return [];\n    }\n\n    return new Issue('E034', element.openLineCol);\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/input-req-label.js",
    "content": "var Issue = require('../issue');\n\nmodule.exports = {\n    name: 'input-req-label',\n    on: ['tag'],\n    filter: ['input', 'label'],\n    desc: [\n'If set, each text or radio input element must have an associated `label`',\n'element. The label may be a parent of the input element, or may identify',\n'the element it labels using its `for` attribute, which must match the',\n'input\\'s `id` (or `name`, for text inputs) attribute.'\n].join('\\n'),\n\n    labels: {},\n    inputsInfo: []\n};\n\nmodule.exports.end = function () {\n    var issues = [];\n    this.inputsInfo.forEach(function (input) {\n        if (!this.labels[input.id] && !this.labels[input.name]) {\n            issues.push(new Issue('E033', input.location, {\n                'idValue': input.id,\n                'nameValue': input.name\n            }));\n        }\n    }.bind(this));\n\n    // wipe previous table\n    this.labels = {};\n    this.inputsInfo = [];\n\n    return issues;\n};\n\nmodule.exports.lint = function (element, opts) {\n    var attrs = element.attribs;\n    function getAttrVal(name) {\n        return attrs.hasOwnProperty(name) && attrs[name]\n            ? attrs[name].value\n            : null;\n    }\n\n    // if it's a label with a 'for', store that value\n    if (element.name === 'label') {\n        var f = getAttrVal('for');\n        if (f) { this.labels[f] = element; }\n        return [];\n    }\n\n    // if it's not a text-type input, ignore it\n    var type = getAttrVal('type');\n    if (type !== 'text' && type !== 'radio') {\n        return [];\n    }\n\n    // check if the input has a label as a parent.\n    for (var e = element; e = e.parent; ) {\n        if (e.name === 'label') {\n            return [];\n        }\n    }\n\n    // check if the input has a named label, by storing the values to\n    // check at the end.\n    var id = getAttrVal('id');\n    var name = type === 'text' ? getAttrVal('name') : null;\n    if (id || name) {\n        this.inputsInfo.push({\n            'id': id,\n            'name': name,\n            'location': element.openLineCol\n        });\n    } else {\n        return new Issue('E033', element.openLineCol, {\n            'idValue': 'null',\n            'nameValue': 'null'\n        });\n    }\n\n    return [];\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/label-req-for.js",
    "content": "var lodash = require('lodash');\nvar knife = require('../knife'),\n    Issue = require('../issue'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'label-req-for',\n    filter: ['label'],\n    on: ['tag'],\n    desc: [\n'If set, each `label` tab must have a `for` attribute.',\n'This practice helps screen readers, and improves form element selection',\n'by allowing the user to focus an input by clicking on the label.',\n'',\n'See [MDN: label element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label)',\n'and [MDN: How to structure an HTML form](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Forms/How_to_structure_an_HTML_form).'\n].join('\\n'),\n    process: proc.boolPlus('strict'),\n\n    idmap: null\n};\n\nmodule.exports.end = function () {\n    this.idmap = null;\n};\n\nmodule.exports.lint = function (ele, opts) {\n    // whether or not all labels MUST have a for attr,\n    // regardless of whether the label has children\n    var strict = (opts[this.name] === 'strict'),\n        hasFor = ele.attribs.hasOwnProperty('for');\n\n    if (strict && !hasFor) {\n        return new Issue('E019', ele.openLineCol);\n    } else if (!strict && !hasFor && !this.hasValidChild(ele)) {\n        return new Issue('E020', ele.openLineCol);\n    }\n\n    if (hasFor) {\n        if (!this.idmap) {\n            this.buildIdMap(ele);\n        }\n\n        var id = ele.attribs['for'].value,\n            forElement = this.idmap[id];\n\n        if (!forElement) {\n            // the paired element does not exist\n            return new Issue('E021', ele.openLineCol, { id: id });\n        } else if (!knife.isLabeable(forElement)) {\n            return new Issue('E022', ele.openLineCol, { id: id });\n        }\n    }\n\n    return [];\n};\n\nmodule.exports.buildIdMap = function (originElement) {\n    var rElem = originElement;\n    while (rElem.parent !== null) {\n        rElem = rElem.parent;\n    }\n    while (rElem.prev !== null) {\n        rElem = rElem.prev;\n    }\n\n    var roots = [];\n    while (rElem !== null) {\n        roots.push(rElem);\n        rElem = rElem.next;\n    }\n\n    var idmap = {};\n\n    roots.forEach(function iterateElements(element) {\n        if (element.attribs && element.attribs.id) {\n            var id = element.attribs.id.value;\n\n            if (!idmap.hasOwnProperty(id)) {\n                idmap[id] = element;\n            }\n        }\n\n        if (element.children) {\n            element.children.forEach(iterateElements);\n        }\n    });\n\n    this.idmap = idmap;\n};\n\nmodule.exports.hasValidChild = function (ele) {\n    // test for any element to be labeable\n    return lodash.some(ele.children, knife.isLabeable);\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/lang.js",
    "content": "var Issue = require('../issue'),\n    knife = require('../knife'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'lang',\n    on: ['tag'],\n    filter: ['html'],\n    options: [{\n        name: 'lang-style',\n        desc: [\n'If set, the lang tag must have a valid form (`xx-YY`, where `xx` is a',\n'valid language code and `YY` is a valid country code). If the value is',\n'equal to \"case\", the tag must be capitalized conventionally (with the',\n'language code lowercase and the country code uppercase).'\n].join('\\n'),\n        process: proc.boolPlus('case')\n    }, {\n        name: 'html-req-lang',\n        desc: 'If set, each `html` tag must have a `lang` attribute.',\n        process: proc.bool\n    }]\n};\n\nmodule.exports.lint = function (element, opts) {\n    var a = element.attribs;\n    if (a && a.hasOwnProperty('lang')) {\n        var l = a.lang.value;\n        if (opts['lang-style']) {\n            var valid = knife.checkLangTag(l);\n            if (valid === 1) {\n                return new Issue('E038', a.lang.valueLineCol, {lang:l});\n            }\n            if (opts['lang-style'] === 'case' && valid === 2) {\n                return new Issue('E039', a.lang.valueLineCol, {lang:l});\n            }\n        }\n        return [];\n    }\n\n    return opts['html-req-lang'] ?\n        new Issue('E025', element.openLineCol) : [];\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/line-end-style.js",
    "content": "var Issue = require('../issue');\n\nmodule.exports = {\n    name: 'line-end-style',\n    on: ['line'],\n    options: [{\n        desc: [\n'Line endings must conform to the given style.',\n'* \"lf\": Unix style, ending in LF.',\n'* \"crlf\": Windows style, ending in CRLF.',\n'* \"cr\": Ending in CR.',\n'* `false`: No restriction.'\n].join('\\n'),\n        process: function (name) {\n            var regex = {\n                cr:   /(^|[^\\n\\r])\\r$/,\n                lf:   /(^|[^\\n\\r])\\n$/,\n                crlf: /(^|[^\\n\\r])\\r\\n$/\n            }[name];\n            return regex ? { regex: regex, name: name } : undefined;\n        }\n    }]\n};\n\nmodule.exports.lint = function (line, opts) {\n    var format = opts[this.name];\n\n    if (format.regex.test(line.line)) {\n        return [];\n    }\n\n    var len = line.line.length,\n        pos = [line.row, len];\n\n    if (line.line[len - 2] === '\\r') {\n        pos[1] -= 1;\n    }\n\n    return new Issue('E015', pos, { format: format.name });\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/line-max-len.js",
    "content": "var Issue = require('../issue'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'line-max-len',\n    on: ['line'],\n    options: [{\n        desc: [\n'The value of this option is either `false` or a positive integer. If it',\n'is a number, the length of each line must not exceed that number.'\n].join('\\n'),\n        process: proc.posInt\n    }, {\n        name: 'line-max-len-ignore-regex',\n        desc: [\n'A string giving a regular expression, a RegExp object, or `false`. If',\n'set, lines with names matching the given regular expression are ignored',\n'for the `line-length` rule. For example, lines with long `href` attributes',\n'can be excluded with regex `href`.'\n].join('\\n'),\n        process: proc.regex,\n        rules: []\n    }]\n};\n\nmodule.exports.lint = function (line, opts) {\n    var maxLength = opts[this.name],\n        ignoreRegExp = opts[this.name + '-ignore-regex'];\n\n    var lineText = line.line.replace(/(\\r\\n|\\n|\\r)$/, '');\n\n    if (ignoreRegExp && ignoreRegExp.test(lineText)) {\n        return [];\n    }\n\n    var len = lineText.length;\n\n    return len > maxLength\n        ? new Issue('E040', [line.row, len],\n                    { maxlength: maxLength, length: len })\n        : [];\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/line-no-trailing-whitespace.js",
    "content": "var Issue = require('../issue');\n\nmodule.exports = {\n    name: 'line-no-trailing-whitespace',\n    on: ['line'],\n    desc: 'If set, lines may not end with whitespace characters.'\n};\n\nmodule.exports.lint = function (line, opts) {\n    var i = line.line.search(/[^\\S\\n\\r]+[\\n\\r]*$/);\n    return i === -1 ? [] : new Issue('E055', [line.row, i]);\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/line.js",
    "content": "var lodash = require('lodash'),\n    knife = require('../knife');\n\nmodule.exports = {\n    name: 'line'\n};\n\nmodule.exports.lint = function(lines, opts, inlineConfigs) {\n    lines[0] = '';\n    var subs = this.subscribers;\n    // use the opts as our base, and build from them.\n    inlineConfigs.reset(opts);\n    return lodash.flattenDeep(lines.map(function (line, index) {\n        /*\n         * Right now, if the config is on a line, that whole line is\n         * given the new configuration. This is not great in theory,\n         * but in practice line rules don't really need the split.\n         */\n        inlineConfigs.getOptsAtIndex(line.index);\n\n        if (index === 0) { return []; }\n        return knife.applyRules(subs, line, inlineConfigs.current);\n    }));\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/link-req-noopener.js",
    "content": "var knife = require('../knife'),\n    Issue = require('../issue'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'link-req-noopener',\n    on: ['tag'],\n    filter: ['a'],\n    desc: [\n'If set, each `a` tag with `target=\"_blank\"` must have a',\n'`rel=\"noopener\"` or `rel=\"noreferrer\"` attribute.'\n].join('\\n'),\n};\n\n\nmodule.exports.lint = function (element, opts) {\n    function getVal(a, value) {\n        return a && a.value && a.value;\n    }\n\n    var noopen = ['noopener', 'noreferrer'];\n\n    var attrs = element.attribs;\n    if (getVal(attrs.target) === '_blank' &&\n        noopen.indexOf(getVal(attrs.rel)) === -1) {\n        return new Issue('E058', element.openLineCol);\n    }\n    return [];\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/origin-tag-forbidden-directive.js",
    "content": "var Issue = require('../issue'),\n    tools = require('../tools'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'origin-tag-forbidden-directive',\n    on: ['origin-tag'],\n    options: [{\n        name: 'origin-tag-forbiden-directive-regex',\n        desc: 'If set, all directives that match this regex is considered as invalid directives.',\n        process: proc.regex,\n    }]\n};\n\n\nmodule.exports.lint = function(element, opts) {\n    let invalidDirectiveRegex = opts['origin-tag-forbiden-directive-regex'], issues = [];\n    if (invalidDirectiveRegex) {\n        Object.keys(element.attribs).forEach((attrName) => {\n            invalidDirectiveRegex.test(attrName) && issues.push(new Issue(tools.isOriginComponent(element) ? 'E069' : 'E070', element.attribs[attrName].nameLineCol, {\n                name: element.name,\n                directive: attrName.split(':')[0]\n            }));\n        });\n    }\n    return issues;\n}\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/origin-tag.js",
    "content": "var knife = require('../knife'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'origin-tag',\n    on: ['dom'],\n    filter: ['tag'],\n    hooks: ['skip-normal-tag']\n};\n\nmodule.exports.lint = function(element, opts) {\n    var matcher = knife.matchFilter.bind(knife, element.name);\n    var s = this.subscribers.filter(matcher);\n    return knife.applyRules(s, element, opts);\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/spec-char-escape.js",
    "content": "var knife = require('../knife'),\n    Issue = require('../issue'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'spec-char-escape',\n    on: ['dom'],\n    filter: ['text', 'tag'],\n    options: [{\n        desc: 'If set, special characters in text and attributes (e.g. `>`) must be escaped.',\n        process: proc.bool\n    }, {\n        name: 'text-ignore-regex',\n        desc: [\n'A string giving a regular expression, a RegExp object, or `false`. If',\n'set, text matching the given regular expression is ignored by rules',\n'which apply to raw text (currently, just `spec-char-escape`).',\n'For example, `\\\\[{.*?}\\\\]` will exclude text wrapped in `[{...}]`.',\n'Note that such text may still cause the input html to parse incorrectly,',\n'which could result in errors in other rules later. To remove such text',\n'before parsing, use `raw-ignore-regex`.'\n].join('\\n'),\n        process: proc.regexGlobal,\n        rules: []\n    }]\n};\n\n// Messages for each group in the regex\nvar messages = [\n    undefined,\n    'an escape with invalid characters',\n    'an unescaped angle bracket',\n    'an ill-formed escape sequence'\n];\nvar regex = /(&[^a-zA-Z0-9#;]*;)|([<>])|(&[a-zA-Z0-9#]*[^a-zA-Z0-9#;])/gm;\n\nmodule.exports.lint = function (element, opts) {\n    var issues = [],\n        ignore = opts['text-ignore-regex'];\n\n    function addIssues(text, lineCol, partDesc) {\n        // Replace ignored parts with spaces (to preserve line/col numbering)\n        text = text.replace(ignore,\n            function(match) { return match.replace(/./g, ' '); }\n        );\n        var lineColFunc = knife.getLineColFunc(text, lineCol, 0),\n            match;\n        while (match = regex.exec(text)) {\n            var i = 1; while (!match[i]) { i++; }\n            issues.push(new Issue('E023', lineColFunc(match.index), {\n                chars: match[i],\n                part: partDesc,\n                desc: messages[i]\n            }));\n        }\n    }\n\n    // if it's text - make sure it only has alphanumericals. If it has a &, a ; should follow.\n    if (element.type === 'text' && element.data.length > 0) {\n        addIssues(element.data, element.lineCol, 'text');\n    }\n\n    var attrs = element.attribs;\n    if (attrs) {\n        Object.keys(attrs).forEach(function (name) {\n            var v = attrs[name];\n            addIssues(v.value, v.valueLineCol, 'attribute value');\n        });\n    }\n    return issues;\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/table-req-caption.js",
    "content": "var Issue = require('../issue');\n\nmodule.exports = {\n    name: 'table-req-caption',\n    on: ['tag'],\n    filter: ['table'],\n    desc: 'If set, each `table` must contain at least one `caption` tag.'\n};\n\nmodule.exports.lint = function (ele, opts) {\n    return ele.children.some(function (c) { return c.name === 'caption'; })\n        ? []\n        : new Issue('E031', ele.openLineCol);\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/table-req-header.js",
    "content": "var Issue = require('../issue');\n\nmodule.exports = {\n    name: 'table-req-header',\n    on: ['tag'],\n    filter: ['table'],\n    desc: [\n'If set, each `table` tag must contain a header: a `thead` tag',\n'or a `tr` tag with a `th` child.'\n].join('\\n')\n};\n\nmodule.exports.lint = function (ele, opts) {\n    var children = ele.children,\n        childIndex = 0,\n        child;\n\n    //ffwd to first relevant table child\n    while ((child = children[childIndex]) &&\n        (\n            child.type !== 'tag' || // skip text nodes\n            (child.name && child.name.match(/(caption|colgroup)/i))\n        )\n    ) {\n        childIndex++;\n    }\n\n    if (child && child.name && child.name.match(/thead/i)) {\n        return [];\n    }\n\n    if (child && child.name && child.name.match(/tr/i)) {\n        // Check if any child in first row is `<th>`, not just first child (which could be a text node)\n        for (var i = 0, l = child.children.length; i < l; i++) {\n            if (child.children[i].name && child.children[i].name == 'th') {\n                return []\n            }\n        }\n    }\n\n    return new Issue('E035', ele.openLineCol);\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/tag-bans.js",
    "content": "var Issue = require('../issue'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'tag-bans',\n    on: ['dom'],\n    filter: ['tag', 'style', 'script'],\n    desc: [\n'The value of this option is a list of strings, each of which is a tag',\n'name. Tags with any of the given names are disallowed.'\n].join('\\n'),\n    process: proc.arrayOfStr\n};\n\nmodule.exports.lint = function (element, opts) {\n    var format = opts[this.name];\n    return format.indexOf(element.name) < 0\n        ? []\n        : new Issue('E061', element.openLineCol, { tag: element.name });\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/tag-close.js",
    "content": "var knife = require('../knife'),\n    Issue = require('../issue'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'tag-close',\n    on: ['tag'],\n    options: [{\n        desc: [\n'If set, tags must be closed. Because htmlparser2 does not match tags',\n'case-insensitively, tags whose closing tag has a different case than the',\n'opening tag may be detected by this option rather than `tag-name-match`.'\n].join('\\n'),\n        process: proc.bool\n    }, {\n        name: 'tag-name-match',\n        desc: 'If set, tag names must match (including case).',\n        process: proc.bool\n    }, {\n        name: 'tag-self-close',\n        desc: [\n'* \"always\": Void elements must be self-closed with `/` (html4 style).',\n'* \"never\": Void elements must not be self-closed with `/` (html5 style).',\n'* `false`: No restriction.',\n'',\n'The void elements are `area`, `base`, `br`, `col`, `embed`, `hr`, `image`, `img`,',\n'`input`, `keygen`, `link`, `menuitem`, `meta`, `param`, `source`, `track`,',\n'and `wbr`.'\n].join('\\n'),\n        process: proc.options(['always', 'never'])\n    }]\n};\n\nmodule.exports.lint = function (element, opts) {\n    var selfClose = knife.isSelfClosing(element);\n    // If the tag did not close itself\n    if (!element.close ||\n        element.name.toLowerCase() !== element.close.toLowerCase()) {\n        if (!selfClose && opts['tag-close']) {\n            return new Issue('E042', element.openLineCol, {\n                name: element.name\n            });\n        }\n    } else {\n        if (opts['tag-name-match'] && element.name !== element.close) {\n            return new Issue('E030', element.closeLineCol);\n        }\n    }\n\n    return [];\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/tag-embed.js",
    "content": "var knife = require('../knife'),\n    Issue = require('../issue'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'tag-embed',\n    on: ['tag'],\n    options: [{\n        name: 'tag-embed-tags',\n        desc: 'If set, all specified tags must fellow the embedded rules given by this option.',\n        process: proc.object\n    }]\n};\n\n\nmodule.exports.lint = function (element, opts) {\n    let embedTags = opts['tag-embed-tags'], issues = [];\n    let childEles = element ? knife.getChildrenByType(element, 'tag') : [];\n\n    if (embedTags && embedTags[element.name]) {\n        let embedEle = embedTags[element.name];\n        //check required elements.\n        if (embedEle.required && Array.isArray(embedEle.required)) {\n            if (embedEle.required.filter((ele) => {\n                return !~childEles.indexOf(ele);\n            }).length > 0) {\n                issues.push(new Issue('E065', element.openLineCol, {\n                    parent: element.name,\n                    elements: embedEle.required.join(\" and \")\n                }));\n            }\n        }\n        //check includes elements.\n        if (embedEle.includes && Array.isArray(embedEle.includes)) {\n            childEles.filter((ele) => {\n                return !~embedEle.includes.indexOf(ele);\n            }).forEach((ele) => {\n                issues.push(new Issue(embedEle.includes.length === 0 ? 'E066' : 'E067', element.openLineCol, {\n                    parent: element.name,\n                    elements: embedEle.includes.join(\" or \"),\n                    forbiddenTag: ele\n                }));\n            });\n        }\n        //check excludes elements.\n        if (embedEle.excludes && Array.isArray(embedEle.excludes)) {\n            embedEle.excludes.forEach((ele) => {\n                if (childEles.indexOf(ele) > -1) {\n                    issues.push(new Issue('E068', element.openLineCol, {\n                        parent: element.name,\n                        elements: embedEle.excludes.join(\" or \"),\n                        forbiddenTag: ele\n                    }));\n                }\n            });\n        }\n    }\n\n    return issues;\n};"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/tag-name-lowercase.js",
    "content": "var Issue = require('../issue');\n\nmodule.exports = {\n    name: 'tag-name-lowercase',\n    on: ['tag'],\n    desc: [\n'If set, tag names must be lowercase.',\n'Only the opening tag is checked; mismatches between open and close tags',\n'are checked by `tag-name-match`.'\n].join('\\n')\n};\n\nmodule.exports.lint = function (element, opts) {\n    return /[A-Z]/.test(element.name)\n        ? new Issue('E017', element.openLineCol)\n        : [];\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/tag-req-attr.js",
    "content": "var knife = require('../knife'),\n    Issue = require('../issue'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'tag-req-attr',\n    on: ['tag'],\n    desc: 'If set, specified attributes should be present on the specified tag.',\n    process: proc.object\n};\n\nmodule.exports.lint = function (element, opts) {\n    var tags = opts[this.name],\n        errorCount = 0;\n\n    for (var tagName in tags) {\n        if (tagName === element.name) {\n            var requiredAttributes = tags[tagName],\n                elementAttributes = element.attribs;\n\n            requiredAttributes.forEach(function(attribute) {\n                var elementAttribute = elementAttributes[attribute.name],\n                    allowEmpty = typeof attribute.allowEmpty === 'undefined' ? false : attribute.allowEmpty;\n\n                if (typeof elementAttribute === 'undefined' || (!allowEmpty && !knife.hasNonEmptyAttr(element, attribute.name))) {\n                    errorCount++;\n                }\n            });\n        }\n    }\n\n    return errorCount === 0 ? [] : new Issue('E057', element.openLineCol);\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/tag-white-list.js",
    "content": "var Issue = require('../issue'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'tag-white-list',\n    on: ['tag'],\n    desc: [\n'The value of this option is a list of strings, each of which is a tag',\n'name. Tags with any of the given names are disallowed.'\n].join('\\n'),\n    options:[{\n        name: 'tag-only-allowed-names',\n        desc: 'If set, only tags in this list are allowed.',\n        process: proc.arrayOfStr\n    }]\n};\n\nmodule.exports.lint = function (element, opts) {\n    var allowedNames = opts['tag-only-allowed-names'];\n    if (!allowedNames || allowedNames.length == 0) {\n        return [];\n    }\n    return allowedNames.indexOf(element.name) < 0\n        ? new Issue('E061', element.openLineCol, { tag: element.name }): [];\n};"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/tag.js",
    "content": "var knife = require('../knife'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'tag',\n    on: ['dom'],\n    filter: ['tag'],\n    hooks: ['skip-origin-tag']\n};\n\nmodule.exports.lint = function(element, opts) {\n    var matcher = knife.matchFilter.bind(knife, element.name);\n    var s = this.subscribers.filter(matcher);\n    return knife.applyRules(s, element, opts);\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/template-lang.js",
    "content": "var Issue = require('../issue'),\n    knife = require('../knife'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'template-lang',\n    on: ['tag'],\n    filter: ['template'],\n    options: [{\n        name: 'template-lang-allows',\n        desc: [\n'If set, the lang tag must have a valid form (`xx-YY`, where `xx` is a',\n'valid language code and `YY` is a valid country code). If the value is',\n'equal to \"case\", the tag must be capitalized conventionally (with the',\n'language code lowercase and the country code uppercase).'\n].join('\\n'),\n        process: proc.arrayOfStr\n    }, {\n        name: 'template-req-lang',\n        desc: 'If set, each `html` tag must have a `lang` attribute.',\n        process: proc.bool\n    }]\n};\n\nmodule.exports.lint = function (element, opts) {\n    var a = element.attribs;\n    if (a && a.hasOwnProperty('lang')) {\n        var l = a.lang.value || '';\n        if (opts['template-lang-allows']) {\n            if (opts['template-lang-allows'].indexOf(l) === -1) {\n                return new Issue('E060', a.lang.valueLineCol, {lang:l});\n            }\n        }\n        return [];\n    }\n\n    return opts['template-req-lang'] ?\n        new Issue('E059', element.openLineCol) : [];\n};"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/text-forbid-raw.js",
    "content": "var Issue = require('../issue');\nvar knife = require('../knife');\n\nmodule.exports = {\n    name: 'text-forbid-raw',\n    on: ['text'],\n    hooks: ['skip-empty-text'],\n    desc: 'All text must be wrapped with a text tag.'\n};\n\nfunction getPosOffset(str) {\n    let fistAlpha = /(\\S)/.exec(str);\n    let linesBefore = str.substring(0, fistAlpha.index).split('\\n');\n\n    return [linesBefore.length - 1, linesBefore[linesBefore.length - 1].length];\n}\n\nmodule.exports.lint = function (element, opts) {\n    let parentEle = element.parent;    \n    if (knife.isOriginTag(parentEle.name)) {\n        return [];\n    }\n    if(!parentEle || parentEle.type != 'tag' || parentEle.name != 'text') {\n        let posOffset = getPosOffset(element.data);\n        return new Issue('E071', [element.lineCol[0] + posOffset[0], posOffset[0] > 0 ? (posOffset[1] + 1) : (element.lineCol[1] + posOffset[1])]);\n    }\n    return [];\n};"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/text.js",
    "content": "var knife = require('../knife'),\n    proc = require('../process_option');\n\nmodule.exports = {\n  name: 'text',\n  on: ['dom'],\n  filter: ['text']\n};\n\nmodule.exports.lint = function(element, opts) {\n    var matcher = knife.matchFilter.bind(knife, element.data);\n    var s = this.subscribers.filter(matcher);\n    return knife.applyRules(s, element, opts);\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/title-max-len.js",
    "content": "var Issue = require('../issue'),\n    proc = require('../process_option');\n\nmodule.exports = {\n    name: 'title-max-len',\n    on: ['title'],\n    desc: [\n'The value is either `false` or a nonnegative integer. If nonzero, the',\n'length of the text in the `<title>` tag must not exceed the given value.'\n].join('\\n'),\n    process: proc.posInt\n};\n\nmodule.exports.lint = function (titles, opts) {\n    var maxlen = opts[this.name],\n        output = [];\n\n    titles.map(function(t) {\n        var text = t.children.filter(function(c) {return c.type === 'text';})\n            .map(function(c) { return c.data; }).join('');\n        if (text.length > maxlen) {\n            output.push(new Issue('E029', t.openLineCol,\n                { title: text, maxlength: maxlen }));\n        }\n    });\n    return output;\n}\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/title-no-dup.js",
    "content": "var Issue = require('../issue');\n\nmodule.exports = {\n    name: 'title-no-dup',\n    on: ['title'],\n    desc: 'If set, the `<title>` tag must not appear twice in the head.'\n};\n\nmodule.exports.lint = function (titles, opts) {\n    return titles.length <= 1\n        ? []\n        : new Issue('E028', titles[1].openLineCol, { num: titles.length });\n}\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/rules/title.js",
    "content": "var Issue = require('../issue'),\n    knife = require('../knife');\n\nmodule.exports = {\n    name: 'title',\n    on: ['tag'],\n    filter: ['head']\n};\n\nmodule.exports.lint = function (elt, opts) {\n    var titles = elt.children.filter(function (e) {\n        return e.type === 'tag' && e.name === 'title';\n    });\n    titles.head = elt;\n    return knife.applyRules(this.subscribers, titles, opts);\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/tools/index.js",
    "content": "var bulk = require('bulk-require');\nvar lodash = require('lodash');\n\n// import all the js files in the directory\nvar utilExports = bulk(__dirname, '!(index).js');\nvar utils = {};\n\n// mixin all the functions from the exports into utils\nlodash.values(utilExports).forEach(function (u) {\n    lodash.mixin(utils, u);\n});\n\n// export utils\nmodule.exports = utils;\n"
  },
  {
    "path": "packages/cml-htmllinter/lib/tools/is_origin_component.js",
    "content": "module.exports.isOriginComponent = function(element) {\n  if (element && element.type === 'tag') {\n      return /^origin-\\w+/.test(element.name);\n  } else {\n      return false;\n  }\n}"
  },
  {
    "path": "packages/cml-htmllinter/package.json",
    "content": "{\n  \"name\": \"cml-htmllint\",\n  \"version\": \"1.0.8\",\n  \"description\": \"An chameleon template linter.\",\n  \"keywords\": [\n    \"html\",\n    \"lint\",\n    \"hint\",\n    \"htmllint\"\n  ],\n  \"author\": \"Chameleon-Team\",\n  \"main\": \"lib/index.js\",\n  \"scripts\": {\n    \"test\": \"nyc ./node_modules/mocha/bin/mocha ./test/**/*.test.js --timeout=3000\"\n  },\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"license\": \"Apache\",\n  \"devDependencies\": {\n    \"bulkify\": \"^1.4.2\",\n    \"chai\": \"^4.1.2\",\n    \"chai-as-promised\": \"^7.1.1\",\n    \"gulp\": \"^3.9.1\",\n    \"gulp-coveralls\": \"^0.1.4\",\n    \"gulp-eslint\": \"^4.0.0\",\n    \"gulp-gh-pages\": \"^0.5.4\",\n    \"gulp-istanbul\": \"^1.1.2\",\n    \"gulp-jscs\": \"^4.0.0\",\n    \"gulp-jsdoc\": \"^0.1.5\",\n    \"gulp-jshint\": \"^2.0.4\",\n    \"gulp-mocha\": \"^3.0.1\",\n    \"jshint\": \"^2.9.5\",\n    \"jshint-stylish\": \"^2.2.1\",\n    \"mocha\": \"^4.0.1\",\n    \"plato\": \"^1.7.0\"\n  },\n  \"dependencies\": {\n    \"bulk-require\": \"^1.0.1\",\n    \"htmlparser2\": \"^3.9.2\",\n    \"lodash\": \"^4.17.4\",\n    \"promise\": \"^8.0.1\"\n  },\n  \"browserify\": {\n    \"transform\": [\n      \"bulkify\"\n    ]\n  },\n  \"engines\": {\n    \"node\": \">=4\"\n  },\n  \"contributors\": [],\n  \"gitHead\": \"5ddcde4330774710f7646559446e008f7785ce00\"\n}"
  },
  {
    "path": "packages/cml-htmllinter/repl.js",
    "content": "#!/usr/bin/env node\n\nvar repl = require('repl');\nvar ctx = repl.start('>> ').context;\n\n\nvar htmllint = require('./');\n\n// export stuff to use in the repl\nctx.htmllint = htmllint;\n\nctx.lint = function () {\n    var promise = ctx.htmllint.apply(ctx.htmllint, arguments);\n\n    function handler(result) {\n        ctx['_'] = result;\n\n        console.log(result);\n        console.log('You can access the results in the \"_\" obj');\n    }\n\n    promise.then(handler, handler);\n};\n\n\nvar parser = ctx.htmllint.defaultLinter.parser;\nctx.parse = parser.parse.bind(parser);\n"
  },
  {
    "path": "packages/cml-htmllinter/test/.eslintrc",
    "content": "---\n  globals:\n    beforeEach: true\n    describe: true\n    it: true\n    expect: true\n    xit: true"
  },
  {
    "path": "packages/cml-htmllinter/test/fixtures/.gitkeep",
    "content": ""
  },
  {
    "path": "packages/cml-htmllinter/test/fixtures/const_rule.js",
    "content": "var ConstRule = function (issues) {\n    this.issues = issues;\n    this.name = 'dom'; // Override normal dom rule\n    this.description = 'returns a constant issue array for all inputs';\n};\n\nmodule.exports = ConstRule;\n\nConstRule.prototype.lint = function () {\n    return this.issues;\n};\n"
  },
  {
    "path": "packages/cml-htmllinter/test/fixtures/sanity.html",
    "content": "<!DOCTYPE html>\n<!-- This file is just a sanity check, no rule should throw\na runtime error on this file -->\n<html>\n  <head>\n    <meta charset=\"utf-8\"/>\n    <title>Sanity Check</title>\n  </head>\n  <body>\n    <div>\n      <p> Some text</p>\n    </div>\n    <div>\n      <h1>A header</h1>\n\n      <button><p>para</p></button>\n    </div>\n\n    <p>Some text</p>\n  </body>\n</html>\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/attr-bans.js",
    "content": "module.exports = [\n    {\n        desc: 'should not match style elements',\n        input: '<body><style>hello</style></body>',\n        opts: { 'attr-bans': ['style'] },\n        output: 0\n    }, {\n        desc: 'should match style attributes',\n        input: '<button style=\"color: red;\"></button>',\n        opts: { 'attr-bans': ['style'] },\n        output: 1\n    }, {\n        desc: 'should not match when disabled',\n        input: '<button style=\"color: red;\"></button>',\n        opts: { 'attr-bans': false },\n        output: 0\n    }, {\n        desc: 'should fail if not given a list',\n        input: '',\n        opts: { 'attr-bans': 'style' },\n        output: 1\n    }, {\n        desc: 'should fail if not given a list of strings',\n        input: '',\n        opts: { 'attr-bans': ['style', true] },\n        output: 1\n    }, {\n        desc: 'should match banned if specified',\n        input: '<body banned></body>',\n        opts: { 'attr-bans': ['banned'] },\n        output: 1\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/attr-name-style.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: '<div abc=\"\" 2fOwj_0o-3=\"\" 0r9jfFJ2=\"\"></div>',\n        opts: { 'attr-name-style': false },\n        output: 0\n    }, {\n        desc: 'should pass correctly styled attribute names',\n        input: '<div abc=\"\" fowj0wo3=\"\"></div>',\n        opts: { 'attr-name-style': 'lowercase' },\n        output: 0\n    }, {\n        desc: 'should pass ignore attribute',\n        input: '<div abc=\"\" xlink:href=\"\"></div>',\n        opts: { 'attr-name-style': 'dash', 'attr-name-ignore-regex': 'xlink:href' },\n        output: 0\n    }, {\n        desc: 'should pass when set to false with ignore attribute',\n        input: '<div abc=\"\" xlink:href=\"\"></div>',\n        opts: { 'attr-name-style': false, 'attr-name-ignore-regex': 'notfound' },\n        output: 0\n    }, {\n        desc: 'should fail incorrectly styled attribute names',\n        input: '<div foWj0wo3=\"\"></div>',\n        opts: { 'attr-name-style': 'lowercase' },\n        output: 1\n    }, {\n        desc: 'should accept \"dash\" option',\n        input: '<div abc=\"\" fowj-awo3-fqowj=\"\"></div>',\n        opts: { 'attr-name-style': 'dash' },\n        output: 0\n    }, {\n        desc: 'should accept a custom RegExp',\n        input: '<div deadbeef1337=\"\" fail=\"\" fails=\"\"></div>',\n        opts: { 'attr-name-style': /^[0-9a-f]+$/ },\n        output: 2\n    }, {\n        desc: 'should accept a string giving a RegExp',\n        input: '<div deadbeef1337=\"\" fail=\"\" fails=\"\"></div>',\n        opts: { 'attr-name-style': '/^[0-9a-f]+$/g' },\n        output: 2\n    }, {\n        desc: 'should fail when given a non-string value',\n        input: '<div></div>',\n        opts: { 'attr-name-style': ['camel'] },\n        output: 1\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/attr-new-line.js",
    "content": "module.exports = [\n    {\n        desc: 'should not match tags with number of attributes less or equal then provided to rule',\n        input: '<div class=\"role\"></div>',\n        opts: { 'attr-new-line': 1 },\n        output: 0\n    }, {\n        desc: 'should match tags with number of attributes more then provided to rule',\n        input: '<div class=\"role\" id=\"red\"></div>',\n        opts: { 'attr-new-line': 1 },\n        output: 1\n    }, {\n        desc: 'should not match tags with attributes splitted on multiple lines',\n        input: '<div class=\"role\"\\n    id=\"red\"></div>',\n        opts: { 'attr-new-line': 1 },\n        output: 0\n    }, {\n        desc: 'should not match tags with attributes splitted on multiple lines with no-value attr',\n        input: '<div class=\"role\"\\n     id=\"red\"\\n     translate>\\n</div>',\n        opts: { 'attr-new-line': 1 },\n        output: 0\n    }, {\n        desc: 'should not match tags with attributes splitted on multiple lines if first row has attributes less or equal then provided in rule',\n        input: '<div class=\"role\"\\n    id=\"red\"></div>',\n        opts: { 'attr-new-line': 1 },\n        output: 0\n    }, {\n        desc: 'should match tags with attributes splitted on multiple lines if first row has attributes more then provided in rule',\n        input: '<div class=\"role\"\\n    id=\"red\"></div>',\n        opts: { 'attr-new-line': 0 },\n        output: 1\n    }, {\n        desc: 'should not match tags with one attribute in the row for +0',\n        input: '<div class=\"role\">\\n</div>',\n        opts: { 'attr-new-line': '+0' },\n        output: 0\n    }, {\n        desc: 'should not match tags with one attribute in the row and wrapper for +0',\n        input: '<html>\\n<body>\\n    <div class=\"role\"></div>\\n</body>\\n</html>',\n        opts: { 'attr-new-line': '+0' },\n        output: 0\n    }, {\n        desc: 'should match tags with two attribute in the row and wrapper for +0',\n        input: '<html>\\n<body>\\n    <div class=\"role\" id=\"me\"></div>\\n</body>\\n</html>',\n        opts: { 'attr-new-line': '+0' },\n        output: 1\n    }, {\n        desc: 'should not match tags with two attribute in the row and with no-value attr for +0',\n        input: '<phone-preview-ios\\n        id=\"dsa\"\\n        trasclude>\\n</phone-preview-ios>',\n        opts: { 'attr-new-line': '+0' },\n        output: 0\n    }, {\n        desc: 'should not match tags with 3 boolean attributes for',\n        input: '<picker-date\\n            ng-model=\"campaignUiData.end_date\"\\n            name=\"endDate\"\\n            rome-options=\"endDateOption\"\\n            required\\n            romemin\\n            romemax>\\n          </picker-date>',\n        opts: { 'attr-new-line': '+0' },\n        output: 0\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/attr-no-dup.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: '<body><div><p class=\"hey\" id=\"fat\" class=\"mdo\">Text</p></div></body>',\n        opts: { 'attr-no-dup': false },\n        output: 0\n    }, {\n        desc: 'should pass when set to any falsy value',\n        input: '<body><div><p class=\"hey\" id=\"fat\" class=\"mdo\">Text</p></div></body>',\n        opts: { 'attr-no-dup': '' },\n        output: 0\n    }, {\n        desc: 'should catch duplicates when set to true',\n        input: '<body><div><p class=\"hey\" id=\"fat\" class=\"mdo\">Text</p></div></body>',\n        opts: { 'attr-no-dup': true },\n        output: 1\n    }, {\n        desc: 'should catch multiple duplicates in one element',\n        input: '<body><div><p class=\"hey\" id=\"fat\" class=\"mdo\" id=\"Whaddup\">Text</p></div></body>',\n        opts: { 'attr-no-dup': true },\n        output: 2\n    }, {\n        desc: 'should catch duplicates on multiple elements',\n        input: '<body><div class=\"mdo\" class=\"hey\"><p id=\"Whaddup\" id=\"fat\">Text</p></div></body>',\n        opts: { 'attr-no-dup': true },\n        output: 2\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/attr-no-unsafe-char.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: '<div prop1=\"qwo\\u0000foqej\" prop2=\"jf\\u2013\"></div>',\n        opts: { 'attr-no-unsafe-char': false },\n        output: 0\n    }, {\n        desc: 'should pass safe attribute values',\n        input: '<div prop1=\"qwo\\u0040foqej\" prop2=\"jf\\u2033\"></div>',\n        opts: { 'attr-no-unsafe-char': true },\n        output: 0\n    }, {\n        desc: 'should fail unsafe attribute values',\n        input: '<div prop1=\"qwofoqej\" prop2=\"jf\\u070f\"></div>',\n        opts: { 'attr-no-unsafe-char': true },\n        output: 1\n    }, {\n        desc: 'should allow LF and CR in attribute values',\n        input: '<div prop1=\"qwo\\n0040foqej\" prop2=\"jf\\r2033\"></div>',\n        opts: { 'attr-no-unsafe-char': true },\n        output: 0\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/attr-order.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: '<img height=\"200\" src=\"test.gif\" class=\"test\" width=\"300\"></img>',\n        opts: { 'attr-order': false },\n        output: 0\n    },\n    {\n        desc: 'should fail on non-list value',\n        input: '<img src=\"test.gif\" class=\"test\" width=\"300\" height=\"200\"></img>',\n        opts: { 'attr-order': 'class' },\n        output: 1\n    },\n    {\n        desc: 'should fail on non-regex value elements',\n        input: '<img src=\"test.gif\" class=\"test\" width=\"300\" height=\"200\"></img>',\n        opts: { 'attr-order': ['class','src',3] },\n        output: 1\n    },\n    {\n        desc: 'should pass when attribute order is consistent with option',\n        input: '<img class=\"test\" src=\"test.gif\" height=\"200\" width=\"300\"></img>',\n        opts: { 'attr-order': ['class','src','height','width'] },\n        output: 0\n    },\n    {\n        desc: 'should fail when attribute order is reversed',\n        input: '<img src=\"test.gif\" class=\"test\"></img>',\n        opts: { 'attr-order': ['class','src'] },\n        output: 1\n    },\n    {\n        desc: 'should give one error per misplaced attribute',\n        input: '<img src=\"test.gif\" class=\"test\" width=\"300\" height=\"200\"></img>',\n        opts: { 'attr-order': ['class','src','height','width'] },\n        output: 2\n    },\n    {\n        desc: 'should pass even when some attributes are not present',\n        input: '<img src=\"test.gif\" height=\"200\" width=\"300\"></img>',\n        opts: { 'attr-order': ['class','src','height','width'] },\n        output: 0\n    },\n    {\n        desc: 'should not give additional errors for attributes which are not present',\n        input: '<img src=\"test.gif\" class=\"test\"></img>',\n        opts: { 'attr-order': ['class','src','height','width'] },\n        output: 1\n    },\n    {\n        desc: 'should pass when attribute order is consistent with regex (class then everything else)',\n        input: '<img class=\"test\" src=\"test.gif\" height=\"200\" width=\"300\"></img>',\n        opts: { 'attr-order': ['class','/^.*$/'] },\n        output: 0\n    },\n    {\n        desc: 'should fail when attribute order is not consistent with regex (class then everything else)',\n        input: '<img src=\"test.gif\" class=\"test\" height=\"200\" width=\"300\"></img>',\n        opts: { 'attr-order': ['class','/^.*$/'] },\n        output: 1\n    },\n    {\n        desc: 'should give one error per misplaced attribute with regex (class then everything else)',\n        input: '<img src=\"test.gif\" height=\"200\" class=\"test\" width=\"300\"></img>',\n        opts: { 'attr-order': ['class','/^.*$/'] },\n        output: 2\n    },\n    {\n        desc: 'should pass when attribute order is consistent with regex (class then data tags)',\n        input: '<img class=\"test\" src=\"test.gif\" data-x=\"123\" data-y=\"456\"></img>',\n        opts: { 'attr-order': ['class','/^data-.*$/'] },\n        output: 0\n    },\n    {\n        desc: 'should fail when attribute order is not consistent with regex (class then data tags)',\n        input: '<img src=\"test.gif\" data-x=\"123\" class=\"test\" data-y=\"456\"></img>',\n        opts: { 'attr-order': ['class','/^data-.*$/'] },\n        output: 1\n    },\n    {\n        desc: 'should pass when attribute order is consistent with regex (class then data tags then others)',\n        input: '<img class=\"test\" data-x=\"123\" data-y=\"456\" src=\"test.gif\"></img>',\n        opts: { 'attr-order': ['class','/^data-.*$/','/^.*$/'] },\n        output: 0\n    },\n    {\n        desc: 'should fail when attribute order is not consistent with regex (class then data tags then others)',\n        input: '<img class=\"test\" src=\"test.gif\" data-x=\"123\" data-y=\"456\"></img>',\n        opts: { 'attr-order': ['class','/^data-.*$/','/^.*$/'] },\n        output: 1\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/attr-quote-style.js",
    "content": "module.exports = [\n    {\n        desc: 'should not run when disabled',\n        input: '<button name=unquoted></button>',\n        opts: { 'attr-quote-style': false },\n        output: 0\n    }, {\n        desc: 'should fail on unknown style',\n        input: '',\n        opts: { 'attr-quote-style': 'unknown' },\n        output: 1\n    }, {\n        desc: 'should match unquoted attr',\n        input: '<button name=unquoted></button>',\n        opts: { 'attr-quote-style': 'quoted' },\n        output: 1\n    }, {\n        desc: 'should match single quoted attr in double mode',\n        input: \"<button disabled=''></button>\",\n        opts: { 'attr-quote-style': 'double' },\n        output: 1\n    }, {\n        desc: 'should match double quoted attr in single mode',\n        input: '<button disabled=\"not\"></button>',\n        opts: { 'attr-quote-style': 'single' },\n        output: 1\n    }, {\n        desc: 'should pass quoted attr',\n        input: '<button t=\"0\" t=\\'k\\'></button>',\n        opts: { 'attr-quote-style': 'quoted' },\n        output: 0\n    }, {\n        desc: 'should not match attributes with no values',\n        input: '<input type=\"checkbox\" checked name=\"test\">',\n        opts: { 'attr-quote-style': 'double' },\n        output: 0\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/attr-req-value.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: '<img src>',\n        opts: {'attr-req-value': false},\n        output: 0\n    }, {\n        desc: 'should pass when attribs are valued',\n        input: '<img src=\"test.jpg\" alt=\"test\">',\n        opts: {'attr-req-value': true},\n        output: 0\n    }, {\n        desc: 'should pass with spaces in attribute values',\n        input: '<img src=\"test image.jpg\" alt=\"test\">',\n        opts: {'attr-req-value': true},\n        output: 0\n    }, {\n        desc: 'should fail when attribs aren`t valued',\n        input: '<img src>',\n        opts: {'attr-req-value': true},\n        output: 1\n    }, {\n        desc: 'should fail when attribs aren`t valued (with equals)',\n        input: '<img src=>',\n        opts: {'attr-req-value': true},\n        output: 1\n    }, {\n        desc: 'should fail for empty attribs followed by correct ones',\n        input: '<img src= alt=\"test\">',\n        opts: {'attr-req-value': true},\n        output: 1\n    }, {\n        desc: 'should pass when attribs are valued with the empty string',\n        input: '<img src=\"\" alt=\"\">',\n        opts: {'attr-req-value': true},\n        output: 0\n    }, {\n        desc: 'should pass for boolean attributes',\n        input: '<input type=\"checkbox\" checked name=test>',\n        opts: {'attr-req-value': true},\n        output: 0\n    }, {\n        desc: 'should fail for boolean attributes with = but no value',\n        input: '<input type=\"checkbox\" checked= name=test>',\n        opts: {'attr-req-value': true},\n        output: 1\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/attr-validate.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: '<div cl=ss=\"\\' \"id=\\'\"></div>',\n        opts: { 'attr-validate': false },\n        output: 0\n    }, {\n        desc: 'should pass valid attribute list 2',\n        input: '<div\\t  class =\"large\" id=a\\nid\\r=\\'\\n\\tb  \\' ></div>',\n        opts: { 'attr-validate': true },\n        output: 0\n    }, {\n        desc: 'should fail when given malformed attributes',\n        input: '<div class=\"large id=\"title\"></div>',\n        opts: { 'attr-validate': true },\n        output: 1\n    }, {\n        desc: 'should fail once per tag with malformed attributes',\n        input: '<div class=large\" id=\\'title\\'><p class==\"bold\">text</p></div>',\n        opts: { 'attr-validate': true },\n        output: 2\n    }, {\n        desc: 'should work on self-closing tags with no space before /',\n        input: '<meta charset=\"utf-8\"/>',\n        opts: { 'attr-validate': true },\n        output: 0\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/class-no-dup.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: '<body><div><p class=\"hey hey\">Text</p></div></body>',\n        opts: { 'class-no-dup': false },\n        output: 0\n    }, {\n        desc: 'should pass when there are no duplicates',\n        input: '<body><div><p class=\"hey hi\">Text</p></div></body>',\n        opts: { 'class-no-dup': true },\n        output: 0\n    }, {\n        desc: 'should catch duplicates when set to true',\n        input: '<body><div><p class=\"hey hey\">Text</p></div></body>',\n        opts: { 'class-no-dup': true },\n        output: 1\n    }, {\n        desc: 'should catch multiple duplicates in one class',\n        input: '<body><div><p class=\"hey hey hi ho ho\">Text</p></div></body>',\n        opts: { 'class-no-dup': true },\n        output: 2\n    }, {\n        desc: 'should work with leading and trailing whitespace',\n        input: '<body><div><p class=\" hey hi\\n\">Text</p></div></body>',\n        opts: { 'class-no-dup': true },\n        output: 0\n    },\n\n    // check ignore splitting\n    {\n        desc: 'should catch duplicates with a custom separator',\n        input: '<body><div><p class=\"hey hey\">Text</p></div></body>',\n        opts: { 'class-no-dup': true, 'id-class-ignore-regex': '{.*?}' },\n        output: 1\n    }, {\n        desc: 'should not catch non-duplicates with a custom separator',\n        input: '<body><div><p class=\"hi {foo bar} {foo x bar} hello \">Text</p></div></body>',\n        opts: { 'class-no-dup': true, 'id-class-ignore-regex': '{.*?}' },\n        output: 0\n    }, {\n        desc: 'should catch multiple duplicates with a custom separator',\n        input: '<body><div><p class=\"hey {foo bar} hey hi {foo bar}\">Text</p></div></body>',\n        opts: { 'class-no-dup': true, 'id-class-ignore-regex': '{.*?}' },\n        output: 2\n    }, {\n        desc: 'should not fail if id-class-ignore-regex has capturing groups',\n        input: '<body><div><p class=\"  hey {foo bar} hi {foo baz}\">Text</p></div></body>',\n        opts: { 'class-no-dup': true, 'id-class-ignore-regex': '(({)(.*?)})' },\n        output: 0\n    }, {\n        desc: 'should not fail if id-class-ignore-regex has literal parens',\n        input: '<body><div><p class=\"hi {(foo bar)} {(foo baz)} hey\">Text</p></div></body>',\n        opts: { 'class-no-dup': true, 'id-class-ignore-regex': '{\\(.*?\\)}' },\n        output: 0\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/class-style.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: '<div id=\"2fOwj_0o-3\" class=\"0r9jfFJ2\"></div>',\n        opts: { 'class-style': false },\n        output: 0\n    }, {\n        desc: 'should pass correctly styled class',\n        input: '<div class=\"fowj0wo3\"></div>',\n        opts: { 'class-style': 'lowercase' },\n        output: 0\n    }, {\n        desc: 'should fail incorrectly styled class names',\n        input: '<div class=\"fojf*ovo\"></div>',\n        opts: { 'class-style': 'lowercase' },\n        output: 1\n    }, {\n        desc: 'should accept a \"dash\" option',\n        input: '<div class=\"fowj-awo3-fqowj\"></div>',\n        opts: { 'class-style': 'dash' },\n        output: 0\n    }, {\n        desc: 'should accept a class that specifies multiple names',\n        input: '<div class=\"pls no\"></div>',\n        opts: {'class-style': 'lowercase'},\n        output: 0\n    }, {\n        desc: 'should accept classes that use the BEM format',\n        input: '<div class=\"block\"></div><div class=\"block__element\"></div><div class=\"block--modifier\"></div><div class=\"block__element--modifier\"></div><div class=\"poll-block\"></div><div class=\"poll-block__element\"></div><div class=\"poll-block__poll-element\"></div><div class=\"poll-block--modifier\"></div><div class=\"poll-block--poll-modifier\"></div><div class=\"poll-block__element--modifier\"></div><div class=\"poll-block__poll-element--modifier\"></div><div class=\"poll-block__element--poll-modifier\"></div><div class=\"poll-block__poll-element--poll-modifier\"></div><div class=\"base-poll-block\"></div><div class=\"base-poll-block__base-poll-element\"></div><div class=\"base-poll-block__element--base-poll-modifier\"></div><div class=\"base-poll-block__base-poll-element--base-poll-modifier\"></div>',\n        opts: {'class-style': 'bem'},\n        output: 0\n    }, {\n        desc: 'should not accept classes that aren\\'t compatible the BEM format',\n        input: '<div class=\"block--modifier--modifier\"></div><div class=\"block__element__element\"></div>',\n        opts: {'class-style': 'bem'},\n        output: 2\n    }, {\n        desc: 'should accept a custom format RegExp',\n        input: '<div class=\"pAsS-one\"></div><div class=\"fail\"></div><div class=\"pAsS-two\">',\n        opts: {'class-style': /^([a-z][A-Z])+(-[a-z]*)*$/},\n        output: 1\n    }, {\n        desc: 'should make an appropriate string into a RegExp',\n        input: '<div class=\"pAsS-one\"></div><div class=\"fail\"></div><div class=\"pAsS-two\">',\n        opts: {'class-style': '/^([a-z][A-Z])+(-[a-z]*)*$/'},\n        output: 1\n    }, {\n        desc: 'should ignore classes matching ignore regex',\n        input: '<div class=\"pls {{no0 oO&}}\"></div>',\n        opts: {'class-style': 'lowercase', 'id-class-ignore-regex': '{{.*?}}'},\n        output: 0\n    }, {\n        desc: 'should fail classes not matching ignore regex',\n        input: '<div class=\"pls {{no0 oO&}} fe<doracoin\"></div>',\n        opts: {'class-style': 'lowercase', 'id-class-ignore-regex': '{{.*?}}'},\n        output: 1\n    }, {\n        desc: 'should give an error if id-class-ignore-regex is empty',\n        input: '',\n        opts: { 'class-style': 'lowercase', 'id-class-ignore-regex': '' },\n        output: 1\n    }, {\n        desc: 'should use id-class-style option if class-style is false',\n        input: '<div class=\"fojf*ovo\"></div>',\n        opts: { 'class-style': false, 'id-class-style': 'lowercase' },\n        output: 1\n    }, {\n        desc: 'should not use id-class-style option if class-style is \"none\"',\n        input: '<div class=\"fojf*ovo\"></div>',\n        opts: { 'class-style': 'none', 'id-class-style': 'lowercase' },\n        output: 0\n    }\n]\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/component-attr-check.js",
    "content": "module.exports = [\n  {\n      desc: 'should pass component-attr-check',\n      input: '<template lang=\"cml\"><component is=\"{{currentComp}}\" style=\"comp\"></component></template>',\n      opts: { \n        'component-event-regex': /(?:c-bind:|c-catch:)(\\w+)/,\n        'component-prop-regex': false,\n        'component-allow-attr': [{\n          name: 'component',\n          allowAttrs: {\n            vars: ['is', 'shrinkcomponents'],\n            methods: [],\n            props: [{\n              name: 'is',\n              required: true\n            }, {\n              name: 'shrinkcomponents',\n              required: false\n            }],\n            events: []\n          }\n        }]\n      },\n      output: 0\n  },\n  {\n    desc: 'should not pass component-attr-check',\n    input: '<template lang=\"cml\"><component shrinkcomponents=\"comp,comp1\"></component></template>',\n    opts: { \n      'component-event-regex': /(?:c-bind:|c-catch:)(\\w+)/,\n      'component-prop-regex': false,\n      'component-allow-attr': {\n        component:{\n          vars: ['is', 'shrinkcomponents'],\n          methods: [],\n          props: [{\n            name: 'is',\n            required: true\n          }, {\n            name: 'shrinkcomponents',\n            required: false\n          }],\n          events: []\n        }\n      }\n    },\n    output: 1\n  }  \n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/doctype-first.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: '<section><div><p>Hello</p><p>World</p></div></section>',\n        opts: { 'doctype-first': false },\n        output: 0\n    }, {\n        desc: 'should pass when set to any falsy value',\n        input: '<!DOCTYPE><div><p>Hello</p><p>World</p></div>',\n        opts: { 'doctype-first': 0 },\n        output: 0\n    }, {\n        desc: 'should pass when !DOCTYPE is first',\n        input: '<!DOCTYPE><div><p>Hello</p><p>World</p></div>',\n        opts: { 'doctype-first': true },\n        output: 0\n    }, {\n        desc: 'should pass case-insensitive !DOCTYPE',\n        input: '<!DoCtYpE><div><p>Hello</p><p>World</p></div>',\n        opts: { 'doctype-first': true },\n        output: 0\n    }, {\n        desc: 'should fail when !DOCTYPE is not present',\n        input: '<section><div><p>Hello</p><p>World</p></div></section>',\n        opts: { 'doctype-first': true },\n        output: 1\n    }, {\n        desc: 'should fail when !DOCTYPE is not first',\n        input: '<section><!DOCTYPE html><div><p>Hello</p><p>World</p></div></section>',\n        opts: { 'doctype-first': true },\n        output: 1\n    }, {\n        desc: 'should pass when multiple !DOCTYPEs are present, as long as a !DOCTYPE is first',\n        input: '<!DOCTYPE><section><!DOCTYPE><div><p>Hello</p><p>World</p></div></section>',\n        opts: { 'doctype-first': true },\n        output: 0\n    }, {\n        desc: 'should pass in smart mode when !DOCTYPE and head are not present',\n        input: '<section><div><p>Hello</p><p>World</p></div></section>',\n        opts: { 'doctype-first': 'smart' },\n        output: 0\n    }, {\n        desc: 'should fail in smart mode when !DOCTYPE is not present but head is',\n        input: '<head></head><section><div><p>Hello</p><p>World</p></div></section>',\n        opts: { 'doctype-first': 'smart' },\n        output: 1\n    }, {\n        desc: 'should fail but not crash when first element is not a tag',\n        input: 'foobar',\n        opts: { 'doctype-first': true },\n        output: 1\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/doctype-html5.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: '<!DOCTYPE HI MOM>',\n        opts: { 'doctype-html5': false },\n        output: 0\n    }, {\n        desc: 'should fail when given a html4 doctype',\n        input: '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"\\n\"http://www.w3.org/TR/html4/strict.dtd\">',\n        opts: { 'doctype-html5': true },\n        output: 1\n    }, {\n        desc: 'should pass when given a non-obsolete non-legacy doctype',\n        input: '<!DOCTYPE html><html></html>',\n        opts: { 'doctype-html5': true },\n        output: 0\n    }, {\n        desc: 'should fail when given a legacy doctype',\n        input: '<!DOCTYPE html SYSTEM \"about:legacy-compat\">',\n        opts: { 'doctype-html5': true },\n        output: 1\n    }, {\n        desc: 'should pass a random directive',\n        input: '<!random g>',\n        opts: { 'doctype-html5': true },\n        output: 0\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/fig-req-figcaption.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: '<figure></figure>',\n        opts: { 'fig-req-figcaption': false },\n        output: 0\n    },\n    {\n        desc: 'should fail when no figcaption is present',\n        input: '<figure></figure>',\n        opts: { 'fig-req-figcaption': true },\n        output: 1\n    },\n    {\n        desc: 'should fail when a caption is not a child',\n        input: '<figure><p>1</p><p>2</p><p>3</p><p>4</p></figure>',\n        opts: { 'fig-req-figcaption': true },\n        output: 1\n    },\n    {\n        desc: 'should fail twice when a figcaption is a sibling',\n        input: '<figure></figure><figcaption></figcaption>',\n        opts: { 'fig-req-figcaption': true },\n        output: 2\n    },\n    {\n        desc: 'should continue checking after a pass',\n        input: '<figure></figure><figure><figcaption></figcaption></figure><div><figcaption></figcaption></div>',\n        opts: { 'fig-req-figcaption': true },\n        output: 2\n    },\n    {\n        desc: 'should pass even if it is the last child',\n        input: '<figure><p>1</p><p>2</p><p>3</p><p>4</p><figcaption></figcaption></figure>',\n        opts: { 'fig-req-figcaption': true },\n        output: 0\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/focusable-tabindex-style.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass two inputs with positive tabindexes',\n        input: [\n            '<input tabindex=2></input>',\n            '<input tabindex=\"3\"></input>'\n        ].join(''),\n        opts: { 'focusable-tabindex-style': true },\n        output: 0\n    }, {\n        desc: 'should pass inputs without positive tabindexes',\n        input: [\n            '<input tabindex=\"0\"></input>',\n            '<input tabindex=\"-1\"></input>',\n            '<input></input>'\n        ].join(''),\n        opts: { 'focusable-tabindex-style': true },\n        output: 0\n    }, {\n        desc: 'should fail mixed inputs',\n        input: [\n            '<input></input>',\n            '<input></input>',\n            '<input tabindex=\"2\"></input>',\n            '<input tabindex=\"3\"></input>'\n        ].join(''),\n        opts: { 'focusable-tabindex-style': true },\n        output: 2\n    }, {\n        desc: 'should fail inputs with both positive and negative tabindexes',\n        input: [\n            '<input tabindex=\"2\"></input>',\n            '<input tabindex=\"-1\"></input>',\n            '<input></input>',\n            '<input tabindex=\"-3\"></input>'\n        ].join(''),\n        opts: { 'focusable-tabindex-style': true },\n        output: 3\n    }, {\n        desc: 'should ignore disabled inputs',\n        input: [\n            '<input disabled></input>',\n            '<input disabled></input>',\n            '<input tabindex=\"2\"></input>',\n            '<input tabindex=\"3\"></input>'\n        ].join(''),\n        opts: { 'focusable-tabindex-style': true },\n        output: 0\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/head-req-title.js",
    "content": "module.exports = [\n    {\n        desc: 'head-req-title should pass when set to false',\n        input: '<head></head>',\n        opts: { 'head-req-title': false },\n        output: 0\n    }, {\n        desc: 'head-req-title should pass when a title is present',\n        input: '<head><title>Title!</title></head>',\n        opts: { 'head-req-title': true },\n        output: 0\n    }, {\n        desc: 'head-req-title should fail when no title is present',\n        input: '<head></head>',\n        opts: { 'head-req-title': true },\n        output: 1\n    }, {\n        desc: 'head-req-title should fail when title is empty',\n        input: '<head><title></title></head>',\n        opts: { 'head-req-title': true },\n        output: 1\n    }, {\n        desc: 'head-req-title should pass when some title is nonempty',\n        input: '<head><title></title><title>For real this time</title></head>',\n        opts: { 'head-req-title': true },\n        output: 0\n    }\n]\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/head-valid-content-model.js",
    "content": "module.exports = [\n    {\n        desc: 'head-div should pass when head-valid-content-model set to false',\n        input: '<head><div></div></head>',\n        opts: { 'head-valid-content-model': false },\n        output: 0\n    }, {\n        desc: 'head-div should fail when head-valid-content-model set to true',\n        input: '<head><div></div></head>',\n        opts: { 'head-valid-content-model': true },\n        output: 1\n    }, {\n        desc: 'should pass when no head is present',\n        input: '<html><body></body></html>',\n        opts: { 'head-valid-content-model': true },\n        output: 0\n    }, {\n        desc: 'legal elements in head should pass',\n        input: '<head><title></title><link></link><script></script><style></style><template></template><noscript></noscript><meta></meta></head>',\n        opts: { 'head-valid-content-model': true },\n        output: 0\n    }, {\n        desc: 'illegal elements in head should fail',\n        input: '<head><title></title><link></link><div></div></head>',\n        opts: { 'head-valid-content-model': true },\n        output: 1\n   }, {\n        desc: 'multiple illegal elements should all fail',\n        input: '<head><div></div><h1></h1><a></a></head>',\n        opts: { 'head-valid-content-model': true },\n        output: 3\n   }, {\n        desc: 'empty head should pass',\n        input: '<head></head>',\n        opts: { 'head-valid-content-model': true },\n        output: 0\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/href-style.js",
    "content": "module.exports = [\n    {\n        desc: 'should not match absolute links given absolute option',\n        input: '<a href=\"http://www.google.com\"></a>',\n        opts: { 'href-style': 'absolute' },\n        output: 0\n    }, {\n        desc: 'should match relative links given absolute option',\n        input: '<a href=\"/dog/cat\"></a>',\n        opts: { 'href-style': 'absolute' },\n        output: 1\n    }, {\n        desc: 'should not match relative links given relative option',\n        input: '<a href=\"/dog/cat\"></a>',\n        opts: { 'href-style': 'relative' },\n        output: 0\n    }, {\n        desc: 'should match absolute links given relative option',\n        input: '<a href=\"http://www.google.com\"></a>',\n        opts: { 'href-style': 'relative' },\n        output: 1\n    }, {\n        desc: 'should not match any links given false option',\n        input: '<a href=\"/dog/cat\"></a><a href=\"http://www.google.com\"></a>',\n        opts: { 'href-style': false },\n        output: 0\n    }, {\n        desc: 'should not match on <a> without an href',\n        input: '<a></a>',\n        opts: { 'href-style': 'absolute' },\n        output: 0\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/html-valid-content-model.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass html-div when set to false',\n        input: '<html><div></div></html>',\n        opts: { 'html-valid-content-model': false },\n        output: 0\n    }, {\n        desc: 'should fail html-div when set to true',\n        input: '<html><div></div></html>',\n        opts: { 'html-valid-content-model': true },\n        output: 1\n    }, {\n        desc: 'should pass head when no html is present',\n        input: '<head></head>',\n        opts: { 'html-valid-content-model': true },\n        output: 0\n    }, {\n        desc: 'should pass html-head-body',\n        input: '<html><head></head><body></body></html>',\n        opts: { 'html-valid-content-model': true },\n        output: 0\n    }, {\n        desc: 'should fail html-head-div-body',\n        input: '<html><head></head><div></div><body></body></html>',\n        opts: { 'html-valid-content-model': true },\n        output: 1\n    }, {\n        desc: 'should fail for each illegal element',\n        input: '<html><div></div><head></head><div></div><body></body></html>',\n        opts: { 'html-valid-content-model': true },\n        output: 2\n    }, {\n        desc: 'should fail html-head-head',\n        input: '<html><head></head><head></head></html>',\n        opts: { 'html-valid-content-model': true },\n        output: 1\n    }, {\n        desc: 'should fail html-body-body',\n        input: '<html><body></body><body></body></html>',\n        opts: { 'html-valid-content-model': true },\n        output: 1\n    }, {\n        desc: 'should fail html-body-head',\n        input: '<html><body></body><head></head></html>',\n        opts: { 'html-valid-content-model': true },\n        output: 1\n    }, {\n        desc: 'should fail html-head-body-head once',\n        input: '<html><head></head><body></body><head></head></html>',\n        opts: { 'html-valid-content-model': true },\n        output: 1\n    }, {\n        desc: 'should fail html-body-head-head twice',\n        input: '<html><body></body><head></head><head></head></html>',\n        opts: { 'html-valid-content-model': true },\n        output: 2\n    }, {\n        desc: 'should pass html-head-body',\n        input: '<html><head></head><body><div></div></body></html>',\n        opts: { 'html-valid-content-model': true },\n        output: 0\n     }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/id-class-no-ad.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: '<div id=\"ad-AD-ad-I\\'m-an-ad\" class=\"ad_thingy_that_advertises\"></div>',\n        opts: { 'id-class-no-ad': false },\n        output: 0\n    }, {\n        desc: 'should pass id and class values not containing \"ad\"',\n        input: '<div id=\"abc\" class=\"fowj0wo3\"></div>',\n        opts: { 'id-class-no-ad': true },\n        output: 0\n    }, {\n        desc: 'should pass id and class values containing \"ad\" but not as a word',\n        input: '<div id=\"bad\" class=\"sadness\"></div>',\n        opts: { 'id-class-no-ad': true },\n        output: 0\n    }, {\n        desc: 'should fail id values containing \"ad\"',\n        input: '<div id=\"qofwj_ad_ofqijoi\"></div>',\n        opts: { 'id-class-no-ad': true },\n        output: 1\n    }, {\n        desc: 'should fail class values containing \"ad\"',\n        input: '<div class=\"definitely-not-an-ad\"></div>',\n        opts: { 'id-class-no-ad': true },\n        output: 1\n    }, {\n        desc: 'should fail values containing \"banner\" or \"social\"',\n        input: '<div id=\"**banner**\" class=\"~~social~~\"></div>',\n        opts: { 'id-class-no-ad': true },\n        output: 2\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/id-no-dup.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass html with no duplicate ids',\n        input: '<div id=\"div1\"></div>text<div id=\"div2\"></div>',\n        opts: { 'id-no-dup': true },\n        output: 0\n    }, {\n        desc: 'should fail html with a duplicate id',\n        input: '<div id=\"div1\"></div>text<div id=\"div1\"></div>',\n        opts: { 'id-no-dup': true },\n        output: 1\n    }, {\n        desc: 'should pass any html when disabled',\n        input: '<div id=\"div1\"></div>text<div id=\"div1\"></div>',\n        opts: { 'id-no-dup': false },\n        output: 0\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/id-style.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: '<div id=\"2fOwj_0o-3\"></div>',\n        opts: { 'id-class-style': false },\n        output: 0\n    }, {\n        desc: 'should fail when given an unknown option value',\n        input: '',\n        opts: { 'id-class-style': 'inconceivable' },\n        output: 1\n    }, {\n        desc: 'should pass correctly styled id',\n        input: '<div id=\"abc\"></div>',\n        opts: { 'id-class-style': 'lowercase' },\n        output: 0\n    }, {\n        desc: 'should fail incorrectly styled id names',\n        input: '<div id=\"foWj0wo3\"></div>',\n        opts: { 'id-class-style': 'lowercase' },\n        output: 1\n    }, {\n        desc: 'should accept a \"dash\" option',\n        input: '<div id=\"abc-def\"></div>',\n        opts: { 'id-class-style': 'dash' },\n        output: 0\n    }, {\n        desc: 'should accept ids that use the BEM format',\n        input: '<div id=\"block\"></div><div id=\"block__element\"></div><div id=\"block--modifier\"></div><div id=\"block__element--modifier\"></div><div id=\"poll-block\"></div><div id=\"poll-block__element\"></div><div id=\"poll-block__poll-element\"></div><div id=\"poll-block--modifier\"></div><div id=\"poll-block--poll-modifier\"></div><div id=\"poll-block__element--modifier\"></div><div id=\"poll-block__poll-element--modifier\"></div><div id=\"poll-block__element--poll-modifier\"></div><div id=\"poll-block__poll-element--poll-modifier\"></div><div id=\"base-poll-block\"></div><div id=\"base-poll-block__base-poll-element\"></div><div id=\"base-poll-block__element--base-poll-modifier\"></div><div id=\"base-poll-block__base-poll-element--base-poll-modifier\"></div>',\n        opts: {'id-class-style': 'bem'},\n        output: 0\n    }, {\n        desc: 'should not accept ids that aren\\'t compatible the BEM format',\n        input: '<div id=\"block--modifier--modifier\"></div><div id=\"block__element__element\"></div>',\n        opts: {'id-class-style': 'bem'},\n        output: 2\n    }, {\n        desc: 'should accept a custom format RegExp',\n        input: '<div id=\"-___\"></div><div id=\"fail\"></div><div class=\"_--_-\">',\n        opts: {'id-class-style': /^[-_]+$/},\n        output: 1\n    }, {\n        desc: 'should ignore ids matching ignore regex',\n        input: '<div id=\"doge{{l**i(tec/oin}}coin\"></div>',\n        opts: {'id-class-style': 'lowercase', 'id-class-ignore-regex': '{{.*?}}'},\n        output: 0\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/img-req-alt.js",
    "content": "module.exports = [\n    {\n        desc: 'should not match images with fallbacks',\n        input: '<img src=\"suchcode.jpg\" alt=\"wow\">',\n        opts: { 'img-req-alt': true },\n        output: 0\n    }, {\n        desc: 'should match images without fallbacks',\n        input: '<img src=\"nyannynyan.svg\">',\n        opts: { 'img-req-alt': true },\n        output: 1\n    }, {\n        desc: 'should fail when img alt is empty',\n        input: '<img src=\"nyannynyan.svg\" alt=\"\">',\n        opts: { 'img-req-alt': true },\n        output: 1\n    }, {\n        desc: 'should not fail when img alt is null but value is \"allownull\"',\n        input: '<img src=\"nyannynyan.svg\" alt=\"\">',\n        opts: { 'img-req-alt': 'allownull' },\n        output: 0\n    }, {\n        desc: 'should fail when img alt is not given even if value is \"allownull\"',\n        input: '<img src=\"nyannynyan.svg\" alt=>',\n        opts: { 'img-req-alt': 'allownull' },\n        output: 0\n    }, {\n        desc: 'should not match non image elements without fallbacks',\n        input: '<div>this should return 0</div>',\n        opts: { 'img-req-alt': true },\n        output: 0\n    }, {\n        desc: 'should not match when disabled',\n        input: '<img src=\"nyannynyan.svg\">',\n        opts: { 'img-req-alt': false },\n        output: 0\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/img-req-src.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: '<img>',\n        opts: { 'img-req-src': false },\n        output: 0\n    }, {\n        desc: 'should pass when image tags have set src attribs',\n        input:'<img src=\"nyan.mrw\">',\n        opts: { 'img-req-src': true },\n        output: 0\n    }, {\n        desc: 'should fail when the img src is not set',\n        input: '<img id=\"notasource\">',\n        opts: { 'img-req-src': true },\n        output: 1\n    }, {\n        desc: 'should fail when the img src is empty',\n        input: '<img src>',\n        opts: { 'img-req-src': true },\n        output: 1\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/indent-delta.js",
    "content": "module.exports = [\n    {\n        desc: 'should work with tabs',\n        input: [\n            '<body>',\n            '\\t<p>hello</p>',\n            '</body>'\n        ].join('\\n'),\n        opts: {'indent-delta':true },\n        output: 0\n    }, {\n        desc: 'should detect bad tab indent',\n        input: [\n            '<body>',\n            '\\t\\t\\t<p>hello</p>',\n            '\\t\\t\\t<p>hello</p>',\n            '</body>'\n        ].join('\\n'),\n        opts: { 'indent-delta':true },\n        output: 2\n    }, {\n        desc: 'should work with tabs and spaces',\n        input: [\n            '<body>',\n            '\\t<p>hello</p>',\n            '  <p>hello</p>',\n            '</body>'\n        ].join('\\n'),\n        opts: { 'indent-delta':true, 'indent-width':2 },\n        output: 0\n    }, {\n        desc: 'should tab to next multiple of indent-width',\n        input: [\n            '<body>',\n            '\\t<p>hello</p>',         // 1 tab\n            '   \\t   \\t<p>hello</p>', // 2 tabs\n            '    <p>hello</p>',       // 1 tab\n            '</body>'\n        ].join('\\n'),\n        opts: { 'indent-delta':true, 'indent-width':4 },\n        output: 1 // From indent-width; none from indent-delta\n    }, {\n        desc: 'should ignore empty lines',\n        input: [\n            '<body>',\n            '\\t<p>break with</p>',\n            '\\t\\t<p>empty line</p>',\n            '',\n            '\\t<p>is fine</p>',\n            '</body>'\n        ].join('\\r\\n'),\n        opts: { 'indent-delta':true, 'indent-width':6 },\n        output: 0\n    }, {\n        desc: 'should detect bad indent with tabs and spaces',\n        input: [\n            '<body>',\n            '\\t  <p>hello</p>',\n            '  <p>hello</p>',\n            '\\t\\t\\t<p>hello</p>',\n            '    <p>hello</p>',\n            '</body>'\n        ].join('\\n'),\n        opts: { 'indent-delta':true, 'indent-width':2 },\n        output: 3\n    },\n]\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/indent-style.js",
    "content": "module.exports = [\n    {\n        desc: 'should match spaces when configured for tabs',\n        input: [\n            '<body>',\n            '  <p>hello</p>',\n            '</body>'\n        ].join('\\n'),\n        opts: { 'indent-style': 'tabs' },\n        output: 1\n    }, {\n        desc: 'should match tabs when configured for spaces',\n        input: [\n            '<body>',\n            '\\t<p> ello</p>',\n            '</body>'\n        ].join('\\n'),\n        opts: { 'indent-style': 'spaces' },\n        output: 1\n    }, {\n        desc: 'should match tabs when configured for spaces',\n        input: [\n            '<body>',\n            '\\t<p> ello</p>',\n            '\\t<p> ello</p>',\n            '\\t<p> ello</p>',\n            '</body>'\n        ].join('\\n'),\n        opts: { 'indent-style': 'spaces' },\n        output: 3\n    },\n    {\n        desc: 'should match inmixed indents',\n        input: [\n            '<body>',\n            '\\t <p>this not okay</p>',\n            '</body>'\n        ].join('\\n'),\n        opts: { 'indent-style': 'spaces' },\n        output: 1\n    }, {\n        desc: 'should match mixed indents starting with spaces',\n        input: [\n            '<body>',\n            '    <p>this not okay</p>',\n            '    <p>this not okay</p>',\n            '\\t\\t\\t\\t<p>this not okay</p>',\n            '\\t\\t\\t\\t<p>this not okay</p>',\n            '</body>'\n        ].join('\\n'),\n        opts: { 'indent-style': 'nonmixed' },\n        output: 2\n    }, {\n        desc: 'should match mixed indents starting with tabs',\n        input: [\n            '<body>',\n            '\\t\\t<p>this not okay</p>',\n            '\\t\\t<p>this not okay</p>',\n            '      <div>Hey</div>',\n            '</body>'\n        ].join('\\n'),\n        opts: { 'indent-style': 'nonmixed' },\n        output: 1\n    }, {\n        desc: 'should not match on false',\n        input: [\n            '<body>',\n            '\\t\\t<p>this not okay</p>',\n            '\\t\\t<p>this not okay</p>',\n            '      <div>Hey</div>',\n            '</body>'\n        ].join('\\n'),\n        opts: { 'indent-style': false },\n        output: 0\n    }, {\n        desc: 'should work with lines containing only tabs',\n        input: '\\t',\n        opts: { 'indent-style': false },\n        output: 0\n    },\n    {\n        desc: 'indent-width should match indents with the wrong number of spaces',\n        input: [\n            '<body>',\n            '       <p>this not okay</p>',\n            '  \\t  <p>this not okay</p>',\n            '        <div>Hey</div>',\n            '</body>'\n        ].join('\\n'),\n        opts: { 'indent-width': 4 },\n        output: 2\n    }, {\n        desc: 'indent-width should not match when set to false',\n        input: [\n            '<body>',\n            '       <p>this not okay</p>',\n            '  \\t  <p>this not okay</p>',\n            '        <div>Hey</div>',\n            '</body>'\n        ].join('\\n'),\n        opts: { 'indent-width': false },\n        output: 0\n    }, {\n        desc: 'indent-width should not fail with all-whitespace lines',\n        input: [\n            '<body>',\n            '        <p>okay</p>',\n            '',\n            '  \\t',\n            '        ',\n            '</body>',\n            '    '\n        ].join('\\n'),\n        opts: { 'indent-width': 4 },\n        output: 1\n    }, {\n        desc: 'indent-width should work with strange indent widths',\n        input: [\n            '<body>',\n            '          <p>this is fine</p>',\n            '        <p>this not okay</p>',\n            '\\t        <div>Hey</div>',\n            '</body>'\n        ].join('\\n'),\n        opts: { 'indent-width': 5 },\n        output: 2\n    },\n    {\n        desc: 'indent-width-cont should match indents with the wrong number of spaces starting with <',\n        input: [\n            '<body>',\n            '        <p>eight spaces</p>',\n            '          <p>ten spaces</p>',\n            '     <div>five spaces</div>',\n            '</body>'\n        ].join('\\n'),\n        opts: { 'indent-width': 4, 'indent-width-cont': true },\n        output: 2\n    }, {\n        desc: 'indent-width-cont should work with strange indent widths',\n        input: [\n            '<body>',\n            '        <p>eight spaces</p>',\n            '          <p>ten spaces</p>',\n            '     <div>five spaces</div>',\n            '</body>'\n        ].join('\\n'),\n        opts: { 'indent-width': 5, 'indent-width-cont': true },\n        output: 1\n    }, {\n        desc: 'indent-width-cont should not match indents that do not start with <',\n        input: [\n            '<body>',\n            '        <div>eight spaces',\n            '          ten spaces',\n            '     five spaces</div>',\n            '</body>'\n        ].join('\\n'),\n        opts: { 'indent-width': 4, 'indent-width-cont': true },\n        output: 0\n    }, {\n        desc: 'indent-width-cont should allow spaces after tabs but not before',\n        input: [\n            '<body>',\n            '\\t<div id=\"a\"',\n            '\\t     class=\"b\">',\n            '\\t     partial tabbing',\n            '\\t </div>',\n            '  \\t<p>illegal</p>',\n            '</body>'\n        ].join('\\n'),\n        opts: { 'indent-style': 'tabs', 'indent-width-cont': true },\n        output: 2\n    }, {\n        desc: 'indent-width-cont should check lines with only spaces',\n        input: [\n            '<div>',\n            '     ',\n            '    <input type=\"button\" />',\n            '</div>',\n            '<script>',\n            '  var foo = 1;',\n            '</script>'\n        ].join('\\n'),\n        opts: { 'indent-width': 4, 'indent-width-cont': true },\n        output: 1\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/input-radio-req-name.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: '<input type=\"radio\">',\n        opts: { 'input-radio-req-name': false },\n        output: 0\n    },\n    {\n        desc: 'should pass when input has no type',\n        input: '<input>',\n        opts: { 'input-radio-req-name': true },\n        output: 0\n    },\n    {\n        desc: 'should pass when input has no type value',\n        input: '<input type>',\n        opts: { 'input-radio-req-name': true },\n        output: 0\n    },\n    {\n        desc: 'should pass when input has type text',\n        input: '<input type=\"text\">',\n        opts: { 'input-radio-req-name': true },\n        output: 0\n    },\n    {\n        desc: 'should fail when radio input has no name',\n        input: '<input type=\"radio\" >',\n        opts: { 'input-radio-req-name': true },\n        output: 1\n    },\n    {\n        desc: 'should fail when radio input has empty name',\n        input: '<input type=\"radio\" name>',\n        opts: { 'input-radio-req-name': true },\n        output: 1\n    },\n    {\n        desc: 'should fail when radio input has name with no length',\n        input: '<input type=\"radio\" name=\"\">',\n        opts: { 'input-radio-req-name': true },\n        output: 1\n    },\n    {\n        desc: 'should pass when radio input has a name',\n        input: '<input type=\"radio\" name=\"hello\">',\n        opts: { 'input-radio-req-name': true },\n        output: 0\n    }\n];"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/input-req-label.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: '<input type=\"text\" >',\n        opts: {'input-req-label': false },\n        output: 0\n    },\n    {\n        desc: 'should do nothing with just a label',\n        input: '<label>Just a label</label>',\n        opts: {'input-req-label': true },\n        output: 0\n    },\n    {\n        desc: 'should do nothing with a label with a \"for\" attrib',\n        input: '<label for=\"doesntmatter\">Just a label</label>',\n        opts: {'input-req-label': true },\n        output: 0\n    },\n    {\n        desc: 'should do nothing with just a label',\n        input: '<label>Just a label</label>',\n        opts: {'input-req-label': true },\n        output: 0\n    },\n    {\n        desc: 'should do nothing with just an input',\n        input: '<input >',\n        opts: {'input-req-label': true },\n        output: 0\n    },\n    {\n        desc: 'should do nothing with an input of the wrong type',\n        input: '<input type=\"number\" >',\n        opts: {'input-req-label': true },\n        output: 0\n    },\n    {\n        desc: 'should return an error if the text input has no label parent and no id/name',\n        input: '<input type=\"text\" value=\"great\" >',\n        opts: {'input-req-label': true },\n        output: 1\n    },\n    {\n        desc: 'should return an error if the radio input has no label parent and no id/name',\n        input: '<input type=\"radio\" value=\"great\" >',\n        opts: {'input-req-label': true },\n        output: 1\n    },\n    {\n        desc: 'should pass if text input has a label parent anywhere up the DOM',\n        input: '<div><label><p><div><input type=\"text\" value=\"great\" ></div></p></label></div>',\n        opts: {'input-req-label': true },\n        output: 0\n    },\n    {\n        desc: 'should pass if radio input has a label parent anywhere up the DOM',\n        input: '<div><label><p><div><input type=\"radio\" value=\"great\" ></div></p></label></div>',\n        opts: {'input-req-label': true },\n        output: 0\n    },\n    {\n        desc: 'should fail if the text input has a name not matching the label for',\n        input: '<div><label for=\"dinosaur\">Label!</label></div><section><input type=\"text\" name=\"romeo\"></section> ',\n        opts: {'input-req-label': true },\n        output: 1\n    },\n    {\n        desc: 'should pass if the text input has a name matching the label for',\n        input: '<div><label for=\"dinosaur\">Label!</label></div><section><input type=\"text\" name=\"dinosaur\"></section> ',\n        opts: {'input-req-label': true },\n        output: 0\n    },\n    {\n        desc: 'should fail if the text input has an id not matching the label for',\n        input: '<div><label for=\"dinosaur\">Label!</label></div><section><input type=\"text\" id=\"romeo\"></section> ',\n        opts: {'input-req-label': true },\n        output: 1\n    },\n    {\n        desc: 'should pass if the text input has an id matching the label for',\n        input: '<div><label for=\"dinosaur\">Label!</label></div><section><input type=\"text\" id=\"dinosaur\"></section> ',\n        opts: {'input-req-label': true },\n        output: 0\n    },\n    {\n        desc: 'should fail if the radio input has a name matching the label for',\n        input: '<div><label for=\"dinosaur\">Label!</label></div><section><input type=\"radio\" name=\"dinosaur\"></section> ',\n        opts: {'input-req-label': true },\n        output: 1\n    },\n    {\n        desc: 'should pass if the radio input has an id matching the label for',\n        input: '<div><label for=\"dinosaur\">Label!</label></div><section><input type=\"radio\" id=\"dinosaur\"></section> ',\n        opts: {'input-req-label': true },\n        output: 0\n    }\n];"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/label-req-for.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: [\n            '<label for=\"noexist\">',\n            '<input type=\"text\" id=\"thing\"/>',\n            '</label>'\n        ].join(''),\n        opts: { 'label-req-for': false },\n        output: 0\n    }, {\n        desc: 'should pass valid for attr in strict mode',\n        input: [\n            '<label for=\"thing\">The Thing</label>',\n            '<input type=\"text\" id=\"thing\"/>'\n        ].join(''),\n        opts: { 'label-req-for': 'strict' },\n        output: 0\n    }, {\n        desc: 'should pass with multiple valid labels',\n        input: [\n            '<label for=\"thing-1\">Thing 1</label>',\n            '<input type=\"text\" id=\"thing-1\"/>',\n            '<label for=\"thing-2\">Thing 2</label>',\n            '<input type=\"text\" id=\"thing-2\"/>'\n        ].join(''),\n        opts: { 'label-req-for': 'strict' },\n        output: 0\n    }, {\n        desc: 'should pass even with out-of-order and duplicated elements',\n        input: [\n            '<label for=\"thing\">The Thing</label>',\n            '<input type=\"text\" id=\"thing\"/>',\n            '<label for=\"thing\">The Thing</label>',\n            '<input type=\"text\" id=\"thing\"/>',\n            '<label for=\"thing\">The Thing</label>'\n        ].join(''),\n        opts: { 'label-req-for': 'strict' },\n        output: 0\n    }, {\n        desc: 'should fail label with only child in strict mode',\n        input: [\n            '<label>',\n            '<input type=\"text\" id=\"thing\"/>',\n            '</label>'\n        ].join(''),\n        opts: { 'label-req-for': 'strict' },\n        output: 1\n    }, {\n        desc: 'should pass label with only child in nonstrict mode',\n        input: [\n            '<label>',\n            '<input type=\"text\" id=\"thing\"/>',\n            '</label>'\n        ].join(''),\n        opts: { 'label-req-for': true },\n        output: 0\n    }, {\n        desc: 'should fail label with nonexistant for id',\n        input: [\n            '<label for=\"noexist\">',\n            '<input type=\"text\" id=\"thing\"/>',\n            '</label>'\n        ].join(''),\n        opts: { 'label-req-for': true },\n        output: 1\n    }, {\n        desc: 'should pass label for with child id',\n        input: [\n            '<label for=\"thing\">',\n            '<input type=\"text\" id=\"thing\"/>',\n            '</label>'\n        ].join(''),\n        opts: { 'label-req-for': true },\n        output: 0\n    }, {\n        desc: 'should fail an unlabeable child in nonstrict',\n        input: [\n            '<label>',\n            '<p>not labeable</p>',\n            '</label>'\n        ].join(''),\n        opts: { 'label-req-for': true },\n        output: 1\n    }, {\n        desc: 'should fail an id that points to an unlabeable element',\n        input: [\n            '<btn></btn><div>',\n            '<label for=\"para\"></label>',\n            '<div id=\"para\"></div>',\n            '</div>'\n        ].join(''),\n        opts: { 'label-req-for': true },\n        output: 1\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/lang.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: '<!DOCTYPE html>\\n<html></html>',\n        opts: { 'html-req-lang': false },\n        output: 0\n    }, {\n        desc: 'should pass html with lang',\n        input: '<!DOCTYPE html>\\n<html lang=\"en\"></html>',\n        opts: { 'html-req-lang': true },\n        output: 0\n    }, {\n        desc: 'should fail on html with no lang',\n        input: '<!DOCTYPE html>\\n<html></html>',\n        opts: { 'html-req-lang': true },\n        output: 1\n    }, {\n        desc: 'should fail on invalid lang if lang-style is true',\n        input: '<!DOCTYPE html>\\n<html lang=\"enus\"></html>',\n        opts: { 'lang-style': true },\n        output: 1\n    }, {\n        desc: 'should pass on valid lang if lang-style is true',\n        input: '<!DOCTYPE html>\\n<html lang=\"en-US\"></html>',\n        opts: { 'lang-style': true },\n        output: 0\n    }, {\n        desc: 'should allow empty lang tag',\n        input: '<!DOCTYPE html>\\n<html lang=\"\"></html>',\n        opts: { 'lang-style': true },\n        output: 0\n    }, {\n        desc: 'should fail on wrong-case lang if lang-style is \"case\"',\n        input: '<!DOCTYPE html>\\n<html lang=\"en-us\"></html>',\n        opts: { 'lang-style': 'case' },\n        output: 1\n    }, {\n        desc: 'should pass correct lang if lang-style is \"case\"',\n        input: '<!DOCTYPE html>\\n<html lang=\"en-US\"></html>',\n        opts: { 'lang-style': 'case' },\n        output: 0\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/line-end-style.js",
    "content": "var input = [\n    '<body>\\n',\n    '  <p>\\n',\n    '    some\\r',\n    '    text\\n',\n    '  </p>\\r\\n',\n    '</body>\\r'\n].join('');\n\nmodule.exports = [\n    {\n        desc: 'should not match anything when set to false',\n        input: input,\n        opts: { 'line-end-style': false },\n        output: 0\n    }, {\n        desc: 'should fail on unknown style',\n        input: '',\n        opts: { 'line-end-style': 'inadmissible' },\n        output: 1\n    }, {\n        desc: 'should match CR and CRLF when set to LF',\n        input: input,\n        opts: { 'line-end-style': 'lf' },\n        output: 3\n    }, {\n        desc: 'should match LF and CRLF when set to CR',\n        input: input,\n        opts: { 'line-end-style': 'cr' },\n        output: 4\n    }, {\n        desc: 'should match CR and LF when set to CRLF',\n        input: input,\n        opts: { 'line-end-style': 'crlf' },\n        output: 5\n    }, {\n        desc: 'should not match empty lines',\n        input: ['<div>','','</div>'].join('\\n') + '\\n',\n        opts: { 'line-end-style': 'lf' },\n        output: 0\n    }\n];\n\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/line-max-len.js",
    "content": "module.exports = [\n  {\n    desc: 'should pass when set to false',\n    input: '-----------------------------------------------------------------------------------',\n    opts: { 'line-max-len': false },\n    output: 0\n  }, {\n    desc: 'should fail when given a non-number',\n    input: '',\n    opts: { 'line-max-len': 'its-a-string' },\n    output: 1\n  }, {\n    desc: 'should fail when given a negative number',\n    input: '1234',\n    opts: { 'line-max-len': -5 },\n    output: 1\n  }, {\n    desc: 'should pass when line length not exceeds the maximum value',\n    input: '1234',\n    opts: { 'line-max-len': 5 },\n    output: 0\n  }, {\n    desc: 'should pass when line length equals to the maximum value',\n    input: '12345',\n    opts: { 'line-max-len': 5 },\n    output: 0\n  }, {\n    desc: 'should ignore line breaks',\n    input: '12345\\r\\n12345\\n',\n    opts: { 'line-max-len': 5 },\n    output: 0\n  }, {\n    desc: 'should fail when line length exceeds the maximum value',\n    input: '123456',\n    opts: { 'line-max-len': 5 },\n    output: 1\n  }, {\n    desc: 'should pass when line length matches ignore-regex',\n    input: '<a href=\"http://www.google.com\">12345</a>',\n    opts: { 'line-max-len': 5, 'line-max-len-ignore-regex': 'href' },\n    output: 0\n  }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/line-no-trailing-whitespace.js",
    "content": "module.exports = [\n    {\n        desc: 'should not match anything when set to false',\n        input: 's p a c e \\n\\t\\r',\n        opts: { 'line-no-trailing-whitespace': false },\n        output: 0\n    }, {\n        desc: 'should match trailing spaces',\n        input: 's p a c e \\n',\n        opts: { 'line-no-trailing-whitespace': true },\n        output: 1\n    }, {\n        desc: 'should match multiple times',\n        input: 's p a c e \\n a n d\\t\\nl i n e',\n        opts: { 'line-no-trailing-whitespace': true },\n        output: 2\n    }, {\n        desc: 'should match only once for multiple spaces on one line',\n        input: 's p a c e\\n a n d \\t  \\t',\n        opts: { 'line-no-trailing-whitespace': true },\n        output: 1\n    }, {\n        desc: 'should match unicode spaces',\n        input: 's p a c e\\u00a0\\r a n d\\u2007\\rl i n e\\u205f',\n        opts: { 'line-no-trailing-whitespace': true },\n        output: 3\n    }, {\n        desc: 'should not match empty lines with CRLF',\n        input: ['<div>','','</div>'].join('\\r\\n') + '\\r\\n',\n        opts: { 'line-no-trailing-whitespace': true },\n        output: 0\n    }\n];\n\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/link-req-noopener.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: '<a href=\"index.html\" target=\"_blank\">link</a>',\n        opts: {'link-req-noopener': false},\n        output: 0\n    }, {\n        desc: 'should pass when there is no target=\"_blank\" attribute',\n        input: '<a href=\"index.html\">index</a>',\n        opts: {'link-req-noopener': true},\n        output: 0\n    }, {\n        desc: 'should fail on a link with target=\"_blank\" but no rel attribute',\n        input: '<a href=\"https://site.com\" target=\"_blank\">',\n        opts: {'link-req-noopener': true},\n        output: 1\n    }, {\n        desc: 'should fail on a link with target=\"_blank\" but no rel attribute',\n        input: '<a href=\"http://othersite.com\"\\ntarget=_blank rel=\"nofollow\">',\n        opts: {'link-req-noopener': true},\n        output: 1\n    }, {\n        desc: 'should pass a link with rel=\"noopener\"',\n        input: '<a href=\"https://site.com\" rel=\"noopener\" target=\"_blank\">',\n        opts: {'link-req-noopener': true},\n        output: 0\n    }, {\n        desc: 'should pass a link with rel=noreferrer',\n        input: '<a href=\"https://site.com\" target=\"_blank\" rel=noreferrer>',\n        opts: {'link-req-noopener': true},\n        output: 0\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/raw-ignore-regex.js",
    "content": "// We set line-end-style to lf for each option at the end of this file\n// for a predictable rule that will fail on each instance of \\r.\nmodule.exports = [\n    {\n        desc: 'should not ignore text if set to false',\n        input: '\\r\\r\\r\\r[[\\r\\n\\t fjq\\r\\n\\r]]\\r\\r',\n        opts: { 'raw-ignore-regex': false },\n        output: 9\n    }, {\n        desc: 'should remove matching text',\n        input: '\\r\\r\\r\\r[[\\r\\n\\t fjq\\r\\n\\r]]\\r\\r\\n',\n        opts: { 'raw-ignore-regex': /\\r/ },\n        output: 0\n    }, {\n        desc: 'should work across line breaks',\n        input: '\\r\\r\\r\\r[[\\r\\n\\t fjq\\r\\n\\r]]\\r\\r',\n        opts: { 'raw-ignore-regex': /\\[\\[[^]*?\\]\\]/ },\n        output: 6\n    }, {\n        desc: 'should remove multiple matches',\n        input: '\\r{\\r\\r}\\r[[\\r\\n\\t fjq\\r\\n\\r]]\\r\\r',\n        opts: { 'raw-ignore-regex': /(\\{[^]*?\\}|\\[\\[[^]*?\\]\\])/ },\n        output: 4\n    }\n];\n\nmodule.exports.forEach(function(test) {\n    test.opts['line-end-style'] = 'lf';\n});\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/runner.test.js",
    "content": "const chai = require('chai');\nconst assert = chai.assert;\nconst should = chai.should;\nconst expect = chai.expect;\nvar fs = require('fs'),\n    path = require('path'),\n    lodash = require('lodash'),\n    htmllint = require('../../lib'),\n    presets = require('../../lib/presets');\n\n// find all files in this directory that are .js files\nvar testFiles = fs.readdirSync(__dirname)\n    .filter(function (filepath) {\n        return (path.extname(filepath) === '.js' &&\n                path.basename(filepath) !== 'runner.test.js');\n    })\n    .map(function (filepath) {\n        var basename = path.basename(filepath, '.js');\n\n        return {\n            name: basename,\n            mod: require('./' + basename)\n        };\n    });\n\nfunction createLinter(names) {\n    return new htmllint.Linter(htmllint.rules);\n}\n\nfunction doTest(funcTest, testFile) {\n    it(funcTest.desc, function (cb) {\n        // configure a new linter\n        var linter = createLinter(funcTest.rules),\n            opts = funcTest.opts || testFile.defaults;\n\n        var promise = linter.lint(funcTest.input, presets.presets.none, opts),\n            expected = funcTest.output;\n\n        promise.then(function (output) {\n            if (lodash.isNumber(expected)) {\n                // test expects a certain number of issues\n                expect(output).to.have.length(expected);\n\n            } else {\n                // TODO: order probably shouldn't matter\n                // TODO: better assertion messages\n                expected.forEach(function (expectedIssue, index) {\n                    if (output.length <= index) {\n                        // only validate if the length is right,\n                        // length is tested later\n                        return;\n                    }\n\n                    var actual = output[index];\n                    // validate on each property specified in the expected issue\n                    Object.keys(expectedIssue)\n                        .forEach(function (key) {\n                            expect(actual[key]).to.be.equal(expectedIssue[key]);\n                        });\n                });\n                expect(output).to.have.length(expected.length);\n            }\n        }).then(cb, cb);\n    });\n}\n\n// for each test file, create a test suite\ntestFiles.forEach(function (testFile) {\n    describe(testFile.name, function () {\n        testFile.mod.forEach(function (test) {\n            if (!test.hasOwnProperty('rules')) {\n                // if no rules are specified, use the filename\n                test.rules = [testFile.name];\n                if (!test.defaults) {\n                    test.defaults = {};\n                }\n            }\n\n            doTest(test, testFile);\n        });\n    });\n});\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/spec-char-escape.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: '<div><p>Hello & hello</p></div>',\n        opts: { 'spec-char-escape': false },\n        output: 0\n    }, {\n        desc: 'should recognize special characters inside of text elements',\n        input: '<div><p class=\"className\" id=\"IdName\" label=\"label\" >Hello & hello</p></div>',\n        opts: { 'spec-char-escape': true },\n        output: 1\n    }, {\n        desc: 'should recognize special characters in attribute values',\n        input: '<div><p id=\"mine&ours\" class=\"yours>mine\"></p></div>',\n        opts: { 'spec-char-escape': true },\n        output: 1\n    }, {\n        desc: 'should return an error for each invalid escape',\n        input: '<div><p id=\"john&*;paul&;ringo&george^\"></p></div>',\n        opts: { 'spec-char-escape': true },\n        output: 3\n    }, {\n        desc: 'should ignore text matching text-ignore-regex',\n        input: '<div><p id=\"abc{{angu|ar $#!+}}\">Some\\n{{>>angular&!!\\\\}}\\n{{!!!!}}\\ntext</p></div>',\n        opts: { 'spec-char-escape': true , 'text-ignore-regex': /{{.*?}}/ },\n        output: 0\n    }, {\n        desc: 'should check sections of text not matching text-ignore-regex',\n        input: '<div><p id=\"abc{{angu|ar $#!+}}\">Some&\\n{{>>angular&!!\\\\}}\\n>text</p></div>',\n        opts: { 'spec-char-escape': true , 'text-ignore-regex': /{{.*?}}/ },\n        output: 2\n    }, {\n        desc: 'text-ignore-regex should maintain case-insensitive flag',\n        input: 'AA&Bb aa&bb',\n        opts: { 'spec-char-escape': true , 'text-ignore-regex': /aa.*?bb/i },\n        output: 0\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/table-req-caption.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: '<table></table>',\n        opts: { 'table-req-caption': false },\n        output: 0\n    },\n    {\n        desc: 'should fail when no caption is present',\n        input: '<table></table>',\n        opts: { 'table-req-caption': true },\n        output: 1\n    },\n    {\n        desc: 'should fail when a caption is a grand-child',\n        input: '<table><td><caption>Hello</caption></td></table>',\n        opts: { 'table-req-caption': true },\n        output: 1\n    },\n    {\n        desc: 'should fail when a caption is a sibling',\n        input: '<table></table><caption>Hello</caption>',\n        opts: { 'table-req-caption': true },\n        output: 1\n    },\n    {\n        desc: 'should fail twice with two tables',\n        input: '<table></table><table><caption>Hello</caption></table><table></table>',\n        opts: { 'table-req-caption': true },\n        output: 2\n    },\n    {\n        desc: 'should pass even if it is the last child',\n        input: '<table><p>Hey</p><p>Hey</p><p>Hey</p><p>Hey</p><p>Hey</p><caption>Hello</caption></table>',\n        opts: { 'table-req-caption': true },\n        output: 0\n    }\n];"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/table-req-header.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: '<table></table>',\n        opts: { 'table-req-header': false },\n        output: 0\n    },\n    {\n        desc: 'should fail when no header is present',\n        input: '<table></table>',\n        opts: { 'table-req-header': true },\n        output: 1\n    },\n    {\n        desc: 'should pass when header is present',\n        input: '<table><tr><th>Doges</th></tr></table>',\n        opts: { 'table-req-header': true },\n        output: 0\n    },\n\t{\n        desc: 'should pass when th is not first cell in tr',\n        input: '<table><tr><td>Shh</td><th>Doges</th></tr></table>',\n        opts: { 'table-req-header': true },\n        output: 0\n    },\n    {\n        desc: 'should fail when th not encapsulated in a tr because that\\'s technically not valid',\n        input: '<table><th>Dog</th></table>',\n        opts: { 'table-req-header': true },\n        output: 1\n    },\n    {\n        desc: 'should fail when header isn\\'t at the top of the table',\n        input: '<table><tr><td>goes woof</td></tr><tr><th>Dog</th></tr></table>',\n        opts: { 'table-req-header': true },\n        output: 1\n    },\n    {\n        desc: 'should pass when table has caption and th',\n        input: '<table><caption>DOGS</caption><tr><th>Hey</th></tr></table>',\n        opts: { 'table-req-header': true },\n        output: 0\n    },\n    {\n        desc: 'should pass when table has caption and thead',\n        input: '<table><caption>DOGS</caption><thead>Hey</thead></table>',\n        opts: { 'table-req-header': true },\n        output: 0\n    },\n\t{\n        desc: 'should pass when table has caption and text before thead',\n        input: '<table>\\n\\t<caption>DOGS</caption>\\n  <thead></thead>\\n</table>',\n        opts: { 'table-req-header': true },\n        output: 0\n    },\n    {\n        desc: 'should pass when table has caption and text before th',\n        input: '<table>\\n\\t<caption>DOGS</caption>\\n  <tr>\\n\\t  <td>Shh</td>\\n  \\t<th>Doges</th>\\n  </tr>\\n</table>',\n        opts: { 'table-req-header': true },\n        output: 0\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/tag-bans.js",
    "content": "module.exports = [\n    {\n        desc: 'should not match div by default',\n        input: '<body><div><p>This is text yo</p></div></body>',\n        output: 0\n    }, {\n        desc: 'should match options if user sets them',\n        input: '<body><button style=\"\"></button><main></main></body>',\n        opts: { 'tag-bans': ['button', 'main'] },\n        output: 2\n    }, {\n        desc: 'should not match defaults if user sets new elements in options',\n        input: '<body><style></style><i></i></body>',\n        opts: { 'tag-bans': ['button', 'main'] },\n        output: 0\n    }, {\n        desc: 'should not match when disabled',\n        input: '<body><button style=\"\"></button><main></main></body>',\n        opts: { 'tag-bans': false },\n        output: 0\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/tag-name-lowercase.js",
    "content": "module.exports = [\n    {\n        desc: 'should match attributes with mixed case',\n        input: '<boDY>',\n        opts: { 'tag-name-lowercase': true },\n        output: 1\n    }, {\n        desc: 'should not match attributes with lowered case',\n        input: '<body>',\n        opts: { 'tag-name-lowercase': true },\n        output: 0\n    }, {\n        desc: 'should multiple mixed-case elements',\n        input: '<HTML><seCtion></section></HTML>',\n        opts: { 'tag-name-lowercase': true },\n        output: 2\n    }, {\n        desc: 'should not match when disabled',\n        input: '<HTML><seCtion></section></HTML>',\n        opts: { 'tag-name-lowercase': false },\n        output: 0\n    }, {\n        desc: 'should not match directives',\n        input: '<!DOCTYPE html>',\n        opts: { 'tag-name-lowercase': true },\n        output: 0\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/tag-req-attr.js",
    "content": "module.exports = [\n    {\n        desc: 'should pass when set to false',\n        input: '<img />',\n        opts: {\n            'tag-req-attr': false\n        },\n        output: 0\n    },\n    {\n        desc: 'should pass when set to empty object',\n        input: '<img />',\n        opts: {\n            'tag-req-attr': {}\n        },\n        output: 0\n    }, {\n        desc: 'should pass when tag has correct attributes set',\n        input: '<img src=\"nyan.mrw\" alt=\"nyan\" />',\n        opts: {\n            'tag-req-attr': {\n                'img': [\n                    {\n                        'name': 'src'\n                    },\n                    {\n                        'name': 'alt'\n                    }\n                ]\n            }\n        },\n        output: 0\n    }, {\n        desc: 'should fail when tag has no correct attributes set',\n        input: '<img id=\"notasource\" />',\n        opts: {\n            'tag-req-attr': {\n                'img': [\n                    {\n                        'name': 'src'\n                    }\n                ]\n            }\n        },\n        output: 1\n    }, {\n        desc: 'should fail when tag has no correct attributes set',\n        input: '<img id=\"notasource\" />',\n        opts: {\n            'tag-req-attr': {\n                'img': [\n                    {\n                        'name': 'src',\n                        'allowEmpty': false\n                    }\n                ]\n            }\n        },\n        output: 1\n    }, {\n        desc: 'should fail when tag attribute is empty',\n        input: '<img src />',\n        opts: {\n            'tag-req-attr': {\n                'img': [\n                    {\n                        'name': 'src'\n                    }\n                ]\n            }\n        },\n        output: 1\n    }, {\n        desc: 'should pass when tag has correct attributes set',\n        input: '<img src=\"nyan.mrw\" alt=\"\" />',\n        opts: {\n            'tag-req-attr': {\n                'img': [\n                    {\n                        'name': 'src'\n                    },\n                    {\n                        'name': 'alt',\n                        'allowEmpty': true\n                    }\n                ]\n            }\n        },\n        output: 0\n    }, {\n        desc: 'should pass when there is no configuration for the tag',\n        input: '<img src=\"nyan.mrw\" alt=\"\" />',\n        opts: {\n            'tag-req-attr': {\n                'input': [\n                    {\n                        'name': 'type'\n                    }\n                ]\n            }\n        },\n        output: 0\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/title-max-len.js",
    "content": "module.exports = [\n    {\n        desc: 'title-max-len should pass when set to false',\n        input: '<head><title>looooooooooooooooooooooooooooooooooooooooo'\n            + 'oooooooooooooooooooooooooooooooooooooooooooooooooooooooo'\n            + 'oooooooooooooooooooooooooooooooooooooooooooooooooooooooo'\n            + 'ooooooooooooooooooooooooooooooooooooooong</title></head>',\n        opts: { 'title-max-len': false },\n        output: 0\n    }, {\n        desc: 'title-max-len should pass when the title fits requirements',\n        input: '<head><title>Title!</title></head>',\n        opts: { 'title-max-len': 60 },\n        output: 0\n    }, {\n        desc: 'title-max-len should fail for long titles',\n        input: '<head><title>Tiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii'\n            + 'iiiiiiiiiiiiiiiiiiiitle</title></head>',\n        opts: { 'title-max-len': 60 },\n        output: 1\n    }, {\n        desc: 'title-max-len should fail for short maximum lengths',\n        input: '<head><title>Title!</title></head>',\n        opts: { 'title-max-len': 4 },\n        output: 1\n    }\n];\n"
  },
  {
    "path": "packages/cml-htmllinter/test/functional/title-no-dup.js",
    "content": "module.exports = [\n    {\n        desc: 'title-no-dup should pass when set to false',\n        input: '<head><title>Tile</title><title>No wait title</title>'\n            + '<title>More titles for good measure</title></head>',\n        opts: { 'title-no-dup': false },\n        output: 0\n    }, {\n        desc: 'title-no-dup should pass when only one title is present',\n        input: '<head><title>Title!</title></head>',\n        opts: { 'title-no-dup': true },\n        output: 0\n    }, {\n        desc: 'title-no-dup should fail when multiple titles are present',\n        input: '<head><title>Title</title><title>Another title</title></head>',\n        opts: { 'title-no-dup': true },\n        output: 1\n    }, {\n        desc: 'title-no-dup should fail only once for many titles',\n        input: '<head><title>Mr.</title><title>Dr.</title>'\n            + '<title>Professor</title></head>',\n        opts: { 'title-no-dup': true },\n        output: 1\n    }\n]\n"
  },
  {
    "path": "packages/cml-htmllinter/test/unit/htmllint.js",
    "content": "describe('htmllint', function () {\n    var htmllint = require('../../');\n\n    it('should be a function', function () {\n        expect(htmllint).to.be.an.instanceOf(Function);\n    });\n\n    it('should return a thenable', function () {\n        var thenable = htmllint('');\n\n        expect(thenable).to.have.property('then');\n    });\n\n    it('should eventually return an array', function () {\n        var result = htmllint('');\n\n        return result.then(function (output) {\n            expect(output).to.be.an.instanceOf(Array);\n        });\n    });\n\n    it('should not throw on sanity.html', function () {\n        var fs = require('fs');\n        var filePath = '../fixtures/sanity.html';\n        var path = require('path');\n        var sanityHtml = fs.readFileSync(path.resolve(__dirname, filePath), {encoding: 'utf8'});\n\n        expect(function () {\n\n            htmllint(sanityHtml);\n        }).to.not.throw(Error);\n    });\n\n    describe('use', function () {\n        it('should register a plugin on the defaultLinter', function () {\n            var rule = {\n                name: 'testrule'\n            }, plugins = [\n                'chai',\n                { rules: [rule] }\n            ];\n\n            htmllint.use(plugins);\n\n            expect(htmllint.defaultLinter.rules.getRule(rule.name)).to.be.eql(rule);\n        });\n    });\n});\n"
  },
  {
    "path": "packages/cml-htmllinter/test/unit/inline-config-html/inline-all.html",
    "content": "<!DOCTYPE html>\n<html>\n\n<head>\n    <meta charset=\"utf-8\" />\n    <title>Hello, World!</title>\n</head>\n\n<body>\n    <h1 id='heading'>Heading</h1>\n    <p>Paragraph</p>\n    <div id='heading'>\n        <div role=\"supra\">This inside that</div>\n        <div class=\"ad\">This inside that</div>\n    </div>\n</body>\n\n</html>\n"
  },
  {
    "path": "packages/cml-htmllinter/test/unit/knife.apply_rules.js",
    "content": "describe('knife.apply_rules', function () {\n    var knife = require('../../lib/knife');\n\n    it('should return [] for no rules', function () {\n        var output = knife.applyRules(null);\n\n        expect(output).to.be.eql([]);\n    });\n});\n"
  },
  {
    "path": "packages/cml-htmllinter/test/unit/knife.is_labeable.js",
    "content": "describe('knife.is_labeable', function () {\n    var knife = require('../../lib/knife');\n\n    it('should return false for hidden input element', function () {\n        var ele = {\n            type: 'tag',\n            name: 'input',\n            attribs: {\n                type: {\n                    value: 'hidden'\n                }\n            }\n        };\n\n        var output = knife.isLabeable(ele);\n\n        expect(output).to.be.eql(false);\n    });\n});\n"
  },
  {
    "path": "packages/cml-htmllinter/test/unit/knife.relative_line_col.js",
    "content": "describe('knife.relative_line_col', function () {\n    var knife = require('../../lib/knife');\n\n    it('should throw when called with an index behind the last', function () {\n        var posFunc = knife.getLineColFunc('the html', [0, 0]);\n\n        expect(posFunc.bind(this, -10)).to.throw();\n    });\n});\n"
  },
  {
    "path": "packages/cml-htmllinter/test/unit/linter.js",
    "content": "var knife = require('../../lib/knife');\n\ndescribe('linter', function () {\n    var Linter = require('../../lib/linter');\n    var linter = null;\n\n    it('should be a function', function () {\n        expect(Linter).to.be.an.instanceOf(Function);\n    });\n\n    beforeEach(function () {\n        linter = new Linter([\n            {name: 'dom',  lint: function () { return []; }},\n            {name: 'line', lint: function () { return []; }},\n            require('../../lib/rules/free-options.js')\n        ]);\n    });\n\n    describe('lint', function () {\n        var ConstRule = require('../fixtures/const_rule');\n\n        var rule = new ConstRule([{\n            msg: 'this is a test',\n            index: 4,\n            line: 2,\n            column: 3\n        }, {\n            msg: 'this is a test',\n            index: 2\n        }]), output;\n\n        it('should output an issue when given a nonexistent option', function (cb) {\n            linter.lint('f\\nfff', { nonopt: 7 }, 'nodefault')\n                .then(function (output) {\n                    expect(output).to.have.length(1);\n                }).then(cb, cb);\n        });\n\n        it('should return correct line and column numbers', function (cb) {\n            linter.rules.addRule(rule);\n            linter.lint('f\\nfff', 'nodefault')\n                .then(function (output) {\n                    expect(output[0].line).to.be.eql(2);\n                    expect(output[0].column).to.be.eql(3);\n                }).then(cb, cb);\n        });\n\n        it('should not truncate output if maxerr is -1', function (cb) {\n            linter.rules.addRule(rule);\n            linter.lint('f\\nfff', { maxerr: -1 }, 'nodefault')\n                .then(function (output) {\n                    expect(output).to.have.length(2);\n                }).then(cb, cb);\n        });\n\n        it('should not return more than the maxerr', function (cb) {\n            linter.rules.addRule(rule);\n            linter.lint('f\\nfff', { maxerr: 1 }, 'nodefault')\n                .then(function (output) {\n                    expect(output).to.have.length(1);\n                }).then(cb, cb);\n        });\n\n        it('should output an issue for non-integer maxerr', function (cb) {\n            linter.lint('', { maxerr: 'five' }, 'nodefault')\n                .then(function (output) {\n                    expect(output).to.have.length(1);\n                }).then(cb, cb);\n        });\n    });\n\n    describe('resetRules', function () {\n        it('should return an array of issues', function () {\n            var issue = { msg: 'hit' };\n\n            linter.rules.addRule({\n                end: function () { return issue; }\n            });\n\n            var output = linter.resetRules();\n\n            expect(output[0]).to.be.eql(issue);\n        });\n    });\n\n    // TODO: move these out of this file...\n    describe('shred', function () {\n        it('should return an array', function () {\n            var output = knife.shred('');\n            expect(output).to.be.an.instanceOf(Array);\n        });\n\n        it('should return the proper number of lines', function () {\n            var lines = [\n                'Line1Line1Line1Line1',\n                'Line2Line2Line2Line2',\n                'Line3Line3Line3Line3'\n            ];\n            var output = knife.shred(lines.join('\\n').concat('\\n'));\n\n            expect(output.length - 1).to.be.eql(lines.length);\n        });\n\n        it('should return the full line at the right index', function () {\n            var lines = [\n                'Line1Line1Line1Line1',\n                'Line2Line2Line2Line2',\n                'Line3Line3Line3Line3'\n            ];\n            var concatted = lines.join('\\n').concat('\\n');\n            var output = knife.shred(concatted);\n\n            expect(output[lines.length].line).to.be.eql(lines[lines.length - 1].concat('\\n'));\n            expect(output[lines.length].index).to.be.eql(concatted.indexOf(lines[lines.length - 1].concat('\\n')));\n        });\n    });\n\n});\n"
  },
  {
    "path": "packages/cml-htmllinter/test/unit/messages.js",
    "content": "describe('messages', function () {\n    var messages = require('../../lib/messages');\n\n    describe('renderMsg', function () {\n        it('should return a string', function () {\n            var code = 'E000', data = {};\n\n            var output = messages.renderMsg(code, data);\n\n            expect(output).to.be.eql('not a valid error code');\n        });\n    });\n\n    describe('renderIssue', function () {\n        it('should return a string', function () {\n            var issue = { code: 'E000', data: {} };\n\n            var output = messages.renderIssue(issue);\n\n            expect(output).to.be.eql('not a valid error code');\n        });\n    });\n});\n"
  },
  {
    "path": "packages/cml-htmllinter/test/unit/parser.dom_builder.js",
    "content": "describe('parser.dom_builder', function () {\n    var DomBuilder = require('../../lib/parser/dom_builder'),\n        DomHandler = require('htmlparser2').DomHandler;\n\n    it('should be a constructor', function () {\n        expect(DomBuilder).to.be.an.instanceOf(Function);\n    });\n\n    it('should inherit from DomHandler', function () {\n        expect(DomBuilder.prototype).to.be.an.instanceOf(DomHandler);\n    });\n\n    it('should throw on addDomElement if not initialized with a parser', function () {\n        var builder = new DomBuilder();\n\n        /*eslint-disable no-underscore-dangle*/\n        expect(builder._addDomElement.bind(builder)).to.throw(Error);\n        /*eslint-enable no-underscore-dangle*/\n    });\n\n    describe('onerror', function () {\n        it('should throw the error', function () {\n            var builder = new DomBuilder();\n\n            expect(function () {\n                builder.onerror('error');\n            }).to.throw();\n        });\n    });\n});\n"
  },
  {
    "path": "packages/cml-htmllinter/test/unit/parser.js",
    "content": "describe('linter', function () {\n    var Parser = require('../../lib/parser');\n\n    it('should be a function', function () {\n        expect(Parser).to.be.an.instanceOf(Function);\n    });\n\n    describe('parse', function () {\n        var parser = null;\n\n        beforeEach(function () {\n            parser = new Parser();\n        });\n\n        it('should return correct line and column numbers', function () {\n            var output = parser.parse([\n               '<body>\\n'\n              ,'  <div a=\"jofwei\">\\n'\n              ,'    TextTextText\\n'\n              ,'  </div>\\n'\n              ,'</body>\\n'\n            ].join(''));\n\n            expect(output[0].openLineCol).to.be.eql([1,1]);\n            expect(output[0].closeLineCol).to.be.eql([5,1]);\n            expect(output[0].children[1].openLineCol).to.be.eql([2,3]);\n            expect(output[0].children[1].closeLineCol).to.be.eql([4,3]);\n        });\n    });\n\n    describe('onattribute', function () {\n        var parser = null;\n\n        beforeEach(function () {\n            parser = new Parser();\n        });\n\n        it('should correctly return an array of duplicates', function () {\n            var output = parser.parse([\n               '<body>\\n'\n              ,'  <div class=\"hello\" id=\"identityDiv\" class=\"goodbye\">\\n'\n              ,'  </div>\\n'\n              ,'</body>\\n'\n            ].join(''));\n\n            expect(output[0].children[1].dupes).to.be.eql(['class']);\n        });\n    });\n});\n"
  },
  {
    "path": "packages/cml-htmllinter/test/unit/raw-ignore-regex.js",
    "content": "var lodash = require('lodash'),\n    Linter = require('../../lib/linter'),\n    Issue = require('../../lib/issue');\n\n// Each E will trigger an error. Lowercase letters are targets for\n// raw-ignore-regex.\nvar defaultHtml = [\n    'E abb  E ', // 1, 8\n    'c\\tE  ',    // 3\n    'bEbEba E'   // 2, 4, 8\n].join('\\n') + '\\n';\n\nvar errors = [\n    [1,1], [1,8],\n    [2,3],\n    [3,2], [3,4], [3,8]\n];\n\nfunction meetExpectations(issues, locs) {\n    if (issues.length !== locs.length) {\n        return false;\n    }\n\n    for (var i = 0; i < locs.length; i++) {\n        if (issues[i].line   !== locs[i][0] ||\n            issues[i].column !== locs[i][1]) {\n            return false;\n        }\n    }\n\n    return true;\n}\n\nvar linter = null;\nfunction expectOutput(ignore, expected, html) {\n    html = html || defaultHtml;\n    return linter.lint(html, { 'raw-ignore-regex': ignore }, 'nodefault')\n        .then(function (output) {\n            var pos = output.map(\n                function(issue){return [issue.line,issue.column];}\n            );\n            expect(pos).to.be.eql(expected);\n        });\n}\n\ndescribe('raw-ignore-regex', function () {\n    function findE(lines) {\n        var issues = [];\n        lines.forEach(function (line) {\n            var regex = /E/gm,\n                match;\n            while (match = regex.exec(line.line)) {\n                issues.push(new Issue('EE', [line.row, match.index + 1]));\n            }\n        });\n        return issues;\n    }\n\n    beforeEach(function () {\n        linter = new Linter([\n            {name: 'dom',  lint: function () { return []; }},\n            {name: 'line', lint: findE},\n            require('../../lib/rules/free-options.js')\n        ]);\n    });\n\n    it('should work with no regex given', function () {\n        return expectOutput(false, errors);\n    });\n\n    it('should correct row and column numbers', function () {\n        return expectOutput('a', errors);\n    });\n\n    it('should work with multiple ignores per line', function () {\n        return expectOutput('b', errors);\n    });\n\n    it('should work with tabs', function () {\n        return expectOutput('c', errors);\n    });\n\n    it('should work with a multi-character ignore', function () {\n        return expectOutput('abb', errors);\n    });\n\n    it('should work with a multi-line ignore', function () {\n        return expectOutput('a[^]*a', [errors[0], errors[5]]);\n    });\n\n    it('should work with multiple multi-line ignores', function () {\n        return expectOutput(\n            '{[^]*?}',\n            [[1,1], [3,4], [4,1], [7,4], [7,8]],\n            'E {\\n\\n}  E\\nE\\n{ \\n \\n  }E{ }E\\n'\n        );\n    });\n});\n"
  },
  {
    "path": "packages/cml-htmllinter/test/unit/rules.doctype-first.js",
    "content": "describe('rules.doctype-first', function () {\n    var rule = require('../../lib/rules/doctype-first');\n\n    beforeEach(function () {\n        rule.end();\n    });\n\n    it('should not validate on a comment', function () {\n        var comment = { type: 'comment' },\n            opts = { 'doctype-first': true };\n\n        rule.lint(comment, opts);\n\n        expect(rule.passedFirst).to.be.eql(false);\n    });\n\n    it('should not validate on spaces', function () {\n        var spaces = { type: 'text', data: ' \\t\\n\\f\\r' },\n            opts = { 'doctype-first': true };\n\n        rule.lint(spaces, opts);\n\n        expect(rule.passedFirst).to.be.eql(false);\n    });\n});\n"
  },
  {
    "path": "packages/cml-htmllinter/test/unit/rules.focusable-tabindex-style.js",
    "content": "describe('rules.focusable-tabindex-style', function () {\n    var rule = require('../../lib/rules/focusable-tabindex-style');\n\n    beforeEach(function () {\n        rule.end();\n    });\n\n    describe('end', function () {\n        it('should reset the detected style', function () {\n            rule.detectedStyle = true;\n\n            rule.end();\n\n            expect(rule.detectedStyle).to.be.eql(null);\n        });\n    });\n\n    describe('lint', function () {\n        it('should return [] when not enabled', function () {\n            var issues = rule.lint({}, { 'focusable-tabindex-style': false });\n\n            expect(issues).to.be.eql([]);\n        });\n    });\n\n    describe('getTabIndexStyle', function () {\n        [\n            {\n                desc: 'should return null for elements with no tabindex',\n                element: {\n                    attribs: {}\n                },\n                style: false\n            }, {\n                desc: 'should return false for elements with tabindex 0',\n                element: {\n                    attribs: { tabindex: { value: 0 } }\n                },\n                style: false\n            }, {\n                desc: 'should return false for elements with negative tabindex',\n                element: {\n                    attribs: { tabindex: { value: -1 } }\n                },\n                style: false\n            }, {\n                desc: 'should return true for elements with positive tabindex',\n                element: {\n                    attribs: { tabindex: { value: 1 } }\n                },\n                style: true\n            }\n        ].forEach(function (testCase) {\n            it(testCase.desc, function () {\n                var style = rule.getTabIndexStyle(testCase.element);\n\n                expect(style).to.be.eql(testCase.style);\n            });\n        });\n    });\n});\n"
  },
  {
    "path": "packages/cml-htmllinter/test/unit/rules.js",
    "content": "describe('htmllint.rules', function () {\n    var rules = require('../../').rules;\n\n    rules.forEach(function (rule) {\n        describe(rule.name, function () {\n            it('should have a name', function () {\n                expect(rule).to.have.property('name');\n            });\n\n            if (rule.name === 'free-options') return;\n\n            it('should have a lint function', function () {\n                expect(rule).to.have.property('lint');\n            });\n\n            if (['line', 'dom'].indexOf(rule.name) === -1) {\n                it('should subscribe to something', function () {\n                    expect(rule).to.have.property('on');\n                    expect(rule.on.length > 0).to.equal(true);\n                });\n            }\n        });\n    });\n});\n"
  },
  {
    "path": "packages/cml-htmllinter/test/unit/runner.test.js",
    "content": "const fs = require('fs');\nconst path = require('path');\nglobal.chai = require('chai');\nglobal.chai.use(require('chai-as-promised'));\nglobal.expect = global.chai.expect;\n\nvar testFiles = fs.readdirSync(__dirname)\n    .filter(function (filepath) {\n        return (path.extname(filepath) === '.js' &&\n                path.basename(filepath) !== 'runner.test.js');\n    })\n    .map(function (filepath) {\n        var basename = path.basename(filepath, '.js');\n\n        return {\n            name: basename,\n            mod: require('./' + basename)\n        };\n    });\n"
  },
  {
    "path": "packages/cml-interface-parser/.eslintrc",
    "content": "{\n  \"parser\": \"babel-eslint\",\n  \"env\": {\n    \"browser\": true,\n    \"node\": true,\n    \"commonjs\": true,\n    \"amd\": true,\n    \"es6\": true,\n    \"mocha\": true\n  },\n  \"parserOptions\": {\n    \"ecmaVersion\": 6,\n    \"sourceType\": \"module\",\n    \"ecmaFeatures\": {\n      \"globalReturn\": true,\n      \"impliedStrict\": true,\n      \"jsx\": true,\n      \"modules\": true\n    }\n  },\n  \"extends\": [\n    \"eslint:recommended\"\n  ],\n\n  \"rules\": {\n    \"no-cond-assign\": 2,\n    \"no-console\": 0,\n    \"no-constant-condition\": 2,\n    \"no-control-regex\": 2,\n    \"comma-dangle\": [1, \"never\"],\n    \"no-debugger\": 2,\n    \"no-dupe-args\": 2,\n    \"no-dupe-keys\": 2,\n    \"no-duplicate-case\": 2,\n    \"no-empty\": 2,\n    \"no-empty-character-class\": 2,\n    \"no-ex-assign\": 2,\n    \"no-extra-boolean-cast\": 2,\n    \"no-extra-parens\": 0,\n    \"no-extra-semi\": 2,\n    \"no-func-assign\": 2,\n    \"no-inner-declarations\": [2, \"functions\"],\n    \"no-invalid-regexp\": 2,\n    \"no-irregular-whitespace\": 2,\n    \"no-negated-in-lhs\": 2,\n    \"no-obj-calls\": 2,\n    \"no-prototype-builtins\": 0,\n    \"no-regex-spaces\": 2,\n    \"no-sparse-arrays\": 2,\n    \"no-unexpected-multiline\": 2,\n    \"no-unreachable\": 2,\n    \"use-isnan\": 2,\n    \"valid-jsdoc\": 0,\n    \"valid-typeof\": 2,\n\n\n\n    \"accessor-pairs\": 2,\n    \"array-callback-return\": 0,\n    \"block-scoped-var\": 0,\n    \"complexity\": [2, 20],\n    \"consistent-return\": 0,\n    \"curly\": [2, \"all\"],\n    \"default-case\": 2,\n    \"dot-location\": [2, \"property\"],\n    \"dot-notation\": [2, {\n      \"allowKeywords\": false\n    }],\n    \"eqeqeq\": [0, \"allow-null\"],\n    \"guard-for-in\": 0,\n    \"no-alert\": 0,\n    \"no-caller\": 2,\n    \"no-case-declarations\": 2,\n    \"no-div-regex\": 2,\n    \"no-else-return\": 0,\n    \"no-empty-function\": 2,\n    \"no-empty-pattern\": 2,\n    \"no-eq-null\": 1,\n    \"no-eval\": 2,\n    \"no-extend-native\": 2,\n    \"no-extra-bind\": 2,\n    \"no-extra-label:\": 0,\n    \"no-fallthrough\": 2,\n    \"no-floating-decimal\": 2,\n    \"no-implicit-coercion\": 0,\n    \"no-implicit-globals\": 1,\n    \"no-implied-eval\": 2,\n    \"no-invalid-this\": 0,\n    \"no-iterator\": 2,\n    \"no-labels\": 2,\n    \"no-lone-blocks\": 2,\n    \"no-loop-func\": 0,\n    \"no-magic-numbers\": [1, {\n      \"ignore\": [0, -1, 1]\n    }],\n    \"no-multi-spaces\": 2,\n    \"no-multi-str\": 2,\n    \"no-native-reassign\": 2,\n    \"no-new\": 2,\n    \"no-new-func\": 0,\n    \"no-new-wrappers\": 2,\n    \"no-octal\": 2,\n    \"no-octal-escape\": 2,\n    \"no-param-reassign\": 0,\n    \"no-proto\": 2,\n    \"no-redeclare\": 2,\n    \"no-return-assign\": 0,\n    \"no-script-url\": 0,\n    \"no-self-assign\": 2,\n    \"no-self-compare\": 2,\n    \"no-sequences\": 2,\n    \"no-throw-literal\": 2,\n    \"no-unmodified-loop-condition\": 2,\n    \"no-unused-expressions\": 0,\n    \"no-unused-labels\": 2,\n    \"no-useless-call\": 2,\n    \"no-useless-concat\": 0,\n    \"no-useless-escape\": 0,\n    \"no-void\": 0,\n    \"no-warning-comments\": 0,\n    \"no-with\": 2,\n    \"radix\": 2,\n    \"vars-on-top\": 0,\n    \"wrap-iife\": [2, \"any\"],\n    \"yoda\": [2, \"never\"],\n    \"strict\": 0,\n\n\n\n    \"init-declarations\": 0,\n    \"no-catch-shadow\": 0,\n    \"no-delete-var\": 2,\n    \"no-label-var\": 2,\n    \"no-restricted-globals\": 0,\n    \"no-shadow\": 0,\n    \"no-shadow-restricted-names\": 2,\n    \"no-undef\": 2,\n    \"no-undef-init\": 2,\n    \"no-undefined\": 0,\n    \"no-unused-vars\": [2, {\n      \"vars\": \"all\",\n      \"args\": \"none\"\n    }],\n    \"no-use-before-define\": 0,\n\n\n    \"callback-return\": 0,\n    \"global-require\": 0,\n    \"handle-callback-err\": [2, \"^(err|error)$\"],\n    \"no-mixed-requires\": 0,\n    \"no-new-require\": 2,\n    \"no-path-concat\": 0,\n    \"no-process-env\": 0,\n    \"no-process-exit\": 0,\n    \"no-sync\": 0,\n\n\n    \"array-bracket-spacing\": [2, \"never\"],\n    \"block-spacing\": [1, \"never\"],\n    \"brace-style\": [0, \"1tbs\", {\n      \"allowSingleLine\": true\n    }],\n    \"camelcase\": 2,\n    \"comma-spacing\": [2, {\n      \"before\": false,\n      \"after\": true\n    }],\n    \"comma-style\": [2, \"last\"],\n    \"computed-property-spacing\": [2, \"never\"],\n    \"consistent-this\": [1, \"that\"],\n    \"func-names\": 0,\n    \"eol-last\": 2,\n    \"indent\": [2, 2, {\n      \"SwitchCase\": 1\n    }],\n    \"key-spacing\": [2, {\n      \"beforeColon\": false,\n      \"afterColon\": true\n    }],\n    \"linebreak-style\": [1, \"unix\"],\n    \"lines-around-comment\": [1, {\n      \"beforeBlockComment\": true\n    }],\n    \"func-style\": 0,\n    \"max-nested-callbacks\": [1, 5],\n    \"id-blacklist\": 0,\n    \"id-length\": 0,\n    \"id-match\": 0,\n    \"jsx-quotes\": 0,\n    \"keyword-spacing\": 2,\n    \"max-len\": [1, 200],\n    \"max-lines\": 0,\n    \"max-params\": [1, 7],\n    \"max-statements\": [1, 200],\n    \"max-statements-per-line\": 0,\n    \"new-cap\": [2, {\n      \"newIsCap\": true,\n      \"capIsNew\": false\n    }],\n    \"new-parens\": 2,\n    \"newline-after-var\": 0,\n    \"no-array-constructor\": 2,\n    \"no-bitwise\": 0,\n    \"newline-before-return\": 0,\n    \"newline-per-chained-call\": 1,\n    \"no-continue\": 0,\n    \"no-inline-comments\": 0,\n    \"no-lonely-if\": 0,\n    \"no-mixed-operators\": 0,\n    \"no-mixed-spaces-and-tabs\": 2,\n    \"no-multiple-empty-lines\": [2, {\n      \"max\": 2\n    }],\n    \"no-negated-condition\": 0,\n    \"no-nested-ternary\": 0,\n    \"no-new-object\": 2,\n    \"no-plusplus\": 0,\n    \"no-restricted-syntax\": 0,\n    \"no-spaced-func\": 2,\n    \"no-ternary\": 0,\n    \"no-trailing-spaces\": 2,\n    \"no-underscore-dangle\": 0,\n    \"no-unneeded-ternary\": 2,\n    \"no-whitespace-before-property\": 0,\n    \"object-curly-newline\": 0,\n    \"object-curly-spacing\": 0,\n    \"object-property-newline\": 0,\n    \"one-var\": [2, {\n      \"initialized\": \"never\"\n    }],\n    \"one-var-declaration-per-line\": 0,\n    \"operator-assignment\": 0,\n    \"operator-linebreak\": [2, \"after\", {\n      \"overrides\": {\n        \"?\": \"before\",\n        \":\": \"before\"\n      }\n    }],\n    \"padded-blocks\": 0,\n    \"quote-props\": 0,\n    \"quotes\": [2, \"single\", \"avoid-escape\"],\n    \"require-jsdoc\": 0,\n    \"semi\": [0, \"always\"],\n    \"semi-spacing\": 0,\n    \"sort-vars\": 0,\n    \"space-before-blocks\": [2, \"always\"],\n    \"space-before-function-paren\": [0, \"always\"],\n    \"space-in-parens\": [2, \"never\"],\n    \"space-infix-ops\": 2,\n    \"space-unary-ops\": [2, {\n      \"words\": true,\n      \"nonwords\": false\n    }],\n    \"spaced-comment\": [2, \"always\", {\n      \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n    }],\n    \"unicode-bom\": 0,\n    \"wrap-regex\": 0,\n\n\n    \"arrow-body-style\": 0,\n    \"arrow-parens\": 0,\n    \"arrow-spacing\": [2, {\n      \"before\": true,\n      \"after\": true\n    }],\n    \"constructor-super\": 0,\n    \"generator-star-spacing\": [2, {\n      \"before\": true,\n      \"after\": true\n    }],\n    \"no-class-assign\": 2,\n    \"no-confusing-arrow\": 0,\n    \"no-const-assign\": 2,\n    \"no-dupe-class-members\": 2,\n    \"no-duplicate-imports\": 0,\n    \"no-new-symbol\": 2,\n    \"no-restricted-imports\": 0,\n    \"no-this-before-super\": 2,\n    \"no-useless-computed-key\": 0,\n    \"no-var\": 0,\n    \"object-shorthand\": 0,\n    \"prefer-arrow-callback\": 0,\n    \"prefer-const\": 0,\n    \"prefer-reflect\": 0,\n    \"prefer-spread\": 0,\n    \"prefer-template\": 0,\n    \"prefer-rest-params\": 0,\n    \"require-yield\": 0,\n    \"rest-spread-spacing\": 0,\n    \"sort-imports\": 0,\n    \"template-curly-spacing\": 1,\n    \"yield-star-spacing\": 2\n  }\n}\n"
  },
  {
    "path": "packages/cml-interface-parser/.gitignore",
    "content": ".vscode\n"
  },
  {
    "path": "packages/cml-interface-parser/config/babel-parser-config.js",
    "content": "module.exports = {\n    sourceType: 'module',\n    allowImportExportEverywhere: true,\n    allowReturnOutsideFunction: true,\n    allowSuperOutsideMethod: true,\n    ranges: true,\n    tokens: true,\n    plugins: [\n      'flow',\n      'asyncGenerators',\n      'bigInt',\n      'classProperties',\n      'classPrivateProperties',\n      'classPrivateMethods',\n      'doExpressions',\n      'dynamicImport',\n      'exportDefaultFrom',\n      'exportNamespaceFrom',\n      'functionBind',\n      'functionSent',\n      'importMeta',\n      'logicalAssignment',\n      'nullishCoalescingOperator',\n      'numericSeparator',\n      'objectRestSpread',\n      'optionalCatchBinding',\n      'optionalChaining',\n      'throwExpressions'\n    ]\n  }\n  "
  },
  {
    "path": "packages/cml-interface-parser/index.js",
    "content": "const parserConfig = require('./config/babel-parser-config');\nconst babelParser = require('@babel/parser');\nconst astTreeParser = require('./src/ast-tree-parser');\nconst fileReader = require('./src/file-reader');\n\n\nclass InterfaceParser {\n\n  /**\n   * Constructor\n   * @param {Object} {\n   *  filePath, // file that contains javascript context you wanna to parse.\n   *  astTree // an ast tree object got from bable parser.\n   * }\n   */\n  constructor({filePath = null, astTree = null}, options = null, currentWorkspace = '') {\n    this._astTree = null;\n    this._currentWorkspace = currentWorkspace;\n\n    if (filePath) {\n      this._astTree = this.getAstTreeFromFile(filePath);\n    }\n    if (astTree) {\n      this._astTree = astTree;\n    }\n    if (options) {\n      this._options = options;\n    }\n  }\n\n  getAstTreeFromFile(filePath) {\n    let content = fileReader.getContent(filePath, this._currentWorkspace);\n    let astTree = null;\n    try {\n      astTree = babelParser.parse(content, this._options || parserConfig);\n    } catch (err) {\n      console.error(err);\n    }\n    return astTree;\n  }\n\n  getParseResults() {\n    let results = {vars: [], methods: [], props: [], events: []};\n    if (this._astTree) {\n      results = astTreeParser.parse(this._astTree);\n    }\n    return results;\n  }\n}\n\nmodule.exports = InterfaceParser;\n"
  },
  {
    "path": "packages/cml-interface-parser/package.json",
    "content": "{\n  \"name\": \"cml-interface-parser\",\n  \"version\": \"1.0.8\",\n  \"description\": \"A tool that can parse interface file and return all properties and methods it has.\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"nyc ./node_modules/mocha/bin/mocha ./test/*.js\",\n    \"test-brk\": \"./node_modules/mocha/bin/mocha --inspect-brk ./test/*.js\"\n  },\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"dependencies\": {\n    \"@babel/parser\": \"^7.1.3\",\n    \"@babel/traverse\": \"^7.2.2\",\n    \"chameleon-tool-utils\": \"1.0.8\",\n    \"commander\": \"^2.19.0\"\n  },\n  \"devDependencies\": {\n    \"chai\": \"^4.2.0\",\n    \"mocha\": \"^5.2.0\",\n    \"nyc\": \"^13.1.0\"\n  },\n  \"gitHead\": \"5ddcde4330774710f7646559446e008f7785ce00\"\n}"
  },
  {
    "path": "packages/cml-interface-parser/src/ast-tree-parser.js",
    "content": "const genericTypes = ['string', 'number', 'object', 'boolean', 'void', 'null'];\nconst genericAnnotationTypes = ['ObjectTypeAnnotation'];\nconst composedAnnotationTypes = ['TupleTypeAnnotation', 'UnionTypeAnnotation', 'IntersectionTypeAnnotation'];\n\nfunction getTypeAliasInfo(bodyItem = {}) {\n  let aliasInfo = {};\n  aliasInfo.typeName = bodyItem.id.name;\n  aliasInfo.flowType = bodyItem.right.type;\n\n  if (~genericAnnotationTypes.indexOf(bodyItem.right.type) && bodyItem.right && bodyItem.right.properties) {\n    aliasInfo.props = bodyItem.right.properties.map((prop) => {\n      return {\n        name: prop.key.name,\n        valueType: prop.value.id.name\n      };\n    });\n  } else if (~composedAnnotationTypes.indexOf(bodyItem.right.type)) {\n    aliasInfo.props = bodyItem.right.types.map((typeItem) => {\n      return {\n        name: typeItem.id.name, valueType: typeItem.id.name\n      };\n    });\n  } else {\n    aliasInfo.props = [];\n  }\n  return aliasInfo;\n}\n\n\nfunction getTypeAliasChain(typeDefinations, propItem) {\n  let _savedTypeChain = [];\n  travelTypes(typeDefinations, propItem);\n  return _savedTypeChain;\n  function travelTypes(typeDefinations, propItem) {\n    if (typeDefinations && propItem) {\n      propItem.props.forEach((prop) => {\n        let nextProp = typeDefinations[prop.valueType];\n        nextProp && _savedTypeChain.push(nextProp) && travelTypes(typeDefinations, nextProp);\n      });\n    }\n  }\n}\n\n\nfunction parse(astTree) {\n  let typeDefinations = {}; let results = {vars: [], methods: [], props: [], events: []};\n\n  astTree && astTree.type === 'File' && astTree.program.body.filter((bodyItem) => {\n    return ['TypeAlias', 'InterfaceDeclaration'].indexOf(bodyItem.type) > -1;\n  }).forEach((bodyItem) => {\n    if (bodyItem.type === 'TypeAlias') {\n      bodyItem._typeAliasInfo = getTypeAliasInfo(bodyItem);\n      bodyItem._typeAliasInfo.typeName && (typeDefinations[bodyItem._typeAliasInfo.typeName] = bodyItem._typeAliasInfo);\n      delete bodyItem._typeAliasInfo;\n    }\n    (bodyItem.type === 'InterfaceDeclaration') && bodyItem.body.properties.forEach((propertyItem) => {\n      if (propertyItem.method) {\n        results.methods.push(propertyItem.key.name);\n        results.events.push({\n          name: propertyItem.key.name,\n          paramsNum: propertyItem.value.params.length,\n          params: propertyItem.value.params ? propertyItem.value.params.filter((param) => {\n            return param.typeAnnotation.type === 'GenericTypeAnnotation';\n          }).map((param) => {\n            let typeParam = typeDefinations[param.typeAnnotation.id.name] || {typeName: param.typeAnnotation.id.name};\n            typeParam.varName = param.name.name;\n            if (typeParam.props) {typeParam.typeChain = getTypeAliasChain(typeDefinations, typeParam);}\n            return typeParam;\n          }) : []\n        });\n      } else {\n        results.vars.push(propertyItem.key.name);\n        propertyItem._formattedPropertyItem = {\n          name: propertyItem.key.name,\n          valueType: propertyItem.value.id.name,\n          props: (genericTypes.indexOf(propertyItem.value.id.name.toLowerCase()) === -1) ? [{\n            name: propertyItem.value.id.name, valueType: propertyItem.value.id.name\n          }] : []\n        };\n        propertyItem._formattedPropertyItem.typeChain = getTypeAliasChain(typeDefinations, propertyItem._formattedPropertyItem);\n        results.props.push(propertyItem._formattedPropertyItem);\n        delete propertyItem._formattedPropertyItem;\n      }\n    });\n  });\n\n  return results;\n}\n\nmodule.exports = {\n  parse\n};\n"
  },
  {
    "path": "packages/cml-interface-parser/src/file-reader.js",
    "content": "const fs = require('fs');\nconst path = require('path');\nconst cliUtils = require('chameleon-tool-utils');\nconst partRegExp = /<\\s*(script)\\s*([^>]*?)\\s*>([\\s\\S]*?)<\\s*\\/\\s*\\1\\s*>/g;\nconst paramRegExp = /([^\\s\\=]+)=?(['\"])?([^\\s\\=\\'\\\"]*)\\2/g;\n\nfunction _retrieveInterfaceContent(filePath = null, currentWorkspace = '') {\n  let fileContent = '';\n  let splitParts = {};\n  let include = null;\n\n  try {\n    fileContent = fs.readFileSync(filePath, 'utf8');\n  } catch (err) {\n    // console.warn(\"cml-interface-parser:\", err.message);\n  }\n  if (fileContent) {\n    splitParts = cliUtils.splitParts({ content: fileContent });\n  }\n  if (splitParts.customBlocks && splitParts.customBlocks.length) {\n    splitParts.customBlocks.forEach(part => {\n      if (part && (part.type === 'include')) {\n        include = part;\n      }\n    });\n  }\n\n  if (include && include.attrs && include.attrs.src) {\n    let nextPath = path.resolve(path.dirname(filePath), include.attrs.src);\n    if (currentWorkspace) {\n      let pathObj = path.parse(include.attrs.src);\n      pathObj.base = pathObj.name;\n      nextPath = cliUtils.findInterfaceFile(currentWorkspace, filePath, path.format(pathObj));\n      if (nextPath.filePath) {\n        nextPath = nextPath.filePath;\n      }\n    }\n    return _retrieveInterfaceContent(nextPath, currentWorkspace);\n  }\n  return fileContent;\n}\n\nfunction getContent(filePath = null, currentWorkspace = '') {\n  let fileRawContent = ''; let interfaceContent = '';\n  fileRawContent = _retrieveInterfaceContent(filePath, currentWorkspace);\n\n  fileRawContent.replace(partRegExp, (match, type, rawAttribute, definationContent) => {\n    !interfaceContent && rawAttribute.replace(paramRegExp, (attrMatch, attrName, mark, attrValue) => {\n      if (attrName === 'cml-type' && attrValue === 'interface') {\n        interfaceContent = definationContent;\n      }\n    });\n  });\n  return interfaceContent;\n}\n\nmodule.exports = {\n  getContent\n}\n"
  },
  {
    "path": "packages/cml-interface-parser/test/docs/include-interface.interface",
    "content": "<include src=\"./index.interface\"></include>\n"
  },
  {
    "path": "packages/cml-interface-parser/test/docs/index.interface",
    "content": "<script cml-type=\"interface\">\n/*\n定义一个inteface用于描述组件的属性和事件\n1、 如果区分组件属性和事件？\n通过类型来区分，事件为函数类型，属性为非函数类型\n2、 如何定义组件属性\n给interface添加同名的属性即可，指定类型\n3、 如何定义组件事件\n以事件名称为key值给interface定义属性，该属性是一个函数类型，返回值为void，\n定义函数的第一个参数为自定义事件传递的detail对象类型\n*/\n\n//定义事件detail对象的参数\ntype scrollEventDetail = {\n  deltaX: Number,\n  deltaY: Number,\n  scrollHeight: Number,\n  scrollLeft: Number,\n  scrollTop: Number,\n  scrollWidth: Number\n}\n\ntype scrolltobottomEventDetail = {\n  direction: String\n}\n\ninterface ScrollerInterface {\n  cstyle: String,\n  bottomOffset: Number,\n  scrollDirection: String,\n  customscroll(eventDetail: scrollEventDetail): void;\n  scrolltobottom(eventDetail: scrolltobottomEventDetail): void;\n}\n</script>\n"
  },
  {
    "path": "packages/cml-interface-parser/test/test.js",
    "content": "const path = require('path');\nconst chai = require('chai');\nconst expect = chai.expect;\nconst Parser = require('../index');\n\ndescribe('parser check', function() {\n  it('normal interface file: should pass check', function() {\n    let parser = new Parser({filePath: path.resolve(__dirname, './docs/index.interface')});\n    let results = parser.getParseResults();\n    expect(results).to.have.deep.property('vars', ['cstyle', 'bottomOffset', 'scrollDirection']);\n    expect(results).to.have.deep.property('methods', ['customscroll', 'scrolltobottom']);\n    expect(results).to.have.deep.property('props', [{\n      name: 'cstyle', valueType: 'String', props: [], typeChain: []\n    }, {\n      name: 'bottomOffset', valueType: 'Number', props: [], typeChain: []\n    }, {\n      name: 'scrollDirection', valueType: 'String', props: [], typeChain: []\n    }]);\n  });\n  it('include interface file: should pass check', function() {\n    let parser = new Parser({filePath: path.resolve(__dirname, './docs/include-interface.interface')});\n    let results = parser.getParseResults();\n    expect(results).to.have.deep.property('vars', ['cstyle', 'bottomOffset', 'scrollDirection']);\n    expect(results).to.have.deep.property('methods', ['customscroll', 'scrolltobottom']);\n    expect(results).to.have.deep.property('props', [{\n      name: 'cstyle', valueType: 'String', props: [], typeChain: []\n    }, {\n      name: 'bottomOffset', valueType: 'Number', props: [], typeChain: []\n    }, {\n      name: 'scrollDirection', valueType: 'String', props: [], typeChain: []\n    }]);\n  });\n});\n"
  },
  {
    "path": "packages/cml-js-parser/.eslintrc",
    "content": "{\n  \"parser\": \"babel-eslint\",\n  \"env\": {\n    \"browser\": true,\n    \"node\": true,\n    \"commonjs\": true,\n    \"amd\": true,\n    \"es6\": true,\n    \"mocha\": true\n  },\n  \"parserOptions\": {\n    \"ecmaVersion\": 6,\n    \"sourceType\": \"module\",\n    \"ecmaFeatures\": {\n      \"globalReturn\": true,\n      \"impliedStrict\": true,\n      \"jsx\": true,\n      \"modules\": true\n    }\n  },\n  \"extends\": [\n    \"eslint:recommended\"\n  ],\n\n  \"rules\": {\n    \"no-cond-assign\": 2,\n    \"no-console\": 0,\n    \"no-constant-condition\": 2,\n    \"no-control-regex\": 2,\n    \"comma-dangle\": [1, \"never\"],\n    \"no-debugger\": 2,\n    \"no-dupe-args\": 2,\n    \"no-dupe-keys\": 2,\n    \"no-duplicate-case\": 2,\n    \"no-empty\": 2,\n    \"no-empty-character-class\": 2,\n    \"no-ex-assign\": 2,\n    \"no-extra-boolean-cast\": 2,\n    \"no-extra-parens\": 0,\n    \"no-extra-semi\": 2,\n    \"no-func-assign\": 2,\n    \"no-inner-declarations\": [2, \"functions\"],\n    \"no-invalid-regexp\": 2,\n    \"no-irregular-whitespace\": 2,\n    \"no-negated-in-lhs\": 2,\n    \"no-obj-calls\": 2,\n    \"no-prototype-builtins\": 0,\n    \"no-regex-spaces\": 2,\n    \"no-sparse-arrays\": 2,\n    \"no-unexpected-multiline\": 2,\n    \"no-unreachable\": 2,\n    \"use-isnan\": 2,\n    \"valid-jsdoc\": 0,\n    \"valid-typeof\": 2,\n\n\n\n    \"accessor-pairs\": 2,\n    \"array-callback-return\": 0,\n    \"block-scoped-var\": 0,\n    \"complexity\": [2, 20],\n    \"consistent-return\": 0,\n    \"curly\": [2, \"all\"],\n    \"default-case\": 2,\n    \"dot-location\": [2, \"property\"],\n    \"dot-notation\": [2, {\n      \"allowKeywords\": false\n    }],\n    \"eqeqeq\": [0, \"allow-null\"],\n    \"guard-for-in\": 0,\n    \"no-alert\": 0,\n    \"no-caller\": 2,\n    \"no-case-declarations\": 2,\n    \"no-div-regex\": 2,\n    \"no-else-return\": 0,\n    \"no-empty-function\": 2,\n    \"no-empty-pattern\": 2,\n    \"no-eq-null\": 1,\n    \"no-eval\": 2,\n    \"no-extend-native\": 2,\n    \"no-extra-bind\": 2,\n    \"no-extra-label:\": 0,\n    \"no-fallthrough\": 2,\n    \"no-floating-decimal\": 2,\n    \"no-implicit-coercion\": 0,\n    \"no-implicit-globals\": 1,\n    \"no-implied-eval\": 2,\n    \"no-invalid-this\": 0,\n    \"no-iterator\": 2,\n    \"no-labels\": 2,\n    \"no-lone-blocks\": 2,\n    \"no-loop-func\": 0,\n    \"no-magic-numbers\": [1, {\n      \"ignore\": [0, -1, 1]\n    }],\n    \"no-multi-spaces\": 2,\n    \"no-multi-str\": 2,\n    \"no-native-reassign\": 2,\n    \"no-new\": 2,\n    \"no-new-func\": 0,\n    \"no-new-wrappers\": 2,\n    \"no-octal\": 2,\n    \"no-octal-escape\": 2,\n    \"no-param-reassign\": 0,\n    \"no-proto\": 2,\n    \"no-redeclare\": 2,\n    \"no-return-assign\": 0,\n    \"no-script-url\": 0,\n    \"no-self-assign\": 2,\n    \"no-self-compare\": 2,\n    \"no-sequences\": 2,\n    \"no-throw-literal\": 2,\n    \"no-unmodified-loop-condition\": 2,\n    \"no-unused-expressions\": 0,\n    \"no-unused-labels\": 2,\n    \"no-useless-call\": 2,\n    \"no-useless-concat\": 0,\n    \"no-useless-escape\": 0,\n    \"no-void\": 0,\n    \"no-warning-comments\": 0,\n    \"no-with\": 2,\n    \"radix\": 2,\n    \"vars-on-top\": 0,\n    \"wrap-iife\": [2, \"any\"],\n    \"yoda\": [2, \"never\"],\n    \"strict\": 0,\n\n\n\n    \"init-declarations\": 0,\n    \"no-catch-shadow\": 0,\n    \"no-delete-var\": 2,\n    \"no-label-var\": 2,\n    \"no-restricted-globals\": 0,\n    \"no-shadow\": 0,\n    \"no-shadow-restricted-names\": 2,\n    \"no-undef\": 2,\n    \"no-undef-init\": 2,\n    \"no-undefined\": 0,\n    \"no-unused-vars\": [2, {\n      \"vars\": \"all\",\n      \"args\": \"none\"\n    }],\n    \"no-use-before-define\": 0,\n\n\n    \"callback-return\": 0,\n    \"global-require\": 0,\n    \"handle-callback-err\": [2, \"^(err|error)$\"],\n    \"no-mixed-requires\": 0,\n    \"no-new-require\": 2,\n    \"no-path-concat\": 0,\n    \"no-process-env\": 0,\n    \"no-process-exit\": 0,\n    \"no-sync\": 0,\n\n\n    \"array-bracket-spacing\": [2, \"never\"],\n    \"block-spacing\": [1, \"never\"],\n    \"brace-style\": [0, \"1tbs\", {\n      \"allowSingleLine\": true\n    }],\n    \"camelcase\": 2,\n    \"comma-spacing\": [2, {\n      \"before\": false,\n      \"after\": true\n    }],\n    \"comma-style\": [2, \"last\"],\n    \"computed-property-spacing\": [2, \"never\"],\n    \"consistent-this\": [1, \"that\"],\n    \"func-names\": 0,\n    \"eol-last\": 2,\n    \"indent\": [2, 2, {\n      \"SwitchCase\": 1\n    }],\n    \"key-spacing\": [2, {\n      \"beforeColon\": false,\n      \"afterColon\": true\n    }],\n    \"linebreak-style\": [1, \"unix\"],\n    \"lines-around-comment\": [1, {\n      \"beforeBlockComment\": true\n    }],\n    \"func-style\": 0,\n    \"max-nested-callbacks\": [1, 5],\n    \"id-blacklist\": 0,\n    \"id-length\": 0,\n    \"id-match\": 0,\n    \"jsx-quotes\": 0,\n    \"keyword-spacing\": 2,\n    \"max-len\": [1, 200],\n    \"max-lines\": 0,\n    \"max-params\": [1, 7],\n    \"max-statements\": [1, 200],\n    \"max-statements-per-line\": 0,\n    \"new-cap\": [2, {\n      \"newIsCap\": true,\n      \"capIsNew\": false\n    }],\n    \"new-parens\": 2,\n    \"newline-after-var\": 0,\n    \"no-array-constructor\": 2,\n    \"no-bitwise\": 0,\n    \"newline-before-return\": 0,\n    \"newline-per-chained-call\": 1,\n    \"no-continue\": 0,\n    \"no-inline-comments\": 0,\n    \"no-lonely-if\": 0,\n    \"no-mixed-operators\": 0,\n    \"no-mixed-spaces-and-tabs\": 2,\n    \"no-multiple-empty-lines\": [2, {\n      \"max\": 2\n    }],\n    \"no-negated-condition\": 0,\n    \"no-nested-ternary\": 0,\n    \"no-new-object\": 2,\n    \"no-plusplus\": 0,\n    \"no-restricted-syntax\": 0,\n    \"no-spaced-func\": 2,\n    \"no-ternary\": 0,\n    \"no-trailing-spaces\": 2,\n    \"no-underscore-dangle\": 0,\n    \"no-unneeded-ternary\": 2,\n    \"no-whitespace-before-property\": 0,\n    \"object-curly-newline\": 0,\n    \"object-curly-spacing\": 0,\n    \"object-property-newline\": 0,\n    \"one-var\": [2, {\n      \"initialized\": \"never\"\n    }],\n    \"one-var-declaration-per-line\": 0,\n    \"operator-assignment\": 0,\n    \"operator-linebreak\": [2, \"after\", {\n      \"overrides\": {\n        \"?\": \"before\",\n        \":\": \"before\"\n      }\n    }],\n    \"padded-blocks\": 0,\n    \"quote-props\": 0,\n    \"quotes\": [2, \"single\", \"avoid-escape\"],\n    \"require-jsdoc\": 0,\n    \"semi\": [0, \"always\"],\n    \"semi-spacing\": 0,\n    \"sort-vars\": 0,\n    \"space-before-blocks\": [2, \"always\"],\n    \"space-before-function-paren\": [0, \"always\"],\n    \"space-in-parens\": [2, \"never\"],\n    \"space-infix-ops\": 2,\n    \"space-unary-ops\": [2, {\n      \"words\": true,\n      \"nonwords\": false\n    }],\n    \"spaced-comment\": [2, \"always\", {\n      \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n    }],\n    \"unicode-bom\": 0,\n    \"wrap-regex\": 0,\n\n\n    \"arrow-body-style\": 0,\n    \"arrow-parens\": 0,\n    \"arrow-spacing\": [2, {\n      \"before\": true,\n      \"after\": true\n    }],\n    \"constructor-super\": 0,\n    \"generator-star-spacing\": [2, {\n      \"before\": true,\n      \"after\": true\n    }],\n    \"no-class-assign\": 2,\n    \"no-confusing-arrow\": 0,\n    \"no-const-assign\": 2,\n    \"no-dupe-class-members\": 2,\n    \"no-duplicate-imports\": 0,\n    \"no-new-symbol\": 2,\n    \"no-restricted-imports\": 0,\n    \"no-this-before-super\": 2,\n    \"no-useless-computed-key\": 0,\n    \"no-var\": 0,\n    \"object-shorthand\": 0,\n    \"prefer-arrow-callback\": 0,\n    \"prefer-const\": 0,\n    \"prefer-reflect\": 0,\n    \"prefer-spread\": 0,\n    \"prefer-template\": 0,\n    \"prefer-rest-params\": 0,\n    \"require-yield\": 0,\n    \"rest-spread-spacing\": 0,\n    \"sort-imports\": 0,\n    \"template-curly-spacing\": 1,\n    \"yield-star-spacing\": 2\n  }\n}\n"
  },
  {
    "path": "packages/cml-js-parser/.gitignore",
    "content": "demo/\n"
  },
  {
    "path": "packages/cml-js-parser/config/babel-parser-config.js",
    "content": "module.exports = {\n  sourceType: 'module',\n  allowImportExportEverywhere: true,\n  allowReturnOutsideFunction: true,\n  allowSuperOutsideMethod: true,\n  ranges: true,\n  tokens: true,\n  plugins: [\n    'flow',\n    'asyncGenerators',\n    'bigInt',\n    'classProperties',\n    'classPrivateProperties',\n    'classPrivateMethods',\n    'doExpressions',\n    'dynamicImport',\n    'exportDefaultFrom',\n    'exportNamespaceFrom',\n    'functionBind',\n    'functionSent',\n    'importMeta',\n    'logicalAssignment',\n    'nullishCoalescingOperator',\n    'numericSeparator',\n    'objectRestSpread',\n    'optionalCatchBinding',\n    'optionalChaining',\n    'throwExpressions'\n  ]\n}\n"
  },
  {
    "path": "packages/cml-js-parser/index.js",
    "content": "const parserConfig = require('./config/babel-parser-config');\nconst babelParser = require('@babel/parser');\nconst traverse = require('@babel/traverse')['default'];\nconst visitors = require('./src/visitors');\nconst fileReader = require('./src/file-reader');\n\n\nclass CmlJSParser {\n\n  /**\n   * Constructor\n   * @param {Object} {\n   *  filePath, // file that contains javascript context you wanna to parse.\n   *  astTree // an ast tree object got from bable parser.\n   * }\n   */\n  constructor({filePath = null, astTree = null}, options = null) {\n    this._astTree = null;\n\n    if (filePath) {\n      this._astTree = this.getAstTreeFromFile(filePath);\n    }\n    if (astTree) {\n      this._astTree = astTree;\n    }\n    if (options) {\n      this._options = options;\n    }\n  }\n\n  getAstTreeFromFile(filePath) {\n    let content = fileReader.getContent(filePath);\n    let astTree = null;\n    try {\n      astTree = babelParser.parse(content, this._options || parserConfig);\n    } catch (err) {\n      console.error(err);\n    }\n    return astTree;\n  }\n\n  getParseResults() {\n    let results = {vars: [], methods: [], props: [], events: []};\n    if (this._astTree) {\n      traverse(this._astTree, {\n        ExportDefaultDeclaration(path) {\n          let containerPath = visitors.exportPathVisitor(path);\n          if (containerPath) {\n            results = visitors.containerPathVisitor(containerPath);\n          }\n        }\n      });\n    }\n    return results;\n  }\n}\n\nmodule.exports = CmlJSParser;\n"
  },
  {
    "path": "packages/cml-js-parser/package.json",
    "content": "{\n  \"name\": \"cml-js-parser\",\n  \"version\": \"1.0.8\",\n  \"description\": \"A tool used to get variable names and methods that can be used in templates.\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"nyc ./node_modules/mocha/bin/mocha ./test/*.js\",\n    \"test-brk\": \"./node_modules/mocha/bin/mocha --inspect-brk ./test/*.js\"\n  },\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"dependencies\": {\n    \"@babel/parser\": \"^7.2.2\",\n    \"@babel/traverse\": \"^7.2.2\",\n    \"bulk-require\": \"^1.0.1\",\n    \"chameleon-tool-utils\": \"1.0.8\"\n  },\n  \"devDependencies\": {\n    \"chai\": \"^4.2.0\",\n    \"mocha\": \"^5.2.0\",\n    \"nyc\": \"^13.1.0\"\n  },\n  \"gitHead\": \"5ddcde4330774710f7646559446e008f7785ce00\"\n}"
  },
  {
    "path": "packages/cml-js-parser/src/file-reader.js",
    "content": "const fs = require('fs');\nconst cliUtils = require('chameleon-tool-utils');\n\nfunction getContent(filePath = null) {\n  let fileRawContent = ''; let parts = {}; let scriptContent = '';\n  try {\n    filePath && (fileRawContent = fs.readFileSync(filePath, 'utf8'));\n  } catch (err) {\n    // console.warn(\"cml-interface-parser:\", err.message);\n  }\n\n  parts = cliUtils.splitParts({content: fileRawContent});\n\n  if (parts.script && parts.script.length) {\n    scriptContent = parts.script.filter((item) => Object.keys(item.attrs).length === 0).map((item) => {\n      return item.content;\n    });\n  }\n\n  return scriptContent[0] || '';\n}\n\nmodule.exports = {\n  getContent\n}\n"
  },
  {
    "path": "packages/cml-js-parser/src/visitors/containerPathVisitor.js",
    "content": "function getObjectKeyName(node) {\n  return node.key.name;\n}\n\nfunction isValidProp(node) {\n  const validKeys = ['props', 'data', 'computed', 'methods'];\n  let keyName = getObjectKeyName(node);\n  let idx = validKeys.indexOf(keyName);\n  return ~idx ? validKeys[idx] : '';\n}\n\nfunction adoptPropResults(res, container) {\n  res.forEach((prop) => {\n    // fillKey is one of 'vars', 'methods', 'props' or 'events'\n    container[prop.fillKey].push(prop.value);\n  });\n}\n\nconst propFuns = {\n  props: function(path) {\n    let props = [];\n    path.get('value').get('properties')\n      .forEach((prop) => {\n        if (prop.isObjectProperty()) {\n          let propName = getObjectKeyName(prop.node);\n          props.push({\n            fillKey: 'vars',\n            value: propName\n          });\n          if (prop.get('value').isObjectExpression()) {\n            let valueInfo = {};\n            prop.get('value').get('properties')\n              .forEach((childProp) => {\n                let childName = getObjectKeyName(childProp.node);\n                if (childName === 'type') {\n                  valueInfo[childName] = childProp.get('value').isIdentifier() ? childProp.node.value.name : '';\n                }\n                if (childName === 'default') {\n                  if (childProp.isObjectProperty()) {\n                    valueInfo[childName] = ~childProp.node.value.type.indexOf('Literal') ? (childProp.node.value.value || '') : '';\n                  } else {\n                    valueInfo[childName] = '';\n                  }\n                }\n                if (childName === 'required') {\n                  valueInfo[childName] = childProp.get('value').isBooleanLiteral() ? childProp.node.value.value : false;\n                }\n              });\n            props.push({\n              fillKey: 'props',\n              value: {\n                name: propName,\n                valueType: valueInfo.type || '',\n                required: !!valueInfo.required || false,\n                default: valueInfo['default']\n              }\n            });\n          }\n          if (prop.get('value').isIdentifier()) {\n            props.push({\n              fillKey: 'props',\n              value: {\n                name: propName,\n                valueType: prop.node.value.name,\n                required: false,\n                default: ''\n              }\n            });\n          }\n        }\n      });\n    return props;\n  },\n  data: function(path) {\n    let props = [];\n    path.get('value').get('properties')\n      .forEach((prop) => {\n        if (prop.isObjectProperty()) {\n          props.push({\n            fillKey: 'vars',\n            value: getObjectKeyName(prop.node)\n          });\n        }\n      });\n    return props;\n  },\n  computed: function(path) {\n    let props = [];\n    path.get('value').get('properties')\n      .forEach((prop) => {\n        if (prop.isObjectMethod()) {\n          props.push({\n            fillKey: 'vars',\n            value: getObjectKeyName(prop.node)\n          });\n        }\n        if (prop.isObjectProperty() && prop.get('value').isFunctionExpression()) {\n          props.push({\n            fillKey: 'vars',\n            value: getObjectKeyName(prop.node)\n          });\n        }\n        if (prop.isSpreadElement()) {\n          prop.get('argument').isCallExpression() && prop.get('argument').get('arguments')\n            .forEach((argItem) => {\n              argItem.isObjectExpression() && argItem.get('properties').forEach((argProp) => {\n                props.push({\n                  fillKey: 'vars',\n                  value: getObjectKeyName(argProp.node)\n                });\n              });\n            });\n        }\n      });\n    return props;\n  },\n  methods: function(path) {\n    let props = [];\n    path.get('value').get('properties')\n      .forEach((prop) => {\n        if (prop.isObjectMethod()) {\n          props.push({\n            fillKey: 'methods',\n            value: getObjectKeyName(prop.node)\n          });\n        }\n        if (prop.isObjectProperty() && prop.get('value').isFunctionExpression()) {\n          props.push({\n            fillKey: 'methods',\n            value: getObjectKeyName(prop.node)\n          });\n        }\n      });\n    return props;\n  }\n};\n\nmodule.exports.containerPathVisitor = function(path) {\n  let results = {vars: [], methods: [], props: [], events: []};\n\n  path && path.traverse({\n    'ClassProperty|ObjectProperty'(path) {\n      let propName = isValidProp(path.node);\n      if (propName && path.get('value').isObjectExpression()) {\n        adoptPropResults(propFuns[propName](path), results);\n      }\n    },\n    MemberExpression(path) {\n      if (!path.node.computed && path.get('object').isThisExpression() && path.get('property').isIdentifier()) {\n        if (path.node.property.name === '$cmlEmit') {\n          let parentNode = path.findParent(path => path.isCallExpression());\n          if (parentNode && parentNode.get('arguments')) {\n            let nameArg = parentNode.get('arguments')[0];\n            if (nameArg.isStringLiteral()) {\n              results.events.push({\n                name: parentNode.get('arguments')[0].node.value,\n                paramsNum: -1,\n                params: []\n              });\n            } else if (nameArg.isIdentifier()) {\n              let argBinding = nameArg.scope.getBinding(nameArg.node.name);\n              let possibleInit = argBinding ? argBinding.path.node.init : null;\n              // For now, we only check just one jump along its scope chain.\n              if (possibleInit && possibleInit.type === 'StringLiteral') {\n                results.events.push({\n                  name: possibleInit.value,\n                  paramsNum: -1,\n                  params: []\n                });\n              }\n            }\n          }\n        }\n      }\n    }\n  });\n\n  return results;\n}\n"
  },
  {
    "path": "packages/cml-js-parser/src/visitors/exportPathVisitor.js",
    "content": "module.exports.exportPathVisitor = function(path) {\n  let declarationPath = path.get('declaration');\n  if (declarationPath.isObjectExpression()) {\n    return declarationPath;\n  }\n  if (declarationPath.isNewExpression()) {\n    let className = declarationPath.get('callee').isIdentifier() ? declarationPath.node.callee.name : '';\n    let container = path.container;\n    return className && container.map((eleNode, index) => {\n      return path.getSibling(index);\n    }).filter((elePath) => {\n      return elePath.node.type === 'ClassDeclaration' && elePath.node.id.name === className;\n    })[0];\n  }\n}\n"
  },
  {
    "path": "packages/cml-js-parser/src/visitors/index.js",
    "content": "const bulk = require('bulk-require');\nconst visitorExports = bulk(__dirname, '!(index).js');\n\nlet visitors = {};\n\nObject.values(visitorExports).forEach(visitor => {\n  Object.assign(visitors, visitor);\n});\n\nmodule.exports = visitors;\n"
  },
  {
    "path": "packages/cml-js-parser/test/docs/export-class.cml",
    "content": "<template lang=\"cml\">\n  <view></view>\n</template>\n\n<script>\n  class App {\n    props = {\n      propOne:{\n        type:Object,\n        required: true,\n        default(){\n          return {}\n        }\n      },\n      propTwo: {\n        type: Boolean,\n        default: true\n      }\n    }\n    data = {\n      dataOne: true,\n      dataTwo: ''\n    }\n    created(res) {\n      this.$cmlEmit('eventOne');\n    }\n    computed = {\n      computedOne() {\n        return true;\n      },\n      computedTwo: function () {\n        return true;\n      }\n    }\n\n    methods =  {\n      onTap() {\n        return true;\n      },\n      onClick: function(e) {\n        return false;\n      }\n    }\n  }\n  export default new App();\n</script>\n\n<style scoped>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  },\n  \"weex\": {\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/cml-js-parser/test/docs/export-default.cml",
    "content": "<template lang=\"cml\">\n  <view></view>\n</template>\n\n<script>\n  import { mapGetters } from 'chameleon-store';\n  import { gettersShow, getterHide } from 'getter-types';\n\n  const tapEvent = 'topevent';\n\n  export default {\n    props: {\n      propOne:{\n        type:Object,\n        required: true,\n        default(){\n          return {}\n        }\n      },\n      propTwo: {\n        type: Boolean,\n        default: true\n      }\n    },\n    data: {\n      dataOne: true,\n      dataTwo: ''\n    },\n    created(res) {\n      this.$cmlEmit('eventOne');\n    },\n    computed: {\n      computedOne() {\n        return true;\n      },\n      computedTwo: function () {\n        return true;\n      },\n      ...mapGetters({\n        computedShow: gettersShow,\n        getterHide\n      })\n    },\n    methods:  {\n      onTap() {\n        this.$cmlEmit(tapEvent);\n        return true;\n      },\n      onClick: function(e) {\n        return false;\n      }\n    }\n  };\n</script>\n\n<style scoped>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n    }\n  },\n  \"weex\": {\n  },\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"dark\",\n      \"navigationBarBackgroundColor\": \"#343434\",\n      \"navigationBarTitleText\": \"CNODE\",\n      \"navigationBarTextStyle\": \"#fff\"\n    }\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/cml-js-parser/test/test.js",
    "content": "const path = require('path');\nconst chai = require('chai');\nconst expect = chai.expect;\nconst Parser = require('../index');\n\ndescribe('parser check', function() {\n  it('should pass export class check', function() {\n    let parser = new Parser({filePath: path.resolve(__dirname, './docs/export-class.cml')});\n    let results = parser.getParseResults();\n    expect(results).to.have.deep.property('vars', ['propOne', 'propTwo', 'dataOne', 'dataTwo', 'computedOne', 'computedTwo'], 'failed at checking vars');\n    expect(results).to.have.deep.property('methods', ['onTap', 'onClick'], 'failed on checking methods');\n    expect(results).to.have.deep.property('props', [{\n      name: 'propOne', valueType: 'Object', required: true, default: ''\n    }, {\n      name: 'propTwo', valueType: 'Boolean', required: false, default: true\n    }], 'failed at checking props');\n    expect(results).to.have.deep.property('events', [{\n      name: 'eventOne', paramsNum: -1, params: []\n    }]);\n  });\n\n  it('should pass export default check', function() {\n    let parser = new Parser({filePath: path.resolve(__dirname, './docs/export-default.cml')});\n    let results = parser.getParseResults();\n    expect(results).to.have.deep.property('vars', ['propOne', 'propTwo', 'dataOne', 'dataTwo', 'computedOne', 'computedTwo', 'computedShow', 'getterHide'], 'failed at checking vars');\n    expect(results).to.have.deep.property('methods', ['onTap', 'onClick'], 'failed on checking methods');\n    expect(results).to.have.deep.property('props', [{\n      name: 'propOne', valueType: 'Object', required: true, default: ''\n    }, {\n      name: 'propTwo', valueType: 'Boolean', required: false, default: true\n    }], 'failed at checking props');\n    expect(results).to.have.deep.property('events', [{\n      name: 'eventOne', paramsNum: -1, params: []\n    }, {\n      name: 'topevent', paramsNum: -1, params: []\n    }]);\n  });\n});\n"
  },
  {
    "path": "packages/cml-vue-loader/.gitignore",
    "content": ".options-cache-*"
  },
  {
    "path": "packages/cml-vue-loader/LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2015-present Yuxi (Evan) You\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "packages/cml-vue-loader/README.md",
    "content": "- 基于vue-loader@14.2.3改造\n- css的插入顺序有bug，不采用cml-extract-css-webpack-plugin是\n- injectStyle方法在Vue实例的beforeCreated阶段插入导致父组件先插入\n- 再插入子组件，所有css也是子组件在后，子组件的优先级高\n- 解决办法是在执行模块时就执行injectStyle，模块依赖的组件都是import，import优先执行，就会比本组件的injectStyle之前先执行"
  },
  {
    "path": "packages/cml-vue-loader/index.js",
    "content": "module.exports = require('./lib/loader')\n"
  },
  {
    "path": "packages/cml-vue-loader/lib/helpers.js",
    "content": "const querystring = require('querystring')\nconst loaderUtils = require('loader-utils')\nconst normalize = require('./utils/normalize')\nconst styleCompilerPath = normalize.lib('style-compiler/index')\n\n// internal lib loaders\nconst selectorPath = normalize.lib('selector')\nconst templateCompilerPath = normalize.lib('template-compiler/index')\nconst templatePreprocessorPath = normalize.lib('template-compiler/preprocessor')\n\n// dep loaders\nconst styleLoaderPath = normalize.dep('vue-style-loader')\n\n\nconst hasBabel = true\nconst hasBuble = false\n\nconst rewriterInjectRE = /\\b(css(?:-loader)?(?:\\?[^!]+)?)(?:!|$)/\n\nconst defaultLang = {\n  template: 'html',\n  styles: 'css',\n  script: 'js'\n}\n\nconst postcssExtensions = [\n  'postcss', 'pcss', 'sugarss', 'sss'\n]\n\n// When extracting parts from the source vue file, we want to apply the\n// loaders chained before vue-loader, but exclude some loaders that simply\n// produces side effects such as linting.\nfunction getRawRequest (\n  { resource, loaderIndex, loaders },\n  excludedPreLoaders = /eslint-loader/\n) {\n  return loaderUtils.getRemainingRequest({\n    resource: resource,\n    loaderIndex: loaderIndex,\n    loaders: loaders.filter(loader => !excludedPreLoaders.test(loader.path))\n  })\n}\n\n// sass => sass-loader\n// sass-loader => sass-loader\n// sass?indentedSyntax!css => sass-loader?indentedSyntax!css-loader\nfunction ensureLoader (lang) {\n  return lang\n    .split('!')\n    .map(loader =>\n      loader.replace(\n        /^([\\w-]+)(\\?.*)?/,\n        (_, name, query) =>\n          (/-loader$/.test(name) ? name : name + '-loader') + (query || '')\n      )\n    )\n    .join('!')\n}\n\nfunction ensureBang (loader) {\n  if (loader.charAt(loader.length - 1) !== '!') {\n    return loader + '!'\n  } else {\n    return loader\n  }\n}\n\nfunction resolveLoaders (\n  optionsId,\n  options,\n  moduleId,\n  isProduction,\n  hasScoped,\n  hasComment,\n  hasFunctionalTemplate,\n  needCssSourceMap\n) {\n  let cssLoaderOptions = ''\n  if (needCssSourceMap) {\n    cssLoaderOptions += '?sourceMap'\n  }\n  if (isProduction) {\n    cssLoaderOptions += (cssLoaderOptions ? '&' : '?') + 'minimize'\n  }\n\n  const bubleTemplateOptions = Object.assign({}, options.buble)\n  bubleTemplateOptions.transforms = Object.assign({}, bubleTemplateOptions.transforms)\n  bubleTemplateOptions.transforms.stripWithFunctional = hasFunctionalTemplate\n\n  const bubleOptions = hasBuble && options.buble\n    ? '?' + JSON.stringify(options.buble)\n    : ''\n\n  const templateCompilerOptions =\n    '?' +\n    JSON.stringify({\n      id: moduleId,\n      hasScoped,\n      hasComment,\n      optionsId,\n      buble: bubleTemplateOptions\n    })\n\n  const defaultLoaders = {\n    html: templateCompilerPath + templateCompilerOptions,\n    css: styleLoaderPath + '!' + 'css-loader' + cssLoaderOptions,\n    js: hasBuble\n      ? 'buble-loader' + bubleOptions\n      : hasBabel ? 'babel-loader' : ''\n  }\n\n\n  return {\n    defaultLoaders,\n    loaders: Object.assign({}, defaultLoaders, options.loaders),\n    preLoaders: options.preLoaders || {},\n    postLoaders: options.postLoaders || {}\n  }\n}\n\nmodule.exports = function createHelpers (\n  optionsId,\n  loaderContext,\n  options,\n  moduleId,\n  parts,\n  isProduction,\n  hasScoped,\n  hasComment,\n  hasFunctionalTemplate,\n  needCssSourceMap\n) {\n  const rawRequest = getRawRequest(loaderContext, options.excludedPreLoaders)\n\n  const {\n    defaultLoaders,\n    loaders,\n    preLoaders,\n    postLoaders\n  } = resolveLoaders(\n    optionsId,\n    options,\n    moduleId,\n    isProduction,\n    hasScoped,\n    hasComment,\n    hasFunctionalTemplate,\n    needCssSourceMap\n  )\n\n  function getRequire (type, part, index, scoped) {\n    return 'require(' + getRequestString(type, part, index, scoped) + ')'\n  }\n\n  function getImport (type, part, index, scoped) {\n    return (\n      'import __vue_' + type + '__ from ' +\n      getRequestString(type, part, index, scoped)\n    )\n  }\n\n  function getNamedExports (type, part, index, scoped) {\n    return (\n      'export * from ' +\n      getRequestString(type, part, index, scoped)\n    )\n  }\n\n  function getRequestString (type, part, index, scoped) {\n    return loaderUtils.stringifyRequest(\n      loaderContext,\n      // disable all configuration loaders\n      '!!' +\n        // get loader string for pre-processors\n        getLoaderString(type, part, index, scoped) +\n        // select the corresponding part from the vue file\n        getSelectorString(type, index || 0) +\n        // the url to the actual vue file, including remaining requests\n        rawRequest\n    )\n  }\n\n  function getRequireForSrc (type, impt, scoped) {\n    return 'require(' + getSrcRequestString(type, impt, scoped) + ')'\n  }\n\n  function getImportForSrc (type, impt, scoped) {\n    return (\n      'import __vue_' + type + '__ from ' +\n      getSrcRequestString(type, impt, scoped)\n    )\n  }\n\n  function getNamedExportsForSrc (type, impt, scoped) {\n    return (\n      'export * from ' +\n      getSrcRequestString(type, impt, scoped)\n    )\n  }\n\n  function getSrcRequestString (type, impt, scoped) {\n    return loaderUtils.stringifyRequest(\n      loaderContext,\n      '!!' + getLoaderString(type, impt, -1, scoped) + impt.src\n    )\n  }\n\n  function addCssModulesToLoader (loader, part, index) {\n    if (!part.module) return loader\n    const option = options.cssModules || {}\n    const DEFAULT_OPTIONS = {\n      modules: true\n    }\n    const OPTIONS = {\n      localIdentName: '[local]_[hash:base64:8]',\n      importLoaders: 1\n    }\n    return loader.replace(/((?:^|!)css(?:-loader)?)(\\?[^!]*)?/, (m, $1, $2) => {\n      // $1: !css-loader\n      // $2: ?a=b\n      const query = loaderUtils.parseQuery($2 || '?')\n      Object.assign(query, OPTIONS, option, DEFAULT_OPTIONS)\n      if (index > 0) {\n        // Note:\n        //   Class name is generated according to its filename.\n        //   Different <style> tags in the same .vue file may generate same names.\n        //   Append `_[index]` to class name to avoid this.\n        query.localIdentName += '_' + index\n      }\n      return $1 + '?' + JSON.stringify(query)\n    })\n  }\n\n  function buildCustomBlockLoaderString (attrs) {\n    const noSrcAttrs = Object.assign({}, attrs)\n    delete noSrcAttrs.src\n    const qs = querystring.stringify(noSrcAttrs)\n    return qs ? '?' + qs : qs\n  }\n\n  // stringify an Array of loader objects\n  function stringifyLoaders (loaders) {\n    return loaders\n      .map(\n        obj =>\n          obj && typeof obj === 'object' && typeof obj.loader === 'string'\n            ? obj.loader +\n              (obj.options ? '?' + JSON.stringify(obj.options) : '')\n            : obj\n      )\n      .join('!')\n  }\n\n  function getLoaderString (type, part, index, scoped) {\n    let loader = getRawLoaderString(type, part, index, scoped)\n    const lang = getLangString(type, part)\n    if (preLoaders[lang]) {\n      loader = loader + ensureBang(preLoaders[lang])\n    }\n    if (postLoaders[lang]) {\n      loader = ensureBang(postLoaders[lang]) + loader\n    }\n    return loader\n  }\n\n  function getLangString (type, { lang }) {\n    if (type === 'script' || type === 'template' || type === 'styles') {\n      return lang || defaultLang[type]\n    } else {\n      return type\n    }\n  }\n\n  function getRawLoaderString (type, part, index, scoped) {\n    let lang = part.lang || defaultLang[type]\n\n    let styleCompiler = ''\n    if (type === 'styles') {\n      // style compiler that needs to be applied for all styles\n      styleCompiler =\n        styleCompilerPath +\n        '?' +\n        JSON.stringify({\n          // a marker for vue-style-loader to know that this is an import from a vue file\n          optionsId,\n          vue: true,\n          id: scoped ? moduleId : undefined,\n          scoped: !!scoped,\n          sourceMap: needCssSourceMap\n        }) +\n        '!'\n      // normalize scss/sass/postcss if no specific loaders have been provided\n      if (!loaders[lang]) {\n        if (postcssExtensions.indexOf(lang) !== -1) {\n          lang = 'css'\n        } else if (lang === 'sass') {\n          lang = 'sass?indentedSyntax'\n        } else if (lang === 'scss') {\n          lang = 'sass'\n        }\n      }\n    }\n\n    let loader = loaders[lang]\n\n    if (loader != null) {\n      if (Array.isArray(loader)) {\n        loader = stringifyLoaders(loader)\n      } else if (typeof loader === 'object') {\n        loader = stringifyLoaders([loader])\n      }\n      if (type === 'styles') {\n        // add css modules\n        loader = addCssModulesToLoader(loader, part, index)\n        // inject rewriter before css loader for extractTextPlugin use cases\n        if (rewriterInjectRE.test(loader)) {\n          loader = loader.replace(\n            rewriterInjectRE,\n            (m, $1) => ensureBang($1) + styleCompiler\n          )\n        } else {\n          loader = ensureBang(loader) + styleCompiler\n        }\n      }\n      // if user defines custom loaders for html, add template compiler to it\n      if (type === 'template' && loader.indexOf(defaultLoaders.html) < 0) {\n        loader = defaultLoaders.html + '!' + loader\n      }\n      return ensureBang(loader)\n    } else {\n      // unknown lang, infer the loader to be used\n      switch (type) {\n        case 'template':\n          return (\n            defaultLoaders.html +\n            '!' +\n            templatePreprocessorPath +\n            `?engine=${lang}` +\n            `&optionsId=${optionsId}` +\n            '!'\n          )\n        case 'styles':\n          loader = addCssModulesToLoader(defaultLoaders.css, part, index)\n          return loader + '!' + styleCompiler + ensureBang(ensureLoader(lang))\n        case 'script':\n          return ensureBang(ensureLoader(lang))\n        default:\n          loader = loaders[type]\n          if (Array.isArray(loader)) {\n            loader = stringifyLoaders(loader)\n          }\n          return ensureBang(loader + buildCustomBlockLoaderString(part.attrs))\n      }\n    }\n  }\n\n  function getSelectorString (type, index) {\n    return (\n      selectorPath +\n      '?type=' +\n      (type === 'script' || type === 'template' || type === 'styles'\n        ? type\n        : 'customBlocks') +\n      '&index=' + index +\n      '!'\n    )\n  }\n\n  return {\n    loaders,\n    getRequire,\n    getImport,\n    getNamedExports,\n    getRequireForSrc,\n    getImportForSrc,\n    getNamedExportsForSrc,\n    getRequestString,\n    getSrcRequestString\n  }\n}\n"
  },
  {
    "path": "packages/cml-vue-loader/lib/loader.js",
    "content": "const path = require('path')\nconst hash = require('hash-sum')\nconst parse = require('./parser')\nconst createHelpers = require('./helpers')\nconst loaderUtils = require('loader-utils')\nconst normalize = require('./utils/normalize')\nconst { saveOptions } = require('./utils/options-cache')\nconst hotReloadAPIPath = normalize.dep('vue-hot-reload-api')\nconst componentNormalizerPath = normalize.lib('runtime/component-normalizer')\n\nmodule.exports = function (content) {\n  let output = ''\n\n  const loaderContext = this\n  const isServer = this.target === 'node'\n  const isProduction = this.minimize || process.env.NODE_ENV === 'production'\n\n  const rawOptions = loaderUtils.getOptions(this)\n\n  // share options between the main loader of style/template loaders.\n  // to support having multiple uses of vue-loader with different options,\n  // we cache and retrieve options for each unique options object.\n  const optionsId = saveOptions(rawOptions)\n\n  const options = rawOptions || {}\n\n  // shadow mode is an internal option\n  // enabled via vue-cli's --target web-component\n  const isShadowMode = !!options.shadowMode\n\n  const filePath = this.resourcePath\n  const fileName = path.basename(filePath)\n\n  const context = (\n    this.rootContext ||\n    (this.options && this.options.context) ||\n    process.cwd()\n  )\n  const sourceRoot = path.dirname(path.relative(context, filePath))\n  const shortFilePath = path.relative(context, filePath).replace(/^(\\.\\.[\\\\\\/])+/, '')\n  const moduleId = 'data-v-' + hash(isProduction ? (shortFilePath + '\\n' + content) : shortFilePath)\n\n  const needCssSourceMap = (\n    !isProduction &&\n    this.sourceMap &&\n    options.cssSourceMap !== false\n  )\n\n  const parts = parse(\n    content,\n    fileName,\n    this.sourceMap,\n    sourceRoot,\n    needCssSourceMap\n  )\n\n  const hasScoped = parts.styles.some(({ scoped }) => scoped)\n  const templateAttrs = parts.template && parts.template.attrs && parts.template.attrs\n  const hasComment = templateAttrs && templateAttrs.comments\n  const hasFunctionalTemplate = templateAttrs && templateAttrs.functional\n\n  const {\n    loaders,\n    getRequire,\n    getImport,\n    getNamedExports,\n    getRequireForSrc,\n    getImportForSrc,\n    getNamedExportsForSrc,\n    getRequestString,\n    getSrcRequestString\n  } = createHelpers(\n    optionsId,\n    loaderContext,\n    options,\n    moduleId,\n    parts,\n    isProduction,\n    hasScoped,\n    hasComment,\n    hasFunctionalTemplate,\n    needCssSourceMap\n  )\n\n  const needsHotReload = (\n    !isServer &&\n    !isProduction &&\n    (parts.script || parts.template) &&\n    options.hotReload !== false\n  )\n  if (needsHotReload) {\n    output += 'var disposed = false\\n'\n  }\n\n  // resolve <style> blocks into a `injectStyle` function\n  // - normal mode: injectStyle contains requires to modules that directly\n  //                inject styles on import\n  // - server mode: injectStyle contains required modules with injectors\n  //                (exposed as __inject__ by vue-style-loader) so that they\n  //                can be called with ssrContext\n  // - shadow mode: injectStyle contains required modules with injectors and\n  //                injects to root component's shadowRoot.\n  let cssModules\n  if (parts.styles.length) {\n    const needsExplicitInjection = isServer || isShadowMode\n    let styleInjectionCode = 'function injectStyle (context) {\\n'\n    if (needsHotReload) {\n      styleInjectionCode += `  if (disposed) return\\n`\n    }\n    if (needsExplicitInjection) {\n      styleInjectionCode += `var i\\n`\n    }\n    parts.styles.forEach((style, i) => {\n      // require style\n      let requireString = style.src\n        ? getRequireForSrc('styles', style, style.scoped)\n        : getRequire('styles', style, i, style.scoped)\n\n      const hasStyleLoader = requireString.indexOf('style-loader') > -1\n      const hasVueStyleLoader = requireString.indexOf('vue-style-loader') > -1\n      // vue-style-loader exposes inject functions in SSR or shadow mode so they\n      // are always called\n      const invokeStyle =\n        needsExplicitInjection && hasVueStyleLoader\n          ? code => `;(i=${code},i.__inject__&&i.__inject__(context),i)\\n`\n          : code => `  ${code}\\n`\n\n      const moduleName = style.module === true ? '$style' : style.module\n      // setCssModule\n      if (moduleName) {\n        if (!cssModules) {\n          cssModules = {}\n          if (needsHotReload) {\n            output += `var cssModules = {}\\n`\n          }\n        }\n        if (moduleName in cssModules) {\n          loaderContext.emitError(\n            'CSS module name \"' + moduleName + '\" is not unique!'\n          )\n          styleInjectionCode += invokeStyle(requireString)\n        } else {\n          cssModules[moduleName] = true\n\n          // `(vue-)style-loader` exposes the name-to-hash map directly\n          // `css-loader` exposes it in `.locals`\n          // add `.locals` if the user configured to not use style-loader.\n          if (!hasStyleLoader) {\n            requireString += '.locals'\n          }\n\n          if (!needsHotReload) {\n            styleInjectionCode += invokeStyle(\n              'this[\"' + moduleName + '\"] = ' + requireString\n            )\n          } else {\n            // handle hot reload for CSS modules.\n            // we store the exported locals in an object and proxy to it by\n            // defining getters inside component instances' lifecycle hook.\n            styleInjectionCode +=\n              invokeStyle(`cssModules[\"${moduleName}\"] = ${requireString}`) +\n              `Object.defineProperty(this, \"${moduleName}\", { get: function () { return cssModules[\"${moduleName}\"] }})\\n`\n\n            const requirePath = style.src\n              ? getSrcRequestString('styles', style, style.scoped)\n              : getRequestString('styles', style, i, style.scoped)\n\n            output +=\n              `module.hot && module.hot.accept([${requirePath}], function () {\\n` +\n              // 1. check if style has been injected\n              `  var oldLocals = cssModules[\"${moduleName}\"]\\n` +\n              `  if (!oldLocals) return\\n` +\n              // 2. re-import (side effect: updates the <style>)\n              `  var newLocals = ${requireString}\\n` +\n              // 3. compare new and old locals to see if selectors changed\n              `  if (JSON.stringify(newLocals) === JSON.stringify(oldLocals)) return\\n` +\n              // 4. locals changed. Update and force re-render.\n              `  cssModules[\"${moduleName}\"] = newLocals\\n` +\n              `  require(\"${hotReloadAPIPath}\").rerender(\"${moduleId}\")\\n` +\n              `})\\n`\n          }\n        }\n      } else {\n        styleInjectionCode += invokeStyle(requireString)\n      }\n    })\n    styleInjectionCode += '}\\n'\n    output += styleInjectionCode\n    output += 'injectStyle();\\n'\n  }\n\n  // <script>\n  output += '/* script */\\n'\n  const script = parts.script\n  if (script) {\n    output += script.src\n      ? (\n          getNamedExportsForSrc('script', script) + '\\n' +\n          getImportForSrc('script', script)\n        )\n      : (\n          getNamedExports('script', script) + '\\n' +\n          getImport('script', script)\n        ) + '\\n'\n  } else {\n    output += 'var __vue_script__ = null\\n'\n  }\n\n  // <template>\n  output += '/* template */\\n'\n  const template = parts.template\n  if (template) {\n    output += `import {` +\n      `render as __vue_render__, ` +\n      `staticRenderFns as __vue_static_render_fns__` +\n    `} from ${\n      template.src\n        ? getSrcRequestString('template', template)\n        : getRequestString('template', template)\n    }\\n`\n  } else {\n    output += 'var __vue_render__, __vue_static_render_fns__\\n'\n  }\n\n  // <template functional>\n  output += '/* template functional */\\n'\n  output +=\n    'var __vue_template_functional__ = ' +\n    (hasFunctionalTemplate ? 'true' : 'false') +\n    '\\n'\n\n  // style\n  // the injection function is passed to the normalizer and injected into\n  // component lifecycle hooks.\n  output += '/* styles */\\n'\n  output +=\n    'var __vue_styles__ = null' +\n    // (parts.styles.length ? 'injectStyle' : 'null') +\n    '\\n'\n\n  // scopeId\n  output += '/* scopeId */\\n'\n  output +=\n    'var __vue_scopeId__ = ' +\n    (hasScoped ? JSON.stringify(moduleId) : 'null') +\n    '\\n'\n\n  // moduleIdentifier (server only)\n  output += '/* moduleIdentifier (server only) */\\n'\n  output +=\n    'var __vue_module_identifier__ = ' +\n    (isServer ? JSON.stringify(hash(this.request)) : 'null') +\n    '\\n'\n\n  // we require the component normalizer function, and call it like so:\n  // normalizeComponent(\n  //   scriptExports,\n  //   compiledTemplate,\n  //   hasFunctionalTemplate,\n  //   injectStyles,\n  //   scopeId,\n  //   moduleIdentifier, (server only)\n  //   isShadowMode (vue-cli only)\n  // )\n  const componentNormalizerRequest = loaderUtils.stringifyRequest(\n    loaderContext,\n    '!' + componentNormalizerPath\n  )\n  output +=\n    `import normalizeComponent from ${componentNormalizerRequest}\\n` +\n    'var Component = normalizeComponent(\\n' +\n    `  __vue_script__,\\n` +\n    `  __vue_render__,\\n` +\n    `  __vue_static_render_fns__,\\n` +\n    '  __vue_template_functional__,\\n' +\n    '  __vue_styles__,\\n' +\n    '  __vue_scopeId__,\\n' +\n    '  __vue_module_identifier__\\n' +\n    (isShadowMode ? `,true` : ``) +\n    ')\\n'\n\n  // development-only code\n  if (!isProduction) {\n    // add filename in dev\n    output +=\n      'Component.options.__file = ' + JSON.stringify(shortFilePath) + '\\n'\n  }\n\n  // add requires for customBlocks\n  if (parts.customBlocks && parts.customBlocks.length) {\n    let addedPrefix = false\n\n    parts.customBlocks.forEach((customBlock, i) => {\n      if (loaders[customBlock.type]) {\n        // require customBlock\n        customBlock.src = customBlock.attrs.src\n        const requireString = customBlock.src\n          ? getRequireForSrc(customBlock.type, customBlock)\n          : getRequire(customBlock.type, customBlock, i)\n\n        if (!addedPrefix) {\n          output += '\\n/* customBlocks */\\n'\n          addedPrefix = true\n        }\n\n        output +=\n          'var customBlock = ' + requireString + '\\n' +\n          'if (customBlock && customBlock.__esModule) {\\n' +\n          '  customBlock = customBlock.default\\n' +\n          '}\\n' +\n          'if (typeof customBlock === \"function\") {\\n' +\n          '  customBlock(Component)\\n' +\n          '}\\n'\n      }\n    })\n    output += '\\n'\n  }\n\n  // hot reload\n  if (needsHotReload) {\n    output +=\n      '\\n/* hot reload */\\n' +\n      'if (module.hot) {(function () {\\n' +\n      '  var hotAPI = require(\"' + hotReloadAPIPath + '\")\\n' +\n      '  hotAPI.install(require(\"vue\"), false)\\n' +\n      '  if (!hotAPI.compatible) return\\n' +\n      '  module.hot.accept()\\n' +\n      '  if (!module.hot.data) {\\n' +\n      // initial insert\n      '    hotAPI.createRecord(\"' + moduleId + '\", Component.options)\\n' +\n      '  } else {\\n'\n    // update\n    if (cssModules) {\n      output +=\n        '    if (module.hot.data.cssModules && Object.keys(module.hot.data.cssModules) !== Object.keys(cssModules)) {\\n' +\n        '      delete Component.options._Ctor\\n' +\n        '    }\\n'\n    }\n    output +=\n      `    hotAPI.${\n        hasFunctionalTemplate ? 'rerender' : 'reload'\n      }(\"${moduleId}\", Component.options)\\n  }\\n`\n    // dispose\n    output +=\n      '  module.hot.dispose(function (data) {\\n' +\n      (cssModules ? '    data.cssModules = cssModules\\n' : '') +\n      '    disposed = true\\n' +\n      '  })\\n'\n    output += '})()}\\n'\n  }\n\n  // final export\n  output += '\\nexport default Component.exports\\n'\n\n  // done\n  return output\n}\n"
  },
  {
    "path": "packages/cml-vue-loader/lib/parser.js",
    "content": "const compiler = require('vue-template-compiler')\nconst cache = require('lru-cache')(100)\nconst hash = require('hash-sum')\nconst SourceMapGenerator = require('source-map').SourceMapGenerator\n\nconst splitRE = /\\r?\\n/g\nconst emptyRE = /^(?:\\/\\/)?\\s*$/\n\nmodule.exports = (content, filename, needMap, sourceRoot, needCSSMap) => {\n  const cacheKey = hash(filename + content)\n  let output = cache.get(cacheKey)\n  if (output) return output\n  output = compiler.parseComponent(content, { pad: 'line' })\n  if (needMap) {\n    if (output.script && !output.script.src) {\n      output.script.map = generateSourceMap(\n        filename,\n        content,\n        output.script.content,\n        sourceRoot\n      )\n    }\n    if (needCSSMap && output.styles) {\n      output.styles.forEach(style => {\n        if (!style.src) {\n          style.map = generateSourceMap(\n            filename,\n            content,\n            style.content,\n            sourceRoot\n          )\n        }\n      })\n    }\n  }\n  cache.set(cacheKey, output)\n  return output\n}\n\nfunction generateSourceMap (filename, source, generated, sourceRoot) {\n  const map = new SourceMapGenerator({\n    file: filename,\n    sourceRoot\n  })\n  map.setSourceContent(filename, source)\n  generated.split(splitRE).forEach((line, index) => {\n    if (!emptyRE.test(line)) {\n      map.addMapping({\n        source: filename,\n        original: {\n          line: index + 1,\n          column: 0\n        },\n        generated: {\n          line: index + 1,\n          column: 0\n        }\n      })\n    }\n  })\n  return map.toJSON()\n}\n"
  },
  {
    "path": "packages/cml-vue-loader/lib/runtime/component-normalizer.js",
    "content": "/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nexport default function normalizeComponent (\n  scriptExports,\n  render,\n  staticRenderFns,\n  functionalTemplate,\n  injectStyles,\n  scopeId,\n  moduleIdentifier, /* server only */\n  shadowMode /* vue-cli only */\n) {\n  scriptExports = scriptExports || {}\n\n  // ES6 modules interop\n  var type = typeof scriptExports.default\n  if (type === 'object' || type === 'function') {\n    scriptExports = scriptExports.default\n  }\n\n  // Vue.extend constructor export interop\n  var options = typeof scriptExports === 'function'\n    ? scriptExports.options\n    : scriptExports\n\n  // render functions\n  if (render) {\n    options.render = render\n    options.staticRenderFns = staticRenderFns\n    options._compiled = true\n  }\n\n  // functional template\n  if (functionalTemplate) {\n    options.functional = true\n  }\n\n  // scopedId\n  if (scopeId) {\n    options._scopeId = scopeId\n  }\n\n  var hook\n  if (moduleIdentifier) { // server build\n    hook = function (context) {\n      // 2.3 injection\n      context =\n        context || // cached call\n        (this.$vnode && this.$vnode.ssrContext) || // stateful\n        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n      // 2.2 with runInNewContext: true\n      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n        context = __VUE_SSR_CONTEXT__\n      }\n      // inject component styles\n      if (injectStyles) {\n        injectStyles.call(this, context)\n      }\n      // register component module identifier for async chunk inferrence\n      if (context && context._registeredComponents) {\n        context._registeredComponents.add(moduleIdentifier)\n      }\n    }\n    // used by ssr in case component is cached and beforeCreate\n    // never gets called\n    options._ssrRegister = hook\n  } else if (injectStyles) {\n    hook = shadowMode\n      ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n      : injectStyles\n  }\n\n  if (hook) {\n    if (options.functional) {\n      // for template-only hot-reload because in that case the render fn doesn't\n      // go through the normalizer\n      options._injectStyles = hook\n      // register for functioal component in vue file\n      var originalRender = options.render\n      options.render = function renderWithStyleInjection (h, context) {\n        hook.call(context)\n        return originalRender(h, context)\n      }\n    } else {\n      // inject component registration as beforeCreate hook\n      var existing = options.beforeCreate\n      options.beforeCreate = existing\n        ? [].concat(existing, hook)\n        : [hook]\n    }\n  }\n\n  return {\n    exports: scriptExports,\n    options: options\n  }\n}\n"
  },
  {
    "path": "packages/cml-vue-loader/lib/selector.js",
    "content": "// this is a utility loader that takes a *.vue file, parses it and returns\n// the requested language block, e.g. the content inside <template>, for\n// further processing.\n\nconst path = require('path')\nconst parse = require('./parser')\nconst loaderUtils = require('loader-utils')\n\nmodule.exports = function (content) {\n  const query = loaderUtils.getOptions(this) || {}\n  const context = (this._compiler && this._compiler.context) || this.options.context || process.cwd()\n  let filename = path.basename(this.resourcePath)\n  filename = filename.substring(0, filename.lastIndexOf(path.extname(filename))) + '.vue'\n  const sourceRoot = path.dirname(path.relative(context, this.resourcePath))\n  const parts = parse(content, filename, this.sourceMap, sourceRoot)\n  let part = parts[query.type]\n  if (Array.isArray(part)) {\n    part = part[query.index]\n  }\n  this.callback(null, part.content, part.map)\n}\n"
  },
  {
    "path": "packages/cml-vue-loader/lib/style-compiler/index.js",
    "content": "const postcss = require('postcss')\nconst loaderUtils = require('loader-utils')\nconst { loadOptions } = require('../utils/options-cache')\nconst loadPostcssConfig = require('./load-postcss-config')\n\nconst trim = require('./plugins/trim')\nconst scopeId = require('./plugins/scope-id')\n\nmodule.exports = function (css, map) {\n  const cb = this.async()\n  const loaderOptions = loaderUtils.getOptions(this) || {}\n  const inlineConfig = loadOptions(loaderOptions.optionsId).postcss\n\n  loadPostcssConfig(this, inlineConfig)\n    .then(config => {\n      const plugins = config.plugins.concat(trim)\n      const options = Object.assign(\n        {\n          to: this.resourcePath,\n          from: this.resourcePath,\n          map: false\n        },\n        config.options\n      )\n\n      // add plugin for vue-loader scoped css rewrite\n      if (loaderOptions.scoped) {\n        plugins.push(scopeId({ id: loaderOptions.id }))\n      }\n\n      // source map\n      if (loaderOptions.sourceMap && !options.map) {\n        options.map = {\n          inline: false,\n          annotation: false,\n          prev: map\n        }\n      }\n\n      return postcss(plugins)\n        .process(css, options)\n        .then(result => {\n          if (result.messages) {\n            result.messages.forEach(({ type, file }) => {\n              if (type === 'dependency') {\n                this.addDependency(file)\n              }\n            })\n          }\n          const map = result.map && result.map.toJSON()\n          cb(null, result.css, map)\n          return null // silence bluebird warning\n        })\n    })\n    .catch(e => {\n      console.error(e)\n      cb(e)\n    })\n}\n"
  },
  {
    "path": "packages/cml-vue-loader/lib/style-compiler/load-postcss-config.js",
    "content": "const load = require('postcss-load-config')\n\nlet loaded\n\nfunction isObject (val) {\n  return val && typeof val === 'object'\n}\n\nmodule.exports = function loadPostcssConfig (loaderContext, inlineConfig = {}) {\n  if (inlineConfig.useConfigFile === false) {\n    return Promise.resolve({\n      plugins: inlineConfig.plugins || [],\n      options: inlineConfig.options || {}\n    })\n  }\n\n  if (process.env.VUE_LOADER_TEST || inlineConfig.cascade || !loaded) {\n    const config = inlineConfig.config || {}\n    const ctx = { webpack: loaderContext }\n    if (config.ctx) {\n      ctx.options = config.ctx\n    }\n    const configPath = (inlineConfig.cascade && !config.path)\n      ? loaderContext.resourcePath\n      : config.path\n    loaded = load(ctx, configPath, { argv: false }).catch(err => {\n      // postcss-load-config throws error when no config file is found,\n      // but for us it's optional. only emit other errors\n      if (err.message.indexOf('No PostCSS Config found') >= 0) {\n        return\n      }\n      loaderContext.emitWarning(`Error loading PostCSS config: ${err.message}`)\n    })\n  }\n\n  return loaded.then(config => {\n    let plugins = []\n    let options = {}\n\n    // inline postcss options for vue-loader\n    if (typeof inlineConfig === 'function') {\n      inlineConfig = inlineConfig.call(this, this)\n    }\n    if (Array.isArray(inlineConfig)) {\n      plugins = inlineConfig\n    } else if (isObject(inlineConfig)) {\n      plugins =\n        typeof inlineConfig.plugins === 'function'\n          ? inlineConfig.plugins.call(this, this)\n          : inlineConfig.plugins || []\n      options = inlineConfig.options || {}\n    }\n\n    // merge postcss config file\n    if (config && config.plugins) {\n      plugins = plugins.concat(config.plugins)\n    }\n    if (config && config.options) {\n      options = Object.assign({}, config.options, options)\n    }\n\n    return {\n      plugins,\n      options\n    }\n  })\n}\n"
  },
  {
    "path": "packages/cml-vue-loader/lib/style-compiler/plugins/scope-id.js",
    "content": "const postcss = require('postcss')\nconst selectorParser = require('postcss-selector-parser')\n\nmodule.exports = postcss.plugin('add-id', ({ id }) => root => {\n  const keyframes = Object.create(null)\n\n  root.each(function rewriteSelector (node) {\n    if (!node.selector) {\n      // handle media queries\n      if (node.type === 'atrule') {\n        if (node.name === 'media' || node.name === 'supports') {\n          node.each(rewriteSelector)\n        } else if (/-?keyframes$/.test(node.name)) {\n          // register keyframes\n          keyframes[node.params] = node.params = node.params + '-' + id\n        }\n      }\n      return\n    }\n    node.selector = selectorParser(selectors => {\n      selectors.each(selector => {\n        let node = null\n        selector.each(n => {\n          // \">>>\" combinator\n          if (n.type === 'combinator' && n.value === '>>>') {\n            n.value = ' '\n            n.spaces.before = n.spaces.after = ''\n            return false\n          }\n          // /deep/ alias for >>>, since >>> doesn't work in SASS\n          if (n.type === 'tag' && n.value === '/deep/') {\n            const prev = n.prev()\n            if (prev && prev.type === 'combinator' && prev.value === ' ') {\n              prev.remove()\n            }\n            n.remove()\n            return false\n          }\n          if (n.type !== 'pseudo' && n.type !== 'combinator') {\n            node = n\n          }\n        })\n        selector.insertAfter(node, selectorParser.attribute({\n          attribute: id\n        }))\n      })\n    }).process(node.selector).result\n  })\n\n  // If keyframes are found in this <style>, find and rewrite animation names\n  // in declarations.\n  // Caveat: this only works for keyframes and animation rules in the same\n  // <style> element.\n  if (Object.keys(keyframes).length) {\n    root.walkDecls(decl => {\n      // individual animation-name declaration\n      if (/-?animation-name$/.test(decl.prop)) {\n        decl.value = decl.value.split(',')\n          .map(v => keyframes[v.trim()] || v.trim())\n          .join(',')\n      }\n      // shorthand\n      if (/-?animation$/.test(decl.prop)) {\n        decl.value = decl.value.split(',')\n          .map(v => {\n            const vals = v.trim().split(/\\s+/)\n            const i = vals.findIndex(val => keyframes[val])\n            if (i !== -1) {\n              vals.splice(i, 1, keyframes[vals[i]])\n              return vals.join(' ')\n            } else {\n              return v\n            }\n          })\n          .join(',')\n      }\n    })\n  }\n})\n"
  },
  {
    "path": "packages/cml-vue-loader/lib/style-compiler/plugins/trim.js",
    "content": "const postcss = require('postcss')\n\nmodule.exports = postcss.plugin('trim', opts => css => {\n  css.walk(({ type, raws }) => {\n    if (type === 'rule' || type === 'atrule') {\n      raws.before = raws.after = '\\n'\n    }\n  })\n})\n"
  },
  {
    "path": "packages/cml-vue-loader/lib/template-compiler/index.js",
    "content": "const prettier = require('prettier')\nconst loaderUtils = require('loader-utils')\nconst normalize = require('../utils/normalize')\nconst compiler = require('vue-template-compiler')\nconst { loadOptions } = require('../utils/options-cache')\nconst transpile = require('vue-template-es2015-compiler')\nconst hotReloadAPIPath = normalize.dep('vue-hot-reload-api')\nconst transformRequire = require('./modules/transform-require')\nconst transformSrcset = require('./modules/transform-srcset')\n\nmodule.exports = function (html) {\n  const isServer = this.target === 'node'\n  const isProduction = this.minimize || process.env.NODE_ENV === 'production'\n  const options = loaderUtils.getOptions(this) || {}\n  const vueOptions = loadOptions(options.optionsId)\n  const needsHotReload = !isServer && !isProduction && vueOptions.hotReload !== false\n  const defaultModules = [transformRequire(vueOptions.transformToRequire), transformSrcset()]\n\n  const compilerOptions = {\n    preserveWhitespace: vueOptions.preserveWhitespace,\n    modules: defaultModules.concat(vueOptions.compilerModules || []),\n    directives: vueOptions.compilerDirectives || {},\n    scopeId: options.hasScoped ? options.id : null,\n    comments: options.hasComment\n  }\n\n  const compile =\n    isServer && compiler.ssrCompile && vueOptions.optimizeSSR !== false\n      ? compiler.ssrCompile\n      : compiler.compile\n\n  const compiled = compile(html, compilerOptions)\n\n  // tips\n  if (compiled.tips && compiled.tips.length) {\n    compiled.tips.forEach(tip => {\n      this.emitWarning(tip)\n    })\n  }\n\n  let code\n  if (compiled.errors && compiled.errors.length) {\n    this.emitError(\n      `\\n  Error compiling template:\\n${pad(html)}\\n` +\n        compiled.errors.map(e => `  - ${e}`).join('\\n') +\n        '\\n'\n    )\n    code =\n      `export var render = function () {}\\n` +\n      `export var staticRenderFns = []`\n  } else {\n    const bubleOptions = options.buble\n    const stripWith = bubleOptions.transforms.stripWith !== false\n    const stripWithFunctional = bubleOptions.transforms.stripWithFunctional\n\n    const staticRenderFns = compiled.staticRenderFns.map(fn =>\n      toFunction(fn, stripWithFunctional)\n    )\n\n    code =\n      transpile(\n        'var render = ' +\n          toFunction(compiled.render, stripWithFunctional) +\n          '\\n' +\n          'var staticRenderFns = [' +\n          staticRenderFns.join(',') +\n          ']',\n        bubleOptions\n      ) + '\\n'\n\n    // prettify render fn\n    if (!isProduction) {\n      code = prettier.format(code, { semi: false, parser: 'babylon' })\n    }\n\n    // mark with stripped (this enables Vue to use correct runtime proxy detection)\n    if (!isProduction && stripWith) {\n      code += `render._withStripped = true\\n`\n    }\n    code += `export { render, staticRenderFns }`\n  }\n  // hot-reload\n  if (needsHotReload) {\n    code +=\n      '\\nif (module.hot) {\\n' +\n      '  module.hot.accept()\\n' +\n      '  if (module.hot.data) {\\n' +\n      '    require(\"' + hotReloadAPIPath + '\")' +\n      '      .rerender(\"' + options.id + '\", { render: render, staticRenderFns: staticRenderFns })\\n' +\n      '  }\\n' +\n      '}'\n  }\n\n  return code\n}\n\nfunction toFunction (code, stripWithFunctional) {\n  return (\n    'function (' + (stripWithFunctional ? '_h,_vm' : '') + ') {' + code + '}'\n  )\n}\n\nfunction pad (html) {\n  return html\n    .split(/\\r?\\n/)\n    .map(line => `  ${line}`)\n    .join('\\n')\n}\n"
  },
  {
    "path": "packages/cml-vue-loader/lib/template-compiler/modules/transform-require.js",
    "content": "// vue compiler module for transforming `<tag>:<attribute>` to `require`\n\nconst urlToRequire = require('../url-to-require')\n\nconst defaultOptions = {\n  video: ['src', 'poster'],\n  source: 'src',\n  img: 'src',\n  image: 'xlink:href'\n}\n\nmodule.exports = userOptions => {\n  const options = userOptions\n    ? Object.assign({}, defaultOptions, userOptions)\n    : defaultOptions\n\n  return {\n    postTransformNode: node => {\n      transform(node, options)\n    }\n  }\n}\n\nfunction transform (node, options) {\n  for (const tag in options) {\n    if ((tag === '*' || node.tag === tag) && node.attrs) {\n      const attributes = options[tag]\n      if (typeof attributes === 'string') {\n        node.attrs.some(attr => rewrite(attr, attributes))\n      } else if (Array.isArray(attributes)) {\n        attributes.forEach(item => node.attrs.some(attr => rewrite(attr, item)))\n      }\n    }\n  }\n}\n\nfunction rewrite (attr, name) {\n  if (attr.name === name) {\n    const value = attr.value\n    // only transform static URLs\n    if (value.charAt(0) === '\"' && value.charAt(value.length - 1) === '\"') {\n      attr.value = urlToRequire(value.slice(1, -1))\n      return true\n    }\n  }\n}\n"
  },
  {
    "path": "packages/cml-vue-loader/lib/template-compiler/modules/transform-srcset.js",
    "content": "// vue compiler module for transforming `img:srcset` to a number of `require`s\n\nconst urlToRequire = require('../url-to-require')\n\nmodule.exports = () => ({\n  postTransformNode: node => {\n    transform(node)\n  }\n})\n\nfunction transform (node) {\n  const tags = ['img', 'source']\n\n  if (tags.indexOf(node.tag) !== -1 && node.attrs) {\n    node.attrs.forEach(attr => {\n      if (attr.name === 'srcset') {\n        // same logic as in transform-require.js\n        const value = attr.value\n        const isStatic = value.charAt(0) === '\"' && value.charAt(value.length - 1) === '\"'\n        if (!isStatic) {\n          return\n        }\n\n        // http://w3c.github.io/html/semantics-embedded-content.html#ref-for-image-candidate-string-5\n        const escapedSpaceCharacters = /( |\\\\t|\\\\n|\\\\f|\\\\r)+/g\n\n        const imageCandidates = value.substr(1, value.length - 2).split(',').map(s => {\n          // The attribute value arrives here with all whitespace, except normal spaces, represented by escape sequences\n          const [url, descriptor] = s.replace(escapedSpaceCharacters, ' ').trim().split(' ', 2)\n          return { require: urlToRequire(url), descriptor: descriptor }\n        })\n\n        // \"require(url1)\"\n        // \"require(url1) 1x\"\n        // \"require(url1), require(url2)\"\n        // \"require(url1), require(url2) 2x\"\n        // \"require(url1) 1x, require(url2)\"\n        // \"require(url1) 1x, require(url2) 2x\"\n        const code = imageCandidates.map(\n          ({ require, descriptor }) => `${require} + \"${descriptor ? ' ' + descriptor : ''}, \" + `\n        ).join('').slice(0, -6).concat('\"').replace(/ \\+ \"\"$/, '')\n\n        attr.value = code\n      }\n    })\n  }\n}\n"
  },
  {
    "path": "packages/cml-vue-loader/lib/template-compiler/preprocessor.js",
    "content": "// loader for pre-processing templates with e.g. pug\n\nconst cons = require('consolidate')\nconst loaderUtils = require('loader-utils')\nconst { loadOptions } = require('../utils/options-cache')\n\nmodule.exports = function (content) {\n  const callback = this.async()\n  const opt = loaderUtils.getOptions(this) || {}\n\n  if (!cons[opt.engine]) {\n    return callback(\n      new Error(\n        \"Template engine '\" +\n          opt.engine +\n          \"' \" +\n          \"isn't available in Consolidate.js\"\n      )\n    )\n  }\n\n  // allow passing options to the template preprocessor via `template` option\n  const vueOptions = loadOptions(opt.optionsId)\n  if (vueOptions.template) {\n    Object.assign(opt, vueOptions.template)\n  }\n\n  // for relative includes\n  opt.filename = this.resourcePath\n\n  cons[opt.engine].render(content, opt, (err, html) => {\n    if (err) {\n      return callback(err)\n    }\n    callback(null, html)\n  })\n}\n"
  },
  {
    "path": "packages/cml-vue-loader/lib/template-compiler/url-to-require.js",
    "content": "module.exports = function urlToRequire (url) {\n  // same logic as in transform-require.js\n  const firstChar = url.charAt(0)\n  if (firstChar === '.' || firstChar === '~' || firstChar === '@') {\n    if (firstChar === '~') {\n      const secondChar = url.charAt(1)\n      url = url.slice(secondChar === '/' ? 2 : 1)\n    }\n    return `require(\"${url}\")`\n  } else {\n    return `\"${url}\"`\n  }\n}\n"
  },
  {
    "path": "packages/cml-vue-loader/lib/utils/normalize.js",
    "content": "const IS_TEST = !!process.env.VUE_LOADER_TEST\nconst fs = require('fs')\nconst path = require('path')\n\nexports.lib = file => path.resolve(__dirname, '../', file)\n\nexports.dep = dep => {\n  if (IS_TEST) {\n    return dep\n  } else if (\n    fs.existsSync(path.resolve(__dirname, '../../node_modules', dep))\n  ) {\n    // npm 2 or npm linked\n    return 'vue-loader/node_modules/' + dep\n  } else {\n    // npm 3\n    return dep\n  }\n}\n"
  },
  {
    "path": "packages/cml-vue-loader/lib/utils/options-cache.js",
    "content": "/*\nInter-loader Option Cache\n\nVue-loader works by delegating language blocks to sub-loaders.\nThe main loader needs to share its options object with the sub-loaders.\nTechnically we should pass everything the sub loaders need via their own\noptions, however there are two problems with this approach:\n\n1. Some options (e.g. postcss, compilerModules) may contain non-serializable\n   values and cannot be passed via inline requests\n2. Passing everything via inline requests makes the module string extremely\n   verbose, and can be quite annoying in error messages.\n\nTo get around this, we cache the options in this module here in order to share\nit between loaders.\n\n- In order to support multiple uses of vue-loader with different options,\neach options object is cached with an id.\n- To share options across threads in threadMode, options are serialized and\ncached on disk.\n*/\n\nconst fs = require('fs')\nconst path = require('path')\nconst hash = require('hash-sum')\n\nconst optionsToId = new Map()\nconst idToOptions = new Map()\n\nexports.saveOptions = options => {\n  if (optionsToId.has(options)) {\n    return optionsToId.get(options)\n  }\n\n  const threadMode = options && options.threadMode\n  const serialized = threadMode ? serialize(options) : null\n  const id = serialized ? hash(serialized) : String(idToOptions.size)\n\n  idToOptions.set(id, options || {})\n  optionsToId.set(options, id)\n\n  if (options && serialized) {\n    const fsidToOptionsPath = getidToOptionsPath(id)\n    if (!fs.existsSync(fsidToOptionsPath)) {\n      fs.writeFileSync(fsidToOptionsPath, serialized)\n    }\n  }\n\n  return id\n}\n\nexports.loadOptions = id => {\n  const res = idToOptions.get(id)\n  if (res) {\n    return res\n  }\n  const fsidToOptionsPath = getidToOptionsPath(id)\n  if (fs.existsSync(fsidToOptionsPath)) {\n    return JSON.parse(fs.readFileSync(fsidToOptionsPath, 'utf-8'))\n  } else {\n    return {}\n  }\n}\n\nfunction serialize (options) {\n  let res\n  try {\n    res = JSON.stringify(options)\n  } catch (e) {\n    throw new Error(`options must be JSON serializable in thread mode.`)\n  }\n  return res\n}\n\nfunction getidToOptionsPath (id) {\n  return path.resolve(__dirname, `.options-cache-${id}`)\n}\n"
  },
  {
    "path": "packages/cml-vue-loader/lib/utils/try-require.js",
    "content": "const cwd = process.cwd()\nconst resolve = require('resolve')\n\n// attempts to first require a dep using projects cwd (when vue-loader is linked)\n// then try a normal require.\nmodule.exports = function tryRequire (dep) {\n  let fromCwd\n  try {\n    fromCwd = resolve.sync(dep, { basedir: cwd })\n  } catch (e) {}\n  if (fromCwd) {\n    return require(fromCwd)\n  } else {\n    try {\n      return require(dep)\n    } catch (e) {}\n  }\n}\n"
  },
  {
    "path": "packages/cml-vue-loader/package.json",
    "content": "{\n  \"name\": \"cml-vue-loader\",\n  \"version\": \"1.0.8\",\n  \"dependencies\": {\n    \"consolidate\": \"^0.14.0\",\n    \"hash-sum\": \"^1.0.2\",\n    \"loader-utils\": \"^1.1.0\",\n    \"lru-cache\": \"^4.1.1\",\n    \"postcss\": \"^6.0.8\",\n    \"postcss-load-config\": \"^1.1.0\",\n    \"postcss-selector-parser\": \"^2.0.0\",\n    \"prettier\": \"1.15.3\",\n    \"resolve\": \"^1.4.0\",\n    \"source-map\": \"^0.6.1\",\n    \"vue-hot-reload-api\": \"^2.2.0\",\n    \"vue-style-loader\": \"^4.0.1\",\n    \"vue-template-es2015-compiler\": \"^1.6.0\"\n  },\n  \"description\": \"Vue single-file component loader for Chameleon\",\n  \"devDependencies\": {\n    \"autoprefixer\": \"^7.2.5\",\n    \"babel-core\": \"^6.25.0\",\n    \"babel-loader\": \"^7.0.0\",\n    \"babel-preset-env\": \"^1.6.0\",\n    \"chai\": \"^4.1.0\",\n    \"coffee-loader\": \"^0.7.2\",\n    \"coffee-script\": \"^1.12.7\",\n    \"conventional-changelog-cli\": \"^1.3.22\",\n    \"css-loader\": \"^0.28.4\",\n    \"eslint\": \"^3.19.0\",\n    \"eslint-plugin-vue-libs\": \"^1.2.0\",\n    \"extract-text-webpack-plugin\": \"^3.0.0\",\n    \"file-loader\": \"^1.1.5\",\n    \"gitbook-plugin-edit-link\": \"^2.0.2\",\n    \"gitbook-plugin-github\": \"^3.0.0\",\n    \"gitbook-plugin-theme-vuejs\": \"^1.1.0\",\n    \"js-yaml\": \"^3.9.1\",\n    \"jsdom\": \"^9.2.1\",\n    \"lint-staged\": \"^4.0.2\",\n    \"marked\": \"^0.3.12\",\n    \"memory-fs\": \"^0.4.1\",\n    \"mkdirp\": \"^0.5.1\",\n    \"mocha\": \"^4.0.1\",\n    \"node-libs-browser\": \"^2.0.0\",\n    \"normalize-newline\": \"^3.0.0\",\n    \"null-loader\": \"^0.1.1\",\n    \"pug\": \"^2.0.0-rc.2\",\n    \"raw-loader\": \"^0.5.1\",\n    \"skeleton-loader\": \"1.1.3\",\n    \"stylus\": \"^0.54.5\",\n    \"stylus-loader\": \"^3.0.1\",\n    \"sugarss\": \"^1.0.0\",\n    \"url-loader\": \"^0.6.2\",\n    \"vue\": \"^2.5.0\",\n    \"vue-server-renderer\": \"^2.5.0\",\n    \"vue-template-compiler\": \"^2.5.0\",\n    \"webpack\": \"^3.0.0\",\n    \"webpack-merge\": \"^4.1.1\",\n    \"yorkie\": \"^1.0.3\"\n  },\n  \"files\": [\n    \"index.js\",\n    \"lib\"\n  ],\n  \"keywords\": [\n    \"vue\",\n    \"webpack\",\n    \"loader\"\n  ],\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"main\": \"index.js\",\n  \"peerDependencies\": {\n    \"css-loader\": \"*\",\n    \"vue-template-compiler\": \"^2.0.0\"\n  }\n}"
  },
  {
    "path": "packages/easy-chameleon/.babelrc",
    "content": "{\n  \"presets\": [\n    \"flow\",\n    [\n      \"env\",\n      {\n        \"targets\": {\n          \"browsers\": [\n            \"> 1%\",\n            \"last 2 versions\",\n            \"not ie <= 8\"\n          ]\n        }\n      }\n    ],\n    \"stage-0\"\n  ],\n  \"plugins\": [\n    \"transform-remove-strict-mode\",\n    [\"babel-plugin-chameleon-import\", {\n      \"libraryName\": \"chameleon-api\",\n      \"libraryDirectory\": \"src/interfaces\",\n      \"libraryFileName\": \"index.js\",\n      \"defaulLibraryDirectory\": \"\",\n      \"defaulLibraryFileName\": \"index.js\",\n    }]\n  ]\n}"
  },
  {
    "path": "packages/easy-chameleon/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\n"
  },
  {
    "path": "packages/easy-chameleon/bin/index.js",
    "content": "#! /usr/bin/env node\nconst path = require('path');\nconst fs = require('fs')\nvar exec = require('child_process').exec\nlet context = process.cwd();\nlet jsonFile = path.join(context,'./package.json');\nlet packageObj = JSON.parse(fs.readFileSync(jsonFile,{encoding: 'utf-8'}));\nlet {devDependencies = {}, dependencies = {}} = packageObj;\nconst ora = require('ora');\n\n//项目中存在的依赖\nlet hasDeps = {\n  ...devDependencies,\n  ...dependencies\n}\n\nlet requireDeps = {\n}\n\nlet devRequire = {\n  \"babel-plugin-chameleon-import\": \"0.0.24\",\n  \"babel-plugin-transform-remove-strict-mode\": \"0.0.2\",\n  \"babel-plugin-transform-runtime\": \"^6.23.0\",\n  \"babel-preset-env\": \"^1.7.0\",\n  \"babel-preset-flow\": \"^6.23.0\",\n  \"babel-preset-stage-0\": \"^6.24.1\",\n \n  \"autoprefixer\": \"8.6.4\",\n  \"css-hot-loader\": \"1.3.9\",\n  \"css-loader\": \"0.28.11\",\n  \"less\": \"3.0.4\",\n  \"less-loader\": \"4.1.0\",\n  \"postcss-import\": \"11.1.0\",\n  \"postcss-loader\": \"2.1.5\",\n  \"postcss-plugin-px2rem\": \"0.7.0\",\n  \"postcss-plugin-weex\": \"0.1.6\",\n  \"style-loader\": \"0.18.2\",\n  \"vue-loader\": \"14.2.3\",\n}\n\n\nlet depInstall = [];\nlet devDepInstall = [];\n\nObject.keys(requireDeps).forEach(key=>{\n  let value = requireDeps[key];\n  if(!hasDeps[key]) {\n    depInstall.push({\n      key,\n      value\n    })\n  }\n})\n\nObject.keys(devRequire).forEach(key=>{\n  let value = devRequire[key];\n  if(!hasDeps[key]) {\n    devDepInstall.push({\n      key,\n      value\n    })\n  }\n})\n\n\nlet depInstallPromise = new Promise(function(resolve, reject){\n  if(depInstall.length === 0) {\n    resolve(depInstall.length);\n  } else {\n    let npmlist = depInstall.map(item=>{\n      return item.key + '@' + item.value\n    }).join(' ')\n    let installcml = `npm i ${npmlist}`\n    exec(installcml,function(err, stdot) {\n      if(err) {\n        reject(err)\n      } else {\n        resolve(depInstall.length)\n      }\n    })\n  }\n})\n\nlet devDepInstallPromise = new Promise(function(resolve, reject){\n  if(devDepInstall.length === 0) {\n    resolve(devDepInstall.length);\n  } else {\n    let npmlist = devDepInstall.map(item=>{\n      return item.key + '@' + item.value\n    }).join(' ')\n    let installcml = `npm i ${npmlist} --save-dev `\n    exec(installcml,function(err, stdot) {\n      if(err) {\n        reject(err)\n      } else {\n        resolve(devDepInstall.length)\n      }\n    })\n  }\n})\n\nconst installSpinner = ora(`npm dependencies installing...`).start()\n\ndepInstallPromise.then(res=>{\n  installSpinner.succeed('dependencies install success')\n\n  depInstall.forEach(item=>{\n    installSpinner.succeed(`${item.key}@${item.value}`)\n  })\n  const devSpinner = ora(`npm devDependencies installing...`).start()\n  devDepInstallPromise.then(res=>{\n\n    devSpinner.succeed('devDependencies install success')\n    devDepInstall.forEach(item=>{\n      devSpinner.succeed(`${item.key}@${item.value}`)\n    })\n  },err=>{\n    throw err;\n  })\n},err=>{\n  throw err;\n})\n\n\n\n\n\n"
  },
  {
    "path": "packages/easy-chameleon/config/getWebpackConfig.js",
    "content": "/* eslint-disable */\nconst { getPostcssrcPath, getCmlLoaderConfig, getMiniappEntry, styleLoaders, getJsLoader, getBabelPath } = require('./utils');\nconst path = require('path');\nconst webpack = require('webpack');\nconst merge = require('webpack-merge');\nconst ExtractTextPlugin = require('extract-text-webpack-plugin');\nconst CleanWebpackPlugin = require('clean-webpack-plugin');\n\n/**\n * options.context   项目根目录\n * options.cmlType   端类型 wx web weex\n * options.media  dev 模式 会开启接口和组件运行时校验  其他值不会\n * options.hot    是否开启vue的模块热更新 只在web生效   会禁用 extract-text-webpack-plugin\n * options.disableExtract  是否禁用 extract-text-webpack-plugin  默认是开启\n * options.cmss  cmss的配置\n */\nexports.getConfig = function (options = {}) {\n  defaultCmss = {\n    rem: true,\n    scale: 0.5,\n    remOptions: {\n      // base on 750px standard.\n      rootValue: { cpx: 75 }, // cpx转rem px不处理\n      // to leave 1px alone.\n      minPixelValue: null\n    },\n    autoprefixOptions: {\n      browsers: ['> 0.1%', 'ios >= 8', 'not ie < 12']\n    }\n  };\n  const { cmlType, media, hot = false, disableExtract = false, context, cmss = defaultCmss, wxConfg = {} } = options;\n  global.__CML__ = {};\n  global.__CML__.cmss = cmss;\n\n  if (!cmlType) {\n    throw new Error('未传递cmlType');\n  }\n  if (!media) {\n    throw new Error('未传递media');\n  }\n\n  function resolve (dir) {\n    return path.join(context, dir);\n  }\n  // 基本配置\n  let webpackConfig = {\n    resolve: {\n      extensions: ['.cml', '.interface'], // 开启后缀\n      modules: [\n        'node_modules',\n        path.join(context, '/node_modules/easy-chameleon/node_modules')\n      ],\n      alias: {\n      }\n    },\n    resolveLoader: {\n      modules: [\n        'node_modules',\n        path.join(context, '/node_modules/easy-chameleon/node_modules')\n      ]\n    },\n    module: {\n      rules: [\n        {\n          test: /\\.js$/,\n          use: [\n            getJsLoader()\n          ],\n          include: getBabelPath(context)\n        },\n        {\n          test: /\\.interface$/, // interface 文件会先经过interface-loader处理后就成为普通js文件\n          use: [getJsLoader(),\n            {\n              loader: 'interface-loader',\n              options: {\n                cmlType: cmlType,\n                media\n              }\n            }\n          ]\n        },\n        {\n          test: /\\.cml$/,\n          use: getCmlLoaders(options)\n        }\n      ]\n    },\n    plugins: [\n      new webpack.DefinePlugin({\n        'process.env.platform': JSON.stringify(cmlType)\n      })\n    ]\n  };\n\n  // 小程序webpack配置\n  if (~['wx', 'alipay', 'baidu', 'qq', 'tt'].indexOf(cmlType)) {\n    const miniMap = {\n      wx: {\n        css: 'wxss',\n        templateReg: /.wxml/\n      },\n      alipay: {\n        css: 'acss',\n        templateReg: /.axml/\n      },\n      baidu: {\n        css: 'css',\n        templateReg: /.swan/\n      },\n      qq: {\n        css: 'qss',\n        templateReg: /.qml/\n      },\n      tt: {\n        css: 'ttss',\n        templateReg: /.ttml/\n      }\n    };\n\n    const targetObj = miniMap[cmlType];\n\n    function getstaticPath (filetype) {\n      return `static/${filetype}/[name]_[hash:7].[ext]`;\n    }\n\n    // publicPath 静态资源的相对路径  都是../../static\n    const { entry = [], jsonpName = 'global', outputPath = path.join(context, `dist/${cmlType}`), publicPath = '../../' } = wxConfg;\n    webpackConfig = merge(webpackConfig, {\n      entry: function () {\n        return getMiniappEntry(context, entry, cmlType);\n      },\n      target: require('chameleon-miniapp-target'),\n      output: {\n        path: outputPath,\n        publicPath,\n        filename: 'static/js/[name].js'\n      },\n\n      resolve: {\n        extensions: ['.js'] // 开启后缀\n      },\n      module: {\n        rules: [\n          ...styleLoaders({ type: cmlType }),\n          {\n            test: /\\.(png|jpe?g|gif|svg)(\\?.*)?$/,\n            loader: 'chameleon-url-loader',\n            options: {\n              limit: false, // 不做limit的base64转换，需要添加?inline参数\n              name: getstaticPath('img')\n            }\n          }, {\n            test: /\\.(mp4|webm|ogg|mp3|wav|flac|aac)(\\?.*)?$/,\n            loader: 'file-loader',\n            options: {\n              name: getstaticPath('media')\n            }\n          },\n          {\n            test: /\\.(woff|woff2?|eot|ttf|otf)(\\?.*)?$/,\n            loader: 'file-loader',\n            options: {\n              name: getstaticPath('fonts')\n            }\n          },\n          {\n            test: targetObj.templateReg,\n            use: getCmlLoaders(options)\n          }\n        ]\n      },\n      plugins: [\n        new ExtractTextPlugin({\n          filename: `[name].${targetObj.css}`,\n          allChunks: true\n        }),\n        new CleanWebpackPlugin(['./*'], { root: outputPath }),\n        new webpack.optimize.CommonsChunkPlugin({\n          name: ['common', 'manifest'],\n          filename: 'static/js/[name].js',\n          minChunks: 2\n        })\n      ]\n    });\n  }\n\n  return webpackConfig;\n};\n\n// 获取cml文件的配置\nfunction getCmlLoaders (options) {\n  const { cmlType, media, hot = false, disableExtract = false } = options;\n  let loaders = [];\n  const cmlLoaderConfig = getCmlLoaderConfig({ type: cmlType, media, hot });\n  const cmlLoader = {\n    loader: 'chameleon-loader',\n    options: {\n      ...cmlLoaderConfig,\n      cmlType,\n      media,\n      postcss: {\n        config: {\n          path: getPostcssrcPath(cmlType)\n        }\n      },\n      cmss: global.__CML__.cmss\n    }\n  };\n  switch (cmlType) {\n    case 'wx':\n    case 'baidu':\n    case 'alipay':\n      loaders = cmlLoader;\n      break;\n    case 'web':\n      loaders = [{\n        loader: 'vue-loader',\n        options: Object.assign(cmlLoaderConfig, {\n          compilerModules: [\n            {\n              postTransformNode: el => {\n                // to convert vnode for weex components.\n                require('chameleon-vue-precompiler')()(el);\n              }\n            }\n          ]\n        })\n      },\n      cmlLoader\n      ];\n      break;\n    case 'weex':\n      loaders = [{\n        loader: 'chameleon-weex-vue-loader',\n        options: {\n          ...cmlLoaderConfig,\n          esModule: true\n        }\n      },\n      cmlLoader\n      ];\n      break;\n  }\n\n  return loaders;\n}\n/* eslint-disable */"
  },
  {
    "path": "packages/easy-chameleon/config/utils.js",
    "content": "const path = require('path')\nconst ExtractTextPlugin = require('extract-text-webpack-plugin')\n\nconst cmlUtils = require('chameleon-tool-utils');\n\n\nexports.cssLoaders = function (options) {\n  options = options || {}\n\n  var cssLoader = {\n    loader: 'css-loader',\n    options: {\n      minimize: options.minimize,\n      sourceMap: false\n    }\n  }\n\n  function getPostCssLoader(type) {\n    return {\n      loader: 'postcss-loader',\n      options: {\n        sourceMap: false,\n        config: {\n          path: exports.getPostcssrcPath(type)\n        }\n      }\n    }\n  }\n\n  function getMiniappLoader(type) {\n    // 把chameleon-css-loader需要在postcssloader之后处理，postcssloader先处理@import，否则@import文件中的内容不经过chameleon-css-loader\n    // chameleon-css-loader需要再最后处理，需要标准的css格式\n    return [\n      {\n        loader: 'chameleon-css-loader',\n        options: {\n          platform: 'miniapp'\n        }\n      },\n      getPostCssLoader(type)\n    ]\n  }\n\n  function addMediaLoader(loaders, type) {\n    loaders.push({\n      loader: 'chameleon-css-loader',\n      options: {\n        media: true,\n        cmlType: type\n      }\n    })\n    return loaders\n  }\n\n\n  // generate loader string to be used with extract text plugin\n  function generateLoaders(loader, loaderOptions) {\n    var loaders = [cssLoader];\n    let result = [];\n\n    if (options.type === 'web') {\n      // 把chameleon-css-loader需要在postcssloader之后处理，postcssloader先处理@import，否则@import文件中的内容不经过chameleon-css-loader\n      // chameleon-css-loader需要再最后处理，需要标准的css格式\n      loaders.push({\n        loader: 'chameleon-css-loader',\n        options: {\n          platform: 'web',\n          ...global.__CML__.cmss\n        }\n      })\n      loaders.push(getPostCssLoader('web'))\n    }\n    if (~['wx', 'alipay', 'baidu'].indexOf(options.type)) {\n      loaders = loaders.concat(getMiniappLoader(options.type))\n    }\n\n    if (options.type === 'weex') {\n      // 把wchameleon-css-loader需要在postcssloader之后处理，postcssloader先处理@import，否则@import文件中的内容不经过chameleon-css-loader\n      // weex不能使用css-loader css-loader就开始添加module.exports模块化代码，而weex-vue-loader中内部会处理css字符串为对象\n      loaders = [\n        {\n          loader: 'chameleon-css-loader',\n          options: {\n            platform: 'weex'\n          }\n        },\n        getPostCssLoader('weex')\n      ];\n    }\n    if (loader) {\n      loaders.push({\n        loader: loader + '-loader',\n        options: Object.assign({}, loaderOptions, {\n          sourceMap: false\n        })\n      })\n    }\n\n    if (options.media === 'export' && options.type !== 'wx' && options.mode !== 'production') {\n      loaders.push(getPostCssLoader('export'));\n    }\n\n    if (options.type === 'weex') {\n      result = loaders;\n    } else {\n      if (options.extract) {\n        result = ExtractTextPlugin.extract({\n          use: loaders,\n          fallback: 'vue-style-loader'\n        })\n      } else {\n        result = ['vue-style-loader'].concat(loaders)\n      }\n    }\n\n    addMediaLoader(result, options.type);\n    return result;\n  }\n  var result = {\n    css: generateLoaders('less'),\n    postcss: generateLoaders(),\n    less: generateLoaders('less'),\n    // sass: generateLoaders('sass', { indentedSyntax: true }),\n    // scss: generateLoaders('sass'),\n    stylus: generateLoaders('stylus'),\n    styl: generateLoaders('stylus'),\n    js: exports.getJsLoader() // 处理vue-loader weex-vue-loader chameleon-loader中的js\n  }\n  return result;\n}\n\nexports.getJsLoader = function () {\n  return {\n    loader: 'babel-loader',\n    options: {\n      filename: path.join(__dirname, '../.babelrc')\n    }\n  }\n}\n\n// Generate loaders for standalone style files (outside of .vue)\nexports.styleLoaders = function (options) {\n  var output = []\n  var loaders = exports.cssLoaders(options)\n  delete loaders.js;\n  for (var extension in loaders) {\n    if (loaders.hasOwnProperty(extension)) {\n      var loader = loaders[extension]\n      if (extension === 'css') {\n        output.push({\n          test: new RegExp('\\\\.' + extension + '$'),\n          exclude: new RegExp('min\\\\.' + extension + '$'),\n          use: loader\n        })\n        let minLoader = loader;\n        // min.css 为后缀的css不过postcss-loader\n        minLoader.splice(minLoader.indexOf('postcss-loader'), 1);\n        output.push({\n          test: new RegExp('min\\\\.' + extension + '$'),\n          use: minLoader\n        })\n      } else {\n        output.push({\n          test: new RegExp('\\\\.' + extension + '$'),\n          use: loader\n        })\n      }\n    }\n\n  }\n  return output\n}\n\n\n//以上三个方法与chameleon-cli保持一致\n\n\n\nexports.getCmlLoaderConfig = function ({type, hot, disableExtract}){ \n  let extract = hot !== true && disableExtract !== true;\n  return {\n    loaders: exports.cssLoaders({\n      extract,\n      type\n    })\n  }\n}\n\n\n\nexports.getPostcssrcPath = function (type) {\n  return path.join(__dirname, `../postcss/${type}/.postcssrc.js`);\n}\n\n\nexports.getMiniappEntry = function(context, entryList = [], cmlType) {\n  var root = context;\n  var entry = {};\n  entry['common'] = ['chameleon-runtime/index.js','chameleon-store/index.js']\n  var projectPath = path.resolve(root,'src');\n  var npmPath = path.resolve(root,'node_modules');\n  \n  //记录已经添加的入口，防止重复循环添加\n  let hasEntryedPath = [];\n\n  //组件导出\n  let exportEntryFile = cmlUtils.getExportEntry(cmlType, context, entryList );\n  exportEntryFile.forEach(item=>{\n    addEntry(item);\n  })\n\n  let npmComponents = cmlUtils.getNpmComponents(cmlType, root);\n  let buildInComponens = cmlUtils.getBuildinComponents(cmlType, root).components;\n  npmComponents = npmComponents.concat(buildInComponens);\n  npmComponents.forEach(item=>{\n    addEntry(item.filePath)\n  })\n \n  return entry;\n\n  function addEntry(chameleonFilePath){\n    //plugin://\n    if(!chameleonFilePath) {\n      return;\n    }\n    if(~hasEntryedPath.indexOf(chameleonFilePath)) {\n      return;\n    }\n    hasEntryedPath.push(chameleonFilePath);\n    let entryName = cmlUtils.getPureEntryName(chameleonFilePath, cmlType, root);\n    entry[entryName] = chameleonFilePath;\n\n    //处理json文件中引用的组件作为入口,wxml文件\n    let targetObject = cmlUtils.getJsonFileContent(chameleonFilePath, cmlType)\n    if(targetObject && targetObject.usingComponents) {\n      let usingComponents = targetObject.usingComponents;\n      Object.keys(usingComponents).forEach(key=>{\n        let comPath = usingComponents[key];\n        let {filePath} = cmlUtils.handleComponentUrl(root,chameleonFilePath,comPath,cmlType);\n        addEntry(filePath);\n      })\n    }\n  }\n}\n\n\n\nlet babelNpm = [\n  \"chameleon-ui-builtin\",\n  'cml-ui',\n  'chameleon-runtime',\n  'chameleon-store',\n  'chameleon-bridge',\n  'chameleon-api',\n  'chameleon-tool-utils',\n  'chameleon-css-loader',\n  'chameleon-loader',\n  'chameleon-miniapp-target',\n  'chameleon-mixins',\n  'chameleon-template-parse',\n  'chameleon-templates',\n  'chameleon-vue-precompiler',\n  'chameleon-webpack-plugin',\n  'chameleon-dev-proxy',\n  'chameleon-linter',\n  'interface-loader',\n  'chameleon-url-loader',\n  'webpack-check-plugin',\n  'chameleon-webpack-dev-middleware',\n  'webpack-liveload-middleware',\n  'chameleon-weex-vue-loader',\n  'babel-plugin-chameleon-import'\n];\n\nexports.getBabelPath = function (context) {\n\n  let babelPath = [\n  ]\n  babelNpm.forEach(item => {\n    babelPath.push(path.join(context, 'node_modules', item))\n    babelPath.push(path.join(context, 'node_modules/easy-chameleon/node_modules', item))\n  })\n  return babelPath\n}"
  },
  {
    "path": "packages/easy-chameleon/entry/web_global.css",
    "content": "body {\n  margin: 0px;\n  padding: 0px;\n}\n\n/* 只允许进行滚动和持续缩放操作 */\na,\nbutton,\n[role=\"button\"],\ninput,\nlabel,\nselect,\ntextarea {\n  touch-action: manipulation;\n}\n\np,\nol,\nul,\ndl,\nfigure {\n  margin: 0;\n  padding: 0;\n}\n\nli {\n  list-style: none;\n}"
  },
  {
    "path": "packages/easy-chameleon/entry/web_global.js",
    "content": "\nimport Vue from 'vue';\nrequire('./web_global.css');\nwindow.Vue = Vue;\n\n"
  },
  {
    "path": "packages/easy-chameleon/index.js",
    "content": "const {getConfig} = require('./config/getWebpackConfig');\nconst {styleLoaders, cssLoaders} = require('./config/utils');\nconst path = require('path');\n\nmodule.exports = {\n\tgetConfig,\n\tstyleLoaders,\n\tcssLoaders\n}"
  },
  {
    "path": "packages/easy-chameleon/npm-shrinkwrap.json",
    "content": "{\n  \"name\": \"easy-chameleon\",\n  \"version\": \"1.0.8\",\n  \"lockfileVersion\": 1,\n  \"requires\": true,\n  \"dependencies\": {\n    \"@babel/code-frame\": {\n      \"version\": \"7.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz\",\n      \"integrity\": \"sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==\",\n      \"dev\": true,\n      \"requires\": {\n        \"@babel/highlight\": \"7.0.0\"\n      }\n    },\n    \"@babel/generator\": {\n      \"version\": \"7.12.5\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz\",\n      \"integrity\": \"sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==\",\n      \"requires\": {\n        \"@babel/types\": \"7.12.6\",\n        \"jsesc\": \"2.5.2\",\n        \"source-map\": \"0.5.7\"\n      },\n      \"dependencies\": {\n        \"jsesc\": {\n          \"version\": \"2.5.2\",\n          \"resolved\": \"https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz\",\n          \"integrity\": \"sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==\"\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        }\n      }\n    },\n    \"@babel/helper-function-name\": {\n      \"version\": \"7.10.4\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz\",\n      \"integrity\": \"sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==\",\n      \"requires\": {\n        \"@babel/helper-get-function-arity\": \"7.10.4\",\n        \"@babel/template\": \"7.10.4\",\n        \"@babel/types\": \"7.12.6\"\n      }\n    },\n    \"@babel/helper-get-function-arity\": {\n      \"version\": \"7.10.4\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz\",\n      \"integrity\": \"sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==\",\n      \"requires\": {\n        \"@babel/types\": \"7.12.6\"\n      }\n    },\n    \"@babel/helper-module-imports\": {\n      \"version\": \"7.12.5\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz\",\n      \"integrity\": \"sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA==\",\n      \"requires\": {\n        \"@babel/types\": \"7.12.6\"\n      }\n    },\n    \"@babel/helper-plugin-utils\": {\n      \"version\": \"7.10.4\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz\",\n      \"integrity\": \"sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==\"\n    },\n    \"@babel/helper-split-export-declaration\": {\n      \"version\": \"7.11.0\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz\",\n      \"integrity\": \"sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==\",\n      \"requires\": {\n        \"@babel/types\": \"7.12.6\"\n      }\n    },\n    \"@babel/helper-validator-identifier\": {\n      \"version\": \"7.10.4\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz\",\n      \"integrity\": \"sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==\"\n    },\n    \"@babel/highlight\": {\n      \"version\": \"7.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz\",\n      \"integrity\": \"sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==\",\n      \"dev\": true,\n      \"requires\": {\n        \"chalk\": \"2.4.2\",\n        \"esutils\": \"2.0.2\",\n        \"js-tokens\": \"4.0.0\"\n      },\n      \"dependencies\": {\n        \"js-tokens\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz\",\n          \"integrity\": \"sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==\",\n          \"dev\": true\n        }\n      }\n    },\n    \"@babel/parser\": {\n      \"version\": \"7.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.1.2.tgz\",\n      \"integrity\": \"sha512-x5HFsW+E/nQalGMw7hu+fvPqnBeBaIr0lWJ2SG0PPL2j+Pm9lYvCrsZJGIgauPIENx0v10INIyFjmSNUD/gSqQ==\"\n    },\n    \"@babel/plugin-syntax-jsx\": {\n      \"version\": \"7.12.1\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz\",\n      \"integrity\": \"sha512-1yRi7yAtB0ETgxdY9ti/p2TivUxJkTdhu/ZbF9MshVGqOx1TdB3b7xCXs49Fupgg50N45KcAsRP/ZqWjs9SRjg==\",\n      \"requires\": {\n        \"@babel/helper-plugin-utils\": \"7.10.4\"\n      }\n    },\n    \"@babel/runtime\": {\n      \"version\": \"7.12.5\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz\",\n      \"integrity\": \"sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==\",\n      \"requires\": {\n        \"regenerator-runtime\": \"0.13.7\"\n      }\n    },\n    \"@babel/template\": {\n      \"version\": \"7.10.4\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz\",\n      \"integrity\": \"sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==\",\n      \"requires\": {\n        \"@babel/code-frame\": \"7.10.4\",\n        \"@babel/parser\": \"7.12.5\",\n        \"@babel/types\": \"7.12.6\"\n      },\n      \"dependencies\": {\n        \"@babel/code-frame\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz\",\n          \"integrity\": \"sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==\",\n          \"requires\": {\n            \"@babel/highlight\": \"7.10.4\"\n          }\n        },\n        \"@babel/highlight\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz\",\n          \"integrity\": \"sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==\",\n          \"requires\": {\n            \"@babel/helper-validator-identifier\": \"7.10.4\",\n            \"chalk\": \"2.4.2\",\n            \"js-tokens\": \"4.0.0\"\n          }\n        },\n        \"@babel/parser\": {\n          \"version\": \"7.12.5\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz\",\n          \"integrity\": \"sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==\"\n        },\n        \"js-tokens\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz\",\n          \"integrity\": \"sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==\"\n        }\n      }\n    },\n    \"@babel/traverse\": {\n      \"version\": \"7.12.5\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.5.tgz\",\n      \"integrity\": \"sha512-xa15FbQnias7z9a62LwYAA5SZZPkHIXpd42C6uW68o8uTuua96FHZy1y61Va5P/i83FAAcMpW8+A/QayntzuqA==\",\n      \"requires\": {\n        \"@babel/code-frame\": \"7.10.4\",\n        \"@babel/generator\": \"7.12.5\",\n        \"@babel/helper-function-name\": \"7.10.4\",\n        \"@babel/helper-split-export-declaration\": \"7.11.0\",\n        \"@babel/parser\": \"7.12.5\",\n        \"@babel/types\": \"7.12.6\",\n        \"debug\": \"4.2.0\",\n        \"globals\": \"11.12.0\",\n        \"lodash\": \"4.17.20\"\n      },\n      \"dependencies\": {\n        \"@babel/code-frame\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz\",\n          \"integrity\": \"sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==\",\n          \"requires\": {\n            \"@babel/highlight\": \"7.10.4\"\n          }\n        },\n        \"@babel/highlight\": {\n          \"version\": \"7.10.4\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz\",\n          \"integrity\": \"sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==\",\n          \"requires\": {\n            \"@babel/helper-validator-identifier\": \"7.10.4\",\n            \"chalk\": \"2.4.2\",\n            \"js-tokens\": \"4.0.0\"\n          }\n        },\n        \"@babel/parser\": {\n          \"version\": \"7.12.5\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz\",\n          \"integrity\": \"sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==\"\n        },\n        \"debug\": {\n          \"version\": \"4.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.2.0.tgz\",\n          \"integrity\": \"sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==\",\n          \"requires\": {\n            \"ms\": \"2.1.2\"\n          }\n        },\n        \"globals\": {\n          \"version\": \"11.12.0\",\n          \"resolved\": \"https://registry.npmjs.org/globals/-/globals-11.12.0.tgz\",\n          \"integrity\": \"sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==\"\n        },\n        \"js-tokens\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz\",\n          \"integrity\": \"sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==\"\n        },\n        \"lodash\": {\n          \"version\": \"4.17.20\",\n          \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz\",\n          \"integrity\": \"sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==\"\n        },\n        \"ms\": {\n          \"version\": \"2.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.2.tgz\",\n          \"integrity\": \"sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==\"\n        }\n      }\n    },\n    \"@babel/types\": {\n      \"version\": \"7.12.6\",\n      \"resolved\": \"https://registry.npmjs.org/@babel/types/-/types-7.12.6.tgz\",\n      \"integrity\": \"sha512-hwyjw6GvjBLiyy3W0YQf0Z5Zf4NpYejUnKFcfcUhZCSffoBBp30w6wP2Wn6pk31jMYZvcOrB/1b7cGXvEoKogA==\",\n      \"requires\": {\n        \"@babel/helper-validator-identifier\": \"7.10.4\",\n        \"lodash\": \"4.17.20\",\n        \"to-fast-properties\": \"2.0.0\"\n      },\n      \"dependencies\": {\n        \"lodash\": {\n          \"version\": \"4.17.20\",\n          \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz\",\n          \"integrity\": \"sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==\"\n        }\n      }\n    },\n    \"@webpack-contrib/schema-utils\": {\n      \"version\": \"1.0.0-beta.0\",\n      \"resolved\": \"https://registry.npmjs.org/@webpack-contrib/schema-utils/-/schema-utils-1.0.0-beta.0.tgz\",\n      \"integrity\": \"sha512-LonryJP+FxQQHsjGBi6W786TQB1Oym+agTpY0c+Kj8alnIw+DLUJb6SI8Y1GHGhLCH1yPRrucjObUmxNICQ1pg==\",\n      \"requires\": {\n        \"ajv\": \"6.7.0\",\n        \"ajv-keywords\": \"3.5.2\",\n        \"chalk\": \"2.4.2\",\n        \"strip-ansi\": \"4.0.0\",\n        \"text-table\": \"0.2.0\",\n        \"webpack-log\": \"1.2.0\"\n      },\n      \"dependencies\": {\n        \"ansi-regex\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz\",\n          \"integrity\": \"sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=\"\n        },\n        \"strip-ansi\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz\",\n          \"integrity\": \"sha1-qEeQIusaw2iocTibY1JixQXuNo8=\",\n          \"requires\": {\n            \"ansi-regex\": \"3.0.0\"\n          }\n        }\n      }\n    },\n    \"abbrev\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz\",\n      \"integrity\": \"sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==\"\n    },\n    \"acorn\": {\n      \"version\": \"5.7.4\",\n      \"resolved\": \"https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz\",\n      \"integrity\": \"sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==\"\n    },\n    \"acorn-jsx\": {\n      \"version\": \"5.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz\",\n      \"integrity\": \"sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==\",\n      \"dev\": true\n    },\n    \"ajv\": {\n      \"version\": \"6.7.0\",\n      \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-6.7.0.tgz\",\n      \"integrity\": \"sha512-RZXPviBTtfmtka9n9sy1N5M5b82CbxWIR6HIis4s3WQTXDJamc/0gpCWNGz6EWdWp4DOfjzJfhz/AS9zVPjjWg==\",\n      \"requires\": {\n        \"fast-deep-equal\": \"2.0.1\",\n        \"fast-json-stable-stringify\": \"2.0.0\",\n        \"json-schema-traverse\": \"0.4.1\",\n        \"uri-js\": \"4.2.2\"\n      }\n    },\n    \"ajv-keywords\": {\n      \"version\": \"3.5.2\",\n      \"resolved\": \"https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz\",\n      \"integrity\": \"sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==\"\n    },\n    \"amdefine\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz\",\n      \"integrity\": \"sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=\",\n      \"dev\": true,\n      \"optional\": true\n    },\n    \"ansi-colors\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz\",\n      \"integrity\": \"sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==\",\n      \"dev\": true,\n      \"requires\": {\n        \"ansi-wrap\": \"0.1.0\"\n      }\n    },\n    \"ansi-escapes\": {\n      \"version\": \"3.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz\",\n      \"integrity\": \"sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==\",\n      \"dev\": true\n    },\n    \"ansi-gray\": {\n      \"version\": \"0.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz\",\n      \"integrity\": \"sha1-KWLPVOyXksSFEKPetSRDaGHvclE=\",\n      \"dev\": true,\n      \"requires\": {\n        \"ansi-wrap\": \"0.1.0\"\n      }\n    },\n    \"ansi-regex\": {\n      \"version\": \"2.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz\",\n      \"integrity\": \"sha1-w7M6te42DYbg5ijwRorn7yfWVN8=\"\n    },\n    \"ansi-styles\": {\n      \"version\": \"3.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz\",\n      \"integrity\": \"sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==\",\n      \"requires\": {\n        \"color-convert\": \"1.9.3\"\n      }\n    },\n    \"ansi-wrap\": {\n      \"version\": \"0.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz\",\n      \"integrity\": \"sha1-qCJQ3bABXponyoLoLqYDu/pF768=\",\n      \"dev\": true\n    },\n    \"archy\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/archy/-/archy-1.0.0.tgz\",\n      \"integrity\": \"sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=\",\n      \"dev\": true\n    },\n    \"argparse\": {\n      \"version\": \"1.0.10\",\n      \"resolved\": \"https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz\",\n      \"integrity\": \"sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==\",\n      \"dev\": true,\n      \"requires\": {\n        \"sprintf-js\": \"1.0.3\"\n      }\n    },\n    \"arr-diff\": {\n      \"version\": \"4.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz\",\n      \"integrity\": \"sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=\",\n      \"dev\": true\n    },\n    \"arr-flatten\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz\",\n      \"integrity\": \"sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==\",\n      \"dev\": true\n    },\n    \"arr-union\": {\n      \"version\": \"3.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz\",\n      \"integrity\": \"sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=\",\n      \"dev\": true\n    },\n    \"array-differ\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz\",\n      \"integrity\": \"sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=\",\n      \"dev\": true\n    },\n    \"array-each\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz\",\n      \"integrity\": \"sha1-p5SvDAWrF1KEbudTofIRoFugxE8=\",\n      \"dev\": true\n    },\n    \"array-slice\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz\",\n      \"integrity\": \"sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==\",\n      \"dev\": true\n    },\n    \"array-uniq\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz\",\n      \"integrity\": \"sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=\",\n      \"dev\": true\n    },\n    \"array-unique\": {\n      \"version\": \"0.3.2\",\n      \"resolved\": \"https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz\",\n      \"integrity\": \"sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=\",\n      \"dev\": true\n    },\n    \"asn1\": {\n      \"version\": \"0.2.4\",\n      \"resolved\": \"https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz\",\n      \"integrity\": \"sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==\",\n      \"dev\": true,\n      \"requires\": {\n        \"safer-buffer\": \"2.1.2\"\n      }\n    },\n    \"assert-plus\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz\",\n      \"integrity\": \"sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=\",\n      \"dev\": true\n    },\n    \"assertion-error\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz\",\n      \"integrity\": \"sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==\",\n      \"dev\": true\n    },\n    \"assign-symbols\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz\",\n      \"integrity\": \"sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=\",\n      \"dev\": true\n    },\n    \"astral-regex\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz\",\n      \"integrity\": \"sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==\",\n      \"dev\": true\n    },\n    \"async\": {\n      \"version\": \"2.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/async/-/async-2.6.1.tgz\",\n      \"integrity\": \"sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==\",\n      \"requires\": {\n        \"lodash\": \"4.17.11\"\n      }\n    },\n    \"asynckit\": {\n      \"version\": \"0.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz\",\n      \"integrity\": \"sha1-x57Zf380y48robyXkLzDZkdLS3k=\",\n      \"dev\": true\n    },\n    \"atob\": {\n      \"version\": \"2.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/atob/-/atob-2.1.2.tgz\",\n      \"integrity\": \"sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==\"\n    },\n    \"autoprefixer\": {\n      \"version\": \"9.8.6\",\n      \"resolved\": \"https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.6.tgz\",\n      \"integrity\": \"sha512-XrvP4VVHdRBCdX1S3WXVD8+RyG9qeb1D5Sn1DeLiG2xfSpzellk5k54xbUERJ3M5DggQxes39UGOTP8CFrEGbg==\",\n      \"requires\": {\n        \"browserslist\": \"4.14.7\",\n        \"caniuse-lite\": \"1.0.30001157\",\n        \"colorette\": \"1.2.1\",\n        \"normalize-range\": \"0.1.2\",\n        \"num2fraction\": \"1.2.2\",\n        \"postcss\": \"7.0.35\",\n        \"postcss-value-parser\": \"4.1.0\"\n      }\n    },\n    \"aws4\": {\n      \"version\": \"1.8.0\",\n      \"resolved\": \"https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz\",\n      \"integrity\": \"sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==\",\n      \"dev\": true\n    },\n    \"babel-code-frame\": {\n      \"version\": \"6.26.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz\",\n      \"integrity\": \"sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=\",\n      \"requires\": {\n        \"chalk\": \"1.1.3\",\n        \"esutils\": \"2.0.2\",\n        \"js-tokens\": \"3.0.2\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          }\n        },\n        \"supports-color\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n          \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n        }\n      }\n    },\n    \"babel-generator\": {\n      \"version\": \"6.26.1\",\n      \"resolved\": \"https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz\",\n      \"integrity\": \"sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==\",\n      \"requires\": {\n        \"babel-messages\": \"6.23.0\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\",\n        \"detect-indent\": \"4.0.0\",\n        \"jsesc\": \"1.3.0\",\n        \"lodash\": \"4.17.11\",\n        \"source-map\": \"0.5.7\",\n        \"trim-right\": \"1.0.1\"\n      },\n      \"dependencies\": {\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        }\n      }\n    },\n    \"babel-messages\": {\n      \"version\": \"6.23.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz\",\n      \"integrity\": \"sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\"\n      }\n    },\n    \"babel-plugin-chameleon-import\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/babel-plugin-chameleon-import/-/babel-plugin-chameleon-import-1.0.8.tgz\",\n      \"integrity\": \"sha512-E3AC9Ye8wj5rFcG2xBwDTLdpoyshHvh/14OJ2liAT/RV6fuu8ak8AssmBIdDB6cUaMBp1KoZcau3n3+wajYadg==\",\n      \"requires\": {\n        \"@babel/helper-module-imports\": \"7.12.5\",\n        \"@babel/runtime\": \"7.12.5\"\n      }\n    },\n    \"babel-runtime\": {\n      \"version\": \"6.26.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz\",\n      \"integrity\": \"sha1-llxwWGaOgrVde/4E/yM3vItWR/4=\",\n      \"requires\": {\n        \"core-js\": \"2.6.11\",\n        \"regenerator-runtime\": \"0.11.1\"\n      },\n      \"dependencies\": {\n        \"regenerator-runtime\": {\n          \"version\": \"0.11.1\",\n          \"resolved\": \"https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz\",\n          \"integrity\": \"sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==\"\n        }\n      }\n    },\n    \"babel-traverse\": {\n      \"version\": \"6.26.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz\",\n      \"integrity\": \"sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=\",\n      \"requires\": {\n        \"babel-code-frame\": \"6.26.0\",\n        \"babel-messages\": \"6.23.0\",\n        \"babel-runtime\": \"6.26.0\",\n        \"babel-types\": \"6.26.0\",\n        \"babylon\": \"6.18.0\",\n        \"debug\": \"2.6.9\",\n        \"globals\": \"9.18.0\",\n        \"invariant\": \"2.2.4\",\n        \"lodash\": \"4.17.11\"\n      }\n    },\n    \"babel-types\": {\n      \"version\": \"6.26.0\",\n      \"resolved\": \"https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz\",\n      \"integrity\": \"sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=\",\n      \"requires\": {\n        \"babel-runtime\": \"6.26.0\",\n        \"esutils\": \"2.0.2\",\n        \"lodash\": \"4.17.11\",\n        \"to-fast-properties\": \"1.0.3\"\n      },\n      \"dependencies\": {\n        \"to-fast-properties\": {\n          \"version\": \"1.0.3\",\n          \"resolved\": \"https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz\",\n          \"integrity\": \"sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=\"\n        }\n      }\n    },\n    \"babylon\": {\n      \"version\": \"6.18.0\",\n      \"resolved\": \"https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz\",\n      \"integrity\": \"sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==\"\n    },\n    \"balanced-match\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz\",\n      \"integrity\": \"sha1-ibTRmasr7kneFk6gK4nORi1xt2c=\"\n    },\n    \"base\": {\n      \"version\": \"0.11.2\",\n      \"resolved\": \"https://registry.npmjs.org/base/-/base-0.11.2.tgz\",\n      \"integrity\": \"sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==\",\n      \"dev\": true,\n      \"requires\": {\n        \"cache-base\": \"1.0.1\",\n        \"class-utils\": \"0.3.6\",\n        \"component-emitter\": \"1.2.1\",\n        \"define-property\": \"1.0.0\",\n        \"isobject\": \"3.0.1\",\n        \"mixin-deep\": \"1.3.1\",\n        \"pascalcase\": \"0.1.1\"\n      },\n      \"dependencies\": {\n        \"define-property\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz\",\n          \"integrity\": \"sha1-dp66rz9KY6rTr56NMEybvnm/sOY=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-descriptor\": \"1.0.2\"\n          }\n        },\n        \"is-accessor-descriptor\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz\",\n          \"integrity\": \"sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==\",\n          \"dev\": true,\n          \"requires\": {\n            \"kind-of\": \"6.0.2\"\n          }\n        },\n        \"is-data-descriptor\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz\",\n          \"integrity\": \"sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==\",\n          \"dev\": true,\n          \"requires\": {\n            \"kind-of\": \"6.0.2\"\n          }\n        },\n        \"is-descriptor\": {\n          \"version\": \"1.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz\",\n          \"integrity\": \"sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-accessor-descriptor\": \"1.0.0\",\n            \"is-data-descriptor\": \"1.0.0\",\n            \"kind-of\": \"6.0.2\"\n          }\n        }\n      }\n    },\n    \"bcrypt-pbkdf\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz\",\n      \"integrity\": \"sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=\",\n      \"dev\": true,\n      \"requires\": {\n        \"tweetnacl\": \"0.14.5\"\n      }\n    },\n    \"beeper\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz\",\n      \"integrity\": \"sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=\",\n      \"dev\": true\n    },\n    \"big.js\": {\n      \"version\": \"5.2.2\",\n      \"resolved\": \"https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz\",\n      \"integrity\": \"sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==\"\n    },\n    \"bluebird\": {\n      \"version\": \"3.7.2\",\n      \"resolved\": \"https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz\",\n      \"integrity\": \"sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==\"\n    },\n    \"boom\": {\n      \"version\": \"2.10.1\",\n      \"resolved\": \"https://registry.npmjs.org/boom/-/boom-2.10.1.tgz\",\n      \"integrity\": \"sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=\",\n      \"dev\": true,\n      \"requires\": {\n        \"hoek\": \"2.16.3\"\n      }\n    },\n    \"brace-expansion\": {\n      \"version\": \"1.1.11\",\n      \"resolved\": \"https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz\",\n      \"integrity\": \"sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==\",\n      \"requires\": {\n        \"balanced-match\": \"1.0.0\",\n        \"concat-map\": \"0.0.1\"\n      }\n    },\n    \"braces\": {\n      \"version\": \"2.3.2\",\n      \"resolved\": \"https://registry.npmjs.org/braces/-/braces-2.3.2.tgz\",\n      \"integrity\": \"sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==\",\n      \"dev\": true,\n      \"requires\": {\n        \"arr-flatten\": \"1.1.0\",\n        \"array-unique\": \"0.3.2\",\n        \"extend-shallow\": \"2.0.1\",\n        \"fill-range\": \"4.0.0\",\n        \"isobject\": \"3.0.1\",\n        \"repeat-element\": \"1.1.3\",\n        \"snapdragon\": \"0.8.2\",\n        \"snapdragon-node\": \"2.1.1\",\n        \"split-string\": \"3.1.0\",\n        \"to-regex\": \"3.0.2\"\n      },\n      \"dependencies\": {\n        \"extend-shallow\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz\",\n          \"integrity\": \"sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-extendable\": \"0.1.1\"\n          }\n        }\n      }\n    },\n    \"browser-stdout\": {\n      \"version\": \"1.3.1\",\n      \"resolved\": \"https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz\",\n      \"integrity\": \"sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==\",\n      \"dev\": true\n    },\n    \"browserslist\": {\n      \"version\": \"4.14.7\",\n      \"resolved\": \"https://registry.npmjs.org/browserslist/-/browserslist-4.14.7.tgz\",\n      \"integrity\": \"sha512-BSVRLCeG3Xt/j/1cCGj1019Wbty0H+Yvu2AOuZSuoaUWn3RatbL33Cxk+Q4jRMRAbOm0p7SLravLjpnT6s0vzQ==\",\n      \"requires\": {\n        \"caniuse-lite\": \"1.0.30001157\",\n        \"colorette\": \"1.2.1\",\n        \"electron-to-chromium\": \"1.3.595\",\n        \"escalade\": \"3.1.1\",\n        \"node-releases\": \"1.1.66\"\n      }\n    },\n    \"buffer-from\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz\",\n      \"integrity\": \"sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==\",\n      \"dev\": true\n    },\n    \"cache-base\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz\",\n      \"integrity\": \"sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==\",\n      \"dev\": true,\n      \"requires\": {\n        \"collection-visit\": \"1.0.0\",\n        \"component-emitter\": \"1.2.1\",\n        \"get-value\": \"2.0.6\",\n        \"has-value\": \"1.0.0\",\n        \"isobject\": \"3.0.1\",\n        \"set-value\": \"2.0.0\",\n        \"to-object-path\": \"0.3.0\",\n        \"union-value\": \"1.0.0\",\n        \"unset-value\": \"1.0.0\"\n      }\n    },\n    \"call-bind\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz\",\n      \"integrity\": \"sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==\",\n      \"requires\": {\n        \"function-bind\": \"1.1.1\",\n        \"get-intrinsic\": \"1.0.1\"\n      }\n    },\n    \"callsites\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz\",\n      \"integrity\": \"sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==\",\n      \"dev\": true\n    },\n    \"caniuse-lite\": {\n      \"version\": \"1.0.30001157\",\n      \"resolved\": \"https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001157.tgz\",\n      \"integrity\": \"sha512-gOerH9Wz2IRZ2ZPdMfBvyOi3cjaz4O4dgNwPGzx8EhqAs4+2IL/O+fJsbt+znSigujoZG8bVcIAUM/I/E5K3MA==\"\n    },\n    \"chai\": {\n      \"version\": \"4.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/chai/-/chai-4.2.0.tgz\",\n      \"integrity\": \"sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==\",\n      \"dev\": true,\n      \"requires\": {\n        \"assertion-error\": \"1.1.0\",\n        \"check-error\": \"1.0.2\",\n        \"deep-eql\": \"3.0.1\",\n        \"get-func-name\": \"2.0.0\",\n        \"pathval\": \"1.1.0\",\n        \"type-detect\": \"4.0.8\"\n      }\n    },\n    \"chalk\": {\n      \"version\": \"2.4.2\",\n      \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz\",\n      \"integrity\": \"sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==\",\n      \"requires\": {\n        \"ansi-styles\": \"3.2.1\",\n        \"escape-string-regexp\": \"1.0.5\",\n        \"supports-color\": \"5.5.0\"\n      },\n      \"dependencies\": {\n        \"supports-color\": {\n          \"version\": \"5.5.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz\",\n          \"integrity\": \"sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==\",\n          \"requires\": {\n            \"has-flag\": \"3.0.0\"\n          }\n        }\n      }\n    },\n    \"chameleon-api\": {\n      \"version\": \"0.4.17\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-api/-/chameleon-api-0.4.17.tgz\",\n      \"integrity\": \"sha512-3VD1mLr+16tH/6ZgSBDJA/PnIcekq/6xF2ucXiPxNgtD10+FhpWEjOLHIVAXEK7sRmUfqSf1/AnV29cptvIraQ==\",\n      \"requires\": {\n        \"chameleon-bridge\": \"0.1.10\",\n        \"child_process\": \"1.0.2\",\n        \"fetch-detector\": \"1.0.1\",\n        \"fetch-ie8\": \"1.5.0\"\n      }\n    },\n    \"chameleon-bridge\": {\n      \"version\": \"0.1.10\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-bridge/-/chameleon-bridge-0.1.10.tgz\",\n      \"integrity\": \"sha512-k7gg00DKPJQ8+iZJI7uZXndLcCzSiG1yvJ8rpgcZuIpQsowhNhryYgWRu9Etiu3dNpQlLyrGVHfg91dKmoJstw==\"\n    },\n    \"chameleon-css-loader\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-css-loader/-/chameleon-css-loader-1.0.8.tgz\",\n      \"integrity\": \"sha512-LPrXf7FMF7kymlt4t0xQPO7vFUz7KmRvzxnJo3m5topUiDZLMp87vreiOt/P8jp7yuTab9F+U5rpOMqYJ7jZOQ==\",\n      \"requires\": {\n        \"autoprefixer\": \"9.8.6\",\n        \"hash-sum\": \"1.0.2\",\n        \"loader-utils\": \"1.2.3\",\n        \"postcss\": \"7.0.35\",\n        \"postcss-plugin-px2rem\": \"0.7.0\",\n        \"rework\": \"1.0.1\"\n      }\n    },\n    \"chameleon-loader\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-loader/-/chameleon-loader-1.0.8.tgz\",\n      \"integrity\": \"sha512-I6jwMFeAmrKuctNMEDJJkL5OAyUOx7opssxVWtuf7QJVQuUl4ny+Cic5qabfDzphSlRQPZCPznb7cVrDZo0W2w==\",\n      \"requires\": {\n        \"@babel/parser\": \"7.1.2\",\n        \"@babel/types\": \"7.12.6\",\n        \"babel-generator\": \"6.26.1\",\n        \"babel-traverse\": \"6.26.0\",\n        \"chameleon-template-parse\": \"1.0.8\",\n        \"chameleon-tool-utils\": \"1.0.8\",\n        \"consolidate\": \"0.14.0\",\n        \"de-indent\": \"1.0.2\",\n        \"fs-extra\": \"7.0.1\",\n        \"hash-sum\": \"1.0.2\",\n        \"he\": \"1.1.0\",\n        \"loader-utils\": \"1.1.0\",\n        \"lru-cache\": \"4.1.1\",\n        \"mvvm-interface-parser\": \"1.0.8\",\n        \"resolve\": \"1.4.0\",\n        \"runtime-check\": \"1.0.8\",\n        \"source-map\": \"0.6.1\",\n        \"vue-style-loader\": \"4.0.1\"\n      },\n      \"dependencies\": {\n        \"big.js\": {\n          \"version\": \"3.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz\",\n          \"integrity\": \"sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==\"\n        },\n        \"json5\": {\n          \"version\": \"0.5.1\",\n          \"resolved\": \"https://registry.npmjs.org/json5/-/json5-0.5.1.tgz\",\n          \"integrity\": \"sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=\"\n        },\n        \"loader-utils\": {\n          \"version\": \"1.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz\",\n          \"integrity\": \"sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=\",\n          \"requires\": {\n            \"big.js\": \"3.2.0\",\n            \"emojis-list\": \"2.1.0\",\n            \"json5\": \"0.5.1\"\n          }\n        }\n      }\n    },\n    \"chameleon-miniapp-target\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-miniapp-target/-/chameleon-miniapp-target-1.0.8.tgz\",\n      \"integrity\": \"sha512-Z6TCpfiyWXQ1YY4m+rHFhgznoQ7Yob2qZkifsQnDwcjO7zVe03p9m0veKupv77w78SEQgQluE5ldblmCRzXCqg==\",\n      \"requires\": {\n        \"chameleon-tool-utils\": \"1.0.8\"\n      }\n    },\n    \"chameleon-mixins\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-mixins/-/chameleon-mixins-1.0.8.tgz\",\n      \"integrity\": \"sha512-qTCWH5UY6ndFunxPcpZlTEiOSmTJ5oN8SLOTWy92rdariZoGSOTfJbVQ8Gc+4SLM6jmFkU4MqtvT3cMfZwbh9w==\"\n    },\n    \"chameleon-runtime\": {\n      \"version\": \"0.1.4\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-runtime/-/chameleon-runtime-0.1.4.tgz\",\n      \"integrity\": \"sha512-k1/k/b3XVZR+G+2PzdGheyL3QcH43ixGmzmuzS08Wg4H/ZC0lQ6kAieQNl3LtnrkMO0DCbfI5B+Ce36EQEp8bg==\",\n      \"requires\": {\n        \"mobx\": \"3.6.1\"\n      }\n    },\n    \"chameleon-store\": {\n      \"version\": \"0.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-store/-/chameleon-store-0.0.3.tgz\",\n      \"integrity\": \"sha512-f6lmeDW01xnau71iXK52haomD2etmQg+gBvVFO5T84eqs9AxtXiRkYAjxl/rqu+ejFACAm1nWMfAjXldw0lUTQ==\",\n      \"requires\": {\n        \"mobx\": \"3.6.1\",\n        \"vuex\": \"3.0.1\"\n      }\n    },\n    \"chameleon-template-parse\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-template-parse/-/chameleon-template-parse-1.0.8.tgz\",\n      \"integrity\": \"sha512-lKmYCE5Jcue9AFX5995VNVgOBBcvmuFx2IMBj3xegHJ56TcyldwlySA2Rex/sbwlvjHfnqBo/HuwsEXedK9WhQ==\",\n      \"requires\": {\n        \"@babel/generator\": \"7.12.5\",\n        \"@babel/parser\": \"7.12.5\",\n        \"@babel/plugin-syntax-jsx\": \"7.12.1\",\n        \"@babel/traverse\": \"7.12.5\",\n        \"@babel/types\": \"7.12.6\",\n        \"babylon\": \"6.18.0\",\n        \"hash-sum\": \"1.0.2\",\n        \"tapable\": \"1.1.3\"\n      },\n      \"dependencies\": {\n        \"@babel/parser\": {\n          \"version\": \"7.12.5\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz\",\n          \"integrity\": \"sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==\"\n        }\n      }\n    },\n    \"chameleon-templates\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-templates/-/chameleon-templates-1.0.8.tgz\",\n      \"integrity\": \"sha512-ivEo9j3yK5iceV+mFltR/Dwg2us/doSgcx6S9s+eS7BxKoeFybCFllN5Qtdn9OrBePShGRIFIYoDyK2vTg+Xhg==\"\n    },\n    \"chameleon-tool-utils\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-tool-utils/-/chameleon-tool-utils-1.0.8.tgz\",\n      \"integrity\": \"sha512-OgVgD1L0z+h2v+UYJrAS6VXJS0XbIU/bQDAf+AOygoZ2Exn0KwGAhBnRNkvJS/H9EwELCEAF2bjt0Zj/UT+lwg==\",\n      \"requires\": {\n        \"chalk\": \"2.4.2\",\n        \"colors\": \"1.4.0\",\n        \"de-indent\": \"1.0.2\",\n        \"fs-extra\": \"6.0.1\",\n        \"glob\": \"7.1.3\",\n        \"hash-sum\": \"1.0.2\",\n        \"he\": \"1.2.0\",\n        \"lru-cache\": \"4.1.5\",\n        \"resolve\": \"1.19.0\"\n      },\n      \"dependencies\": {\n        \"fs-extra\": {\n          \"version\": \"6.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz\",\n          \"integrity\": \"sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==\",\n          \"requires\": {\n            \"graceful-fs\": \"4.1.15\",\n            \"jsonfile\": \"4.0.0\",\n            \"universalify\": \"0.1.2\"\n          }\n        },\n        \"he\": {\n          \"version\": \"1.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/he/-/he-1.2.0.tgz\",\n          \"integrity\": \"sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==\"\n        },\n        \"lru-cache\": {\n          \"version\": \"4.1.5\",\n          \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz\",\n          \"integrity\": \"sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==\",\n          \"requires\": {\n            \"pseudomap\": \"1.0.2\",\n            \"yallist\": \"2.1.2\"\n          }\n        },\n        \"resolve\": {\n          \"version\": \"1.19.0\",\n          \"resolved\": \"https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz\",\n          \"integrity\": \"sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==\",\n          \"requires\": {\n            \"is-core-module\": \"2.1.0\",\n            \"path-parse\": \"1.0.6\"\n          }\n        }\n      }\n    },\n    \"chameleon-url-loader\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-url-loader/-/chameleon-url-loader-1.0.8.tgz\",\n      \"integrity\": \"sha512-40BTSmzWyM33aI2CSwyFFny1DraZN5sNfOnmL3+9JHPe+QMHMKnweSnx8Nu570qgB8/S+rJLIlwbT7rX5zQgXg==\",\n      \"requires\": {\n        \"@webpack-contrib/schema-utils\": \"1.0.0-beta.0\",\n        \"loader-utils\": \"1.2.3\",\n        \"mime\": \"2.4.6\"\n      }\n    },\n    \"chameleon-vue-precompiler\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-vue-precompiler/-/chameleon-vue-precompiler-1.0.8.tgz\",\n      \"integrity\": \"sha512-iEUkaeCMAZRJyX10GG4ZjTlYqMD0E1qbQid0FoYfamJtIq/OWbbxkfakElIFUN2EoX0ru8up/iB3IhgPjTE1/A==\",\n      \"requires\": {\n        \"esprima\": \"4.0.1\"\n      }\n    },\n    \"chameleon-weex-vue-loader\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/chameleon-weex-vue-loader/-/chameleon-weex-vue-loader-1.0.8.tgz\",\n      \"integrity\": \"sha512-i4QCUuTLAYE/DJEa5Rzipcln/7gpAHhlizwYbpWNlVkT1X1poVlBTxvzg4nXhzWleo+TGnwZY01/SEKY9DUVEQ==\",\n      \"requires\": {\n        \"consolidate\": \"0.14.0\",\n        \"hash-sum\": \"1.0.2\",\n        \"he\": \"1.1.0\",\n        \"js-beautify\": \"1.13.0\",\n        \"loader-utils\": \"1.2.3\",\n        \"lru-cache\": \"4.1.1\",\n        \"object-assign\": \"4.1.1\",\n        \"postcss\": \"6.0.23\",\n        \"postcss-selector-parser\": \"2.2.3\",\n        \"source-map\": \"0.5.7\",\n        \"vue-hot-reload-api\": \"2.3.4\",\n        \"vue-style-loader\": \"3.1.2\",\n        \"vue-template-compiler\": \"2.6.12\",\n        \"vue-template-es2015-compiler\": \"1.9.1\",\n        \"weex-styler\": \"0.3.1\",\n        \"weex-template-compiler\": \"2.5.16-weex.1\"\n      },\n      \"dependencies\": {\n        \"postcss\": {\n          \"version\": \"6.0.23\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz\",\n          \"integrity\": \"sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==\",\n          \"requires\": {\n            \"chalk\": \"2.4.2\",\n            \"source-map\": \"0.6.1\",\n            \"supports-color\": \"5.5.0\"\n          },\n          \"dependencies\": {\n            \"source-map\": {\n              \"version\": \"0.6.1\",\n              \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz\",\n              \"integrity\": \"sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==\"\n            }\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"5.5.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz\",\n          \"integrity\": \"sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==\",\n          \"requires\": {\n            \"has-flag\": \"3.0.0\"\n          }\n        },\n        \"vue-style-loader\": {\n          \"version\": \"3.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-3.1.2.tgz\",\n          \"integrity\": \"sha512-ICtVdK/p+qXWpdSs2alWtsXt9YnDoYjQe0w5616j9+/EhjoxZkbun34uWgsMFnC1MhrMMwaWiImz3K2jK1Yp2Q==\",\n          \"requires\": {\n            \"hash-sum\": \"1.0.2\",\n            \"loader-utils\": \"1.2.3\"\n          }\n        }\n      }\n    },\n    \"chardet\": {\n      \"version\": \"0.7.0\",\n      \"resolved\": \"https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz\",\n      \"integrity\": \"sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==\",\n      \"dev\": true\n    },\n    \"check-error\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz\",\n      \"integrity\": \"sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=\",\n      \"dev\": true\n    },\n    \"child_process\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/child_process/-/child_process-1.0.2.tgz\",\n      \"integrity\": \"sha1-sffn/HPSXn/R1FWtyU4UODAYK1o=\"\n    },\n    \"circular-json\": {\n      \"version\": \"0.3.3\",\n      \"resolved\": \"https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz\",\n      \"integrity\": \"sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==\",\n      \"dev\": true\n    },\n    \"class-utils\": {\n      \"version\": \"0.3.6\",\n      \"resolved\": \"https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz\",\n      \"integrity\": \"sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==\",\n      \"dev\": true,\n      \"requires\": {\n        \"arr-union\": \"3.1.0\",\n        \"define-property\": \"0.2.5\",\n        \"isobject\": \"3.0.1\",\n        \"static-extend\": \"0.1.2\"\n      },\n      \"dependencies\": {\n        \"define-property\": {\n          \"version\": \"0.2.5\",\n          \"resolved\": \"https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz\",\n          \"integrity\": \"sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-descriptor\": \"0.1.6\"\n          }\n        }\n      }\n    },\n    \"clean-webpack-plugin\": {\n      \"version\": \"0.1.19\",\n      \"resolved\": \"https://registry.npmjs.org/clean-webpack-plugin/-/clean-webpack-plugin-0.1.19.tgz\",\n      \"integrity\": \"sha512-M1Li5yLHECcN2MahoreuODul5LkjohJGFxLPTjl3j1ttKrF5rgjZET1SJduuqxLAuT1gAPOdkhg03qcaaU1KeA==\",\n      \"requires\": {\n        \"rimraf\": \"2.6.3\"\n      }\n    },\n    \"cli-cursor\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz\",\n      \"integrity\": \"sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=\",\n      \"requires\": {\n        \"restore-cursor\": \"2.0.0\"\n      }\n    },\n    \"cli-spinners\": {\n      \"version\": \"1.3.1\",\n      \"resolved\": \"https://registry.npmjs.org/cli-spinners/-/cli-spinners-1.3.1.tgz\",\n      \"integrity\": \"sha512-1QL4544moEsDVH9T/l6Cemov/37iv1RtoKf7NJ04A60+4MREXNfx/QvavbH6QoGdsD4N4Mwy49cmaINR/o2mdg==\"\n    },\n    \"cli-width\": {\n      \"version\": \"2.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz\",\n      \"integrity\": \"sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=\",\n      \"dev\": true\n    },\n    \"clone\": {\n      \"version\": \"1.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/clone/-/clone-1.0.4.tgz\",\n      \"integrity\": \"sha1-2jCcwmPfFZlMaIypAheco8fNfH4=\"\n    },\n    \"clone-buffer\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz\",\n      \"integrity\": \"sha1-4+JbIHrE5wGvch4staFnksrD3Fg=\",\n      \"dev\": true\n    },\n    \"clone-stats\": {\n      \"version\": \"0.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz\",\n      \"integrity\": \"sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=\",\n      \"dev\": true\n    },\n    \"cloneable-readable\": {\n      \"version\": \"1.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.2.tgz\",\n      \"integrity\": \"sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==\",\n      \"dev\": true,\n      \"requires\": {\n        \"inherits\": \"2.0.3\",\n        \"process-nextick-args\": \"2.0.0\",\n        \"readable-stream\": \"2.3.6\"\n      },\n      \"dependencies\": {\n        \"isarray\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz\",\n          \"integrity\": \"sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=\",\n          \"dev\": true\n        },\n        \"readable-stream\": {\n          \"version\": \"2.3.6\",\n          \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz\",\n          \"integrity\": \"sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==\",\n          \"dev\": true,\n          \"requires\": {\n            \"core-util-is\": \"1.0.2\",\n            \"inherits\": \"2.0.3\",\n            \"isarray\": \"1.0.0\",\n            \"process-nextick-args\": \"2.0.0\",\n            \"safe-buffer\": \"5.1.2\",\n            \"string_decoder\": \"1.1.1\",\n            \"util-deprecate\": \"1.0.2\"\n          }\n        },\n        \"string_decoder\": {\n          \"version\": \"1.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz\",\n          \"integrity\": \"sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==\",\n          \"dev\": true,\n          \"requires\": {\n            \"safe-buffer\": \"5.1.2\"\n          }\n        }\n      }\n    },\n    \"cml-ui\": {\n      \"version\": \"0.2.0-alpha.1\",\n      \"resolved\": \"https://registry.npmjs.org/cml-ui/-/cml-ui-0.2.0-alpha.1.tgz\",\n      \"integrity\": \"sha512-ZpUR3i1GhLQhQN8yhwxW5aMd7bAcT/hIlmCVQ71D7VxTRnB0L2TJ2Ng3eG7J53yDc2b9MvhYtV7YmAtI38GO7w==\"\n    },\n    \"co\": {\n      \"version\": \"4.6.0\",\n      \"resolved\": \"https://registry.npmjs.org/co/-/co-4.6.0.tgz\",\n      \"integrity\": \"sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=\"\n    },\n    \"collection-visit\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz\",\n      \"integrity\": \"sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=\",\n      \"dev\": true,\n      \"requires\": {\n        \"map-visit\": \"1.0.0\",\n        \"object-visit\": \"1.0.1\"\n      }\n    },\n    \"color-convert\": {\n      \"version\": \"1.9.3\",\n      \"resolved\": \"https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz\",\n      \"integrity\": \"sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==\",\n      \"requires\": {\n        \"color-name\": \"1.1.3\"\n      }\n    },\n    \"color-name\": {\n      \"version\": \"1.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz\",\n      \"integrity\": \"sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=\"\n    },\n    \"color-support\": {\n      \"version\": \"1.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz\",\n      \"integrity\": \"sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==\",\n      \"dev\": true\n    },\n    \"colorette\": {\n      \"version\": \"1.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz\",\n      \"integrity\": \"sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==\"\n    },\n    \"colors\": {\n      \"version\": \"1.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/colors/-/colors-1.4.0.tgz\",\n      \"integrity\": \"sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==\"\n    },\n    \"combined-stream\": {\n      \"version\": \"1.0.7\",\n      \"resolved\": \"https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz\",\n      \"integrity\": \"sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==\",\n      \"dev\": true,\n      \"requires\": {\n        \"delayed-stream\": \"1.0.0\"\n      }\n    },\n    \"commander\": {\n      \"version\": \"2.19.0\",\n      \"resolved\": \"https://registry.npmjs.org/commander/-/commander-2.19.0.tgz\",\n      \"integrity\": \"sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==\"\n    },\n    \"component-emitter\": {\n      \"version\": \"1.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz\",\n      \"integrity\": \"sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=\",\n      \"dev\": true\n    },\n    \"concat-map\": {\n      \"version\": \"0.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz\",\n      \"integrity\": \"sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=\"\n    },\n    \"config-chain\": {\n      \"version\": \"1.1.12\",\n      \"resolved\": \"https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz\",\n      \"integrity\": \"sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==\",\n      \"requires\": {\n        \"ini\": \"1.3.5\",\n        \"proto-list\": \"1.2.4\"\n      }\n    },\n    \"consolidate\": {\n      \"version\": \"0.14.0\",\n      \"resolved\": \"https://registry.npmjs.org/consolidate/-/consolidate-0.14.0.tgz\",\n      \"integrity\": \"sha1-sDrNVmolZcqW6Z9E/RQXSGtN+I0=\",\n      \"requires\": {\n        \"bluebird\": \"3.7.2\"\n      }\n    },\n    \"convert-source-map\": {\n      \"version\": \"0.3.5\",\n      \"resolved\": \"https://registry.npmjs.org/convert-source-map/-/convert-source-map-0.3.5.tgz\",\n      \"integrity\": \"sha1-8dgClQr33SYxof6+BZZVDIarMZA=\"\n    },\n    \"copy-descriptor\": {\n      \"version\": \"0.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz\",\n      \"integrity\": \"sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=\",\n      \"dev\": true\n    },\n    \"core-js\": {\n      \"version\": \"2.6.11\",\n      \"resolved\": \"https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz\",\n      \"integrity\": \"sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==\"\n    },\n    \"core-util-is\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz\",\n      \"integrity\": \"sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=\",\n      \"dev\": true\n    },\n    \"coveralls\": {\n      \"version\": \"2.13.3\",\n      \"resolved\": \"https://registry.npmjs.org/coveralls/-/coveralls-2.13.3.tgz\",\n      \"integrity\": \"sha512-iiAmn+l1XqRwNLXhW8Rs5qHZRFMYp9ZIPjEOVRpC/c4so6Y/f4/lFi0FfR5B9cCqgyhkJ5cZmbvcVRfP8MHchw==\",\n      \"dev\": true,\n      \"requires\": {\n        \"js-yaml\": \"3.6.1\",\n        \"lcov-parse\": \"0.0.10\",\n        \"log-driver\": \"1.2.5\",\n        \"minimist\": \"1.2.0\",\n        \"request\": \"2.79.0\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\",\n          \"dev\": true\n        },\n        \"assert-plus\": {\n          \"version\": \"0.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz\",\n          \"integrity\": \"sha1-104bh+ev/A24qttwIfP+SBAasjQ=\",\n          \"dev\": true\n        },\n        \"aws-sign2\": {\n          \"version\": \"0.6.0\",\n          \"resolved\": \"https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz\",\n          \"integrity\": \"sha1-FDQt0428yU0OW4fXY81jYSwOeU8=\",\n          \"dev\": true\n        },\n        \"caseless\": {\n          \"version\": \"0.11.0\",\n          \"resolved\": \"https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz\",\n          \"integrity\": \"sha1-cVuW6phBWTzDMGeSP17GDr2k99c=\",\n          \"dev\": true\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"dev\": true,\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          }\n        },\n        \"form-data\": {\n          \"version\": \"2.1.4\",\n          \"resolved\": \"https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz\",\n          \"integrity\": \"sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=\",\n          \"dev\": true,\n          \"requires\": {\n            \"asynckit\": \"0.4.0\",\n            \"combined-stream\": \"1.0.7\",\n            \"mime-types\": \"2.1.21\"\n          }\n        },\n        \"har-validator\": {\n          \"version\": \"2.0.6\",\n          \"resolved\": \"https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz\",\n          \"integrity\": \"sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=\",\n          \"dev\": true,\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"commander\": \"2.19.0\",\n            \"is-my-json-valid\": \"2.19.0\",\n            \"pinkie-promise\": \"2.0.1\"\n          }\n        },\n        \"http-signature\": {\n          \"version\": \"1.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz\",\n          \"integrity\": \"sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=\",\n          \"dev\": true,\n          \"requires\": {\n            \"assert-plus\": \"0.2.0\",\n            \"jsprim\": \"1.4.1\",\n            \"sshpk\": \"1.16.0\"\n          }\n        },\n        \"oauth-sign\": {\n          \"version\": \"0.8.2\",\n          \"resolved\": \"https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz\",\n          \"integrity\": \"sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=\",\n          \"dev\": true\n        },\n        \"punycode\": {\n          \"version\": \"1.4.1\",\n          \"resolved\": \"https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz\",\n          \"integrity\": \"sha1-wNWmOycYgArY4esPpSachN1BhF4=\",\n          \"dev\": true\n        },\n        \"qs\": {\n          \"version\": \"6.3.2\",\n          \"resolved\": \"https://registry.npmjs.org/qs/-/qs-6.3.2.tgz\",\n          \"integrity\": \"sha1-51vV9uJoEioqDgvaYwslUMFmUCw=\",\n          \"dev\": true\n        },\n        \"request\": {\n          \"version\": \"2.79.0\",\n          \"resolved\": \"https://registry.npmjs.org/request/-/request-2.79.0.tgz\",\n          \"integrity\": \"sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=\",\n          \"dev\": true,\n          \"requires\": {\n            \"aws-sign2\": \"0.6.0\",\n            \"aws4\": \"1.8.0\",\n            \"caseless\": \"0.11.0\",\n            \"combined-stream\": \"1.0.7\",\n            \"extend\": \"3.0.2\",\n            \"forever-agent\": \"0.6.1\",\n            \"form-data\": \"2.1.4\",\n            \"har-validator\": \"2.0.6\",\n            \"hawk\": \"3.1.3\",\n            \"http-signature\": \"1.1.1\",\n            \"is-typedarray\": \"1.0.0\",\n            \"isstream\": \"0.1.2\",\n            \"json-stringify-safe\": \"5.0.1\",\n            \"mime-types\": \"2.1.21\",\n            \"oauth-sign\": \"0.8.2\",\n            \"qs\": \"6.3.2\",\n            \"stringstream\": \"0.0.6\",\n            \"tough-cookie\": \"2.3.4\",\n            \"tunnel-agent\": \"0.4.3\",\n            \"uuid\": \"3.3.2\"\n          }\n        },\n        \"supports-color\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n          \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\",\n          \"dev\": true\n        },\n        \"tough-cookie\": {\n          \"version\": \"2.3.4\",\n          \"resolved\": \"https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz\",\n          \"integrity\": \"sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==\",\n          \"dev\": true,\n          \"requires\": {\n            \"punycode\": \"1.4.1\"\n          }\n        },\n        \"tunnel-agent\": {\n          \"version\": \"0.4.3\",\n          \"resolved\": \"https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz\",\n          \"integrity\": \"sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us=\",\n          \"dev\": true\n        }\n      }\n    },\n    \"cross-spawn\": {\n      \"version\": \"6.0.5\",\n      \"resolved\": \"https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz\",\n      \"integrity\": \"sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==\",\n      \"dev\": true,\n      \"requires\": {\n        \"nice-try\": \"1.0.5\",\n        \"path-key\": \"2.0.1\",\n        \"semver\": \"5.6.0\",\n        \"shebang-command\": \"1.2.0\",\n        \"which\": \"1.3.1\"\n      }\n    },\n    \"cryptiles\": {\n      \"version\": \"2.0.5\",\n      \"resolved\": \"https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz\",\n      \"integrity\": \"sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=\",\n      \"dev\": true,\n      \"requires\": {\n        \"boom\": \"2.10.1\"\n      }\n    },\n    \"css\": {\n      \"version\": \"2.2.4\",\n      \"resolved\": \"https://registry.npmjs.org/css/-/css-2.2.4.tgz\",\n      \"integrity\": \"sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==\",\n      \"requires\": {\n        \"inherits\": \"2.0.3\",\n        \"source-map\": \"0.6.1\",\n        \"source-map-resolve\": \"0.5.2\",\n        \"urix\": \"0.1.0\"\n      }\n    },\n    \"d\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/d/-/d-1.0.1.tgz\",\n      \"integrity\": \"sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==\",\n      \"requires\": {\n        \"es5-ext\": \"0.10.53\",\n        \"type\": \"1.2.0\"\n      }\n    },\n    \"dashdash\": {\n      \"version\": \"1.14.1\",\n      \"resolved\": \"https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz\",\n      \"integrity\": \"sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=\",\n      \"dev\": true,\n      \"requires\": {\n        \"assert-plus\": \"1.0.0\"\n      }\n    },\n    \"dateformat\": {\n      \"version\": \"2.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz\",\n      \"integrity\": \"sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=\",\n      \"dev\": true\n    },\n    \"de-indent\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz\",\n      \"integrity\": \"sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=\"\n    },\n    \"debug\": {\n      \"version\": \"2.6.9\",\n      \"resolved\": \"https://registry.npmjs.org/debug/-/debug-2.6.9.tgz\",\n      \"integrity\": \"sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==\",\n      \"requires\": {\n        \"ms\": \"2.0.0\"\n      }\n    },\n    \"decode-uri-component\": {\n      \"version\": \"0.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz\",\n      \"integrity\": \"sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=\"\n    },\n    \"deep-eql\": {\n      \"version\": \"3.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz\",\n      \"integrity\": \"sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==\",\n      \"dev\": true,\n      \"requires\": {\n        \"type-detect\": \"4.0.8\"\n      }\n    },\n    \"deep-is\": {\n      \"version\": \"0.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz\",\n      \"integrity\": \"sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=\"\n    },\n    \"defaults\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz\",\n      \"integrity\": \"sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=\",\n      \"requires\": {\n        \"clone\": \"1.0.4\"\n      }\n    },\n    \"define-properties\": {\n      \"version\": \"1.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz\",\n      \"integrity\": \"sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==\",\n      \"requires\": {\n        \"object-keys\": \"1.1.1\"\n      }\n    },\n    \"define-property\": {\n      \"version\": \"2.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz\",\n      \"integrity\": \"sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==\",\n      \"dev\": true,\n      \"requires\": {\n        \"is-descriptor\": \"1.0.2\",\n        \"isobject\": \"3.0.1\"\n      },\n      \"dependencies\": {\n        \"is-accessor-descriptor\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz\",\n          \"integrity\": \"sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==\",\n          \"dev\": true,\n          \"requires\": {\n            \"kind-of\": \"6.0.2\"\n          }\n        },\n        \"is-data-descriptor\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz\",\n          \"integrity\": \"sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==\",\n          \"dev\": true,\n          \"requires\": {\n            \"kind-of\": \"6.0.2\"\n          }\n        },\n        \"is-descriptor\": {\n          \"version\": \"1.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz\",\n          \"integrity\": \"sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-accessor-descriptor\": \"1.0.0\",\n            \"is-data-descriptor\": \"1.0.0\",\n            \"kind-of\": \"6.0.2\"\n          }\n        }\n      }\n    },\n    \"delayed-stream\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz\",\n      \"integrity\": \"sha1-3zrhmayt+31ECqrgsp4icrJOxhk=\",\n      \"dev\": true\n    },\n    \"deprecated\": {\n      \"version\": \"0.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz\",\n      \"integrity\": \"sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=\",\n      \"dev\": true\n    },\n    \"detect-file\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz\",\n      \"integrity\": \"sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=\",\n      \"dev\": true\n    },\n    \"detect-indent\": {\n      \"version\": \"4.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz\",\n      \"integrity\": \"sha1-920GQ1LN9Docts5hnE7jqUdd4gg=\",\n      \"requires\": {\n        \"repeating\": \"2.0.1\"\n      }\n    },\n    \"diff\": {\n      \"version\": \"3.5.0\",\n      \"resolved\": \"https://registry.npmjs.org/diff/-/diff-3.5.0.tgz\",\n      \"integrity\": \"sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==\",\n      \"dev\": true\n    },\n    \"doctrine\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz\",\n      \"integrity\": \"sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==\",\n      \"dev\": true,\n      \"requires\": {\n        \"esutils\": \"2.0.2\"\n      }\n    },\n    \"duplexer2\": {\n      \"version\": \"0.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz\",\n      \"integrity\": \"sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=\",\n      \"dev\": true,\n      \"requires\": {\n        \"readable-stream\": \"1.1.14\"\n      }\n    },\n    \"ecc-jsbn\": {\n      \"version\": \"0.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz\",\n      \"integrity\": \"sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=\",\n      \"dev\": true,\n      \"requires\": {\n        \"jsbn\": \"0.1.1\",\n        \"safer-buffer\": \"2.1.2\"\n      }\n    },\n    \"editorconfig\": {\n      \"version\": \"0.15.3\",\n      \"resolved\": \"https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.3.tgz\",\n      \"integrity\": \"sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==\",\n      \"requires\": {\n        \"commander\": \"2.19.0\",\n        \"lru-cache\": \"4.1.5\",\n        \"semver\": \"5.6.0\",\n        \"sigmund\": \"1.0.1\"\n      },\n      \"dependencies\": {\n        \"lru-cache\": {\n          \"version\": \"4.1.5\",\n          \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz\",\n          \"integrity\": \"sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==\",\n          \"requires\": {\n            \"pseudomap\": \"1.0.2\",\n            \"yallist\": \"2.1.2\"\n          }\n        }\n      }\n    },\n    \"electron-to-chromium\": {\n      \"version\": \"1.3.595\",\n      \"resolved\": \"https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.595.tgz\",\n      \"integrity\": \"sha512-JpaBIhdBkF9FLG7x06ONfe0f5bxPrxRcq0X+Sc8vsCt+OPWIzxOD+qM71NEHLGbDfN9Q6hbtHRv4/dnvcOxo6g==\"\n    },\n    \"emojis-list\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz\",\n      \"integrity\": \"sha1-TapNnbAPmBmIDHn6RXrlsJof04k=\"\n    },\n    \"end-of-stream\": {\n      \"version\": \"0.1.5\",\n      \"resolved\": \"https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz\",\n      \"integrity\": \"sha1-jhdyBsPICDfYVjLouTWd/osvbq8=\",\n      \"dev\": true,\n      \"requires\": {\n        \"once\": \"1.3.3\"\n      },\n      \"dependencies\": {\n        \"once\": {\n          \"version\": \"1.3.3\",\n          \"resolved\": \"https://registry.npmjs.org/once/-/once-1.3.3.tgz\",\n          \"integrity\": \"sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=\",\n          \"dev\": true,\n          \"requires\": {\n            \"wrappy\": \"1.0.2\"\n          }\n        }\n      }\n    },\n    \"es5-ext\": {\n      \"version\": \"0.10.53\",\n      \"resolved\": \"https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz\",\n      \"integrity\": \"sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==\",\n      \"requires\": {\n        \"es6-iterator\": \"2.0.3\",\n        \"es6-symbol\": \"3.1.3\",\n        \"next-tick\": \"1.0.0\"\n      }\n    },\n    \"es6-iterator\": {\n      \"version\": \"2.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz\",\n      \"integrity\": \"sha1-p96IkUGgWpSwhUQDstCg+/qY87c=\",\n      \"requires\": {\n        \"d\": \"1.0.1\",\n        \"es5-ext\": \"0.10.53\",\n        \"es6-symbol\": \"3.1.3\"\n      }\n    },\n    \"es6-symbol\": {\n      \"version\": \"3.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz\",\n      \"integrity\": \"sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==\",\n      \"requires\": {\n        \"d\": \"1.0.1\",\n        \"ext\": \"1.4.0\"\n      }\n    },\n    \"escalade\": {\n      \"version\": \"3.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz\",\n      \"integrity\": \"sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==\"\n    },\n    \"escape-string-regexp\": {\n      \"version\": \"1.0.5\",\n      \"resolved\": \"https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz\",\n      \"integrity\": \"sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=\"\n    },\n    \"escodegen\": {\n      \"version\": \"1.14.3\",\n      \"resolved\": \"https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz\",\n      \"integrity\": \"sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==\",\n      \"requires\": {\n        \"esprima\": \"4.0.1\",\n        \"estraverse\": \"4.2.0\",\n        \"esutils\": \"2.0.2\",\n        \"optionator\": \"0.8.2\",\n        \"source-map\": \"0.6.1\"\n      }\n    },\n    \"eslint\": {\n      \"version\": \"5.12.0\",\n      \"resolved\": \"https://registry.npmjs.org/eslint/-/eslint-5.12.0.tgz\",\n      \"integrity\": \"sha512-LntwyPxtOHrsJdcSwyQKVtHofPHdv+4+mFwEe91r2V13vqpM8yLr7b1sW+Oo/yheOPkWYsYlYJCkzlFAt8KV7g==\",\n      \"dev\": true,\n      \"requires\": {\n        \"@babel/code-frame\": \"7.0.0\",\n        \"ajv\": \"6.7.0\",\n        \"chalk\": \"2.4.2\",\n        \"cross-spawn\": \"6.0.5\",\n        \"debug\": \"4.1.1\",\n        \"doctrine\": \"2.1.0\",\n        \"eslint-scope\": \"4.0.0\",\n        \"eslint-utils\": \"1.3.1\",\n        \"eslint-visitor-keys\": \"1.0.0\",\n        \"espree\": \"5.0.0\",\n        \"esquery\": \"1.0.1\",\n        \"esutils\": \"2.0.2\",\n        \"file-entry-cache\": \"2.0.0\",\n        \"functional-red-black-tree\": \"1.0.1\",\n        \"glob\": \"7.1.3\",\n        \"globals\": \"11.10.0\",\n        \"ignore\": \"4.0.6\",\n        \"import-fresh\": \"3.0.0\",\n        \"imurmurhash\": \"0.1.4\",\n        \"inquirer\": \"6.2.1\",\n        \"js-yaml\": \"3.12.1\",\n        \"json-stable-stringify-without-jsonify\": \"1.0.1\",\n        \"levn\": \"0.3.0\",\n        \"lodash\": \"4.17.11\",\n        \"minimatch\": \"3.0.4\",\n        \"mkdirp\": \"0.5.1\",\n        \"natural-compare\": \"1.4.0\",\n        \"optionator\": \"0.8.2\",\n        \"path-is-inside\": \"1.0.2\",\n        \"pluralize\": \"7.0.0\",\n        \"progress\": \"2.0.3\",\n        \"regexpp\": \"2.0.1\",\n        \"semver\": \"5.6.0\",\n        \"strip-ansi\": \"4.0.0\",\n        \"strip-json-comments\": \"2.0.1\",\n        \"table\": \"5.2.1\",\n        \"text-table\": \"0.2.0\"\n      },\n      \"dependencies\": {\n        \"ansi-regex\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz\",\n          \"integrity\": \"sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=\",\n          \"dev\": true\n        },\n        \"debug\": {\n          \"version\": \"4.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/debug/-/debug-4.1.1.tgz\",\n          \"integrity\": \"sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==\",\n          \"dev\": true,\n          \"requires\": {\n            \"ms\": \"2.1.1\"\n          }\n        },\n        \"esprima\": {\n          \"version\": \"4.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz\",\n          \"integrity\": \"sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==\",\n          \"dev\": true\n        },\n        \"globals\": {\n          \"version\": \"11.10.0\",\n          \"resolved\": \"https://registry.npmjs.org/globals/-/globals-11.10.0.tgz\",\n          \"integrity\": \"sha512-0GZF1RiPKU97IHUO5TORo9w1PwrH/NBPl+fS7oMLdaTRiYmYbwK4NWoZWrAdd0/abG9R2BU+OiwyQpTpE6pdfQ==\",\n          \"dev\": true\n        },\n        \"js-yaml\": {\n          \"version\": \"3.12.1\",\n          \"resolved\": \"https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.1.tgz\",\n          \"integrity\": \"sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA==\",\n          \"dev\": true,\n          \"requires\": {\n            \"argparse\": \"1.0.10\",\n            \"esprima\": \"4.0.1\"\n          }\n        },\n        \"ms\": {\n          \"version\": \"2.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.1.1.tgz\",\n          \"integrity\": \"sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==\",\n          \"dev\": true\n        },\n        \"strip-ansi\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz\",\n          \"integrity\": \"sha1-qEeQIusaw2iocTibY1JixQXuNo8=\",\n          \"dev\": true,\n          \"requires\": {\n            \"ansi-regex\": \"3.0.0\"\n          }\n        }\n      }\n    },\n    \"eslint-scope\": {\n      \"version\": \"4.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz\",\n      \"integrity\": \"sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==\",\n      \"dev\": true,\n      \"requires\": {\n        \"esrecurse\": \"4.2.1\",\n        \"estraverse\": \"4.2.0\"\n      }\n    },\n    \"eslint-utils\": {\n      \"version\": \"1.3.1\",\n      \"resolved\": \"https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz\",\n      \"integrity\": \"sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==\",\n      \"dev\": true\n    },\n    \"eslint-visitor-keys\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz\",\n      \"integrity\": \"sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==\",\n      \"dev\": true\n    },\n    \"espree\": {\n      \"version\": \"5.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/espree/-/espree-5.0.0.tgz\",\n      \"integrity\": \"sha512-1MpUfwsdS9MMoN7ZXqAr9e9UKdVHDcvrJpyx7mm1WuQlx/ygErEQBzgi5Nh5qBHIoYweprhtMkTCb9GhcAIcsA==\",\n      \"dev\": true,\n      \"requires\": {\n        \"acorn\": \"6.0.5\",\n        \"acorn-jsx\": \"5.0.1\",\n        \"eslint-visitor-keys\": \"1.0.0\"\n      },\n      \"dependencies\": {\n        \"acorn\": {\n          \"version\": \"6.0.5\",\n          \"resolved\": \"https://registry.npmjs.org/acorn/-/acorn-6.0.5.tgz\",\n          \"integrity\": \"sha512-i33Zgp3XWtmZBMNvCr4azvOFeWVw1Rk6p3hfi3LUDvIFraOMywb1kAtrbi+med14m4Xfpqm3zRZMT+c0FNE7kg==\",\n          \"dev\": true\n        }\n      }\n    },\n    \"esprima\": {\n      \"version\": \"4.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz\",\n      \"integrity\": \"sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==\"\n    },\n    \"esquery\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz\",\n      \"integrity\": \"sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==\",\n      \"dev\": true,\n      \"requires\": {\n        \"estraverse\": \"4.2.0\"\n      }\n    },\n    \"esrecurse\": {\n      \"version\": \"4.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz\",\n      \"integrity\": \"sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==\",\n      \"dev\": true,\n      \"requires\": {\n        \"estraverse\": \"4.2.0\"\n      }\n    },\n    \"estraverse\": {\n      \"version\": \"4.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz\",\n      \"integrity\": \"sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=\"\n    },\n    \"esutils\": {\n      \"version\": \"2.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz\",\n      \"integrity\": \"sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=\"\n    },\n    \"expand-brackets\": {\n      \"version\": \"2.1.4\",\n      \"resolved\": \"https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz\",\n      \"integrity\": \"sha1-t3c14xXOMPa27/D4OwQVGiJEliI=\",\n      \"dev\": true,\n      \"requires\": {\n        \"debug\": \"2.6.9\",\n        \"define-property\": \"0.2.5\",\n        \"extend-shallow\": \"2.0.1\",\n        \"posix-character-classes\": \"0.1.1\",\n        \"regex-not\": \"1.0.2\",\n        \"snapdragon\": \"0.8.2\",\n        \"to-regex\": \"3.0.2\"\n      },\n      \"dependencies\": {\n        \"define-property\": {\n          \"version\": \"0.2.5\",\n          \"resolved\": \"https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz\",\n          \"integrity\": \"sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-descriptor\": \"0.1.6\"\n          }\n        },\n        \"extend-shallow\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz\",\n          \"integrity\": \"sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-extendable\": \"0.1.1\"\n          }\n        }\n      }\n    },\n    \"expand-tilde\": {\n      \"version\": \"2.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz\",\n      \"integrity\": \"sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=\",\n      \"dev\": true,\n      \"requires\": {\n        \"homedir-polyfill\": \"1.0.1\"\n      }\n    },\n    \"ext\": {\n      \"version\": \"1.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/ext/-/ext-1.4.0.tgz\",\n      \"integrity\": \"sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==\",\n      \"requires\": {\n        \"type\": \"2.1.0\"\n      },\n      \"dependencies\": {\n        \"type\": {\n          \"version\": \"2.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/type/-/type-2.1.0.tgz\",\n          \"integrity\": \"sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA==\"\n        }\n      }\n    },\n    \"extend\": {\n      \"version\": \"3.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/extend/-/extend-3.0.2.tgz\",\n      \"integrity\": \"sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==\",\n      \"dev\": true\n    },\n    \"extend-shallow\": {\n      \"version\": \"3.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz\",\n      \"integrity\": \"sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=\",\n      \"dev\": true,\n      \"requires\": {\n        \"assign-symbols\": \"1.0.0\",\n        \"is-extendable\": \"1.0.1\"\n      },\n      \"dependencies\": {\n        \"is-extendable\": {\n          \"version\": \"1.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz\",\n          \"integrity\": \"sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-plain-object\": \"2.0.4\"\n          }\n        }\n      }\n    },\n    \"external-editor\": {\n      \"version\": \"3.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz\",\n      \"integrity\": \"sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==\",\n      \"dev\": true,\n      \"requires\": {\n        \"chardet\": \"0.7.0\",\n        \"iconv-lite\": \"0.4.24\",\n        \"tmp\": \"0.0.33\"\n      }\n    },\n    \"extglob\": {\n      \"version\": \"2.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz\",\n      \"integrity\": \"sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==\",\n      \"dev\": true,\n      \"requires\": {\n        \"array-unique\": \"0.3.2\",\n        \"define-property\": \"1.0.0\",\n        \"expand-brackets\": \"2.1.4\",\n        \"extend-shallow\": \"2.0.1\",\n        \"fragment-cache\": \"0.2.1\",\n        \"regex-not\": \"1.0.2\",\n        \"snapdragon\": \"0.8.2\",\n        \"to-regex\": \"3.0.2\"\n      },\n      \"dependencies\": {\n        \"define-property\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz\",\n          \"integrity\": \"sha1-dp66rz9KY6rTr56NMEybvnm/sOY=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-descriptor\": \"1.0.2\"\n          }\n        },\n        \"extend-shallow\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz\",\n          \"integrity\": \"sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-extendable\": \"0.1.1\"\n          }\n        },\n        \"is-accessor-descriptor\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz\",\n          \"integrity\": \"sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==\",\n          \"dev\": true,\n          \"requires\": {\n            \"kind-of\": \"6.0.2\"\n          }\n        },\n        \"is-data-descriptor\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz\",\n          \"integrity\": \"sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==\",\n          \"dev\": true,\n          \"requires\": {\n            \"kind-of\": \"6.0.2\"\n          }\n        },\n        \"is-descriptor\": {\n          \"version\": \"1.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz\",\n          \"integrity\": \"sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-accessor-descriptor\": \"1.0.0\",\n            \"is-data-descriptor\": \"1.0.0\",\n            \"kind-of\": \"6.0.2\"\n          }\n        }\n      }\n    },\n    \"extract-text-webpack-plugin\": {\n      \"version\": \"3.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/extract-text-webpack-plugin/-/extract-text-webpack-plugin-3.0.2.tgz\",\n      \"integrity\": \"sha512-bt/LZ4m5Rqt/Crl2HiKuAl/oqg0psx1tsTLkvWbJen1CtD+fftkZhMaQ9HOtY2gWsl2Wq+sABmMVi9z3DhKWQQ==\",\n      \"requires\": {\n        \"async\": \"2.6.1\",\n        \"loader-utils\": \"1.2.3\",\n        \"schema-utils\": \"0.3.0\",\n        \"webpack-sources\": \"1.3.0\"\n      }\n    },\n    \"extsprintf\": {\n      \"version\": \"1.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz\",\n      \"integrity\": \"sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=\",\n      \"dev\": true\n    },\n    \"fancy-log\": {\n      \"version\": \"1.3.3\",\n      \"resolved\": \"https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz\",\n      \"integrity\": \"sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==\",\n      \"dev\": true,\n      \"requires\": {\n        \"ansi-gray\": \"0.1.1\",\n        \"color-support\": \"1.1.3\",\n        \"parse-node-version\": \"1.0.0\",\n        \"time-stamp\": \"1.1.0\"\n      }\n    },\n    \"fast-deep-equal\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz\",\n      \"integrity\": \"sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=\"\n    },\n    \"fast-json-stable-stringify\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz\",\n      \"integrity\": \"sha1-1RQsDK7msRifh9OnYREGT4bIu/I=\"\n    },\n    \"fast-levenshtein\": {\n      \"version\": \"2.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz\",\n      \"integrity\": \"sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=\"\n    },\n    \"fetch-detector\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/fetch-detector/-/fetch-detector-1.0.1.tgz\",\n      \"integrity\": \"sha1-bLPq9zjCcnhi6GiA1hIUI+qkIIM=\"\n    },\n    \"fetch-ie8\": {\n      \"version\": \"1.5.0\",\n      \"resolved\": \"https://registry.npmjs.org/fetch-ie8/-/fetch-ie8-1.5.0.tgz\",\n      \"integrity\": \"sha1-8RQcP5bLyJN6oxsPvBp3AiD7wVs=\"\n    },\n    \"figures\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/figures/-/figures-2.0.0.tgz\",\n      \"integrity\": \"sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=\",\n      \"dev\": true,\n      \"requires\": {\n        \"escape-string-regexp\": \"1.0.5\"\n      }\n    },\n    \"file-entry-cache\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz\",\n      \"integrity\": \"sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=\",\n      \"dev\": true,\n      \"requires\": {\n        \"flat-cache\": \"1.3.4\",\n        \"object-assign\": \"4.1.1\"\n      }\n    },\n    \"fill-range\": {\n      \"version\": \"4.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz\",\n      \"integrity\": \"sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=\",\n      \"dev\": true,\n      \"requires\": {\n        \"extend-shallow\": \"2.0.1\",\n        \"is-number\": \"3.0.0\",\n        \"repeat-string\": \"1.6.1\",\n        \"to-regex-range\": \"2.1.1\"\n      },\n      \"dependencies\": {\n        \"extend-shallow\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz\",\n          \"integrity\": \"sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-extendable\": \"0.1.1\"\n          }\n        }\n      }\n    },\n    \"find-index\": {\n      \"version\": \"0.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz\",\n      \"integrity\": \"sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=\",\n      \"dev\": true\n    },\n    \"findup-sync\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz\",\n      \"integrity\": \"sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=\",\n      \"dev\": true,\n      \"requires\": {\n        \"detect-file\": \"1.0.0\",\n        \"is-glob\": \"3.1.0\",\n        \"micromatch\": \"3.1.10\",\n        \"resolve-dir\": \"1.0.1\"\n      }\n    },\n    \"fined\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/fined/-/fined-1.1.1.tgz\",\n      \"integrity\": \"sha512-jQp949ZmEbiYHk3gkbdtpJ0G1+kgtLQBNdP5edFP7Fh+WAYceLQz6yO1SBj72Xkg8GVyTB3bBzAYrHJVh5Xd5g==\",\n      \"dev\": true,\n      \"requires\": {\n        \"expand-tilde\": \"2.0.2\",\n        \"is-plain-object\": \"2.0.4\",\n        \"object.defaults\": \"1.1.0\",\n        \"object.pick\": \"1.3.0\",\n        \"parse-filepath\": \"1.0.2\"\n      }\n    },\n    \"first-chunk-stream\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz\",\n      \"integrity\": \"sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=\",\n      \"dev\": true\n    },\n    \"flagged-respawn\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz\",\n      \"integrity\": \"sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==\",\n      \"dev\": true\n    },\n    \"flat-cache\": {\n      \"version\": \"1.3.4\",\n      \"resolved\": \"https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.4.tgz\",\n      \"integrity\": \"sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==\",\n      \"dev\": true,\n      \"requires\": {\n        \"circular-json\": \"0.3.3\",\n        \"graceful-fs\": \"4.1.15\",\n        \"rimraf\": \"2.6.3\",\n        \"write\": \"0.2.1\"\n      }\n    },\n    \"flatten\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/flatten/-/flatten-1.0.3.tgz\",\n      \"integrity\": \"sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg==\"\n    },\n    \"for-in\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz\",\n      \"integrity\": \"sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=\",\n      \"dev\": true\n    },\n    \"for-own\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz\",\n      \"integrity\": \"sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=\",\n      \"dev\": true,\n      \"requires\": {\n        \"for-in\": \"1.0.2\"\n      }\n    },\n    \"forever-agent\": {\n      \"version\": \"0.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz\",\n      \"integrity\": \"sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=\",\n      \"dev\": true\n    },\n    \"fragment-cache\": {\n      \"version\": \"0.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz\",\n      \"integrity\": \"sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=\",\n      \"dev\": true,\n      \"requires\": {\n        \"map-cache\": \"0.2.2\"\n      }\n    },\n    \"fs-extra\": {\n      \"version\": \"7.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz\",\n      \"integrity\": \"sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==\",\n      \"requires\": {\n        \"graceful-fs\": \"4.1.15\",\n        \"jsonfile\": \"4.0.0\",\n        \"universalify\": \"0.1.2\"\n      }\n    },\n    \"fs.realpath\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz\",\n      \"integrity\": \"sha1-FQStJSMVjKpA20onh8sBQRmU6k8=\"\n    },\n    \"function-bind\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz\",\n      \"integrity\": \"sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==\"\n    },\n    \"functional-red-black-tree\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz\",\n      \"integrity\": \"sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=\",\n      \"dev\": true\n    },\n    \"gaze\": {\n      \"version\": \"0.5.2\",\n      \"resolved\": \"https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz\",\n      \"integrity\": \"sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=\",\n      \"dev\": true,\n      \"requires\": {\n        \"globule\": \"0.1.0\"\n      }\n    },\n    \"generate-function\": {\n      \"version\": \"2.3.1\",\n      \"resolved\": \"https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz\",\n      \"integrity\": \"sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==\",\n      \"dev\": true,\n      \"requires\": {\n        \"is-property\": \"1.0.2\"\n      }\n    },\n    \"generate-object-property\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz\",\n      \"integrity\": \"sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=\",\n      \"dev\": true,\n      \"requires\": {\n        \"is-property\": \"1.0.2\"\n      }\n    },\n    \"get-func-name\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz\",\n      \"integrity\": \"sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=\",\n      \"dev\": true\n    },\n    \"get-intrinsic\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.1.tgz\",\n      \"integrity\": \"sha512-ZnWP+AmS1VUaLgTRy47+zKtjTxz+0xMpx3I52i+aalBK1QP19ggLF3Db89KJX7kjfOfP2eoa01qc++GwPgufPg==\",\n      \"requires\": {\n        \"function-bind\": \"1.1.1\",\n        \"has\": \"1.0.3\",\n        \"has-symbols\": \"1.0.1\"\n      }\n    },\n    \"get-value\": {\n      \"version\": \"2.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz\",\n      \"integrity\": \"sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=\",\n      \"dev\": true\n    },\n    \"getpass\": {\n      \"version\": \"0.1.7\",\n      \"resolved\": \"https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz\",\n      \"integrity\": \"sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=\",\n      \"dev\": true,\n      \"requires\": {\n        \"assert-plus\": \"1.0.0\"\n      }\n    },\n    \"glob\": {\n      \"version\": \"7.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/glob/-/glob-7.1.3.tgz\",\n      \"integrity\": \"sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==\",\n      \"requires\": {\n        \"fs.realpath\": \"1.0.0\",\n        \"inflight\": \"1.0.6\",\n        \"inherits\": \"2.0.3\",\n        \"minimatch\": \"3.0.4\",\n        \"once\": \"1.4.0\",\n        \"path-is-absolute\": \"1.0.1\"\n      }\n    },\n    \"glob-stream\": {\n      \"version\": \"3.1.18\",\n      \"resolved\": \"https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz\",\n      \"integrity\": \"sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=\",\n      \"dev\": true,\n      \"requires\": {\n        \"glob\": \"4.5.3\",\n        \"glob2base\": \"0.0.12\",\n        \"minimatch\": \"2.0.10\",\n        \"ordered-read-streams\": \"0.1.0\",\n        \"through2\": \"0.6.5\",\n        \"unique-stream\": \"1.0.0\"\n      },\n      \"dependencies\": {\n        \"glob\": {\n          \"version\": \"4.5.3\",\n          \"resolved\": \"https://registry.npmjs.org/glob/-/glob-4.5.3.tgz\",\n          \"integrity\": \"sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=\",\n          \"dev\": true,\n          \"requires\": {\n            \"inflight\": \"1.0.6\",\n            \"inherits\": \"2.0.3\",\n            \"minimatch\": \"2.0.10\",\n            \"once\": \"1.4.0\"\n          }\n        },\n        \"minimatch\": {\n          \"version\": \"2.0.10\",\n          \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz\",\n          \"integrity\": \"sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=\",\n          \"dev\": true,\n          \"requires\": {\n            \"brace-expansion\": \"1.1.11\"\n          }\n        },\n        \"readable-stream\": {\n          \"version\": \"1.0.34\",\n          \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz\",\n          \"integrity\": \"sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=\",\n          \"dev\": true,\n          \"requires\": {\n            \"core-util-is\": \"1.0.2\",\n            \"inherits\": \"2.0.3\",\n            \"isarray\": \"0.0.1\",\n            \"string_decoder\": \"0.10.31\"\n          }\n        },\n        \"through2\": {\n          \"version\": \"0.6.5\",\n          \"resolved\": \"https://registry.npmjs.org/through2/-/through2-0.6.5.tgz\",\n          \"integrity\": \"sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=\",\n          \"dev\": true,\n          \"requires\": {\n            \"readable-stream\": \"1.0.34\",\n            \"xtend\": \"4.0.1\"\n          }\n        }\n      }\n    },\n    \"glob-watcher\": {\n      \"version\": \"0.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz\",\n      \"integrity\": \"sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=\",\n      \"dev\": true,\n      \"requires\": {\n        \"gaze\": \"0.5.2\"\n      }\n    },\n    \"glob2base\": {\n      \"version\": \"0.0.12\",\n      \"resolved\": \"https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz\",\n      \"integrity\": \"sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=\",\n      \"dev\": true,\n      \"requires\": {\n        \"find-index\": \"0.1.1\"\n      }\n    },\n    \"global-modules\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz\",\n      \"integrity\": \"sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==\",\n      \"dev\": true,\n      \"requires\": {\n        \"global-prefix\": \"1.0.2\",\n        \"is-windows\": \"1.0.2\",\n        \"resolve-dir\": \"1.0.1\"\n      }\n    },\n    \"global-prefix\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz\",\n      \"integrity\": \"sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=\",\n      \"dev\": true,\n      \"requires\": {\n        \"expand-tilde\": \"2.0.2\",\n        \"homedir-polyfill\": \"1.0.1\",\n        \"ini\": \"1.3.5\",\n        \"is-windows\": \"1.0.2\",\n        \"which\": \"1.3.1\"\n      }\n    },\n    \"globals\": {\n      \"version\": \"9.18.0\",\n      \"resolved\": \"https://registry.npmjs.org/globals/-/globals-9.18.0.tgz\",\n      \"integrity\": \"sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==\"\n    },\n    \"globule\": {\n      \"version\": \"0.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/globule/-/globule-0.1.0.tgz\",\n      \"integrity\": \"sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=\",\n      \"dev\": true,\n      \"requires\": {\n        \"glob\": \"3.1.21\",\n        \"lodash\": \"1.0.2\",\n        \"minimatch\": \"0.2.14\"\n      },\n      \"dependencies\": {\n        \"glob\": {\n          \"version\": \"3.1.21\",\n          \"resolved\": \"https://registry.npmjs.org/glob/-/glob-3.1.21.tgz\",\n          \"integrity\": \"sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=\",\n          \"dev\": true,\n          \"requires\": {\n            \"graceful-fs\": \"1.2.3\",\n            \"inherits\": \"1.0.2\",\n            \"minimatch\": \"0.2.14\"\n          }\n        },\n        \"graceful-fs\": {\n          \"version\": \"1.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz\",\n          \"integrity\": \"sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=\",\n          \"dev\": true\n        },\n        \"inherits\": {\n          \"version\": \"1.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz\",\n          \"integrity\": \"sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=\",\n          \"dev\": true\n        },\n        \"lodash\": {\n          \"version\": \"1.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz\",\n          \"integrity\": \"sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=\",\n          \"dev\": true\n        },\n        \"lru-cache\": {\n          \"version\": \"2.7.3\",\n          \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz\",\n          \"integrity\": \"sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=\",\n          \"dev\": true\n        },\n        \"minimatch\": {\n          \"version\": \"0.2.14\",\n          \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz\",\n          \"integrity\": \"sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=\",\n          \"dev\": true,\n          \"requires\": {\n            \"lru-cache\": \"2.7.3\",\n            \"sigmund\": \"1.0.1\"\n          }\n        }\n      }\n    },\n    \"glogg\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz\",\n      \"integrity\": \"sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==\",\n      \"dev\": true,\n      \"requires\": {\n        \"sparkles\": \"1.0.1\"\n      }\n    },\n    \"graceful-fs\": {\n      \"version\": \"4.1.15\",\n      \"resolved\": \"https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz\",\n      \"integrity\": \"sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==\"\n    },\n    \"growl\": {\n      \"version\": \"1.10.5\",\n      \"resolved\": \"https://registry.npmjs.org/growl/-/growl-1.10.5.tgz\",\n      \"integrity\": \"sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==\",\n      \"dev\": true\n    },\n    \"gulp\": {\n      \"version\": \"3.9.1\",\n      \"resolved\": \"https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz\",\n      \"integrity\": \"sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=\",\n      \"dev\": true,\n      \"requires\": {\n        \"archy\": \"1.0.0\",\n        \"chalk\": \"1.1.3\",\n        \"deprecated\": \"0.0.1\",\n        \"gulp-util\": \"3.0.8\",\n        \"interpret\": \"1.2.0\",\n        \"liftoff\": \"2.5.0\",\n        \"minimist\": \"1.2.0\",\n        \"orchestrator\": \"0.3.8\",\n        \"pretty-hrtime\": \"1.0.3\",\n        \"semver\": \"4.3.6\",\n        \"tildify\": \"1.2.0\",\n        \"v8flags\": \"2.1.1\",\n        \"vinyl-fs\": \"0.3.14\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\",\n          \"dev\": true\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"dev\": true,\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          }\n        },\n        \"semver\": {\n          \"version\": \"4.3.6\",\n          \"resolved\": \"https://registry.npmjs.org/semver/-/semver-4.3.6.tgz\",\n          \"integrity\": \"sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=\",\n          \"dev\": true\n        },\n        \"supports-color\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n          \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\",\n          \"dev\": true\n        }\n      }\n    },\n    \"gulp-uglify-es\": {\n      \"version\": \"1.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/gulp-uglify-es/-/gulp-uglify-es-1.0.4.tgz\",\n      \"integrity\": \"sha512-UMRufZsBmQizCYpftutaiVoLswpbzFEfY90EJLU4YlTgculeHnanb794s88TMd5tpCZVC638sAX6JrLVYTP/Wg==\",\n      \"dev\": true,\n      \"requires\": {\n        \"o-stream\": \"0.2.2\",\n        \"plugin-error\": \"1.0.1\",\n        \"terser\": \"3.14.1\",\n        \"vinyl\": \"2.2.0\",\n        \"vinyl-sourcemaps-apply\": \"0.2.1\"\n      },\n      \"dependencies\": {\n        \"clone\": {\n          \"version\": \"2.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/clone/-/clone-2.1.2.tgz\",\n          \"integrity\": \"sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=\",\n          \"dev\": true\n        },\n        \"clone-stats\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz\",\n          \"integrity\": \"sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=\",\n          \"dev\": true\n        },\n        \"replace-ext\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz\",\n          \"integrity\": \"sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=\",\n          \"dev\": true\n        },\n        \"vinyl\": {\n          \"version\": \"2.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz\",\n          \"integrity\": \"sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==\",\n          \"dev\": true,\n          \"requires\": {\n            \"clone\": \"2.1.2\",\n            \"clone-buffer\": \"1.0.0\",\n            \"clone-stats\": \"1.0.0\",\n            \"cloneable-readable\": \"1.1.2\",\n            \"remove-trailing-separator\": \"1.1.0\",\n            \"replace-ext\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"gulp-util\": {\n      \"version\": \"3.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz\",\n      \"integrity\": \"sha1-AFTh50RQLifATBh8PsxQXdVLu08=\",\n      \"dev\": true,\n      \"requires\": {\n        \"array-differ\": \"1.0.0\",\n        \"array-uniq\": \"1.0.3\",\n        \"beeper\": \"1.1.1\",\n        \"chalk\": \"1.1.3\",\n        \"dateformat\": \"2.2.0\",\n        \"fancy-log\": \"1.3.3\",\n        \"gulplog\": \"1.0.0\",\n        \"has-gulplog\": \"0.1.0\",\n        \"lodash._reescape\": \"3.0.0\",\n        \"lodash._reevaluate\": \"3.0.0\",\n        \"lodash._reinterpolate\": \"3.0.0\",\n        \"lodash.template\": \"3.6.2\",\n        \"minimist\": \"1.2.0\",\n        \"multipipe\": \"0.1.2\",\n        \"object-assign\": \"3.0.0\",\n        \"replace-ext\": \"0.0.1\",\n        \"through2\": \"2.0.5\",\n        \"vinyl\": \"0.5.3\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\",\n          \"dev\": true\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"dev\": true,\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          }\n        },\n        \"object-assign\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz\",\n          \"integrity\": \"sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=\",\n          \"dev\": true\n        },\n        \"supports-color\": {\n          \"version\": \"2.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n          \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\",\n          \"dev\": true\n        }\n      }\n    },\n    \"gulplog\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz\",\n      \"integrity\": \"sha1-4oxNRdBey77YGDY86PnFkmIp/+U=\",\n      \"dev\": true,\n      \"requires\": {\n        \"glogg\": \"1.0.2\"\n      }\n    },\n    \"handlebars\": {\n      \"version\": \"4.0.12\",\n      \"resolved\": \"https://registry.npmjs.org/handlebars/-/handlebars-4.0.12.tgz\",\n      \"integrity\": \"sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA==\",\n      \"dev\": true,\n      \"requires\": {\n        \"async\": \"2.6.1\",\n        \"optimist\": \"0.6.1\",\n        \"source-map\": \"0.6.1\",\n        \"uglify-js\": \"3.4.9\"\n      }\n    },\n    \"has\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/has/-/has-1.0.3.tgz\",\n      \"integrity\": \"sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==\",\n      \"requires\": {\n        \"function-bind\": \"1.1.1\"\n      }\n    },\n    \"has-ansi\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz\",\n      \"integrity\": \"sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=\",\n      \"requires\": {\n        \"ansi-regex\": \"2.1.1\"\n      }\n    },\n    \"has-flag\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz\",\n      \"integrity\": \"sha1-tdRU3CGZriJWmfNGfloH87lVuv0=\"\n    },\n    \"has-gulplog\": {\n      \"version\": \"0.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz\",\n      \"integrity\": \"sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=\",\n      \"dev\": true,\n      \"requires\": {\n        \"sparkles\": \"1.0.1\"\n      }\n    },\n    \"has-symbols\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz\",\n      \"integrity\": \"sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==\"\n    },\n    \"has-value\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz\",\n      \"integrity\": \"sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=\",\n      \"dev\": true,\n      \"requires\": {\n        \"get-value\": \"2.0.6\",\n        \"has-values\": \"1.0.0\",\n        \"isobject\": \"3.0.1\"\n      }\n    },\n    \"has-values\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz\",\n      \"integrity\": \"sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=\",\n      \"dev\": true,\n      \"requires\": {\n        \"is-number\": \"3.0.0\",\n        \"kind-of\": \"4.0.0\"\n      },\n      \"dependencies\": {\n        \"kind-of\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz\",\n          \"integrity\": \"sha1-IIE989cSkosgc3hpGkUGb65y3Vc=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-buffer\": \"1.1.6\"\n          }\n        }\n      }\n    },\n    \"hash-sum\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz\",\n      \"integrity\": \"sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=\"\n    },\n    \"hawk\": {\n      \"version\": \"3.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz\",\n      \"integrity\": \"sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=\",\n      \"dev\": true,\n      \"requires\": {\n        \"boom\": \"2.10.1\",\n        \"cryptiles\": \"2.0.5\",\n        \"hoek\": \"2.16.3\",\n        \"sntp\": \"1.0.9\"\n      }\n    },\n    \"he\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/he/-/he-1.1.0.tgz\",\n      \"integrity\": \"sha1-KTGdSb7sE6mx88T5sqbd5IWbsqc=\"\n    },\n    \"hoek\": {\n      \"version\": \"2.16.3\",\n      \"resolved\": \"https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz\",\n      \"integrity\": \"sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=\",\n      \"dev\": true\n    },\n    \"homedir-polyfill\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz\",\n      \"integrity\": \"sha1-TCu8inWJmP7r9e1oWA921GdotLw=\",\n      \"dev\": true,\n      \"requires\": {\n        \"parse-passwd\": \"1.0.0\"\n      }\n    },\n    \"iconv-lite\": {\n      \"version\": \"0.4.24\",\n      \"resolved\": \"https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz\",\n      \"integrity\": \"sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==\",\n      \"dev\": true,\n      \"requires\": {\n        \"safer-buffer\": \"2.1.2\"\n      }\n    },\n    \"ignore\": {\n      \"version\": \"4.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz\",\n      \"integrity\": \"sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==\",\n      \"dev\": true\n    },\n    \"import-fresh\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz\",\n      \"integrity\": \"sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==\",\n      \"dev\": true,\n      \"requires\": {\n        \"parent-module\": \"1.0.0\",\n        \"resolve-from\": \"4.0.0\"\n      }\n    },\n    \"imurmurhash\": {\n      \"version\": \"0.1.4\",\n      \"resolved\": \"https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz\",\n      \"integrity\": \"sha1-khi5srkoojixPcT7a21XbyMUU+o=\",\n      \"dev\": true\n    },\n    \"indexes-of\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz\",\n      \"integrity\": \"sha1-8w9xbI4r00bHtn0985FVZqfAVgc=\"\n    },\n    \"inflight\": {\n      \"version\": \"1.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz\",\n      \"integrity\": \"sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=\",\n      \"requires\": {\n        \"once\": \"1.4.0\",\n        \"wrappy\": \"1.0.2\"\n      }\n    },\n    \"inherits\": {\n      \"version\": \"2.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz\",\n      \"integrity\": \"sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=\"\n    },\n    \"ini\": {\n      \"version\": \"1.3.5\",\n      \"resolved\": \"https://registry.npmjs.org/ini/-/ini-1.3.5.tgz\",\n      \"integrity\": \"sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==\"\n    },\n    \"inquirer\": {\n      \"version\": \"6.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/inquirer/-/inquirer-6.2.1.tgz\",\n      \"integrity\": \"sha512-088kl3DRT2dLU5riVMKKr1DlImd6X7smDhpXUCkJDCKvTEJeRiXh0G132HG9u5a+6Ylw9plFRY7RuTnwohYSpg==\",\n      \"dev\": true,\n      \"requires\": {\n        \"ansi-escapes\": \"3.1.0\",\n        \"chalk\": \"2.4.2\",\n        \"cli-cursor\": \"2.1.0\",\n        \"cli-width\": \"2.2.0\",\n        \"external-editor\": \"3.0.3\",\n        \"figures\": \"2.0.0\",\n        \"lodash\": \"4.17.11\",\n        \"mute-stream\": \"0.0.7\",\n        \"run-async\": \"2.3.0\",\n        \"rxjs\": \"6.3.3\",\n        \"string-width\": \"2.1.1\",\n        \"strip-ansi\": \"5.0.0\",\n        \"through\": \"2.3.8\"\n      },\n      \"dependencies\": {\n        \"ansi-regex\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz\",\n          \"integrity\": \"sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==\",\n          \"dev\": true\n        },\n        \"strip-ansi\": {\n          \"version\": \"5.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.0.0.tgz\",\n          \"integrity\": \"sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow==\",\n          \"dev\": true,\n          \"requires\": {\n            \"ansi-regex\": \"4.0.0\"\n          }\n        }\n      }\n    },\n    \"interface-loader\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/interface-loader/-/interface-loader-1.0.8.tgz\",\n      \"integrity\": \"sha512-TMS3Nx0h7msFzNNn+FftWVNSdRjFrkBHWHFbUSeCxPu6lpqNzAOwcAd2+vhOxb5wkgPgX54gufzm3SkVY/g3+w==\",\n      \"requires\": {\n        \"@babel/parser\": \"7.1.0\",\n        \"babel-generator\": \"6.26.1\",\n        \"babel-traverse\": \"6.26.0\",\n        \"chameleon-tool-utils\": \"1.0.8\",\n        \"loader-utils\": \"1.1.0\",\n        \"mvvm-interface-parser\": \"1.0.8\",\n        \"runtime-check\": \"1.0.8\"\n      },\n      \"dependencies\": {\n        \"@babel/parser\": {\n          \"version\": \"7.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.1.0.tgz\",\n          \"integrity\": \"sha512-SmjnXCuPAlai75AFtzv+KCBcJ3sDDWbIn+WytKw1k+wAtEy6phqI2RqKh/zAnw53i1NR8su3Ep/UoqaKcimuLg==\"\n        },\n        \"big.js\": {\n          \"version\": \"3.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz\",\n          \"integrity\": \"sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==\"\n        },\n        \"json5\": {\n          \"version\": \"0.5.1\",\n          \"resolved\": \"https://registry.npmjs.org/json5/-/json5-0.5.1.tgz\",\n          \"integrity\": \"sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=\"\n        },\n        \"loader-utils\": {\n          \"version\": \"1.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz\",\n          \"integrity\": \"sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=\",\n          \"requires\": {\n            \"big.js\": \"3.2.0\",\n            \"emojis-list\": \"2.1.0\",\n            \"json5\": \"0.5.1\"\n          }\n        }\n      }\n    },\n    \"interpret\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz\",\n      \"integrity\": \"sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==\",\n      \"dev\": true\n    },\n    \"invariant\": {\n      \"version\": \"2.2.4\",\n      \"resolved\": \"https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz\",\n      \"integrity\": \"sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==\",\n      \"requires\": {\n        \"loose-envify\": \"1.4.0\"\n      }\n    },\n    \"is-absolute\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz\",\n      \"integrity\": \"sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==\",\n      \"dev\": true,\n      \"requires\": {\n        \"is-relative\": \"1.0.0\",\n        \"is-windows\": \"1.0.2\"\n      }\n    },\n    \"is-accessor-descriptor\": {\n      \"version\": \"0.1.6\",\n      \"resolved\": \"https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz\",\n      \"integrity\": \"sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=\",\n      \"dev\": true,\n      \"requires\": {\n        \"kind-of\": \"3.2.2\"\n      },\n      \"dependencies\": {\n        \"kind-of\": {\n          \"version\": \"3.2.2\",\n          \"resolved\": \"https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz\",\n          \"integrity\": \"sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-buffer\": \"1.1.6\"\n          }\n        }\n      }\n    },\n    \"is-buffer\": {\n      \"version\": \"1.1.6\",\n      \"resolved\": \"https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz\",\n      \"integrity\": \"sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==\",\n      \"dev\": true\n    },\n    \"is-core-module\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-core-module/-/is-core-module-2.1.0.tgz\",\n      \"integrity\": \"sha512-YcV7BgVMRFRua2FqQzKtTDMz8iCuLEyGKjr70q8Zm1yy2qKcurbFEd79PAdHV77oL3NrAaOVQIbMmiHQCHB7ZA==\",\n      \"requires\": {\n        \"has\": \"1.0.3\"\n      }\n    },\n    \"is-data-descriptor\": {\n      \"version\": \"0.1.4\",\n      \"resolved\": \"https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz\",\n      \"integrity\": \"sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=\",\n      \"dev\": true,\n      \"requires\": {\n        \"kind-of\": \"3.2.2\"\n      },\n      \"dependencies\": {\n        \"kind-of\": {\n          \"version\": \"3.2.2\",\n          \"resolved\": \"https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz\",\n          \"integrity\": \"sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-buffer\": \"1.1.6\"\n          }\n        }\n      }\n    },\n    \"is-descriptor\": {\n      \"version\": \"0.1.6\",\n      \"resolved\": \"https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz\",\n      \"integrity\": \"sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==\",\n      \"dev\": true,\n      \"requires\": {\n        \"is-accessor-descriptor\": \"0.1.6\",\n        \"is-data-descriptor\": \"0.1.4\",\n        \"kind-of\": \"5.1.0\"\n      },\n      \"dependencies\": {\n        \"kind-of\": {\n          \"version\": \"5.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz\",\n          \"integrity\": \"sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==\",\n          \"dev\": true\n        }\n      }\n    },\n    \"is-extendable\": {\n      \"version\": \"0.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz\",\n      \"integrity\": \"sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=\",\n      \"dev\": true\n    },\n    \"is-extglob\": {\n      \"version\": \"2.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz\",\n      \"integrity\": \"sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=\",\n      \"dev\": true\n    },\n    \"is-finite\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz\",\n      \"integrity\": \"sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==\"\n    },\n    \"is-fullwidth-code-point\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz\",\n      \"integrity\": \"sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=\",\n      \"dev\": true\n    },\n    \"is-glob\": {\n      \"version\": \"3.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz\",\n      \"integrity\": \"sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=\",\n      \"dev\": true,\n      \"requires\": {\n        \"is-extglob\": \"2.1.1\"\n      }\n    },\n    \"is-my-ip-valid\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz\",\n      \"integrity\": \"sha512-gmh/eWXROncUzRnIa1Ubrt5b8ep/MGSnfAUI3aRp+sqTCs1tv1Isl8d8F6JmkN3dXKc3ehZMrtiPN9eL03NuaQ==\",\n      \"dev\": true\n    },\n    \"is-my-json-valid\": {\n      \"version\": \"2.19.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.19.0.tgz\",\n      \"integrity\": \"sha512-mG0f/unGX1HZ5ep4uhRaPOS8EkAY8/j6mDRMJrutq4CqhoJWYp7qAlonIPy3TV7p3ju4TK9fo/PbnoksWmsp5Q==\",\n      \"dev\": true,\n      \"requires\": {\n        \"generate-function\": \"2.3.1\",\n        \"generate-object-property\": \"1.2.0\",\n        \"is-my-ip-valid\": \"1.0.0\",\n        \"jsonpointer\": \"4.0.1\",\n        \"xtend\": \"4.0.1\"\n      }\n    },\n    \"is-number\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz\",\n      \"integrity\": \"sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=\",\n      \"dev\": true,\n      \"requires\": {\n        \"kind-of\": \"3.2.2\"\n      },\n      \"dependencies\": {\n        \"kind-of\": {\n          \"version\": \"3.2.2\",\n          \"resolved\": \"https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz\",\n          \"integrity\": \"sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-buffer\": \"1.1.6\"\n          }\n        }\n      }\n    },\n    \"is-plain-object\": {\n      \"version\": \"2.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz\",\n      \"integrity\": \"sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==\",\n      \"dev\": true,\n      \"requires\": {\n        \"isobject\": \"3.0.1\"\n      }\n    },\n    \"is-promise\": {\n      \"version\": \"2.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz\",\n      \"integrity\": \"sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=\",\n      \"dev\": true\n    },\n    \"is-property\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz\",\n      \"integrity\": \"sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=\",\n      \"dev\": true\n    },\n    \"is-relative\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz\",\n      \"integrity\": \"sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==\",\n      \"dev\": true,\n      \"requires\": {\n        \"is-unc-path\": \"1.0.0\"\n      }\n    },\n    \"is-typedarray\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz\",\n      \"integrity\": \"sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=\",\n      \"dev\": true\n    },\n    \"is-unc-path\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz\",\n      \"integrity\": \"sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==\",\n      \"dev\": true,\n      \"requires\": {\n        \"unc-path-regex\": \"0.1.2\"\n      }\n    },\n    \"is-utf8\": {\n      \"version\": \"0.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz\",\n      \"integrity\": \"sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=\",\n      \"dev\": true\n    },\n    \"is-windows\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz\",\n      \"integrity\": \"sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==\",\n      \"dev\": true\n    },\n    \"isarray\": {\n      \"version\": \"0.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz\",\n      \"integrity\": \"sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=\",\n      \"dev\": true\n    },\n    \"isexe\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz\",\n      \"integrity\": \"sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=\",\n      \"dev\": true\n    },\n    \"isobject\": {\n      \"version\": \"3.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz\",\n      \"integrity\": \"sha1-TkMekrEalzFjaqH5yNHMvP2reN8=\",\n      \"dev\": true\n    },\n    \"isstream\": {\n      \"version\": \"0.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz\",\n      \"integrity\": \"sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=\",\n      \"dev\": true\n    },\n    \"istanbul\": {\n      \"version\": \"0.4.5\",\n      \"resolved\": \"https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz\",\n      \"integrity\": \"sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=\",\n      \"dev\": true,\n      \"requires\": {\n        \"abbrev\": \"1.0.9\",\n        \"async\": \"1.5.2\",\n        \"escodegen\": \"1.8.1\",\n        \"esprima\": \"2.7.3\",\n        \"glob\": \"5.0.15\",\n        \"handlebars\": \"4.0.12\",\n        \"js-yaml\": \"3.6.1\",\n        \"mkdirp\": \"0.5.1\",\n        \"nopt\": \"3.0.6\",\n        \"once\": \"1.4.0\",\n        \"resolve\": \"1.1.7\",\n        \"supports-color\": \"3.2.3\",\n        \"which\": \"1.3.1\",\n        \"wordwrap\": \"1.0.0\"\n      },\n      \"dependencies\": {\n        \"abbrev\": {\n          \"version\": \"1.0.9\",\n          \"resolved\": \"https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz\",\n          \"integrity\": \"sha1-kbR5JYinc4wl813W9jdSovh3YTU=\",\n          \"dev\": true\n        },\n        \"async\": {\n          \"version\": \"1.5.2\",\n          \"resolved\": \"https://registry.npmjs.org/async/-/async-1.5.2.tgz\",\n          \"integrity\": \"sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=\",\n          \"dev\": true\n        },\n        \"escodegen\": {\n          \"version\": \"1.8.1\",\n          \"resolved\": \"https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz\",\n          \"integrity\": \"sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=\",\n          \"dev\": true,\n          \"requires\": {\n            \"esprima\": \"2.7.3\",\n            \"estraverse\": \"1.9.3\",\n            \"esutils\": \"2.0.2\",\n            \"optionator\": \"0.8.2\",\n            \"source-map\": \"0.2.0\"\n          }\n        },\n        \"esprima\": {\n          \"version\": \"2.7.3\",\n          \"resolved\": \"https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz\",\n          \"integrity\": \"sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=\",\n          \"dev\": true\n        },\n        \"estraverse\": {\n          \"version\": \"1.9.3\",\n          \"resolved\": \"https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz\",\n          \"integrity\": \"sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=\",\n          \"dev\": true\n        },\n        \"glob\": {\n          \"version\": \"5.0.15\",\n          \"resolved\": \"https://registry.npmjs.org/glob/-/glob-5.0.15.tgz\",\n          \"integrity\": \"sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=\",\n          \"dev\": true,\n          \"requires\": {\n            \"inflight\": \"1.0.6\",\n            \"inherits\": \"2.0.3\",\n            \"minimatch\": \"3.0.4\",\n            \"once\": \"1.4.0\",\n            \"path-is-absolute\": \"1.0.1\"\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\",\n          \"dev\": true\n        },\n        \"nopt\": {\n          \"version\": \"3.0.6\",\n          \"resolved\": \"https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz\",\n          \"integrity\": \"sha1-xkZdvwirzU2zWTF/eaxopkayj/k=\",\n          \"dev\": true,\n          \"requires\": {\n            \"abbrev\": \"1.0.9\"\n          }\n        },\n        \"resolve\": {\n          \"version\": \"1.1.7\",\n          \"resolved\": \"https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz\",\n          \"integrity\": \"sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=\",\n          \"dev\": true\n        },\n        \"source-map\": {\n          \"version\": \"0.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz\",\n          \"integrity\": \"sha1-2rc/vPwrqBm03gO9b26qSBZLP50=\",\n          \"dev\": true,\n          \"optional\": true,\n          \"requires\": {\n            \"amdefine\": \"1.0.1\"\n          }\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"dev\": true,\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"js-base64\": {\n      \"version\": \"2.6.4\",\n      \"resolved\": \"https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz\",\n      \"integrity\": \"sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==\"\n    },\n    \"js-beautify\": {\n      \"version\": \"1.13.0\",\n      \"resolved\": \"https://registry.npmjs.org/js-beautify/-/js-beautify-1.13.0.tgz\",\n      \"integrity\": \"sha512-/Tbp1OVzZjbwzwJQFIlYLm9eWQ+3aYbBXLSaqb1mEJzhcQAfrqMMQYtjb6io+U6KpD0ID4F+Id3/xcjH3l/sqA==\",\n      \"requires\": {\n        \"config-chain\": \"1.1.12\",\n        \"editorconfig\": \"0.15.3\",\n        \"glob\": \"7.1.3\",\n        \"mkdirp\": \"1.0.4\",\n        \"nopt\": \"5.0.0\"\n      },\n      \"dependencies\": {\n        \"mkdirp\": {\n          \"version\": \"1.0.4\",\n          \"resolved\": \"https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz\",\n          \"integrity\": \"sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==\"\n        }\n      }\n    },\n    \"js-tokens\": {\n      \"version\": \"3.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz\",\n      \"integrity\": \"sha1-mGbfOVECEw449/mWvOtlRDIJwls=\"\n    },\n    \"js-yaml\": {\n      \"version\": \"3.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.1.tgz\",\n      \"integrity\": \"sha1-bl/mfYsgXOTSL60Ft3geja3MSzA=\",\n      \"dev\": true,\n      \"requires\": {\n        \"argparse\": \"1.0.10\",\n        \"esprima\": \"2.7.3\"\n      },\n      \"dependencies\": {\n        \"esprima\": {\n          \"version\": \"2.7.3\",\n          \"resolved\": \"https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz\",\n          \"integrity\": \"sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=\",\n          \"dev\": true\n        }\n      }\n    },\n    \"jsbn\": {\n      \"version\": \"0.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz\",\n      \"integrity\": \"sha1-peZUwuWi3rXyAdls77yoDA7y9RM=\",\n      \"dev\": true\n    },\n    \"jsesc\": {\n      \"version\": \"1.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz\",\n      \"integrity\": \"sha1-RsP+yMGJKxKwgz25vHYiF226s0s=\"\n    },\n    \"json-schema\": {\n      \"version\": \"0.2.3\",\n      \"resolved\": \"https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz\",\n      \"integrity\": \"sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=\",\n      \"dev\": true\n    },\n    \"json-schema-traverse\": {\n      \"version\": \"0.4.1\",\n      \"resolved\": \"https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz\",\n      \"integrity\": \"sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==\"\n    },\n    \"json-stable-stringify-without-jsonify\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz\",\n      \"integrity\": \"sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=\",\n      \"dev\": true\n    },\n    \"json-stringify-safe\": {\n      \"version\": \"5.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz\",\n      \"integrity\": \"sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=\",\n      \"dev\": true\n    },\n    \"json5\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/json5/-/json5-1.0.1.tgz\",\n      \"integrity\": \"sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==\",\n      \"requires\": {\n        \"minimist\": \"1.2.0\"\n      }\n    },\n    \"jsonfile\": {\n      \"version\": \"4.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz\",\n      \"integrity\": \"sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=\",\n      \"requires\": {\n        \"graceful-fs\": \"4.1.15\"\n      }\n    },\n    \"jsonpointer\": {\n      \"version\": \"4.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz\",\n      \"integrity\": \"sha1-T9kss04OnbPInIYi7PUfm5eMbLk=\",\n      \"dev\": true\n    },\n    \"jsprim\": {\n      \"version\": \"1.4.1\",\n      \"resolved\": \"https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz\",\n      \"integrity\": \"sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=\",\n      \"dev\": true,\n      \"requires\": {\n        \"assert-plus\": \"1.0.0\",\n        \"extsprintf\": \"1.3.0\",\n        \"json-schema\": \"0.2.3\",\n        \"verror\": \"1.10.0\"\n      }\n    },\n    \"kind-of\": {\n      \"version\": \"6.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz\",\n      \"integrity\": \"sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==\",\n      \"dev\": true\n    },\n    \"lcov-parse\": {\n      \"version\": \"0.0.10\",\n      \"resolved\": \"https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz\",\n      \"integrity\": \"sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=\",\n      \"dev\": true\n    },\n    \"levn\": {\n      \"version\": \"0.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/levn/-/levn-0.3.0.tgz\",\n      \"integrity\": \"sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=\",\n      \"requires\": {\n        \"prelude-ls\": \"1.1.2\",\n        \"type-check\": \"0.3.2\"\n      }\n    },\n    \"liftoff\": {\n      \"version\": \"2.5.0\",\n      \"resolved\": \"https://registry.npmjs.org/liftoff/-/liftoff-2.5.0.tgz\",\n      \"integrity\": \"sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=\",\n      \"dev\": true,\n      \"requires\": {\n        \"extend\": \"3.0.2\",\n        \"findup-sync\": \"2.0.0\",\n        \"fined\": \"1.1.1\",\n        \"flagged-respawn\": \"1.0.1\",\n        \"is-plain-object\": \"2.0.4\",\n        \"object.map\": \"1.0.1\",\n        \"rechoir\": \"0.6.2\",\n        \"resolve\": \"1.4.0\"\n      }\n    },\n    \"loader-utils\": {\n      \"version\": \"1.2.3\",\n      \"resolved\": \"https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz\",\n      \"integrity\": \"sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==\",\n      \"requires\": {\n        \"big.js\": \"5.2.2\",\n        \"emojis-list\": \"2.1.0\",\n        \"json5\": \"1.0.1\"\n      }\n    },\n    \"lodash\": {\n      \"version\": \"4.17.11\",\n      \"resolved\": \"https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz\",\n      \"integrity\": \"sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==\"\n    },\n    \"lodash._basecopy\": {\n      \"version\": \"3.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz\",\n      \"integrity\": \"sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=\",\n      \"dev\": true\n    },\n    \"lodash._basetostring\": {\n      \"version\": \"3.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz\",\n      \"integrity\": \"sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=\",\n      \"dev\": true\n    },\n    \"lodash._basevalues\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz\",\n      \"integrity\": \"sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=\",\n      \"dev\": true\n    },\n    \"lodash._getnative\": {\n      \"version\": \"3.9.1\",\n      \"resolved\": \"https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz\",\n      \"integrity\": \"sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=\",\n      \"dev\": true\n    },\n    \"lodash._isiterateecall\": {\n      \"version\": \"3.0.9\",\n      \"resolved\": \"https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz\",\n      \"integrity\": \"sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=\",\n      \"dev\": true\n    },\n    \"lodash._reescape\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz\",\n      \"integrity\": \"sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=\",\n      \"dev\": true\n    },\n    \"lodash._reevaluate\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz\",\n      \"integrity\": \"sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=\",\n      \"dev\": true\n    },\n    \"lodash._reinterpolate\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz\",\n      \"integrity\": \"sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=\",\n      \"dev\": true\n    },\n    \"lodash._root\": {\n      \"version\": \"3.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz\",\n      \"integrity\": \"sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=\",\n      \"dev\": true\n    },\n    \"lodash.escape\": {\n      \"version\": \"3.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz\",\n      \"integrity\": \"sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=\",\n      \"dev\": true,\n      \"requires\": {\n        \"lodash._root\": \"3.0.1\"\n      }\n    },\n    \"lodash.isarguments\": {\n      \"version\": \"3.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz\",\n      \"integrity\": \"sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=\",\n      \"dev\": true\n    },\n    \"lodash.isarray\": {\n      \"version\": \"3.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz\",\n      \"integrity\": \"sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=\",\n      \"dev\": true\n    },\n    \"lodash.keys\": {\n      \"version\": \"3.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz\",\n      \"integrity\": \"sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=\",\n      \"dev\": true,\n      \"requires\": {\n        \"lodash._getnative\": \"3.9.1\",\n        \"lodash.isarguments\": \"3.1.0\",\n        \"lodash.isarray\": \"3.0.4\"\n      }\n    },\n    \"lodash.restparam\": {\n      \"version\": \"3.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz\",\n      \"integrity\": \"sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=\",\n      \"dev\": true\n    },\n    \"lodash.template\": {\n      \"version\": \"3.6.2\",\n      \"resolved\": \"https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz\",\n      \"integrity\": \"sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=\",\n      \"dev\": true,\n      \"requires\": {\n        \"lodash._basecopy\": \"3.0.1\",\n        \"lodash._basetostring\": \"3.0.1\",\n        \"lodash._basevalues\": \"3.0.0\",\n        \"lodash._isiterateecall\": \"3.0.9\",\n        \"lodash._reinterpolate\": \"3.0.0\",\n        \"lodash.escape\": \"3.2.0\",\n        \"lodash.keys\": \"3.1.2\",\n        \"lodash.restparam\": \"3.6.1\",\n        \"lodash.templatesettings\": \"3.1.1\"\n      }\n    },\n    \"lodash.templatesettings\": {\n      \"version\": \"3.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz\",\n      \"integrity\": \"sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=\",\n      \"dev\": true,\n      \"requires\": {\n        \"lodash._reinterpolate\": \"3.0.0\",\n        \"lodash.escape\": \"3.2.0\"\n      }\n    },\n    \"lodash.uniq\": {\n      \"version\": \"4.5.0\",\n      \"resolved\": \"https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz\",\n      \"integrity\": \"sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=\"\n    },\n    \"log-driver\": {\n      \"version\": \"1.2.5\",\n      \"resolved\": \"https://registry.npmjs.org/log-driver/-/log-driver-1.2.5.tgz\",\n      \"integrity\": \"sha1-euTsJXMC/XkNVXyxDJcQDYV7AFY=\",\n      \"dev\": true\n    },\n    \"log-symbols\": {\n      \"version\": \"2.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz\",\n      \"integrity\": \"sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==\",\n      \"requires\": {\n        \"chalk\": \"2.4.2\"\n      }\n    },\n    \"loglevelnext\": {\n      \"version\": \"1.0.5\",\n      \"resolved\": \"https://registry.npmjs.org/loglevelnext/-/loglevelnext-1.0.5.tgz\",\n      \"integrity\": \"sha512-V/73qkPuJmx4BcBF19xPBr+0ZRVBhc4POxvZTZdMeXpJ4NItXSJ/MSwuFT0kQJlCbXvdlZoQQ/418bS1y9Jh6A==\",\n      \"requires\": {\n        \"es6-symbol\": \"3.1.3\",\n        \"object.assign\": \"4.1.2\"\n      }\n    },\n    \"loose-envify\": {\n      \"version\": \"1.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz\",\n      \"integrity\": \"sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==\",\n      \"requires\": {\n        \"js-tokens\": \"3.0.2\"\n      }\n    },\n    \"lru-cache\": {\n      \"version\": \"4.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz\",\n      \"integrity\": \"sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==\",\n      \"requires\": {\n        \"pseudomap\": \"1.0.2\",\n        \"yallist\": \"2.1.2\"\n      }\n    },\n    \"make-iterator\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz\",\n      \"integrity\": \"sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==\",\n      \"dev\": true,\n      \"requires\": {\n        \"kind-of\": \"6.0.2\"\n      }\n    },\n    \"map-cache\": {\n      \"version\": \"0.2.2\",\n      \"resolved\": \"https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz\",\n      \"integrity\": \"sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=\",\n      \"dev\": true\n    },\n    \"map-visit\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz\",\n      \"integrity\": \"sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=\",\n      \"dev\": true,\n      \"requires\": {\n        \"object-visit\": \"1.0.1\"\n      }\n    },\n    \"micromatch\": {\n      \"version\": \"3.1.10\",\n      \"resolved\": \"https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz\",\n      \"integrity\": \"sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==\",\n      \"dev\": true,\n      \"requires\": {\n        \"arr-diff\": \"4.0.0\",\n        \"array-unique\": \"0.3.2\",\n        \"braces\": \"2.3.2\",\n        \"define-property\": \"2.0.2\",\n        \"extend-shallow\": \"3.0.2\",\n        \"extglob\": \"2.0.4\",\n        \"fragment-cache\": \"0.2.1\",\n        \"kind-of\": \"6.0.2\",\n        \"nanomatch\": \"1.2.13\",\n        \"object.pick\": \"1.3.0\",\n        \"regex-not\": \"1.0.2\",\n        \"snapdragon\": \"0.8.2\",\n        \"to-regex\": \"3.0.2\"\n      }\n    },\n    \"mime\": {\n      \"version\": \"2.4.6\",\n      \"resolved\": \"https://registry.npmjs.org/mime/-/mime-2.4.6.tgz\",\n      \"integrity\": \"sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA==\"\n    },\n    \"mime-db\": {\n      \"version\": \"1.37.0\",\n      \"resolved\": \"https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz\",\n      \"integrity\": \"sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==\",\n      \"dev\": true\n    },\n    \"mime-types\": {\n      \"version\": \"2.1.21\",\n      \"resolved\": \"https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz\",\n      \"integrity\": \"sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==\",\n      \"dev\": true,\n      \"requires\": {\n        \"mime-db\": \"1.37.0\"\n      }\n    },\n    \"mimic-fn\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz\",\n      \"integrity\": \"sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==\"\n    },\n    \"minimatch\": {\n      \"version\": \"3.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz\",\n      \"integrity\": \"sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==\",\n      \"requires\": {\n        \"brace-expansion\": \"1.1.11\"\n      }\n    },\n    \"minimist\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz\",\n      \"integrity\": \"sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=\"\n    },\n    \"mixin-deep\": {\n      \"version\": \"1.3.1\",\n      \"resolved\": \"https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz\",\n      \"integrity\": \"sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==\",\n      \"dev\": true,\n      \"requires\": {\n        \"for-in\": \"1.0.2\",\n        \"is-extendable\": \"1.0.1\"\n      },\n      \"dependencies\": {\n        \"is-extendable\": {\n          \"version\": \"1.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz\",\n          \"integrity\": \"sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-plain-object\": \"2.0.4\"\n          }\n        }\n      }\n    },\n    \"mkdirp\": {\n      \"version\": \"0.5.1\",\n      \"resolved\": \"https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz\",\n      \"integrity\": \"sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=\",\n      \"dev\": true,\n      \"requires\": {\n        \"minimist\": \"0.0.8\"\n      },\n      \"dependencies\": {\n        \"minimist\": {\n          \"version\": \"0.0.8\",\n          \"resolved\": \"https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz\",\n          \"integrity\": \"sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=\",\n          \"dev\": true\n        }\n      }\n    },\n    \"mobx\": {\n      \"version\": \"3.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/mobx/-/mobx-3.6.1.tgz\",\n      \"integrity\": \"sha1-rmOo8A4UhadA0Pka4val9o4wO+o=\"\n    },\n    \"mocha\": {\n      \"version\": \"5.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz\",\n      \"integrity\": \"sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==\",\n      \"dev\": true,\n      \"requires\": {\n        \"browser-stdout\": \"1.3.1\",\n        \"commander\": \"2.15.1\",\n        \"debug\": \"3.1.0\",\n        \"diff\": \"3.5.0\",\n        \"escape-string-regexp\": \"1.0.5\",\n        \"glob\": \"7.1.2\",\n        \"growl\": \"1.10.5\",\n        \"he\": \"1.1.1\",\n        \"minimatch\": \"3.0.4\",\n        \"mkdirp\": \"0.5.1\",\n        \"supports-color\": \"5.4.0\"\n      },\n      \"dependencies\": {\n        \"commander\": {\n          \"version\": \"2.15.1\",\n          \"resolved\": \"https://registry.npmjs.org/commander/-/commander-2.15.1.tgz\",\n          \"integrity\": \"sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==\",\n          \"dev\": true\n        },\n        \"debug\": {\n          \"version\": \"3.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/debug/-/debug-3.1.0.tgz\",\n          \"integrity\": \"sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==\",\n          \"dev\": true,\n          \"requires\": {\n            \"ms\": \"2.0.0\"\n          }\n        },\n        \"glob\": {\n          \"version\": \"7.1.2\",\n          \"resolved\": \"https://registry.npmjs.org/glob/-/glob-7.1.2.tgz\",\n          \"integrity\": \"sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==\",\n          \"dev\": true,\n          \"requires\": {\n            \"fs.realpath\": \"1.0.0\",\n            \"inflight\": \"1.0.6\",\n            \"inherits\": \"2.0.3\",\n            \"minimatch\": \"3.0.4\",\n            \"once\": \"1.4.0\",\n            \"path-is-absolute\": \"1.0.1\"\n          }\n        },\n        \"he\": {\n          \"version\": \"1.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/he/-/he-1.1.1.tgz\",\n          \"integrity\": \"sha1-k0EP0hsAlzUVH4howvJx80J+I/0=\",\n          \"dev\": true\n        },\n        \"supports-color\": {\n          \"version\": \"5.4.0\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz\",\n          \"integrity\": \"sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==\",\n          \"dev\": true,\n          \"requires\": {\n            \"has-flag\": \"3.0.0\"\n          }\n        }\n      }\n    },\n    \"ms\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/ms/-/ms-2.0.0.tgz\",\n      \"integrity\": \"sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=\"\n    },\n    \"multipipe\": {\n      \"version\": \"0.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz\",\n      \"integrity\": \"sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=\",\n      \"dev\": true,\n      \"requires\": {\n        \"duplexer2\": \"0.0.2\"\n      }\n    },\n    \"mute-stream\": {\n      \"version\": \"0.0.7\",\n      \"resolved\": \"https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz\",\n      \"integrity\": \"sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=\",\n      \"dev\": true\n    },\n    \"mvvm-interface-parser\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/mvvm-interface-parser/-/mvvm-interface-parser-1.0.8.tgz\",\n      \"integrity\": \"sha512-hVrQ3E/oTNU2dBhBbOREA/Zlfm6qjyzO8Q2oGAOp/hVGZ27/WwHMRVsITQgyqO7HMfHoMnWWfvLPtGdnE9QqRQ==\",\n      \"requires\": {\n        \"@babel/generator\": \"7.12.5\",\n        \"@babel/parser\": \"7.12.5\",\n        \"@babel/traverse\": \"7.12.5\",\n        \"@babel/types\": \"7.12.6\",\n        \"chameleon-tool-utils\": \"1.0.8\",\n        \"runtime-check\": \"1.0.8\"\n      },\n      \"dependencies\": {\n        \"@babel/parser\": {\n          \"version\": \"7.12.5\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.12.5.tgz\",\n          \"integrity\": \"sha512-FVM6RZQ0mn2KCf1VUED7KepYeUWoVShczewOCfm3nzoBybaih51h+sYVVGthW9M6lPByEPTQf+xm27PBdlpwmQ==\"\n        }\n      }\n    },\n    \"nanomatch\": {\n      \"version\": \"1.2.13\",\n      \"resolved\": \"https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz\",\n      \"integrity\": \"sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==\",\n      \"dev\": true,\n      \"requires\": {\n        \"arr-diff\": \"4.0.0\",\n        \"array-unique\": \"0.3.2\",\n        \"define-property\": \"2.0.2\",\n        \"extend-shallow\": \"3.0.2\",\n        \"fragment-cache\": \"0.2.1\",\n        \"is-windows\": \"1.0.2\",\n        \"kind-of\": \"6.0.2\",\n        \"object.pick\": \"1.3.0\",\n        \"regex-not\": \"1.0.2\",\n        \"snapdragon\": \"0.8.2\",\n        \"to-regex\": \"3.0.2\"\n      }\n    },\n    \"natives\": {\n      \"version\": \"1.1.6\",\n      \"resolved\": \"https://registry.npmjs.org/natives/-/natives-1.1.6.tgz\",\n      \"integrity\": \"sha512-6+TDFewD4yxY14ptjKaS63GVdtKiES1pTPyxn9Jb0rBqPMZ7VcCiooEhPNsr+mqHtMGxa/5c/HhcC4uPEUw/nA==\",\n      \"dev\": true\n    },\n    \"natural-compare\": {\n      \"version\": \"1.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz\",\n      \"integrity\": \"sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=\",\n      \"dev\": true\n    },\n    \"next-tick\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz\",\n      \"integrity\": \"sha1-yobR/ogoFpsBICCOPchCS524NCw=\"\n    },\n    \"nice-try\": {\n      \"version\": \"1.0.5\",\n      \"resolved\": \"https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz\",\n      \"integrity\": \"sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==\",\n      \"dev\": true\n    },\n    \"node-releases\": {\n      \"version\": \"1.1.66\",\n      \"resolved\": \"https://registry.npmjs.org/node-releases/-/node-releases-1.1.66.tgz\",\n      \"integrity\": \"sha512-JHEQ1iWPGK+38VLB2H9ef2otU4l8s3yAMt9Xf934r6+ojCYDMHPMqvCc9TnzfeFSP1QEOeU6YZEd3+De0LTCgg==\"\n    },\n    \"nopt\": {\n      \"version\": \"5.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz\",\n      \"integrity\": \"sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==\",\n      \"requires\": {\n        \"abbrev\": \"1.1.1\"\n      }\n    },\n    \"normalize-range\": {\n      \"version\": \"0.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz\",\n      \"integrity\": \"sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=\"\n    },\n    \"num2fraction\": {\n      \"version\": \"1.2.2\",\n      \"resolved\": \"https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz\",\n      \"integrity\": \"sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=\"\n    },\n    \"o-stream\": {\n      \"version\": \"0.2.2\",\n      \"resolved\": \"https://registry.npmjs.org/o-stream/-/o-stream-0.2.2.tgz\",\n      \"integrity\": \"sha512-V3j76KU3g/Gyl8rpdi2z72rn5zguMvTCQgAXfBe3pxEefKqXmOUOD7mvx/mNjykdxGqDVfpSoo8r+WdrkWg/1Q==\",\n      \"dev\": true\n    },\n    \"object-assign\": {\n      \"version\": \"4.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz\",\n      \"integrity\": \"sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=\"\n    },\n    \"object-copy\": {\n      \"version\": \"0.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz\",\n      \"integrity\": \"sha1-fn2Fi3gb18mRpBupde04EnVOmYw=\",\n      \"dev\": true,\n      \"requires\": {\n        \"copy-descriptor\": \"0.1.1\",\n        \"define-property\": \"0.2.5\",\n        \"kind-of\": \"3.2.2\"\n      },\n      \"dependencies\": {\n        \"define-property\": {\n          \"version\": \"0.2.5\",\n          \"resolved\": \"https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz\",\n          \"integrity\": \"sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-descriptor\": \"0.1.6\"\n          }\n        },\n        \"kind-of\": {\n          \"version\": \"3.2.2\",\n          \"resolved\": \"https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz\",\n          \"integrity\": \"sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-buffer\": \"1.1.6\"\n          }\n        }\n      }\n    },\n    \"object-keys\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz\",\n      \"integrity\": \"sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==\"\n    },\n    \"object-visit\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz\",\n      \"integrity\": \"sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=\",\n      \"dev\": true,\n      \"requires\": {\n        \"isobject\": \"3.0.1\"\n      }\n    },\n    \"object.assign\": {\n      \"version\": \"4.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz\",\n      \"integrity\": \"sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==\",\n      \"requires\": {\n        \"call-bind\": \"1.0.0\",\n        \"define-properties\": \"1.1.3\",\n        \"has-symbols\": \"1.0.1\",\n        \"object-keys\": \"1.1.1\"\n      }\n    },\n    \"object.defaults\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz\",\n      \"integrity\": \"sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=\",\n      \"dev\": true,\n      \"requires\": {\n        \"array-each\": \"1.0.1\",\n        \"array-slice\": \"1.1.0\",\n        \"for-own\": \"1.0.0\",\n        \"isobject\": \"3.0.1\"\n      }\n    },\n    \"object.map\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz\",\n      \"integrity\": \"sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=\",\n      \"dev\": true,\n      \"requires\": {\n        \"for-own\": \"1.0.0\",\n        \"make-iterator\": \"1.0.1\"\n      }\n    },\n    \"object.pick\": {\n      \"version\": \"1.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz\",\n      \"integrity\": \"sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=\",\n      \"dev\": true,\n      \"requires\": {\n        \"isobject\": \"3.0.1\"\n      }\n    },\n    \"once\": {\n      \"version\": \"1.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/once/-/once-1.4.0.tgz\",\n      \"integrity\": \"sha1-WDsap3WWHUsROsF9nFC6753Xa9E=\",\n      \"requires\": {\n        \"wrappy\": \"1.0.2\"\n      }\n    },\n    \"onetime\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz\",\n      \"integrity\": \"sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=\",\n      \"requires\": {\n        \"mimic-fn\": \"1.2.0\"\n      }\n    },\n    \"optimist\": {\n      \"version\": \"0.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz\",\n      \"integrity\": \"sha1-2j6nRob6IaGaERwybpDrFaAZZoY=\",\n      \"dev\": true,\n      \"requires\": {\n        \"minimist\": \"0.0.10\",\n        \"wordwrap\": \"0.0.3\"\n      },\n      \"dependencies\": {\n        \"minimist\": {\n          \"version\": \"0.0.10\",\n          \"resolved\": \"https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz\",\n          \"integrity\": \"sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=\",\n          \"dev\": true\n        },\n        \"wordwrap\": {\n          \"version\": \"0.0.3\",\n          \"resolved\": \"https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz\",\n          \"integrity\": \"sha1-o9XabNXAvAAI03I0u68b7WMFkQc=\",\n          \"dev\": true\n        }\n      }\n    },\n    \"optionator\": {\n      \"version\": \"0.8.2\",\n      \"resolved\": \"https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz\",\n      \"integrity\": \"sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=\",\n      \"requires\": {\n        \"deep-is\": \"0.1.3\",\n        \"fast-levenshtein\": \"2.0.6\",\n        \"levn\": \"0.3.0\",\n        \"prelude-ls\": \"1.1.2\",\n        \"type-check\": \"0.3.2\",\n        \"wordwrap\": \"1.0.0\"\n      }\n    },\n    \"ora\": {\n      \"version\": \"3.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/ora/-/ora-3.0.0.tgz\",\n      \"integrity\": \"sha512-LBS97LFe2RV6GJmXBi6OKcETKyklHNMV0xw7BtsVn2MlsgsydyZetSCbCANr+PFLmDyv4KV88nn0eCKza665Mg==\",\n      \"requires\": {\n        \"chalk\": \"2.4.2\",\n        \"cli-cursor\": \"2.1.0\",\n        \"cli-spinners\": \"1.3.1\",\n        \"log-symbols\": \"2.2.0\",\n        \"strip-ansi\": \"4.0.0\",\n        \"wcwidth\": \"1.0.1\"\n      },\n      \"dependencies\": {\n        \"ansi-regex\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz\",\n          \"integrity\": \"sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=\"\n        },\n        \"strip-ansi\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz\",\n          \"integrity\": \"sha1-qEeQIusaw2iocTibY1JixQXuNo8=\",\n          \"requires\": {\n            \"ansi-regex\": \"3.0.0\"\n          }\n        }\n      }\n    },\n    \"orchestrator\": {\n      \"version\": \"0.3.8\",\n      \"resolved\": \"https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz\",\n      \"integrity\": \"sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=\",\n      \"dev\": true,\n      \"requires\": {\n        \"end-of-stream\": \"0.1.5\",\n        \"sequencify\": \"0.0.7\",\n        \"stream-consume\": \"0.1.1\"\n      }\n    },\n    \"ordered-read-streams\": {\n      \"version\": \"0.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz\",\n      \"integrity\": \"sha1-/VZamvjrRHO6abbtijQ1LLVS8SY=\",\n      \"dev\": true\n    },\n    \"os-homedir\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz\",\n      \"integrity\": \"sha1-/7xJiDNuDoM94MFox+8VISGqf7M=\",\n      \"dev\": true\n    },\n    \"os-tmpdir\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz\",\n      \"integrity\": \"sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=\",\n      \"dev\": true\n    },\n    \"parent-module\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/parent-module/-/parent-module-1.0.0.tgz\",\n      \"integrity\": \"sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA==\",\n      \"dev\": true,\n      \"requires\": {\n        \"callsites\": \"3.0.0\"\n      }\n    },\n    \"parse-filepath\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz\",\n      \"integrity\": \"sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=\",\n      \"dev\": true,\n      \"requires\": {\n        \"is-absolute\": \"1.0.0\",\n        \"map-cache\": \"0.2.2\",\n        \"path-root\": \"0.1.1\"\n      }\n    },\n    \"parse-node-version\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.0.tgz\",\n      \"integrity\": \"sha512-02GTVHD1u0nWc20n2G7WX/PgdhNFG04j5fi1OkaJzPWLTcf6vh6229Lta1wTmXG/7Dg42tCssgkccVt7qvd8Kg==\",\n      \"dev\": true\n    },\n    \"parse-passwd\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz\",\n      \"integrity\": \"sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=\",\n      \"dev\": true\n    },\n    \"pascalcase\": {\n      \"version\": \"0.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz\",\n      \"integrity\": \"sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=\",\n      \"dev\": true\n    },\n    \"path-is-absolute\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz\",\n      \"integrity\": \"sha1-F0uSaHNVNP+8es5r9TpanhtcX18=\"\n    },\n    \"path-is-inside\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz\",\n      \"integrity\": \"sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=\",\n      \"dev\": true\n    },\n    \"path-key\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz\",\n      \"integrity\": \"sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=\",\n      \"dev\": true\n    },\n    \"path-parse\": {\n      \"version\": \"1.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz\",\n      \"integrity\": \"sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==\"\n    },\n    \"path-root\": {\n      \"version\": \"0.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz\",\n      \"integrity\": \"sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=\",\n      \"dev\": true,\n      \"requires\": {\n        \"path-root-regex\": \"0.1.2\"\n      }\n    },\n    \"path-root-regex\": {\n      \"version\": \"0.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz\",\n      \"integrity\": \"sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=\",\n      \"dev\": true\n    },\n    \"pathval\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz\",\n      \"integrity\": \"sha1-uULm1L3mUwBe9rcTYd74cn0GReA=\",\n      \"dev\": true\n    },\n    \"pinkie\": {\n      \"version\": \"2.0.4\",\n      \"resolved\": \"https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz\",\n      \"integrity\": \"sha1-clVrgM+g1IqXToDnckjoDtT3+HA=\",\n      \"dev\": true\n    },\n    \"pinkie-promise\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz\",\n      \"integrity\": \"sha1-ITXW36ejWMBprJsXh3YogihFD/o=\",\n      \"dev\": true,\n      \"requires\": {\n        \"pinkie\": \"2.0.4\"\n      }\n    },\n    \"plugin-error\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz\",\n      \"integrity\": \"sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==\",\n      \"dev\": true,\n      \"requires\": {\n        \"ansi-colors\": \"1.1.0\",\n        \"arr-diff\": \"4.0.0\",\n        \"arr-union\": \"3.1.0\",\n        \"extend-shallow\": \"3.0.2\"\n      }\n    },\n    \"pluralize\": {\n      \"version\": \"7.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz\",\n      \"integrity\": \"sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==\",\n      \"dev\": true\n    },\n    \"posix-character-classes\": {\n      \"version\": \"0.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz\",\n      \"integrity\": \"sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=\",\n      \"dev\": true\n    },\n    \"postcss\": {\n      \"version\": \"7.0.35\",\n      \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz\",\n      \"integrity\": \"sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==\",\n      \"requires\": {\n        \"chalk\": \"2.4.2\",\n        \"source-map\": \"0.6.1\",\n        \"supports-color\": \"6.1.0\"\n      }\n    },\n    \"postcss-plugin-px2rem\": {\n      \"version\": \"0.7.0\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-plugin-px2rem/-/postcss-plugin-px2rem-0.7.0.tgz\",\n      \"integrity\": \"sha1-UXjPZNLcYumNSNHM/QU+5KAOJUU=\",\n      \"requires\": {\n        \"postcss\": \"5.2.18\"\n      },\n      \"dependencies\": {\n        \"ansi-styles\": {\n          \"version\": \"2.2.1\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz\",\n          \"integrity\": \"sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=\"\n        },\n        \"chalk\": {\n          \"version\": \"1.1.3\",\n          \"resolved\": \"https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz\",\n          \"integrity\": \"sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=\",\n          \"requires\": {\n            \"ansi-styles\": \"2.2.1\",\n            \"escape-string-regexp\": \"1.0.5\",\n            \"has-ansi\": \"2.0.0\",\n            \"strip-ansi\": \"3.0.1\",\n            \"supports-color\": \"2.0.0\"\n          },\n          \"dependencies\": {\n            \"supports-color\": {\n              \"version\": \"2.0.0\",\n              \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz\",\n              \"integrity\": \"sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=\"\n            }\n          }\n        },\n        \"has-flag\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz\",\n          \"integrity\": \"sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=\"\n        },\n        \"postcss\": {\n          \"version\": \"5.2.18\",\n          \"resolved\": \"https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz\",\n          \"integrity\": \"sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==\",\n          \"requires\": {\n            \"chalk\": \"1.1.3\",\n            \"js-base64\": \"2.6.4\",\n            \"source-map\": \"0.5.7\",\n            \"supports-color\": \"3.2.3\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\"\n        },\n        \"supports-color\": {\n          \"version\": \"3.2.3\",\n          \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz\",\n          \"integrity\": \"sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=\",\n          \"requires\": {\n            \"has-flag\": \"1.0.0\"\n          }\n        }\n      }\n    },\n    \"postcss-selector-parser\": {\n      \"version\": \"2.2.3\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz\",\n      \"integrity\": \"sha1-+UN3iGBsPJrO4W/+jYsWKX8nu5A=\",\n      \"requires\": {\n        \"flatten\": \"1.0.3\",\n        \"indexes-of\": \"1.0.1\",\n        \"uniq\": \"1.0.1\"\n      }\n    },\n    \"postcss-value-parser\": {\n      \"version\": \"4.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz\",\n      \"integrity\": \"sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==\"\n    },\n    \"prelude-ls\": {\n      \"version\": \"1.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz\",\n      \"integrity\": \"sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=\"\n    },\n    \"pretty-hrtime\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz\",\n      \"integrity\": \"sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=\",\n      \"dev\": true\n    },\n    \"process-nextick-args\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz\",\n      \"integrity\": \"sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==\",\n      \"dev\": true\n    },\n    \"progress\": {\n      \"version\": \"2.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/progress/-/progress-2.0.3.tgz\",\n      \"integrity\": \"sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==\",\n      \"dev\": true\n    },\n    \"proto-list\": {\n      \"version\": \"1.2.4\",\n      \"resolved\": \"https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz\",\n      \"integrity\": \"sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=\"\n    },\n    \"pseudomap\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz\",\n      \"integrity\": \"sha1-8FKijacOYYkX7wqKw0wa5aaChrM=\"\n    },\n    \"punycode\": {\n      \"version\": \"2.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz\",\n      \"integrity\": \"sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==\"\n    },\n    \"readable-stream\": {\n      \"version\": \"1.1.14\",\n      \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz\",\n      \"integrity\": \"sha1-fPTFTvZI44EwhMY23SB54WbAgdk=\",\n      \"dev\": true,\n      \"requires\": {\n        \"core-util-is\": \"1.0.2\",\n        \"inherits\": \"2.0.3\",\n        \"isarray\": \"0.0.1\",\n        \"string_decoder\": \"0.10.31\"\n      }\n    },\n    \"rechoir\": {\n      \"version\": \"0.6.2\",\n      \"resolved\": \"https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz\",\n      \"integrity\": \"sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=\",\n      \"dev\": true,\n      \"requires\": {\n        \"resolve\": \"1.4.0\"\n      }\n    },\n    \"regenerator-runtime\": {\n      \"version\": \"0.13.7\",\n      \"resolved\": \"https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz\",\n      \"integrity\": \"sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==\"\n    },\n    \"regex-not\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz\",\n      \"integrity\": \"sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==\",\n      \"dev\": true,\n      \"requires\": {\n        \"extend-shallow\": \"3.0.2\",\n        \"safe-regex\": \"1.1.0\"\n      }\n    },\n    \"regexpp\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz\",\n      \"integrity\": \"sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==\",\n      \"dev\": true\n    },\n    \"remove-trailing-separator\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz\",\n      \"integrity\": \"sha1-wkvOKig62tW8P1jg1IJJuSN52O8=\",\n      \"dev\": true\n    },\n    \"repeat-element\": {\n      \"version\": \"1.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz\",\n      \"integrity\": \"sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==\",\n      \"dev\": true\n    },\n    \"repeat-string\": {\n      \"version\": \"1.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz\",\n      \"integrity\": \"sha1-jcrkcOHIirwtYA//Sndihtp15jc=\",\n      \"dev\": true\n    },\n    \"repeating\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz\",\n      \"integrity\": \"sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=\",\n      \"requires\": {\n        \"is-finite\": \"1.1.0\"\n      }\n    },\n    \"replace-ext\": {\n      \"version\": \"0.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz\",\n      \"integrity\": \"sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=\",\n      \"dev\": true\n    },\n    \"resolve\": {\n      \"version\": \"1.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/resolve/-/resolve-1.4.0.tgz\",\n      \"integrity\": \"sha512-aW7sVKPufyHqOmyyLzg/J+8606v5nevBgaliIlV7nUpVMsDnoBGV/cbSLNjZAg9q0Cfd/+easKVKQ8vOu8fn1Q==\",\n      \"requires\": {\n        \"path-parse\": \"1.0.6\"\n      }\n    },\n    \"resolve-dir\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz\",\n      \"integrity\": \"sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=\",\n      \"dev\": true,\n      \"requires\": {\n        \"expand-tilde\": \"2.0.2\",\n        \"global-modules\": \"1.0.0\"\n      }\n    },\n    \"resolve-from\": {\n      \"version\": \"4.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz\",\n      \"integrity\": \"sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==\",\n      \"dev\": true\n    },\n    \"resolve-url\": {\n      \"version\": \"0.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz\",\n      \"integrity\": \"sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=\"\n    },\n    \"restore-cursor\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz\",\n      \"integrity\": \"sha1-n37ih/gv0ybU/RYpI9YhKe7g368=\",\n      \"requires\": {\n        \"onetime\": \"2.0.1\",\n        \"signal-exit\": \"3.0.2\"\n      }\n    },\n    \"ret\": {\n      \"version\": \"0.1.15\",\n      \"resolved\": \"https://registry.npmjs.org/ret/-/ret-0.1.15.tgz\",\n      \"integrity\": \"sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==\",\n      \"dev\": true\n    },\n    \"rework\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/rework/-/rework-1.0.1.tgz\",\n      \"integrity\": \"sha1-MIBqhBNCtUUQqkEQhQzUhTQUSqc=\",\n      \"requires\": {\n        \"convert-source-map\": \"0.3.5\",\n        \"css\": \"2.2.4\"\n      }\n    },\n    \"rimraf\": {\n      \"version\": \"2.6.3\",\n      \"resolved\": \"https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz\",\n      \"integrity\": \"sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==\",\n      \"requires\": {\n        \"glob\": \"7.1.3\"\n      }\n    },\n    \"run-async\": {\n      \"version\": \"2.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz\",\n      \"integrity\": \"sha1-A3GrSuC91yDUFm19/aZP96RFpsA=\",\n      \"dev\": true,\n      \"requires\": {\n        \"is-promise\": \"2.1.0\"\n      }\n    },\n    \"runtime-check\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/runtime-check/-/runtime-check-1.0.8.tgz\",\n      \"integrity\": \"sha512-SNEIbwoI2+hVsVWK146bTY+TRQ+CNz5edPf0Be9/hWR8zk4j+jq7ASG455c/6iGrhmiz+LTZEg8ZcPaFoWsILA==\",\n      \"requires\": {\n        \"@babel/parser\": \"7.1.0\",\n        \"babel-generator\": \"6.26.1\",\n        \"babel-traverse\": \"6.26.0\"\n      },\n      \"dependencies\": {\n        \"@babel/parser\": {\n          \"version\": \"7.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.1.0.tgz\",\n          \"integrity\": \"sha512-SmjnXCuPAlai75AFtzv+KCBcJ3sDDWbIn+WytKw1k+wAtEy6phqI2RqKh/zAnw53i1NR8su3Ep/UoqaKcimuLg==\"\n        }\n      }\n    },\n    \"rxjs\": {\n      \"version\": \"6.3.3\",\n      \"resolved\": \"https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz\",\n      \"integrity\": \"sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==\",\n      \"dev\": true,\n      \"requires\": {\n        \"tslib\": \"1.9.3\"\n      }\n    },\n    \"safe-buffer\": {\n      \"version\": \"5.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz\",\n      \"integrity\": \"sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==\",\n      \"dev\": true\n    },\n    \"safe-regex\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz\",\n      \"integrity\": \"sha1-QKNmnzsHfR6UPURinhV91IAjvy4=\",\n      \"dev\": true,\n      \"requires\": {\n        \"ret\": \"0.1.15\"\n      }\n    },\n    \"safer-buffer\": {\n      \"version\": \"2.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz\",\n      \"integrity\": \"sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==\",\n      \"dev\": true\n    },\n    \"schema-utils\": {\n      \"version\": \"0.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz\",\n      \"integrity\": \"sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=\",\n      \"requires\": {\n        \"ajv\": \"5.5.2\"\n      },\n      \"dependencies\": {\n        \"ajv\": {\n          \"version\": \"5.5.2\",\n          \"resolved\": \"https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz\",\n          \"integrity\": \"sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=\",\n          \"requires\": {\n            \"co\": \"4.6.0\",\n            \"fast-deep-equal\": \"1.1.0\",\n            \"fast-json-stable-stringify\": \"2.0.0\",\n            \"json-schema-traverse\": \"0.3.1\"\n          }\n        },\n        \"fast-deep-equal\": {\n          \"version\": \"1.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz\",\n          \"integrity\": \"sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=\"\n        },\n        \"json-schema-traverse\": {\n          \"version\": \"0.3.1\",\n          \"resolved\": \"https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz\",\n          \"integrity\": \"sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=\"\n        }\n      }\n    },\n    \"semver\": {\n      \"version\": \"5.6.0\",\n      \"resolved\": \"https://registry.npmjs.org/semver/-/semver-5.6.0.tgz\",\n      \"integrity\": \"sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==\"\n    },\n    \"sequencify\": {\n      \"version\": \"0.0.7\",\n      \"resolved\": \"https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz\",\n      \"integrity\": \"sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=\",\n      \"dev\": true\n    },\n    \"set-value\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz\",\n      \"integrity\": \"sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==\",\n      \"dev\": true,\n      \"requires\": {\n        \"extend-shallow\": \"2.0.1\",\n        \"is-extendable\": \"0.1.1\",\n        \"is-plain-object\": \"2.0.4\",\n        \"split-string\": \"3.1.0\"\n      },\n      \"dependencies\": {\n        \"extend-shallow\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz\",\n          \"integrity\": \"sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-extendable\": \"0.1.1\"\n          }\n        }\n      }\n    },\n    \"shebang-command\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz\",\n      \"integrity\": \"sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=\",\n      \"dev\": true,\n      \"requires\": {\n        \"shebang-regex\": \"1.0.0\"\n      }\n    },\n    \"shebang-regex\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz\",\n      \"integrity\": \"sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=\",\n      \"dev\": true\n    },\n    \"sigmund\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz\",\n      \"integrity\": \"sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=\"\n    },\n    \"signal-exit\": {\n      \"version\": \"3.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz\",\n      \"integrity\": \"sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=\"\n    },\n    \"slice-ansi\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.0.0.tgz\",\n      \"integrity\": \"sha512-4j2WTWjp3GsZ+AOagyzVbzp4vWGtZ0hEZ/gDY/uTvm6MTxUfTUIsnMIFb1bn8o0RuXiqUw15H1bue8f22Vw2oQ==\",\n      \"dev\": true,\n      \"requires\": {\n        \"ansi-styles\": \"3.2.1\",\n        \"astral-regex\": \"1.0.0\",\n        \"is-fullwidth-code-point\": \"2.0.0\"\n      }\n    },\n    \"snapdragon\": {\n      \"version\": \"0.8.2\",\n      \"resolved\": \"https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz\",\n      \"integrity\": \"sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==\",\n      \"dev\": true,\n      \"requires\": {\n        \"base\": \"0.11.2\",\n        \"debug\": \"2.6.9\",\n        \"define-property\": \"0.2.5\",\n        \"extend-shallow\": \"2.0.1\",\n        \"map-cache\": \"0.2.2\",\n        \"source-map\": \"0.5.7\",\n        \"source-map-resolve\": \"0.5.2\",\n        \"use\": \"3.1.1\"\n      },\n      \"dependencies\": {\n        \"define-property\": {\n          \"version\": \"0.2.5\",\n          \"resolved\": \"https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz\",\n          \"integrity\": \"sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-descriptor\": \"0.1.6\"\n          }\n        },\n        \"extend-shallow\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz\",\n          \"integrity\": \"sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-extendable\": \"0.1.1\"\n          }\n        },\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\",\n          \"dev\": true\n        }\n      }\n    },\n    \"snapdragon-node\": {\n      \"version\": \"2.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz\",\n      \"integrity\": \"sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==\",\n      \"dev\": true,\n      \"requires\": {\n        \"define-property\": \"1.0.0\",\n        \"isobject\": \"3.0.1\",\n        \"snapdragon-util\": \"3.0.1\"\n      },\n      \"dependencies\": {\n        \"define-property\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz\",\n          \"integrity\": \"sha1-dp66rz9KY6rTr56NMEybvnm/sOY=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-descriptor\": \"1.0.2\"\n          }\n        },\n        \"is-accessor-descriptor\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz\",\n          \"integrity\": \"sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==\",\n          \"dev\": true,\n          \"requires\": {\n            \"kind-of\": \"6.0.2\"\n          }\n        },\n        \"is-data-descriptor\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz\",\n          \"integrity\": \"sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==\",\n          \"dev\": true,\n          \"requires\": {\n            \"kind-of\": \"6.0.2\"\n          }\n        },\n        \"is-descriptor\": {\n          \"version\": \"1.0.2\",\n          \"resolved\": \"https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz\",\n          \"integrity\": \"sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-accessor-descriptor\": \"1.0.0\",\n            \"is-data-descriptor\": \"1.0.0\",\n            \"kind-of\": \"6.0.2\"\n          }\n        }\n      }\n    },\n    \"snapdragon-util\": {\n      \"version\": \"3.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz\",\n      \"integrity\": \"sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==\",\n      \"dev\": true,\n      \"requires\": {\n        \"kind-of\": \"3.2.2\"\n      },\n      \"dependencies\": {\n        \"kind-of\": {\n          \"version\": \"3.2.2\",\n          \"resolved\": \"https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz\",\n          \"integrity\": \"sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-buffer\": \"1.1.6\"\n          }\n        }\n      }\n    },\n    \"sntp\": {\n      \"version\": \"1.0.9\",\n      \"resolved\": \"https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz\",\n      \"integrity\": \"sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=\",\n      \"dev\": true,\n      \"requires\": {\n        \"hoek\": \"2.16.3\"\n      }\n    },\n    \"source-list-map\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz\",\n      \"integrity\": \"sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==\"\n    },\n    \"source-map\": {\n      \"version\": \"0.6.1\",\n      \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz\",\n      \"integrity\": \"sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==\"\n    },\n    \"source-map-resolve\": {\n      \"version\": \"0.5.2\",\n      \"resolved\": \"https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz\",\n      \"integrity\": \"sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==\",\n      \"requires\": {\n        \"atob\": \"2.1.2\",\n        \"decode-uri-component\": \"0.2.0\",\n        \"resolve-url\": \"0.2.1\",\n        \"source-map-url\": \"0.4.0\",\n        \"urix\": \"0.1.0\"\n      }\n    },\n    \"source-map-support\": {\n      \"version\": \"0.5.10\",\n      \"resolved\": \"https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz\",\n      \"integrity\": \"sha512-YfQ3tQFTK/yzlGJuX8pTwa4tifQj4QS2Mj7UegOu8jAz59MqIiMGPXxQhVQiIMNzayuUSF/jEuVnfFF5JqybmQ==\",\n      \"dev\": true,\n      \"requires\": {\n        \"buffer-from\": \"1.1.1\",\n        \"source-map\": \"0.6.1\"\n      }\n    },\n    \"source-map-url\": {\n      \"version\": \"0.4.0\",\n      \"resolved\": \"https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz\",\n      \"integrity\": \"sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=\"\n    },\n    \"sparkles\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz\",\n      \"integrity\": \"sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==\",\n      \"dev\": true\n    },\n    \"split-string\": {\n      \"version\": \"3.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz\",\n      \"integrity\": \"sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==\",\n      \"dev\": true,\n      \"requires\": {\n        \"extend-shallow\": \"3.0.2\"\n      }\n    },\n    \"sprintf-js\": {\n      \"version\": \"1.0.3\",\n      \"resolved\": \"https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz\",\n      \"integrity\": \"sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=\",\n      \"dev\": true\n    },\n    \"sshpk\": {\n      \"version\": \"1.16.0\",\n      \"resolved\": \"https://registry.npmjs.org/sshpk/-/sshpk-1.16.0.tgz\",\n      \"integrity\": \"sha512-Zhev35/y7hRMcID/upReIvRse+I9SVhyVre/KTJSJQWMz3C3+G+HpO7m1wK/yckEtujKZ7dS4hkVxAnmHaIGVQ==\",\n      \"dev\": true,\n      \"requires\": {\n        \"asn1\": \"0.2.4\",\n        \"assert-plus\": \"1.0.0\",\n        \"bcrypt-pbkdf\": \"1.0.2\",\n        \"dashdash\": \"1.14.1\",\n        \"ecc-jsbn\": \"0.1.2\",\n        \"getpass\": \"0.1.7\",\n        \"jsbn\": \"0.1.1\",\n        \"safer-buffer\": \"2.1.2\",\n        \"tweetnacl\": \"0.14.5\"\n      }\n    },\n    \"static-extend\": {\n      \"version\": \"0.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz\",\n      \"integrity\": \"sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=\",\n      \"dev\": true,\n      \"requires\": {\n        \"define-property\": \"0.2.5\",\n        \"object-copy\": \"0.1.0\"\n      },\n      \"dependencies\": {\n        \"define-property\": {\n          \"version\": \"0.2.5\",\n          \"resolved\": \"https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz\",\n          \"integrity\": \"sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-descriptor\": \"0.1.6\"\n          }\n        }\n      }\n    },\n    \"stream-consume\": {\n      \"version\": \"0.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.1.tgz\",\n      \"integrity\": \"sha512-tNa3hzgkjEP7XbCkbRXe1jpg+ievoa0O4SCFlMOYEscGSS4JJsckGL8swUyAa/ApGU3Ae4t6Honor4HhL+tRyg==\",\n      \"dev\": true\n    },\n    \"string-width\": {\n      \"version\": \"2.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz\",\n      \"integrity\": \"sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==\",\n      \"dev\": true,\n      \"requires\": {\n        \"is-fullwidth-code-point\": \"2.0.0\",\n        \"strip-ansi\": \"4.0.0\"\n      },\n      \"dependencies\": {\n        \"ansi-regex\": {\n          \"version\": \"3.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz\",\n          \"integrity\": \"sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=\",\n          \"dev\": true\n        },\n        \"strip-ansi\": {\n          \"version\": \"4.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz\",\n          \"integrity\": \"sha1-qEeQIusaw2iocTibY1JixQXuNo8=\",\n          \"dev\": true,\n          \"requires\": {\n            \"ansi-regex\": \"3.0.0\"\n          }\n        }\n      }\n    },\n    \"string_decoder\": {\n      \"version\": \"0.10.31\",\n      \"resolved\": \"https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz\",\n      \"integrity\": \"sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=\",\n      \"dev\": true\n    },\n    \"stringstream\": {\n      \"version\": \"0.0.6\",\n      \"resolved\": \"https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz\",\n      \"integrity\": \"sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==\",\n      \"dev\": true\n    },\n    \"strip-ansi\": {\n      \"version\": \"3.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz\",\n      \"integrity\": \"sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=\",\n      \"requires\": {\n        \"ansi-regex\": \"2.1.1\"\n      }\n    },\n    \"strip-bom\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz\",\n      \"integrity\": \"sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=\",\n      \"dev\": true,\n      \"requires\": {\n        \"first-chunk-stream\": \"1.0.0\",\n        \"is-utf8\": \"0.2.1\"\n      }\n    },\n    \"strip-json-comments\": {\n      \"version\": \"2.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz\",\n      \"integrity\": \"sha1-PFMZQukIwml8DsNEhYwobHygpgo=\",\n      \"dev\": true\n    },\n    \"supports-color\": {\n      \"version\": \"6.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz\",\n      \"integrity\": \"sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==\",\n      \"requires\": {\n        \"has-flag\": \"3.0.0\"\n      }\n    },\n    \"table\": {\n      \"version\": \"5.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/table/-/table-5.2.1.tgz\",\n      \"integrity\": \"sha512-qmhNs2GEHNqY5fd2Mo+8N1r2sw/rvTAAvBZTaTx+Y7PHLypqyrxr1MdIu0pLw6Xvl/Gi4ONu/sdceP8vvUjkyA==\",\n      \"dev\": true,\n      \"requires\": {\n        \"ajv\": \"6.7.0\",\n        \"lodash\": \"4.17.11\",\n        \"slice-ansi\": \"2.0.0\",\n        \"string-width\": \"2.1.1\"\n      }\n    },\n    \"tapable\": {\n      \"version\": \"1.1.3\",\n      \"resolved\": \"https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz\",\n      \"integrity\": \"sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==\"\n    },\n    \"terser\": {\n      \"version\": \"3.14.1\",\n      \"resolved\": \"https://registry.npmjs.org/terser/-/terser-3.14.1.tgz\",\n      \"integrity\": \"sha512-NSo3E99QDbYSMeJaEk9YW2lTg3qS9V0aKGlb+PlOrei1X02r1wSBHCNX/O+yeTRFSWPKPIGj6MqvvdqV4rnVGw==\",\n      \"dev\": true,\n      \"requires\": {\n        \"commander\": \"2.17.1\",\n        \"source-map\": \"0.6.1\",\n        \"source-map-support\": \"0.5.10\"\n      },\n      \"dependencies\": {\n        \"commander\": {\n          \"version\": \"2.17.1\",\n          \"resolved\": \"https://registry.npmjs.org/commander/-/commander-2.17.1.tgz\",\n          \"integrity\": \"sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==\",\n          \"dev\": true\n        }\n      }\n    },\n    \"text-table\": {\n      \"version\": \"0.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz\",\n      \"integrity\": \"sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=\"\n    },\n    \"through\": {\n      \"version\": \"2.3.8\",\n      \"resolved\": \"https://registry.npmjs.org/through/-/through-2.3.8.tgz\",\n      \"integrity\": \"sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=\",\n      \"dev\": true\n    },\n    \"through2\": {\n      \"version\": \"2.0.5\",\n      \"resolved\": \"https://registry.npmjs.org/through2/-/through2-2.0.5.tgz\",\n      \"integrity\": \"sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==\",\n      \"dev\": true,\n      \"requires\": {\n        \"readable-stream\": \"2.3.6\",\n        \"xtend\": \"4.0.1\"\n      },\n      \"dependencies\": {\n        \"isarray\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz\",\n          \"integrity\": \"sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=\",\n          \"dev\": true\n        },\n        \"readable-stream\": {\n          \"version\": \"2.3.6\",\n          \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz\",\n          \"integrity\": \"sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==\",\n          \"dev\": true,\n          \"requires\": {\n            \"core-util-is\": \"1.0.2\",\n            \"inherits\": \"2.0.3\",\n            \"isarray\": \"1.0.0\",\n            \"process-nextick-args\": \"2.0.0\",\n            \"safe-buffer\": \"5.1.2\",\n            \"string_decoder\": \"1.1.1\",\n            \"util-deprecate\": \"1.0.2\"\n          }\n        },\n        \"string_decoder\": {\n          \"version\": \"1.1.1\",\n          \"resolved\": \"https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz\",\n          \"integrity\": \"sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==\",\n          \"dev\": true,\n          \"requires\": {\n            \"safe-buffer\": \"5.1.2\"\n          }\n        }\n      }\n    },\n    \"tildify\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz\",\n      \"integrity\": \"sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=\",\n      \"dev\": true,\n      \"requires\": {\n        \"os-homedir\": \"1.0.2\"\n      }\n    },\n    \"time-stamp\": {\n      \"version\": \"1.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz\",\n      \"integrity\": \"sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=\",\n      \"dev\": true\n    },\n    \"tmp\": {\n      \"version\": \"0.0.33\",\n      \"resolved\": \"https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz\",\n      \"integrity\": \"sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==\",\n      \"dev\": true,\n      \"requires\": {\n        \"os-tmpdir\": \"1.0.2\"\n      }\n    },\n    \"to-fast-properties\": {\n      \"version\": \"2.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz\",\n      \"integrity\": \"sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=\"\n    },\n    \"to-object-path\": {\n      \"version\": \"0.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz\",\n      \"integrity\": \"sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=\",\n      \"dev\": true,\n      \"requires\": {\n        \"kind-of\": \"3.2.2\"\n      },\n      \"dependencies\": {\n        \"kind-of\": {\n          \"version\": \"3.2.2\",\n          \"resolved\": \"https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz\",\n          \"integrity\": \"sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-buffer\": \"1.1.6\"\n          }\n        }\n      }\n    },\n    \"to-regex\": {\n      \"version\": \"3.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz\",\n      \"integrity\": \"sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==\",\n      \"dev\": true,\n      \"requires\": {\n        \"define-property\": \"2.0.2\",\n        \"extend-shallow\": \"3.0.2\",\n        \"regex-not\": \"1.0.2\",\n        \"safe-regex\": \"1.1.0\"\n      }\n    },\n    \"to-regex-range\": {\n      \"version\": \"2.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz\",\n      \"integrity\": \"sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=\",\n      \"dev\": true,\n      \"requires\": {\n        \"is-number\": \"3.0.0\",\n        \"repeat-string\": \"1.6.1\"\n      }\n    },\n    \"trim-right\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz\",\n      \"integrity\": \"sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=\"\n    },\n    \"tslib\": {\n      \"version\": \"1.9.3\",\n      \"resolved\": \"https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz\",\n      \"integrity\": \"sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==\",\n      \"dev\": true\n    },\n    \"tweetnacl\": {\n      \"version\": \"0.14.5\",\n      \"resolved\": \"https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz\",\n      \"integrity\": \"sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=\",\n      \"dev\": true\n    },\n    \"type\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/type/-/type-1.2.0.tgz\",\n      \"integrity\": \"sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==\"\n    },\n    \"type-check\": {\n      \"version\": \"0.3.2\",\n      \"resolved\": \"https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz\",\n      \"integrity\": \"sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=\",\n      \"requires\": {\n        \"prelude-ls\": \"1.1.2\"\n      }\n    },\n    \"type-detect\": {\n      \"version\": \"4.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz\",\n      \"integrity\": \"sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==\",\n      \"dev\": true\n    },\n    \"uglify-js\": {\n      \"version\": \"3.4.9\",\n      \"resolved\": \"https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz\",\n      \"integrity\": \"sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==\",\n      \"dev\": true,\n      \"optional\": true,\n      \"requires\": {\n        \"commander\": \"2.17.1\",\n        \"source-map\": \"0.6.1\"\n      },\n      \"dependencies\": {\n        \"commander\": {\n          \"version\": \"2.17.1\",\n          \"resolved\": \"https://registry.npmjs.org/commander/-/commander-2.17.1.tgz\",\n          \"integrity\": \"sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==\",\n          \"dev\": true,\n          \"optional\": true\n        }\n      }\n    },\n    \"unc-path-regex\": {\n      \"version\": \"0.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz\",\n      \"integrity\": \"sha1-5z3T17DXxe2G+6xrCufYxqadUPo=\",\n      \"dev\": true\n    },\n    \"union-value\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz\",\n      \"integrity\": \"sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=\",\n      \"dev\": true,\n      \"requires\": {\n        \"arr-union\": \"3.1.0\",\n        \"get-value\": \"2.0.6\",\n        \"is-extendable\": \"0.1.1\",\n        \"set-value\": \"0.4.3\"\n      },\n      \"dependencies\": {\n        \"extend-shallow\": {\n          \"version\": \"2.0.1\",\n          \"resolved\": \"https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz\",\n          \"integrity\": \"sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=\",\n          \"dev\": true,\n          \"requires\": {\n            \"is-extendable\": \"0.1.1\"\n          }\n        },\n        \"set-value\": {\n          \"version\": \"0.4.3\",\n          \"resolved\": \"https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz\",\n          \"integrity\": \"sha1-fbCPnT0i3H945Trzw79GZuzfzPE=\",\n          \"dev\": true,\n          \"requires\": {\n            \"extend-shallow\": \"2.0.1\",\n            \"is-extendable\": \"0.1.1\",\n            \"is-plain-object\": \"2.0.4\",\n            \"to-object-path\": \"0.3.0\"\n          }\n        }\n      }\n    },\n    \"uniq\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz\",\n      \"integrity\": \"sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=\"\n    },\n    \"unique-stream\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz\",\n      \"integrity\": \"sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=\",\n      \"dev\": true\n    },\n    \"universalify\": {\n      \"version\": \"0.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz\",\n      \"integrity\": \"sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==\"\n    },\n    \"unset-value\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz\",\n      \"integrity\": \"sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=\",\n      \"dev\": true,\n      \"requires\": {\n        \"has-value\": \"0.3.1\",\n        \"isobject\": \"3.0.1\"\n      },\n      \"dependencies\": {\n        \"has-value\": {\n          \"version\": \"0.3.1\",\n          \"resolved\": \"https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz\",\n          \"integrity\": \"sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=\",\n          \"dev\": true,\n          \"requires\": {\n            \"get-value\": \"2.0.6\",\n            \"has-values\": \"0.1.4\",\n            \"isobject\": \"2.1.0\"\n          },\n          \"dependencies\": {\n            \"isobject\": {\n              \"version\": \"2.1.0\",\n              \"resolved\": \"https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz\",\n              \"integrity\": \"sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=\",\n              \"dev\": true,\n              \"requires\": {\n                \"isarray\": \"1.0.0\"\n              }\n            }\n          }\n        },\n        \"has-values\": {\n          \"version\": \"0.1.4\",\n          \"resolved\": \"https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz\",\n          \"integrity\": \"sha1-bWHeldkd/Km5oCCJrThL/49it3E=\",\n          \"dev\": true\n        },\n        \"isarray\": {\n          \"version\": \"1.0.0\",\n          \"resolved\": \"https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz\",\n          \"integrity\": \"sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=\",\n          \"dev\": true\n        }\n      }\n    },\n    \"uri-js\": {\n      \"version\": \"4.2.2\",\n      \"resolved\": \"https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz\",\n      \"integrity\": \"sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==\",\n      \"requires\": {\n        \"punycode\": \"2.1.1\"\n      }\n    },\n    \"urix\": {\n      \"version\": \"0.1.0\",\n      \"resolved\": \"https://registry.npmjs.org/urix/-/urix-0.1.0.tgz\",\n      \"integrity\": \"sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=\"\n    },\n    \"use\": {\n      \"version\": \"3.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/use/-/use-3.1.1.tgz\",\n      \"integrity\": \"sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==\",\n      \"dev\": true\n    },\n    \"user-home\": {\n      \"version\": \"1.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz\",\n      \"integrity\": \"sha1-K1viOjK2Onyd640PKNSFcko98ZA=\",\n      \"dev\": true\n    },\n    \"util-deprecate\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz\",\n      \"integrity\": \"sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=\",\n      \"dev\": true\n    },\n    \"uuid\": {\n      \"version\": \"3.3.2\",\n      \"resolved\": \"https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz\",\n      \"integrity\": \"sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==\"\n    },\n    \"v8flags\": {\n      \"version\": \"2.1.1\",\n      \"resolved\": \"https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz\",\n      \"integrity\": \"sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=\",\n      \"dev\": true,\n      \"requires\": {\n        \"user-home\": \"1.1.1\"\n      }\n    },\n    \"verror\": {\n      \"version\": \"1.10.0\",\n      \"resolved\": \"https://registry.npmjs.org/verror/-/verror-1.10.0.tgz\",\n      \"integrity\": \"sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=\",\n      \"dev\": true,\n      \"requires\": {\n        \"assert-plus\": \"1.0.0\",\n        \"core-util-is\": \"1.0.2\",\n        \"extsprintf\": \"1.3.0\"\n      }\n    },\n    \"vinyl\": {\n      \"version\": \"0.5.3\",\n      \"resolved\": \"https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz\",\n      \"integrity\": \"sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=\",\n      \"dev\": true,\n      \"requires\": {\n        \"clone\": \"1.0.4\",\n        \"clone-stats\": \"0.0.1\",\n        \"replace-ext\": \"0.0.1\"\n      }\n    },\n    \"vinyl-fs\": {\n      \"version\": \"0.3.14\",\n      \"resolved\": \"https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz\",\n      \"integrity\": \"sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=\",\n      \"dev\": true,\n      \"requires\": {\n        \"defaults\": \"1.0.3\",\n        \"glob-stream\": \"3.1.18\",\n        \"glob-watcher\": \"0.0.6\",\n        \"graceful-fs\": \"3.0.11\",\n        \"mkdirp\": \"0.5.1\",\n        \"strip-bom\": \"1.0.0\",\n        \"through2\": \"0.6.5\",\n        \"vinyl\": \"0.4.6\"\n      },\n      \"dependencies\": {\n        \"clone\": {\n          \"version\": \"0.2.0\",\n          \"resolved\": \"https://registry.npmjs.org/clone/-/clone-0.2.0.tgz\",\n          \"integrity\": \"sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=\",\n          \"dev\": true\n        },\n        \"graceful-fs\": {\n          \"version\": \"3.0.11\",\n          \"resolved\": \"https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz\",\n          \"integrity\": \"sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=\",\n          \"dev\": true,\n          \"requires\": {\n            \"natives\": \"1.1.6\"\n          }\n        },\n        \"readable-stream\": {\n          \"version\": \"1.0.34\",\n          \"resolved\": \"https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz\",\n          \"integrity\": \"sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=\",\n          \"dev\": true,\n          \"requires\": {\n            \"core-util-is\": \"1.0.2\",\n            \"inherits\": \"2.0.3\",\n            \"isarray\": \"0.0.1\",\n            \"string_decoder\": \"0.10.31\"\n          }\n        },\n        \"through2\": {\n          \"version\": \"0.6.5\",\n          \"resolved\": \"https://registry.npmjs.org/through2/-/through2-0.6.5.tgz\",\n          \"integrity\": \"sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=\",\n          \"dev\": true,\n          \"requires\": {\n            \"readable-stream\": \"1.0.34\",\n            \"xtend\": \"4.0.1\"\n          }\n        },\n        \"vinyl\": {\n          \"version\": \"0.4.6\",\n          \"resolved\": \"https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz\",\n          \"integrity\": \"sha1-LzVsh6VQolVGHza76ypbqL94SEc=\",\n          \"dev\": true,\n          \"requires\": {\n            \"clone\": \"0.2.0\",\n            \"clone-stats\": \"0.0.1\"\n          }\n        }\n      }\n    },\n    \"vinyl-sourcemaps-apply\": {\n      \"version\": \"0.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz\",\n      \"integrity\": \"sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=\",\n      \"dev\": true,\n      \"requires\": {\n        \"source-map\": \"0.5.7\"\n      },\n      \"dependencies\": {\n        \"source-map\": {\n          \"version\": \"0.5.7\",\n          \"resolved\": \"https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz\",\n          \"integrity\": \"sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=\",\n          \"dev\": true\n        }\n      }\n    },\n    \"vue-hot-reload-api\": {\n      \"version\": \"2.3.4\",\n      \"resolved\": \"https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz\",\n      \"integrity\": \"sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==\"\n    },\n    \"vue-style-loader\": {\n      \"version\": \"4.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.0.1.tgz\",\n      \"integrity\": \"sha512-k21XBqrm13hFt4+ywXP5Jv1T4v31lI7r7dpA4zS5FS2T28MjJc5rq8EG85K2IVjq9FDk8d+IUSD/4stYfG4UZg==\",\n      \"requires\": {\n        \"hash-sum\": \"1.0.2\",\n        \"loader-utils\": \"1.2.3\"\n      }\n    },\n    \"vue-template-compiler\": {\n      \"version\": \"2.6.12\",\n      \"resolved\": \"https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.12.tgz\",\n      \"integrity\": \"sha512-OzzZ52zS41YUbkCBfdXShQTe69j1gQDZ9HIX8miuC9C3rBCk9wIRjLiZZLrmX9V+Ftq/YEyv1JaVr5Y/hNtByg==\",\n      \"requires\": {\n        \"de-indent\": \"1.0.2\",\n        \"he\": \"1.1.0\"\n      }\n    },\n    \"vue-template-es2015-compiler\": {\n      \"version\": \"1.9.1\",\n      \"resolved\": \"https://registry.npmjs.org/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz\",\n      \"integrity\": \"sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==\"\n    },\n    \"vuex\": {\n      \"version\": \"3.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/vuex/-/vuex-3.0.1.tgz\",\n      \"integrity\": \"sha512-wLoqz0B7DSZtgbWL1ShIBBCjv22GV5U+vcBFox658g6V0s4wZV9P4YjCNyoHSyIBpj1f29JBoNQIqD82cR4O3w==\"\n    },\n    \"wcwidth\": {\n      \"version\": \"1.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz\",\n      \"integrity\": \"sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=\",\n      \"requires\": {\n        \"defaults\": \"1.0.3\"\n      }\n    },\n    \"webpack-check-plugin\": {\n      \"version\": \"1.0.8\",\n      \"resolved\": \"https://registry.npmjs.org/webpack-check-plugin/-/webpack-check-plugin-1.0.8.tgz\",\n      \"integrity\": \"sha512-4MwjW3hyQizRYhgVg4O51emeWd15/4kbZI+nIiWcaboCv7q82+G8zuanUDS20DyIUzeckEoLRoCRcP7VF7sYow==\",\n      \"requires\": {\n        \"@babel/parser\": \"7.1.0\",\n        \"babel-generator\": \"6.26.1\",\n        \"babel-traverse\": \"6.26.0\",\n        \"chalk\": \"2.4.2\",\n        \"lodash.uniq\": \"4.5.0\"\n      },\n      \"dependencies\": {\n        \"@babel/parser\": {\n          \"version\": \"7.1.0\",\n          \"resolved\": \"https://registry.npmjs.org/@babel/parser/-/parser-7.1.0.tgz\",\n          \"integrity\": \"sha512-SmjnXCuPAlai75AFtzv+KCBcJ3sDDWbIn+WytKw1k+wAtEy6phqI2RqKh/zAnw53i1NR8su3Ep/UoqaKcimuLg==\"\n        }\n      }\n    },\n    \"webpack-log\": {\n      \"version\": \"1.2.0\",\n      \"resolved\": \"https://registry.npmjs.org/webpack-log/-/webpack-log-1.2.0.tgz\",\n      \"integrity\": \"sha512-U9AnICnu50HXtiqiDxuli5gLB5PGBo7VvcHx36jRZHwK4vzOYLbImqT4lwWwoMHdQWwEKw736fCHEekokTEKHA==\",\n      \"requires\": {\n        \"chalk\": \"2.4.2\",\n        \"log-symbols\": \"2.2.0\",\n        \"loglevelnext\": \"1.0.5\",\n        \"uuid\": \"3.3.2\"\n      }\n    },\n    \"webpack-merge\": {\n      \"version\": \"4.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.2.1.tgz\",\n      \"integrity\": \"sha512-4p8WQyS98bUJcCvFMbdGZyZmsKuWjWVnVHnAS3FFg0HDaRVrPbkivx2RYCre8UiemD67RsiFFLfn4JhLAin8Vw==\",\n      \"requires\": {\n        \"lodash\": \"4.17.11\"\n      }\n    },\n    \"webpack-sources\": {\n      \"version\": \"1.3.0\",\n      \"resolved\": \"https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.3.0.tgz\",\n      \"integrity\": \"sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==\",\n      \"requires\": {\n        \"source-list-map\": \"2.0.1\",\n        \"source-map\": \"0.6.1\"\n      }\n    },\n    \"weex-styler\": {\n      \"version\": \"0.3.1\",\n      \"resolved\": \"https://registry.npmjs.org/weex-styler/-/weex-styler-0.3.1.tgz\",\n      \"integrity\": \"sha512-xkX5/wS/QLiJXKwbdpeytbLN0kHviQwj9CLdvBxqu+RRZABZpTniKZr1oxjh9Q0+n/aRC+smwFpQpUKvXh9V1g==\",\n      \"requires\": {\n        \"css\": \"2.2.4\"\n      }\n    },\n    \"weex-template-compiler\": {\n      \"version\": \"2.5.16-weex.1\",\n      \"resolved\": \"https://registry.npmjs.org/weex-template-compiler/-/weex-template-compiler-2.5.16-weex.1.tgz\",\n      \"integrity\": \"sha512-v6hlv2eANy35y2iu9mO+OQ3oHx1/OtfbEx1PrONaCeS6tHKTu4W0dx22GP0T4qinSLlORBvwGwMGyKEme5YD7w==\",\n      \"requires\": {\n        \"acorn\": \"5.7.4\",\n        \"escodegen\": \"1.14.3\",\n        \"he\": \"1.1.0\",\n        \"vue-template-es2015-compiler\": \"1.9.1\"\n      }\n    },\n    \"which\": {\n      \"version\": \"1.3.1\",\n      \"resolved\": \"https://registry.npmjs.org/which/-/which-1.3.1.tgz\",\n      \"integrity\": \"sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==\",\n      \"dev\": true,\n      \"requires\": {\n        \"isexe\": \"2.0.0\"\n      }\n    },\n    \"wordwrap\": {\n      \"version\": \"1.0.0\",\n      \"resolved\": \"https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz\",\n      \"integrity\": \"sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=\"\n    },\n    \"wrappy\": {\n      \"version\": \"1.0.2\",\n      \"resolved\": \"https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz\",\n      \"integrity\": \"sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=\"\n    },\n    \"write\": {\n      \"version\": \"0.2.1\",\n      \"resolved\": \"https://registry.npmjs.org/write/-/write-0.2.1.tgz\",\n      \"integrity\": \"sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=\",\n      \"dev\": true,\n      \"requires\": {\n        \"mkdirp\": \"0.5.1\"\n      }\n    },\n    \"xtend\": {\n      \"version\": \"4.0.1\",\n      \"resolved\": \"https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz\",\n      \"integrity\": \"sha1-pcbVMr5lbiPbgg77lDofBJmNY68=\",\n      \"dev\": true\n    },\n    \"yallist\": {\n      \"version\": \"2.1.2\",\n      \"resolved\": \"https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz\",\n      \"integrity\": \"sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=\"\n    }\n  }\n}\n"
  },
  {
    "path": "packages/easy-chameleon/package.json",
    "content": "{\n  \"name\": \"easy-chameleon\",\n  \"version\": \"1.0.8\",\n  \"description\": \"easy-chameleon\",\n  \"main\": \"index.js\",\n  \"bin\": {\n    \"ecml\": \"./bin/index.js\"\n  },\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"keywords\": [\n    \"chameleon\",\n    \"cml\",\n    \"miniprogram\",\n    \"vue\",\n    \"weex\",\n    \"android\",\n    \"ios\",\n    \"mobile\",\n    \"mvvm\"\n  ],\n  \"dependencies\": {\n    \"babel-plugin-chameleon-import\": \"^1.0.8\",\n    \"chameleon-api\": \"^0.4.17\",\n    \"chameleon-bridge\": \"^0.1.10\",\n    \"chameleon-css-loader\": \"^1.0.8\",\n    \"chameleon-loader\": \"^1.0.8\",\n    \"chameleon-miniapp-target\": \"^1.0.8\",\n    \"chameleon-mixins\": \"^1.0.8\",\n    \"chameleon-runtime\": \"^0.1.4\",\n    \"chameleon-store\": \"0.0.3\",\n    \"chameleon-template-parse\": \"^1.0.8\",\n    \"chameleon-templates\": \"^1.0.8\",\n    \"chameleon-tool-utils\": \"^1.0.8\",\n    \"chameleon-url-loader\": \"^1.0.8\",\n    \"chameleon-vue-precompiler\": \"^1.0.8\",\n    \"chameleon-weex-vue-loader\": \"^1.0.8\",\n    \"clean-webpack-plugin\": \"0.1.19\",\n    \"cml-ui\": \"^0.2.0-alpha.1\",\n    \"extract-text-webpack-plugin\": \"3.0.2\",\n    \"interface-loader\": \"^1.0.8\",\n    \"ora\": \"3.0.0\",\n    \"webpack-check-plugin\": \"^1.0.8\",\n    \"webpack-liveload-middleware\": \"1.0.8\",\n    \"webpack-merge\": \"^4.1.3\"\n  },\n  \"devDependencies\": {\n    \"chai\": \"^4.2.0\",\n    \"coveralls\": \"^2.11.9\",\n    \"eslint\": \"^5.9.0\",\n    \"gulp\": \"^3.9.1\",\n    \"gulp-uglify-es\": \"^1.0.4\",\n    \"istanbul\": \"^0.4.5\",\n    \"mocha\": \"^5.2.0\"\n  }\n}\n"
  },
  {
    "path": "packages/easy-chameleon/postcss/web/.postcssrc.js",
    "content": "// https://github.com/michael-ciniawsky/postcss-load-config\nmodule.exports = {\n  \"plugins\": {\n    // to edit target browsers: use \"browserslist\" field in package.json\n    \"postcss-import\": {},\n    \"postcss-plugin-weex\":{},\n    \"autoprefixer\": {\n        browsers: ['> 0.1%', 'ios >= 8', 'not ie < 12']\n    }\n  }\n}"
  },
  {
    "path": "packages/easy-chameleon/postcss/weex/.postcssrc.js",
    "content": "// https://github.com/michael-ciniawsky/postcss-load-config\nmodule.exports = {\n  \"plugins\": {\n    // to edit target browsers: use \"browserslist\" field in package.json\n    \"postcss-import\": {},\n  }\n}"
  },
  {
    "path": "packages/easy-chameleon/postcss/wx/.postcssrc.js",
    "content": "// https://github.com/michael-ciniawsky/postcss-load-config\nmodule.exports = {\n  \"plugins\": {\n    // to edit target browsers: use \"browserslist\" field in package.json\n    \"postcss-import\": {}\n  }\n}"
  },
  {
    "path": "packages/interface-loader/.eslintrc",
    "content": "{\n    // 在配置文件里配置全局变量时，使用 globals 指出你要使用的全局变量。将变量设置为 true 将允许变量被重写，或 false 将不允许被重写\n    \"globals\": {\n        \"cml\": false\n    },\n  // 环境定义了预定义的全局变量。\n  \"env\": {\n      //环境定义了预定义的全局变量。更多在官网查看\n      \"browser\": true,\n      \"node\": true,\n      \"commonjs\": true,\n      \"amd\": true,\n      \"es6\": true,\n      \"mocha\": true\n  },\n  // JavaScript 语言选项\n  \"parserOptions\": {\n      // ECMAScript 版本\n      \"ecmaVersion\": 9,\n      \"sourceType\": \"module\", //设置为 \"script\" (默认) 或 \"module\"（如果你的代码是 ECMAScript 模块)。\n      //想使用的额外的语言特性:\n      \"ecmaFeatures\": {\n          // 允许在全局作用域下使用 return 语句\n          \"globalReturn\": true,\n          // impliedStric\n          \"impliedStrict\": true,\n          // 启用 JSX\n          \"jsx\": true,\n          \"modules\": true\n      }\n  },\n  //-----让eslint支持 JSX start\n  \"plugins\": [\n\n  ],\n  \"extends\": [\n      \"eslint:recommended\"\n  ],\n  //-----让eslint支持 JSX end\n\n\n  /**\n   * \"off\" 或 0 - 关闭规则\n   * \"warn\" 或 1 - 开启规则，使用警告级别的错误：warn (不会导致程序退出),\n   * \"error\" 或 2 - 开启规则，使用错误级别的错误：error (当被触发的时候，程序会退出)\n   */\n  \"rules\": {\n\n      ////////////////\n      // 可能的错误 //\n      ////////////////\n\n      // 禁止条件表达式中出现赋值操作符\n      \"no-cond-assign\": 2,\n      // 禁用 console\n      \"no-console\": 0,\n      // 禁止在条件中使用常量表达式\n      // if (false) {\n      // doSomethingUnfinished();\n      // } //cuowu\n      \"no-constant-condition\": 2,\n      // 禁止在正则表达式中使用控制字符 ：new RegExp(\"\\x1f\")\n      \"no-control-regex\": 2,\n      // 数组和对象键值对最后一个逗号， never参数：不能带末尾的逗号, always参数：必须带末尾的逗号，\n      // always-multiline：多行模式必须带逗号，单行模式不能带逗号\n      \"comma-dangle\": [1, \"never\"],\n      // 禁用 debugger\n      \"no-debugger\": 2,\n      // 禁止 function 定义中出现重名参数\n      \"no-dupe-args\": 2,\n      // 禁止对象字面量中出现重复的 key\n      \"no-dupe-keys\": 2,\n      // 禁止重复的 case 标签\n      \"no-duplicate-case\": 2,\n      // 禁止空语句块\n      \"no-empty\": 2,\n      // 禁止在正则表达式中使用空字符集 (/^abc[]/)\n      \"no-empty-character-class\": 2,\n      // 禁止对 catch 子句的参数重新赋值\n      \"no-ex-assign\": 2,\n      // 禁止不必要的布尔转换\n      \"no-extra-boolean-cast\": 2,\n      // 禁止不必要的括号 //(a * b) + c;//报错\n      \"no-extra-parens\": 0,\n      // 禁止不必要的分号\n      \"no-extra-semi\": 2,\n      // 禁止对 function 声明重新赋值\n      \"no-func-assign\": 2,\n      // 禁止在嵌套的块中出现 function 或 var 声明\n      \"no-inner-declarations\": [2, \"functions\"],\n      // 禁止 RegExp 构造函数中无效的正则表达式字符串\n      \"no-invalid-regexp\": 2,\n      // 禁止在字符串和注释之外不规则的空白\n      \"no-irregular-whitespace\": 2,\n      // 禁止在 in 表达式中出现否定的左操作数\n      \"no-negated-in-lhs\": 2,\n      // 禁止把全局对象 (Math 和 JSON) 作为函数调用 错误：var math = Math();\n      \"no-obj-calls\": 2,\n      // 禁止直接使用 Object.prototypes 的内置属性\n      \"no-prototype-builtins\": 0,\n      // 禁止正则表达式字面量中出现多个空格\n      \"no-regex-spaces\": 2,\n      // 禁用稀疏数组\n      \"no-sparse-arrays\": 2,\n      // 禁止出现令人困惑的多行表达式\n      \"no-unexpected-multiline\": 2,\n      // 禁止在return、throw、continue 和 break语句之后出现不可达代码\n      \"no-unreachable\": 2,\n      // 要求使用 isNaN() 检查 NaN\n      \"use-isnan\": 2,\n      // 强制使用有效的 JSDoc 注释\n      \"valid-jsdoc\": 0,\n      // 强制 typeof 表达式与有效的字符串进行比较\n      // typeof foo === \"undefimed\" 错误\n      \"valid-typeof\": 2,\n\n\n      //////////////\n      // 最佳实践 //\n      //////////////\n\n      // 定义对象的set存取器属性时，强制定义get\n      \"accessor-pairs\": 2,\n      // 强制数组方法的回调函数中有 return 语句\n      \"array-callback-return\": 0,\n      // 强制把变量的使用限制在其定义的作用域范围内\n      \"block-scoped-var\": 0,\n      // 限制圈复杂度，也就是类似if else能连续接多少个\n      \"complexity\": [2, 9],\n      // 要求 return 语句要么总是指定返回的值，要么不指定\n      \"consistent-return\": 0,\n      // 强制所有控制语句使用一致的括号风格\n      \"curly\": [2, \"all\"],\n      // switch 语句强制 default 分支，也可添加 // no default 注释取消此次警告\n      \"default-case\": 2,\n      // 强制object.key 中 . 的位置，参数:\n      // property，'.'号应与属性在同一行\n      // object, '.' 号应与对象名在同一行\n      \"dot-location\": [2, \"property\"],\n      // 强制使用.号取属性\n      // 参数： allowKeywords：true 使用保留字做属性名时，只能使用.方式取属性\n      // false 使用保留字做属性名时, 只能使用[]方式取属性 e.g [2, {\"allowKeywords\": false}]\n      // allowPattern: 当属性名匹配提供的正则表达式时，允许使用[]方式取值,否则只能用.号取值 e.g [2, {\"allowPattern\": \"^[a-z]+(_[a-z]+)+$\"}]\n      \"dot-notation\": [2, {\n          \"allowKeywords\": false\n      }],\n      // 使用 === 替代 == allow-null允许null和undefined==\n      \"eqeqeq\": [0, \"allow-null\"],\n      // 要求 for-in 循环中有一个 if 语句\n      \"guard-for-in\": 2,\n      // 禁用 alert、confirm 和 prompt\n      \"no-alert\": 0,\n      // 禁用 arguments.caller 或 arguments.callee\n      \"no-caller\": 2,\n      // 不允许在 case 子句中使用词法声明\n      \"no-case-declarations\": 2,\n      // 禁止除法操作符显式的出现在正则表达式开始的位置\n      \"no-div-regex\": 2,\n      // 禁止 if 语句中有 return 之后有 else\n      \"no-else-return\": 0,\n      // 禁止出现空函数.如果一个函数包含了一条注释，它将不会被认为有问题。\n      \"no-empty-function\": 2,\n      // 禁止使用空解构模式no-empty-pattern\n      \"no-empty-pattern\": 2,\n      // 禁止在没有类型检查操作符的情况下与 null 进行比较\n      \"no-eq-null\": 1,\n      // 禁用 eval()\n      \"no-eval\": 2,\n      // 禁止扩展原生类型\n      \"no-extend-native\": 2,\n      // 禁止不必要的 .bind() 调用\n      \"no-extra-bind\": 2,\n      // 禁用不必要的标签\n      \"no-extra-label:\": 0,\n      // 禁止 case 语句落空\n      \"no-fallthrough\": 2,\n      // 禁止数字字面量中使用前导和末尾小数点\n      \"no-floating-decimal\": 2,\n      // 禁止使用短符号进行类型转换(!!fOO)\n      \"no-implicit-coercion\": 0,\n      // 禁止在全局范围内使用 var 和命名的 function 声明\n      \"no-implicit-globals\": 1,\n      // 禁止使用类似 eval() 的方法\n      \"no-implied-eval\": 2,\n      // 禁止 this 关键字出现在类和类对象之外\n      \"no-invalid-this\": 0,\n      // 禁用 __iterator__ 属性\n      \"no-iterator\": 2,\n      // 禁用标签语句\n      \"no-labels\": 2,\n      // 禁用不必要的嵌套块\n      \"no-lone-blocks\": 2,\n      // 禁止在循环中出现 function 声明和表达式\n      \"no-loop-func\": 1,\n      // 禁用魔术数字(3.14什么的用常量代替)\n      \"no-magic-numbers\": [1, {\n          \"ignore\": [0, -1, 1]\n      }],\n      // 禁止使用多个空格\n      \"no-multi-spaces\": 2,\n      // 禁止使用多行字符串，在 JavaScript 中，可以在新行之前使用斜线创建多行字符串\n      \"no-multi-str\": 2,\n      // 禁止对原生对象赋值\n      \"no-native-reassign\": 2,\n      // 禁止在非赋值或条件语句中使用 new 操作符\n      \"no-new\": 2,\n      // 禁止对 Function 对象使用 new 操作符\n      \"no-new-func\": 0,\n      // 禁止对 String，Number 和 Boolean 使用 new 操作符\n      \"no-new-wrappers\": 2,\n      // 禁用八进制字面量\n      \"no-octal\": 2,\n      // 禁止在字符串中使用八进制转义序列\n      \"no-octal-escape\": 2,\n      // 不允许对 function 的参数进行重新赋值\n      \"no-param-reassign\": 0,\n      // 禁用 __proto__ 属性\n      \"no-proto\": 2,\n      // 禁止使用 var 多次声明同一变量\n      \"no-redeclare\": 2,\n      // 禁用指定的通过 require 加载的模块\n      \"no-return-assign\": 0,\n      // 禁止使用 javascript: url\n      \"no-script-url\": 0,\n      // 禁止自我赋值\n      \"no-self-assign\": 2,\n      // 禁止自身比较\n      \"no-self-compare\": 2,\n      // 禁用逗号操作符\n      \"no-sequences\": 2,\n      // 禁止抛出非异常字面量\n      \"no-throw-literal\": 2,\n      // 禁用一成不变的循环条件\n      \"no-unmodified-loop-condition\": 2,\n      // 禁止出现未使用过的表达式\n      \"no-unused-expressions\": 0,\n      // 禁用未使用过的标签\n      \"no-unused-labels\": 2,\n      // 禁止不必要的 .call() 和 .apply()\n      \"no-useless-call\": 2,\n      // 禁止不必要的字符串字面量或模板字面量的连接\n      \"no-useless-concat\": 0,\n      // 禁用不必要的转义字符\n      \"no-useless-escape\": 0,\n      // 禁用 void 操作符\n      \"no-void\": 0,\n      // 禁止在注释中使用特定的警告术语\n      \"no-warning-comments\": 0,\n      // 禁用 with 语句\n      \"no-with\": 2,\n      // 强制在parseInt()使用基数参数\n      \"radix\": 2,\n      // 要求所有的 var 声明出现在它们所在的作用域顶部\n      \"vars-on-top\": 0,\n      // 要求 IIFE 使用括号括起来\n      \"wrap-iife\": [2, \"any\"],\n      // 要求或禁止 “Yoda” 条件\n      \"yoda\": [2, \"never\"],\n      // 要求或禁止使用严格模式指令\n      \"strict\": 0,\n\n\n      //////////////\n      // 变量声明 //\n      //////////////\n\n      // 要求或禁止 var 声明中的初始化(初值)\n      \"init-declarations\": 0,\n      // 不允许 catch 子句的参数与外层作用域中的变量同名\n      \"no-catch-shadow\": 0,\n      // 禁止删除变量\n      \"no-delete-var\": 2,\n      // 不允许标签与变量同名\n      \"no-label-var\": 2,\n      // 禁用特定的全局变量\n      \"no-restricted-globals\": 0,\n      // 禁止 var 声明 与外层作用域的变量同名\n      \"no-shadow\": 0,\n      // 禁止覆盖受限制的标识符\n      \"no-shadow-restricted-names\": 2,\n      // 禁用未声明的变量，除非它们在 /*global */ 注释中被提到\n      \"no-undef\": 2,\n      // 禁止将变量初始化为 undefined\n      \"no-undef-init\": 2,\n      // 禁止将 undefined 作为标识符\n      \"no-undefined\": 0,\n      // 禁止出现未使用过的变量\n      \"no-unused-vars\": [2, {\n          \"vars\": \"all\",\n          \"args\": \"none\"\n      }],\n      // 不允许在变量定义之前使用它们\n      \"no-use-before-define\": 0,\n\n      //////////////////////////\n      // Node.js and CommonJS //\n      //////////////////////////\n\n      // require return statements after callbacks\n      \"callback-return\": 0,\n      // 要求 require() 出现在顶层模块作用域中\n      \"global-require\": 1,\n      // 要求回调函数中有容错处理\n      \"handle-callback-err\": [2, \"^(err|error)$\"],\n      // 禁止混合常规 var 声明和 require 调用\n      \"no-mixed-requires\": 0,\n      // 禁止调用 require 时使用 new 操作符\n      \"no-new-require\": 2,\n      // 禁止对 __dirname 和 __filename进行字符串连接\n      \"no-path-concat\": 0,\n      // 禁用 process.env\n      \"no-process-env\": 0,\n      // 禁用 process.exit()\n      \"no-process-exit\": 0,\n      // 禁用同步方法\n      \"no-sync\": 0,\n\n      //////////////\n      // 风格指南 //\n      //////////////\n\n      // 指定数组的元素之间要以空格隔开(, 后面)， never参数：[ 之前和 ] 之后不能带空格，always参数：[ 之前和 ] 之后必须带空格\n      \"array-bracket-spacing\": [2, \"never\"],\n      // 禁止或强制在单行代码块中使用空格(禁用)\n      \"block-spacing\": [1, \"never\"],\n      //强制使用一致的缩进 第二个参数为 \"tab\" 时，会使用tab，\n      // if while function 后面的{必须与if在同一行，java风格。\n      \"brace-style\": [2, \"1tbs\", {\n          \"allowSingleLine\": true\n      }],\n      // 双峰驼命名格式\n      \"camelcase\": 2,\n      // 控制逗号前后的空格\n      \"comma-spacing\": [2, {\n          \"before\": false,\n          \"after\": true\n      }],\n      // 控制逗号在行尾出现还是在行首出现 (默认行尾)\n      // http://eslint.org/docs/rules/comma-style\n      \"comma-style\": [2, \"last\"],\n      //\"SwitchCase\" (默认：0) 强制 switch 语句中的 case 子句的缩进水平\n      // 以方括号取对象属性时，[ 后面和 ] 前面是否需要空格, 可选参数 never, always\n      \"computed-property-spacing\": [2, \"never\"],\n      // 用于指统一在回调函数中指向this的变量名，箭头函数中的this已经可以指向外层调用者，应该没卵用了\n      // e.g [0,\"that\"] 指定只能 var that = this. that不能指向其他任何值，this也不能赋值给that以外的其他值\n      \"consistent-this\": [1, \"that\"],\n      // 强制使用命名的 function 表达式\n      \"func-names\": 0,\n      // 文件末尾强制换行\n      \"eol-last\": 2,\n      \"indent\": [2, 2, {\n          \"SwitchCase\": 1\n      }],\n      // 强制在对象字面量的属性中键和值之间使用一致的间距\n      \"key-spacing\": [2, {\n          \"beforeColon\": false,\n          \"afterColon\": true\n      }],\n      // 强制使用一致的换行风格\n      \"linebreak-style\": [1, \"unix\"],\n      // 要求在注释周围有空行 ( 要求在块级注释之前有一空行)\n      \"lines-around-comment\": [1, {\n          \"beforeBlockComment\": true\n      }],\n      // 强制一致地使用函数声明或函数表达式，方法定义风格，参数：\n      // declaration: 强制使用方法声明的方式，function f(){} e.g [2, \"declaration\"]\n      // expression：强制使用方法表达式的方式，var f = function() {} e.g [2, \"expression\"]\n      // allowArrowFunctions: declaration风格中允许箭头函数。 e.g [2, \"declaration\", { \"allowArrowFunctions\": true }]\n      \"func-style\": 0,\n      // 强制回调函数最大嵌套深度 5层\n      \"max-nested-callbacks\": [1, 5],\n      // 禁止使用指定的标识符\n      \"id-blacklist\": 0,\n      // 强制标识符的最新和最大长度\n      \"id-length\": 0,\n      // 要求标识符匹配一个指定的正则表达式\n      \"id-match\": 0,\n      // 强制在 JSX 属性中一致地使用双引号或单引号\n      \"jsx-quotes\": 0,\n      // 强制在关键字前后使用一致的空格 (前后腰需要)\n      \"keyword-spacing\": 2,\n      // 强制一行的最大长度\n      \"max-len\": [1, 200],\n      // 强制最大行数\n      \"max-lines\": 0,\n      // 强制 function 定义中最多允许的参数数量\n      \"max-params\": [1, 7],\n      // 强制 function 块最多允许的的语句数量\n      \"max-statements\": [1, 200],\n      // 强制每一行中所允许的最大语句数量\n      \"max-statements-per-line\": 0,\n      // 要求构造函数首字母大写 （要求调用 new 操作符时有首字母大小的函数，允许调用首字母大写的函数时没有 new 操作符。）\n      \"new-cap\": [2, {\n          \"newIsCap\": true,\n          \"capIsNew\": false\n      }],\n      // 要求调用无参构造函数时有圆括号\n      \"new-parens\": 2,\n      // 要求或禁止 var 声明语句后有一行空行\n      \"newline-after-var\": 0,\n      // 禁止使用 Array 构造函数\n      \"no-array-constructor\": 2,\n      // 禁用按位运算符\n      \"no-bitwise\": 0,\n      // 要求 return 语句之前有一空行\n      \"newline-before-return\": 0,\n      // 要求方法链中每个调用都有一个换行符\n      \"newline-per-chained-call\": 1,\n      // 禁用 continue 语句\n      \"no-continue\": 0,\n      // 禁止在代码行后使用内联注释\n      \"no-inline-comments\": 0,\n      // 禁止 if 作为唯一的语句出现在 else 语句中\n      \"no-lonely-if\": 0,\n      // 禁止混合使用不同的操作符\n      \"no-mixed-operators\": 0,\n      // 不允许空格和 tab 混合缩进\n      \"no-mixed-spaces-and-tabs\": 2,\n      // 不允许多个空行\n      \"no-multiple-empty-lines\": [2, {\n          \"max\": 2\n      }],\n      // 不允许否定的表达式\n      \"no-negated-condition\": 0,\n      // 不允许使用嵌套的三元表达式\n      \"no-nested-ternary\": 0,\n      // 禁止使用 Object 的构造函数\n      \"no-new-object\": 2,\n      // 禁止使用一元操作符 ++ 和 --\n      \"no-plusplus\": 0,\n      // 禁止使用特定的语法\n      \"no-restricted-syntax\": 0,\n      // 禁止 function 标识符和括号之间出现空格\n      \"no-spaced-func\": 2,\n      // 不允许使用三元操作符\n      \"no-ternary\": 0,\n      // 禁用行尾空格\n      \"no-trailing-spaces\": 2,\n      // 禁止标识符中有悬空下划线_bar\n      \"no-underscore-dangle\": 0,\n      // 禁止可以在有更简单的可替代的表达式时使用三元操作符\n      \"no-unneeded-ternary\": 2,\n      // 禁止属性前有空白\n      \"no-whitespace-before-property\": 0,\n      // 强制花括号内换行符的一致性\n      \"object-curly-newline\": 0,\n      // 强制在花括号中使用一致的空格\n      \"object-curly-spacing\": 0,\n      // 强制将对象的属性放在不同的行上\n      \"object-property-newline\": 0,\n      // 强制函数中的变量要么一起声明要么分开声明\n      \"one-var\": [2, {\n          \"initialized\": \"never\"\n      }],\n      // 要求或禁止在 var 声明周围换行\n      \"one-var-declaration-per-line\": 0,\n      // 要求或禁止在可能的情况下要求使用简化的赋值操作符\n      \"operator-assignment\": 0,\n      // 强制操作符使用一致的换行符\n      \"operator-linebreak\": [2, \"after\", {\n          \"overrides\": {\n              \"?\": \"before\",\n              \":\": \"before\"\n          }\n      }],\n      // 要求或禁止块内填充\n      \"padded-blocks\": 0,\n      // 要求对象字面量属性名称用引号括起来\n      \"quote-props\": 0,\n      // 强制使用一致的反勾号、双引号或单引号\n    //   \"quotes\": [2, \"single\",\"double\", \"avoid-escape\"],\n      // 要求使用 JSDoc 注释\n      \"require-jsdoc\": 0,\n      // 要求或禁止使用分号而不是 ASI（这个才是控制行尾部分号的，）\n      \"semi\": [0, \"always\"],\n      // 强制分号之前和之后使用一致的空格\n      \"semi-spacing\": 0,\n      // 要求同一个声明块中的变量按顺序排列\n      \"sort-vars\": 0,\n      // 强制在块之前使用一致的空格\n      \"space-before-blocks\": [2, \"always\"],\n      // 强制在 function的左括号之前使用一致的空格\n      \"space-before-function-paren\": [0, \"always\"],\n      // 强制在圆括号内使用一致的空格\n      \"space-in-parens\": [2, \"never\"],\n      // 要求操作符周围有空格\n      \"space-infix-ops\": 2,\n      // 强制在一元操作符前后使用一致的空格\n      \"space-unary-ops\": [2, {\n          \"words\": true,\n          \"nonwords\": false\n      }],\n      // 强制在注释中 // 或 /* 使用一致的空格\n      \"spaced-comment\": [2, \"always\", {\n          \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n      }],\n      // 要求或禁止 Unicode BOM\n      \"unicode-bom\": 0,\n      // 要求正则表达式被括号括起来\n      \"wrap-regex\": 0,\n\n      //////////////\n      // ES6.相关 //\n      //////////////\n\n      // 要求箭头函数体使用大括号\n      \"arrow-body-style\": 2,\n      // 要求箭头函数的参数使用圆括号\n      \"arrow-parens\": 0,\n      \"arrow-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 强制在子类构造函数中用super()调用父类构造函数，TypeScrip的编译器也会提示\n      \"constructor-super\": 0,\n      // 强制 generator 函数中 * 号周围使用一致的空格\n      \"generator-star-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 禁止修改类声明的变量\n      \"no-class-assign\": 2,\n      // 不允许箭头功能，在那里他们可以混淆的比较\n      \"no-confusing-arrow\": 0,\n      // 禁止修改 const 声明的变量\n      \"no-const-assign\": 2,\n      // 禁止类成员中出现重复的名称\n      \"no-dupe-class-members\": 2,\n      // 不允许复制模块的进口\n      \"no-duplicate-imports\": 0,\n      // 禁止 Symbol 的构造函数\n      \"no-new-symbol\": 2,\n      // 允许指定模块加载时的进口\n      \"no-restricted-imports\": 0,\n      // 禁止在构造函数中，在调用 super() 之前使用 this 或 super\n      \"no-this-before-super\": 2,\n      // 禁止不必要的计算性能键对象的文字\n      \"no-useless-computed-key\": 0,\n      // 要求使用 let 或 const 而不是 var\n      \"no-var\": 0,\n      // 要求或禁止对象字面量中方法和属性使用简写语法\n      \"object-shorthand\": 0,\n      // 要求使用箭头函数作为回调\n      \"prefer-arrow-callback\": 0,\n      // 要求使用 const 声明那些声明后不再被修改的变量\n      \"prefer-const\": 0,\n      // 要求在合适的地方使用 Reflect 方法\n      \"prefer-reflect\": 0,\n      // 要求使用扩展运算符而非 .apply()\n      \"prefer-spread\": 0,\n      // 要求使用模板字面量而非字符串连接\n      \"prefer-template\": 0,\n      // Suggest using the rest parameters instead of arguments\n      \"prefer-rest-params\": 0,\n      // 要求generator 函数内有 yield\n      \"require-yield\": 0,\n      // enforce spacing between rest and spread operators and their expressions\n      \"rest-spread-spacing\": 0,\n      // 强制模块内的 import 排序\n      \"sort-imports\": 0,\n      // 要求或禁止模板字符串中的嵌入表达式周围空格的使用\n      \"template-curly-spacing\": 1,\n      // 强制在 yield* 表达式中 * 周围使用空格\n      \"yield-star-spacing\": 2\n  }\n}\n"
  },
  {
    "path": "packages/interface-loader/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\ndist/\n# ///////////////////////////\n\n"
  },
  {
    "path": "packages/interface-loader/.npmignore",
    "content": ".scripts/\ntest/\ngulpfile.js"
  },
  {
    "path": "packages/interface-loader/package.json",
    "content": "{\n  \"name\": \"interface-loader\",\n  \"version\": \"1.0.8\",\n  \"description\": \"\",\n  \"main\": \"src/index.js\",\n  \"scripts\": {\n    \"test\": \"mocha --recursive --reporter spec\",\n    \"cover\": \"istanbul cover --report lcov node_modules/mocha/bin/_mocha -- -R spec --recursive\",\n    \"eslint:fix\": \"eslint --ext .js  src --fix\",\n    \"eslint\": \"eslint ./src\"\n  },\n  \"dependencies\": {\n    \"@babel/parser\": \"7.1.0\",\n    \"babel-generator\": \"6.26.1\",\n    \"babel-traverse\": \"6.26.0\",\n    \"chameleon-tool-utils\": \"1.0.8\",\n    \"loader-utils\": \"1.1.0\",\n    \"mvvm-interface-parser\": \"1.0.8\",\n    \"runtime-check\": \"1.0.8\"\n  },\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"devDependencies\": {\n    \"babel-core\": \"^6.26.3\",\n    \"babel-preset-flow\": \"^6.23.0\",\n    \"chai\": \"^4.2.0\",\n    \"coveralls\": \"^2.11.9\",\n    \"eslint\": \"^5.9.0\",\n    \"istanbul\": \"^0.4.5\",\n    \"mocha\": \"^5.2.0\",\n    \"through2\": \"^3.0.0\"\n  },\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"gitHead\": \"5ddcde4330774710f7646559446e008f7785ce00\"\n}"
  },
  {
    "path": "packages/interface-loader/src/index.js",
    "content": "\nconst loaderUtils = require('loader-utils')\nconst mvvmInterfaceParser = require('mvvm-interface-parser');\nmodule.exports = function (source) {\n  const rawOptions = loaderUtils.getOptions(this);\n  const options = rawOptions || {};\n  // loader的类型  wx  web weex\n  let {cmlType, media, check = {}} = options;\n  const filePath = this.resourcePath;\n  // todo\n  let {result, devDeps} = mvvmInterfaceParser({cmlType, media, source, filePath, check});\n  devDeps.forEach(item => {\n    this.addDependency(item);\n  })\n  return result;\n}\n"
  },
  {
    "path": "packages/interface-loader/src/lib/check.js",
    "content": "const parser = require('@babel/parser');\nconst traverse = require('babel-traverse');\nconst generate = require(\"babel-generator\");\nconst {getDefines, parsePlugins} = require('runtime-check');\nconst path = require('path');\nconst cmlUtils = require('chameleon-tool-utils');\n\n/**\n * 处理ast导出表达式\n *\n * @param  {Object} ast ast\n * @return {Object}     ast\n */\nconst handlExport = function (ast) {\n  traverse[\"default\"](ast, {\n    enter(path) {\n      if (path.node.type === 'ExportDefaultDeclaration') {\n        // 拿到export ddefault new Method(); 这一行代码\n        let exportCode = generate[\"default\"](path.node);\n        // 拿到 new Method(); 这一段代码\n        let declarationCode = generate[\"default\"](path.node.declaration);\n        // 得到 export default __OBJECT__WARPPER__(new Method());\n        let codeSeg = exportCode.code.replace(declarationCode.code, '__OBJECT__WRAPPER__(' + declarationCode.code + ')');\n        // 转成ast\n        let replacement = parser.parse(codeSeg, {\n          plugins: parsePlugins,\n          sourceType: 'module'\n        });\n        traverse[\"default\"].removeProperties(replacement);\n        // 替换\n        path.replaceWith(replacement.program.body[0]);\n        path.stop();\n      }\n    }\n  });\n\n  return ast;\n};\n\n/**\n * 对象包裹器\n *运行时的错误信息，根据端传入不同的方法，\n * @param  {Object} obj 需要处理的对象\n * @return {Object}     对象\n */\n/* istanbul ignore next */\nconst wrapper = function (obj) {\n  const className = obj.constructor.name;\n  /* eslint-disable no-undef */\n  const defines = __CHECK__DEFINES__;\n  const enableTypes = __enableTypes__.split(',') || []; // ['Object','Array','Nullable']\n  /* eslint-disable no-undef */\n  const types = defines.types;\n  const interfaceNames = defines.classes[className];\n  let methods = {};\n\n  interfaceNames && interfaceNames.forEach(interfaceName => {\n    const keys = Object.keys(defines.interfaces);\n    keys.forEach(key => {\n      methods = {\n        ...methods,\n        ...defines.interfaces[key]\n      }\n    });\n  });\n  /**\n   * 获取类型\n   *\n   * @param  {*}      value 值\n   * @return {string}       类型\n   */\n  const getType = function (value) {\n    if (value instanceof Promise) {\n      return \"Promise\";\n    }\n    const type = Object.prototype.toString.call(value);\n    return type.replace(/\\[object\\s(.*)\\]/g, '$1').replace(/( |^)[a-z]/g, (L) => L.toUpperCase());\n  };\n\n  /**\n   * 校验类型  两个loader共用代码\n   *\n   * @param  {*}      value 实际传入的值\n   * @param  {string} type  静态分析时候得到的值得类型\n   * @param  {array[string]} errList 校验错误信息  类型\n   * @return {bool}         校验结果\n   */\n\n  /* eslint complexity:[2,39] */\n  const checkType = function(value, originType, errList = []) {\n    let isNullableReg = /_cml_nullable_lmc_/g;\n    let type = originType.replace('_cml_nullable_lmc_', '');\n    (type === \"Void\") && (type = \"Undefined\")\n    let currentType = getType(value);\n    let canUseNullable = !!~enableTypes.indexOf(\"Nullable\");\n    let canUseObject = !!~enableTypes.indexOf(\"Object\");\n    let canUseArray = !!~enableTypes.indexOf(\"Array\");\n    if (currentType == 'Null') {\n      if (type == \"Null\") {// 如果定义的参数的值就是 Null，那么校验通过\n        errList = [];\n      } else {\n      // 那么判断是否是可选参数的情况\n        (canUseNullable && isNullableReg.test(originType)) ? errList = [] : errList.push(`定义了${type}类型的参数，传入的却是${currentType},请确认是否开启nullable配置`)\n      }\n      return errList;\n\n    }\n    if (currentType == 'Undefined') { // 如果运行时传入的真实值是undefined,那么可能改值在接口处就是被定义为 Undefined类型或者是 ?string 这种可选参数 nullable的情况；\n      if (type == \"Undefined\") {\n        errList = [];\n      } else {\n        (canUseNullable && isNullableReg.test(originType)) ? errList = [] : errList.push(`定义了${type}类型的参数，传入的却是${currentType},请确认是否开启nullable配置或者检查所传参数是否和接口定义的一致`)\n      }\n      return errList;\n    }\n    if (currentType == 'String') {\n      if (type == 'String') {\n        errList = [];\n      } else {\n        errList.push(`定义了${type}类型的参数，传入的却是${currentType},请检查所传参数是否和接口定义的一致`)\n      }\n      return errList;\n    }\n    if (currentType == 'Boolean') {\n      if (type == 'Boolean') {\n        errList = [];\n      } else {\n        errList.push(`定义了${type}类型的参数，传入的却是${currentType},请检查所传参数是否和接口定义的一致`)\n      }\n      return errList;\n    }\n    if (currentType == 'Number') {\n      if (type == 'Number') {\n        errList = [];\n      } else {\n        errList.push(`定义了${type}类型的参数，传入的却是${currentType},请检查所传参数是否和接口定义的一致`)\n      }\n      return errList;\n    }\n    if (currentType == 'Object') {\n      if (type == 'Object') {\n        (!canUseObject) ? errList.push(`不能直接定义类型${type}，需要使用符合类型定义，请确认是否开启了可以直接定义 Object 类型参数；`) : (errList = []);\n      } else if (type == 'CMLObject') {\n        errList = [];\n      } else { // 这种情况的对象就是自定义的对象；\n        if (types[type]) {\n          const keys = Object.keys(types[type]);\n          // todo 这里是同样的问题，可能多传递\n          keys.forEach(key => {\n            let subError = checkType(value[key], types[type][key], []);\n            if (subError && subError.length) {\n              errList = errList.concat(subError)\n            }\n          });\n          if (Object.keys(value).length > keys.length) {\n            errList.push(`type [${type}] 参数个数与定义不符`)\n          }\n        } else {\n          errList.push('找不到定义的type [' + type + ']!');\n        }\n      }\n      return errList;\n    }\n    if (currentType == 'Array') {\n      if (type == 'Array') {\n        (!canUseArray) ? errList.push(`不能直接定义类型${type}，需要使用符合类型定义，请确认是否开启了可以直接定义 Array 类型参数；`) : (errList = []);\n      } else {\n        if (types[type]) {\n          // 数组元素的类型\n          let itemType = types[type][0];\n          for (let i = 0; i < value.length; i++) {\n            let subError = checkType(value[i], itemType, []);\n            if (subError && subError.length) {\n              errList = errList.concat(subError)\n            }\n          }\n        } else {\n          errList.push('找不到定义的type [' + type + ']!');\n\n        }\n      }\n\n      return errList;\n    }\n    if (currentType == 'Function') {\n      // if (type == 'Function') {\n      //   errList = [];\n      // } else {\n      //   errList.push(`定义了${type}类型的参数，传入的却是${currentType},请检查所传参数是否和接口定义的一致`)\n      // }\n      if (types[type]) {\n        if (!types[type].input && !types[type].output) {\n          errList.push(`找不到${types[type]} 函数定义的输入输出`);\n        }\n      } else {\n        errList.push('找不到定义的type [' + type + ']!');\n      }\n      return errList;\n    }\n    if (currentType == 'Promise') {\n      if (type === 'Promise') {\n        errList.push(`不能直接定义Promise类型，异步请采用回调函数的形式！`)\n      } else {\n        errList.push(`定义了${type}类型的参数，传入的却是${currentType},请检查所传参数是否和接口定义的一致`)\n      }\n      return errList;\n    }\n    if (currentType == 'Date') {\n      if (type == 'Date') {\n        errList = [];\n      } else {\n        errList.push(`定义了${type}类型的参数，传入的却是${currentType},请检查所传参数是否和接口定义的一致`)\n      }\n      return errList;\n    }\n    if (currentType == 'RegExp') {\n      if (type == 'RegExp') {\n        errList = [];\n      } else {\n        errList.push(`定义了${type}类型的参数，传入的却是${currentType},请检查所传参数是否和接口定义的一致`)\n      }\n      return errList;\n    }\n\n\n    return errList;\n  }\n\n  /**\n   * 校验参数类型\n   *\n   * @param  {string} methodName 方法名称\n   * @param  {Array}  argNames   参数名称列表\n   * @param  {Array}  argValues  参数值列表\n   * @return {bool}              校验结果\n   */\n  const checkArgsType = function (methodName, argValues) {\n    let argList;\n\n    if (getType(methodName) == 'Array') {\n      // 回调函数的校验    methodName[0] 方法的名字 methodName[1]该回调函数在方法的参数索引\n      argList = types[methods[methodName[0]].input[methodName[1]]].input;\n      // 拿到这个回调函数的参数定义\n    } else {\n      argList = methods[methodName].input;\n    }\n    // todo 函数可能多传参数\n    argList.forEach((argType, index) => {\n      let errList = checkType(argValues[index], argType, []);\n      if (errList && errList.length > 0) {\n        showErrorMessage(`\n        校验位置: 方法${methodName} 或该${methodName}的回调函数中第${index + 1}个参数\n        错误信息: ${errList.join('\\n')}`)\n      }\n    });\n    if (argValues.length > argList.length) {\n      showErrorMessage(`[${methodName}]方法参数传递个数与定义不符`);\n    }\n  };\n\n  /**\n   * 校验返回值类型\n   *\n   * @param  {string} methodName 方法名称\n   * @param  {*}      returnData 返回值\n   * @return {bool}              校验结果\n   */\n  const checkReturnType = function (methodName, returnData) {\n    let output;\n    if (getType(methodName) == 'Array') {\n      output = types[methods[methodName[0]].input[methodName[1]]].output;\n    } else {\n      output = methods[methodName].output;\n    }\n    // todo output 为什么可以是数组\n    // if (output instanceof Array) {\n    //   output.forEach(type => {\n\n    //     //todo 而且是要有一个校验不符合就check失败？ 应该是有一个校验通过就可以吧\n    //     checkType(returnData, type,[])\n    //   });\n    // }\n    let errList = checkType(returnData, output, []);\n    if (errList && errList.length > 0) {\n      showErrorMessage(`\n      校验位置: 方法${methodName}返回值\n      错误信息: ${errList.join('\\n')}`)\n    }\n  };\n\n  /**\n   * 创建warpper\n   *\n   * @param  {string}   funcName   方法名称\n   * @param  {Function} originFunc 原有方法\n   * @return {Function}            包裹后的方法\n   */\n  const createWarpper = function (funcName, originFunc) {\n    return function () {\n      // 白名单方法\n      if (this && this.$cmlPolyHooks && this.$cmlPolyHooks.indexOf(originFunc)) {\n        return originFunc.apply(this, arguments);\n      }\n      const argValues = Array.prototype.slice.call(arguments)\n        .map(function (arg, index) {\n          // 对传入的方法要做特殊的处理，这个是传入的callback，对callback函数再做包装\n          if (getType(arg) == 'Function') {\n            return createWarpper([funcName, index], arg);\n          }\n          return arg;\n        });\n\n      checkArgsType(funcName, argValues);\n\n      const result = originFunc.apply(this, argValues);\n\n      checkReturnType(funcName, result)\n      return result;\n    }\n  };\n\n  // 获取所有方法\n  const keys = Object.keys(methods);\n  // 微信 预览模式会执行 白屏暂时注释\n  // Object.getOwnPropertyNames(Object.getPrototypeOf(obj)).forEach(key => {\n  //   if (!/constructor|prototype|length/ig.test(key)) {\n  //     if (!~keys.indexOf(key)) {\n  //       showErrorMessage('method [' + key + '] not declare in the interface!');\n  //     }\n  //   }\n  // })\n  // 处理包装方法\n  keys.forEach(key => {\n    const originFunc = obj[key];\n    if (!originFunc) {\n      showErrorMessage('method [' + key + '] not found!');\n      return;\n    }\n\n    if (obj.hasOwnProperty(key)) {\n      obj[key] = createWarpper(key, originFunc);\n    } else {\n      Object.getPrototypeOf(obj)[key] = createWarpper(key, originFunc);\n    }\n  });\n\n  return obj;\n};\n\n/**\n * 获取处理后的代码\n *\n * @param  {string} code 代码片段\n * @return {string}      代码片段\n */\nconst getCode = function (code, options) {\n  let {filePath, cmlType, enableTypes} = options;\n  const defines = getDefines(code, filePath);\n  /* eslint-disable no-magic-numbers */\n  const defineStr = JSON.stringify(defines.defines, null, 2);\n  /* eslint-disable no-magic-numbers */\n  const newCode = generate[\"default\"](handlExport(defines.ast)).code;\n\n  let result = '';\n  let wrapperCode = '';\n  if (filePath) {\n    filePath = path.resolve(filePath);\n    filePath = cmlUtils.handleWinPath(filePath);\n    result += `const __INTERFACE__FILEPATH=\"${filePath}\"`;\n  }\n  /* eslint-disable no-inner-declarations */\n  if (cmlType === 'weex') {\n    function throwError(content) {\n      var modal = weex.requireModule('modal')\n      modal.alert({\n        message: `文件位置: ${__INTERFACE__FILEPATH}\n                   ${content}`\n      })\n    }\n    result += `\n      const __CML_ERROR__ = ${throwError.toString()}\n    `\n  } else {\n    function throwError(content) {\n      throw new Error(`文件位置: ${__INTERFACE__FILEPATH}\n            ${content}`)\n    }\n    result += `\n      const __CML_ERROR__ = ${throwError.toString()}\n    `\n  }\n  /* eslint-disable no-inner-declarations */\n  wrapperCode = `\n  ${wrapper.toString().replace(/showErrorMessage/g, '__CML_ERROR__')}`\n\n\n  result += `\n  const __enableTypes__ = \"${enableTypes}\"\n  const __CHECK__DEFINES__ = ${defineStr};\n  const __OBJECT__WRAPPER__ = ${wrapperCode};\n  ${newCode}\n  `;\n  return result;\n};\n\nmodule.exports = {\n  getCode\n};\n"
  },
  {
    "path": "packages/interface-loader/test/lib.test/check.js",
    "content": "const path = require('path');\nconst fs = require('fs');\nconst {expect} = require('chai');\n\nconst generator = require('./generator.test.js');\nlet code = fs.readFileSync(path.resolve(__dirname, './interface.test'), 'utf-8');\nlet result = generator(code);\nresult = result.replace(/export\\s+default/g, 'module.exports =')\nlet generateFileName = './wrap-method.js';\nfs.writeFileSync(path.join(__dirname, `${generateFileName}`), result, {encoding: 'utf-8'});\nlet wrappedMethods = require(`${generateFileName}`);\nconsole.log('wrappedMethods', wrappedMethods)\n// 这个loader的主要作用是用来校验interface中定义的参数类型是否在对应的函数执行的时候中是一致的；\n// 只要函数执行通过就可以；将  .interface 文件中的methods 进行一层包装，从而进行函数的参数和返回值的校验；\ndescribe('test interface loader:used for check the parammeters and return valus of the function', function() {\n  describe('test the type of return value of function', function() {\n    it('test return value of function is Undefined', function() {\n      wrappedMethods.retValueUndefind();\n    });\n    it('test return value of function is String', function() {\n      wrappedMethods.retValueString();\n    });\n    it('test return value of function is Boolean', function() {\n      wrappedMethods.retValueBoolean();\n    });\n    it('test return value of function is Object', function() {\n      wrappedMethods.retValueObject();\n    });\n    it('test return value of function is Array', function() {\n      wrappedMethods.retValueArray();\n    });\n    it('test return value of function is RegExp', function() {\n      wrappedMethods.retValueRegExp();\n    });\n    it('test return value of function is Date', function() {\n      wrappedMethods.retValueDate();\n    });\n    it('test return value of function is Promise', function() {\n      wrappedMethods.retValuePromise();\n    });\n    it('test return value of function is Promise-Async', function() {\n      wrappedMethods.retValueAsync();\n    });\n  });\n  describe('test the type of arguments of function ', function() {\n    it('test arguments of function is Undefined', function() {\n      wrappedMethods.argsUndefined(undefined);\n    });\n    it('test arguments of function is Undefined', function() {\n      wrappedMethods.argsNumber(4);\n\n    });\n    it('test arguments of function is String', function() {\n      wrappedMethods.argsString('this is string');\n\n    });\n    it('test arguments of function is Boolean', function() {\n      wrappedMethods.argsBoolean(true);\n\n    });\n    it('test arguments of function is Object', function() {\n      wrappedMethods.argsObject({});\n\n    });\n    it('test arguments of function is Array', function() {\n      wrappedMethods.argsArray([]);\n\n    });\n    it('test arguments of function is RegExp', function() {\n      wrappedMethods.argsRegexp(/reg/);\n    });\n    it('test arguments of function is Date', function() {\n      wrappedMethods.argsDate(new Date());\n    });\n    it('test arguments of function is Promise', function() {\n      wrappedMethods.argsAsync((async function a() {})());\n      wrappedMethods.argsPromsie(new Promise(() => {}));\n    });\n    it('test arguments of function is nullable', function() {\n      wrappedMethods.argsNullable(null);\n      wrappedMethods.argsNullable(undefined);\n      wrappedMethods.argsNullable();\n\n    });\n    // nullable数据类型必须在实际传参的时候有个占位；\n    it('test arguments of function is Mixins', function() {\n      wrappedMethods.argsMixins(1, {}, 'str');\n      wrappedMethods.argsMixins(1, null, 'str');\n      wrappedMethods.argsMixins(1, undefined, 'str');\n    });\n  })\n})\n"
  },
  {
    "path": "packages/interface-loader/test/lib.test/check.test.js",
    "content": "const {getCode} = require('../../src/lib/check.js');\nconst expect = require('chai').expect;\n\nlet code = `\ninterface Interface1Interface {\n  getMsg(msg: String): String;\n}\nclass Method implements Interface1Interface {\n  getMsg(msg) {\n    return 'web:' + msg;\n  }\n}\n\nexport default new Method();\n`\n\nlet result = getCode(code,{\n  cmlType: 'wx',\n  filePath: '/user/name.cml',\n  enableTypes: []\n})\n\ndescribe('check.js wx', function() {\n  it('getCode', function() {\n    expect(!!~result.indexOf('export default __OBJECT__WRAPPER__')).to.be.equal(true);\n  })\n})\n\n\nlet result2 = getCode(code,{\n  cmlType: 'weex',\n  filePath: '/user/name.cml',\n  enableTypes: []\n})\n\ndescribe('check.js weex', function() {\n  it('getCode', function() {\n    expect(!!~result2.indexOf('export default __OBJECT__WRAPPER__')).to.be.equal(true);\n  })\n})\n"
  },
  {
    "path": "packages/interface-loader/test/lib.test/generator.test.js",
    "content": "/**\n * 对check方法进行包装  处理flow的语法\n */\nconst check = require('../../src/lib/check.js');\n/* eslint-disable no-unused-vars */\nconst generate = require(\"babel-generator\");\nconst flow = require('babel-preset-flow');\n/* eslint-disable no-unused-vars */\nvar babel = require(\"babel-core\");\nconst path = require('path');\n\nfunction generator(code, cb) {\n  let result;\n  result = check.getCode(code, {\n    cmlType: 'web',\n    filePath: '/Users/didi/Documents/cml/chameleon-cli',\n    enableTypes: ['Nullable', 'Object', 'Array']\n  });\n\n  result = babel.transform(result, {\n    presets: [\n      'flow'\n    ],\n    babelrc: false,\n    filename: path.join(__dirname)\n  })\n  return result.code;\n}\n\nmodule.exports = generator\n"
  },
  {
    "path": "packages/interface-loader/test/lib.test/interface.test",
    "content": "interface EntryInterface {\n  retValueUndefind():Undefined;\n  retValueNumber():Number;\n  retValueString():String;\n  retValueBoolean():Boolean;\n  retValueObject():Object;\n  retValueArray():Array;\n  retValueRegExp():RegExp;\n  retValueDate():Date;\n  retValuePromise():Promise;\n  retValueAsync():Promise;\n  retValueFunction():Function;\n\n  argsUndefined(arg:Undefined):Undefined;\n  argsNumber(arg:Number):Undefined;\n  argsString(arg:String):Undefined;\n  argsBoolean(arg:Boolean):Undefined;\n  argsObject(arg:Object):Undefined;\n  argsArray(arg:Array):Undefined;\n  argsRegexp(arg:RegExp):Undefined;\n  argsDate(arg:Date):Undefined;\n  argsPromsie(arg:Promise):Undefined;\n  argsAsync(arg:Promise):Undefined;\n  argsNullable(arg:?Number):Undefined;\n  argsMixins(arg1:Number,arg2:?Object,arg3:String):Undefined;\n\n}\n\n\nclass Method implements EntryInterface {\n  retValueUndefind(){\n    return undefined;\n  };\n  retValueNumber(){\n    return 8;\n  };\n  retValueString(){\n    return 'this is string'\n  };\n  retValueBoolean(){\n    return true;\n  };\n  retValueObject(){\n    return {};\n  };\n  retValueArray(){\n    return [1,2,3];\n  };\n  retValueRegExp(){\n    return /reg/g;\n  };\n  retValueDate(){\n    return new Date();\n  };\n  retValuePromise(){\n    return new Promise(() => {});\n  };\n  async retValueAsync(){\n  };\n  retValueFunction(){\n    return function(){}\n  };\n\n  argsUndefined(arg){};\n  argsNumber(arg){};\n  argsString(arg){};\n  argsBoolean(arg){};\n  argsObject(arg){};\n  argsArray(arg){};\n  argsRegexp(arg){};\n  argsDate(arg){};\n  argsPromsie(arg){};\n  argsAsync(arg){};\n  argsNullable(arg){};\n\n  argsMixins(arg1,arg2,arg3){};\n\n  \n}\n\nexport default new Method();"
  },
  {
    "path": "packages/mvvm-babel-generator/LICENSE",
    "content": "MIT License\n\nCopyright (c) 2014-present Sebastian McKenzie and other contributors\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "packages/mvvm-babel-generator/lib/buffer.js",
    "content": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\n\nfunction _trimRight() {\n  const data = _interopRequireDefault(require(\"trim-right\"));\n\n  _trimRight = function () {\n    return data;\n  };\n\n  return data;\n}\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst SPACES_RE = /^[ \\t]+$/;\n\nclass Buffer {\n  constructor(map) {\n    this._map = null;\n    this._buf = [];\n    this._last = \"\";\n    this._queue = [];\n    this._position = {\n      line: 1,\n      column: 0\n    };\n    this._sourcePosition = {\n      identifierName: null,\n      line: null,\n      column: null,\n      filename: null\n    };\n    this._disallowedPop = null;\n    this._map = map;\n  }\n\n  get() {\n    this._flush();\n\n    const map = this._map;\n    const result = {\n      code: (0, _trimRight().default)(this._buf.join(\"\")),\n      map: null,\n      rawMappings: map && map.getRawMappings()\n    };\n\n    if (map) {\n      Object.defineProperty(result, \"map\", {\n        configurable: true,\n        enumerable: true,\n\n        get() {\n          return this.map = map.get();\n        },\n\n        set(value) {\n          Object.defineProperty(this, \"map\", {\n            value,\n            writable: true\n          });\n        }\n\n      });\n    }\n\n    return result;\n  }\n\n  append(str) {\n    this._flush();\n\n    const {\n      line,\n      column,\n      filename,\n      identifierName,\n      force\n    } = this._sourcePosition;\n\n    this._append(str, line, column, identifierName, filename, force);\n  }\n\n  queue(str) {\n    if (str === \"\\n\") {\n      while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) {\n        this._queue.shift();\n      }\n    }\n\n    const {\n      line,\n      column,\n      filename,\n      identifierName,\n      force\n    } = this._sourcePosition;\n\n    this._queue.unshift([str, line, column, identifierName, filename, force]);\n  }\n\n  _flush() {\n    let item;\n\n    while (item = this._queue.pop()) this._append(...item);\n  }\n\n  _append(str, line, column, identifierName, filename, force) {\n    if (this._map && str[0] !== \"\\n\") {\n      this._map.mark(this._position.line, this._position.column, line, column, identifierName, filename, force);\n    }\n\n    this._buf.push(str);\n\n    this._last = str[str.length - 1];\n\n    for (let i = 0; i < str.length; i++) {\n      if (str[i] === \"\\n\") {\n        this._position.line++;\n        this._position.column = 0;\n      } else {\n        this._position.column++;\n      }\n    }\n  }\n\n  removeTrailingNewline() {\n    if (this._queue.length > 0 && this._queue[0][0] === \"\\n\") {\n      this._queue.shift();\n    }\n  }\n\n  removeLastSemicolon() {\n    if (this._queue.length > 0 && this._queue[0][0] === \";\") {\n      this._queue.shift();\n    }\n  }\n\n  endsWith(suffix) {\n    if (suffix.length === 1) {\n      let last;\n\n      if (this._queue.length > 0) {\n        const str = this._queue[0][0];\n        last = str[str.length - 1];\n      } else {\n        last = this._last;\n      }\n\n      return last === suffix;\n    }\n\n    const end = this._last + this._queue.reduce((acc, item) => item[0] + acc, \"\");\n\n    if (suffix.length <= end.length) {\n      return end.slice(-suffix.length) === suffix;\n    }\n\n    return false;\n  }\n\n  hasContent() {\n    return this._queue.length > 0 || !!this._last;\n  }\n\n  exactSource(loc, cb) {\n    this.source(\"start\", loc, true);\n    cb();\n    this.source(\"end\", loc);\n\n    this._disallowPop(\"start\", loc);\n  }\n\n  source(prop, loc, force) {\n    if (prop && !loc) return;\n\n    this._normalizePosition(prop, loc, this._sourcePosition, force);\n  }\n\n  withSource(prop, loc, cb) {\n    if (!this._map) return cb();\n    const originalLine = this._sourcePosition.line;\n    const originalColumn = this._sourcePosition.column;\n    const originalFilename = this._sourcePosition.filename;\n    const originalIdentifierName = this._sourcePosition.identifierName;\n    this.source(prop, loc);\n    cb();\n\n    if ((!this._sourcePosition.force || this._sourcePosition.line !== originalLine || this._sourcePosition.column !== originalColumn || this._sourcePosition.filename !== originalFilename) && (!this._disallowedPop || this._disallowedPop.line !== originalLine || this._disallowedPop.column !== originalColumn || this._disallowedPop.filename !== originalFilename)) {\n      this._sourcePosition.line = originalLine;\n      this._sourcePosition.column = originalColumn;\n      this._sourcePosition.filename = originalFilename;\n      this._sourcePosition.identifierName = originalIdentifierName;\n      this._sourcePosition.force = false;\n      this._disallowedPop = null;\n    }\n  }\n\n  _disallowPop(prop, loc) {\n    if (prop && !loc) return;\n    this._disallowedPop = this._normalizePosition(prop, loc);\n  }\n\n  _normalizePosition(prop, loc, targetObj, force) {\n    const pos = loc ? loc[prop] : null;\n\n    if (targetObj === undefined) {\n      targetObj = {\n        identifierName: null,\n        line: null,\n        column: null,\n        filename: null,\n        force: false\n      };\n    }\n\n    const origLine = targetObj.line;\n    const origColumn = targetObj.column;\n    const origFilename = targetObj.filename;\n    targetObj.identifierName = prop === \"start\" && loc && loc.identifierName || null;\n    targetObj.line = pos ? pos.line : null;\n    targetObj.column = pos ? pos.column : null;\n    targetObj.filename = loc && loc.filename || null;\n\n    if (force || targetObj.line !== origLine || targetObj.column !== origColumn || targetObj.filename !== origFilename) {\n      targetObj.force = force;\n    }\n\n    return targetObj;\n  }\n\n  getCurrentColumn() {\n    const extra = this._queue.reduce((acc, item) => item[0] + acc, \"\");\n\n    const lastIndex = extra.lastIndexOf(\"\\n\");\n    return lastIndex === -1 ? this._position.column + extra.length : extra.length - 1 - lastIndex;\n  }\n\n  getCurrentLine() {\n    const extra = this._queue.reduce((acc, item) => item[0] + acc, \"\");\n\n    let count = 0;\n\n    for (let i = 0; i < extra.length; i++) {\n      if (extra[i] === \"\\n\") count++;\n    }\n\n    return this._position.line + count;\n  }\n\n}\n\nexports.default = Buffer;"
  },
  {
    "path": "packages/mvvm-babel-generator/lib/generators/base.js",
    "content": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.File = File;\nexports.Program = Program;\nexports.BlockStatement = BlockStatement;\nexports.Noop = Noop;\nexports.Directive = Directive;\nexports.DirectiveLiteral = DirectiveLiteral;\nexports.InterpreterDirective = InterpreterDirective;\n\nfunction File(node) {\n  if (node.program) {\n    this.print(node.program.interpreter, node);\n  }\n\n  this.print(node.program, node);\n}\n\nfunction Program(node) {\n  this.printInnerComments(node, false);\n  this.printSequence(node.directives, node);\n  if (node.directives && node.directives.length) this.newline();\n  this.printSequence(node.body, node);\n}\n\nfunction BlockStatement(node) {\n  this.token(\"{\");\n  this.printInnerComments(node);\n  const hasDirectives = node.directives && node.directives.length;\n\n  if (node.body.length || hasDirectives) {\n    this.newline();\n    this.printSequence(node.directives, node, {\n      indent: true\n    });\n    if (hasDirectives) this.newline();\n    this.printSequence(node.body, node, {\n      indent: true\n    });\n    this.removeTrailingNewline();\n    this.source(\"end\", node.loc);\n    if (!this.endsWith(\"\\n\")) this.newline();\n    this.rightBrace();\n  } else {\n    this.source(\"end\", node.loc);\n    this.token(\"}\");\n  }\n}\n\nfunction Noop() {}\n\nfunction Directive(node) {\n  this.print(node.value, node);\n  this.semicolon();\n}\n\nconst unescapedSingleQuoteRE = /(?:^|[^\\\\])(?:\\\\\\\\)*'/;\nconst unescapedDoubleQuoteRE = /(?:^|[^\\\\])(?:\\\\\\\\)*\"/;\n\nfunction DirectiveLiteral(node) {\n  const raw = this.getPossibleRaw(node);\n\n  if (raw != null) {\n    this.token(raw);\n    return;\n  }\n\n  const {\n    value\n  } = node;\n\n  if (!unescapedDoubleQuoteRE.test(value)) {\n    this.token(`\"${value}\"`);\n  } else if (!unescapedSingleQuoteRE.test(value)) {\n    this.token(`'${value}'`);\n  } else {\n    throw new Error(\"Malformed AST: it is not possible to print a directive containing\" + \" both unescaped single and double quotes.\");\n  }\n}\n\nfunction InterpreterDirective(node) {\n  this.token(`#!${node.value}\\n`);\n}"
  },
  {
    "path": "packages/mvvm-babel-generator/lib/generators/classes.js",
    "content": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.ClassExpression = exports.ClassDeclaration = ClassDeclaration;\nexports.ClassBody = ClassBody;\nexports.ClassProperty = ClassProperty;\nexports.ClassPrivateProperty = ClassPrivateProperty;\nexports.ClassMethod = ClassMethod;\nexports.ClassPrivateMethod = ClassPrivateMethod;\nexports._classMethodHead = _classMethodHead;\n\nfunction t() {\n  const data = _interopRequireWildcard(require(\"@babel/types/lib\"));\n\n  t = function () {\n    return data;\n  };\n\n  return data;\n}\n\nfunction _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; } }\n\nfunction ClassDeclaration(node, parent) {\n  if (!this.format.decoratorsBeforeExport || !t().isExportDefaultDeclaration(parent) && !t().isExportNamedDeclaration(parent)) {\n    this.printJoin(node.decorators, node);\n  }\n\n  if (node.declare) {\n    this.word(\"declare\");\n    this.space();\n  }\n\n  if (node.abstract) {\n    this.word(\"abstract\");\n    this.space();\n  }\n\n  this.word(\"class\");\n\n  if (node.id) {\n    this.space();\n    this.print(node.id, node);\n  }\n\n  this.print(node.typeParameters, node);\n\n  if (node.superClass) {\n    this.space();\n    this.word(\"extends\");\n    this.space();\n    this.print(node.superClass, node);\n    this.print(node.superTypeParameters, node);\n  }\n\n  if (node.implements) {\n    this.space();\n    this.word(\"implements\");\n    this.space();\n    this.printList(node.implements, node);\n  }\n\n  this.space();\n  this.print(node.body, node);\n}\n\nfunction ClassBody(node) {\n  this.token(\"{\");\n  this.printInnerComments(node);\n\n  if (node.body.length === 0) {\n    this.token(\"}\");\n  } else {\n    this.newline();\n    this.indent();\n    this.printSequence(node.body, node);\n    this.dedent();\n    if (!this.endsWith(\"\\n\")) this.newline();\n    this.rightBrace();\n  }\n}\n\nfunction ClassProperty(node) {\n  this.printJoin(node.decorators, node);\n\n  if (node.accessibility) {\n    this.word(node.accessibility);\n    this.space();\n  }\n\n  if (node.static) {\n    this.word(\"static\");\n    this.space();\n  }\n\n  if (node.abstract) {\n    this.word(\"abstract\");\n    this.space();\n  }\n\n  if (node.readonly) {\n    this.word(\"readonly\");\n    this.space();\n  }\n\n  if (node.computed) {\n    this.token(\"[\");\n    this.print(node.key, node);\n    this.token(\"]\");\n  } else {\n    this._variance(node);\n\n    this.print(node.key, node);\n  }\n\n  if (node.optional) {\n    this.token(\"?\");\n  }\n\n  if (node.definite) {\n    this.token(\"!\");\n  }\n\n  this.print(node.typeAnnotation, node);\n\n  if (node.value) {\n    this.space();\n    this.token(\"=\");\n    this.space();\n    this.print(node.value, node);\n  }\n\n  this.semicolon();\n}\n\nfunction ClassPrivateProperty(node) {\n  if (node.static) {\n    this.word(\"static\");\n    this.space();\n  }\n\n  this.print(node.key, node);\n  this.print(node.typeAnnotation, node);\n\n  if (node.value) {\n    this.space();\n    this.token(\"=\");\n    this.space();\n    this.print(node.value, node);\n  }\n\n  this.semicolon();\n}\n\nfunction ClassMethod(node) {\n  this._classMethodHead(node);\n\n  this.space();\n  this.print(node.body, node);\n}\n\nfunction ClassPrivateMethod(node) {\n  this._classMethodHead(node);\n\n  this.space();\n  this.print(node.body, node);\n}\n\nfunction _classMethodHead(node) {\n  this.printJoin(node.decorators, node);\n\n  if (node.accessibility) {\n    this.word(node.accessibility);\n    this.space();\n  }\n\n  if (node.abstract) {\n    this.word(\"abstract\");\n    this.space();\n  }\n\n  if (node.static) {\n    this.word(\"static\");\n    this.space();\n  }\n\n  this._methodHead(node);\n}"
  },
  {
    "path": "packages/mvvm-babel-generator/lib/generators/expressions.js",
    "content": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.UnaryExpression = UnaryExpression;\nexports.DoExpression = DoExpression;\nexports.ParenthesizedExpression = ParenthesizedExpression;\nexports.UpdateExpression = UpdateExpression;\nexports.ConditionalExpression = ConditionalExpression;\nexports.NewExpression = NewExpression;\nexports.SequenceExpression = SequenceExpression;\nexports.ThisExpression = ThisExpression;\nexports.Super = Super;\nexports.Decorator = Decorator;\nexports.OptionalMemberExpression = OptionalMemberExpression;\nexports.OptionalCallExpression = OptionalCallExpression;\nexports.CallExpression = CallExpression;\nexports.Import = Import;\nexports.EmptyStatement = EmptyStatement;\nexports.ExpressionStatement = ExpressionStatement;\nexports.AssignmentPattern = AssignmentPattern;\nexports.LogicalExpression = exports.BinaryExpression = exports.AssignmentExpression = AssignmentExpression;\nexports.BindExpression = BindExpression;\nexports.MemberExpression = MemberExpression;\nexports.MetaProperty = MetaProperty;\nexports.PrivateName = PrivateName;\nexports.AwaitExpression = exports.YieldExpression = void 0;\n\nfunction t() {\n  const data = _interopRequireWildcard(require(\"@babel/types/lib\"));\n\n  t = function () {\n    return data;\n  };\n\n  return data;\n}\n\nvar n = _interopRequireWildcard(require(\"../node\"));\n\nfunction _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; } }\n\nfunction UnaryExpression(node) {\n  if (node.operator === \"void\" || node.operator === \"delete\" || node.operator === \"typeof\" || node.operator === \"throw\") {\n    this.word(node.operator);\n    this.space();\n  } else {\n    this.token(node.operator);\n  }\n\n  this.print(node.argument, node);\n}\n\nfunction DoExpression(node) {\n  this.word(\"do\");\n  this.space();\n  this.print(node.body, node);\n}\n\nfunction ParenthesizedExpression(node) {\n  this.token(\"(\");\n  this.print(node.expression, node);\n  this.token(\")\");\n}\n\nfunction UpdateExpression(node) {\n  if (node.prefix) {\n    this.token(node.operator);\n    this.print(node.argument, node);\n  } else {\n    this.startTerminatorless(true);\n    this.print(node.argument, node);\n    this.endTerminatorless();\n    this.token(node.operator);\n  }\n}\n\nfunction ConditionalExpression(node) {\n  this.print(node.test, node);\n  this.space();\n  this.token(\"?\");\n  this.space();\n  this.print(node.consequent, node);\n  this.space();\n  this.token(\":\");\n  this.space();\n  this.print(node.alternate, node);\n}\n\nfunction NewExpression(node, parent) {\n  this.word(\"new\");\n  this.space();\n  this.print(node.callee, node);\n\n  if (this.format.minified && node.arguments.length === 0 && !node.optional && !t().isCallExpression(parent, {\n    callee: node\n  }) && !t().isMemberExpression(parent) && !t().isNewExpression(parent)) {\n    return;\n  }\n\n  this.print(node.typeArguments, node);\n  this.print(node.typeParameters, node);\n\n  if (node.optional) {\n    this.token(\"?.\");\n  }\n\n  this.token(\"(\");\n  this.printList(node.arguments, node);\n  this.token(\")\");\n}\n\nfunction SequenceExpression(node) {\n  this.printList(node.expressions, node);\n}\n\nfunction ThisExpression() {\n  this.word(\"this\");\n}\n\nfunction Super() {\n  this.word(\"super\");\n}\n\nfunction Decorator(node) {\n  this.token(\"@\");\n  this.print(node.expression, node);\n  this.newline();\n}\n\nfunction OptionalMemberExpression(node) {\n  this.print(node.object, node);\n\n  if (!node.computed && t().isMemberExpression(node.property)) {\n    throw new TypeError(\"Got a MemberExpression for MemberExpression property\");\n  }\n\n  let computed = node.computed;\n\n  if (t().isLiteral(node.property) && typeof node.property.value === \"number\") {\n    computed = true;\n  }\n\n  if (node.optional) {\n    this.token(\"?.\");\n  }\n\n  if (computed) {\n    this.token(\"[\");\n    this.print(node.property, node);\n    this.token(\"]\");\n  } else {\n    if (!node.optional) {\n      this.token(\".\");\n    }\n\n    this.print(node.property, node);\n  }\n}\n\nfunction OptionalCallExpression(node) {\n  this.print(node.callee, node);\n  this.print(node.typeArguments, node);\n  this.print(node.typeParameters, node);\n\n  if (node.optional) {\n    this.token(\"?.\");\n  }\n\n  this.token(\"(\");\n  this.printList(node.arguments, node);\n  this.token(\")\");\n}\n\nfunction CallExpression(node) {\n  this.print(node.callee, node);\n  this.print(node.typeArguments, node);\n  this.print(node.typeParameters, node);\n  this.token(\"(\");\n  this.printList(node.arguments, node);\n  this.token(\")\");\n}\n\nfunction Import() {\n  this.word(\"import\");\n}\n\nfunction buildYieldAwait(keyword) {\n  return function (node) {\n    this.word(keyword);\n\n    if (node.delegate) {\n      this.token(\"*\");\n    }\n\n    if (node.argument) {\n      this.space();\n      const terminatorState = this.startTerminatorless();\n      this.print(node.argument, node);\n      this.endTerminatorless(terminatorState);\n    }\n  };\n}\n\nconst YieldExpression = buildYieldAwait(\"yield\");\nexports.YieldExpression = YieldExpression;\nconst AwaitExpression = buildYieldAwait(\"await\");\nexports.AwaitExpression = AwaitExpression;\n\nfunction EmptyStatement() {\n  this.semicolon(true);\n}\n\nfunction ExpressionStatement(node) {\n  this.print(node.expression, node);\n  this.semicolon();\n}\n\nfunction AssignmentPattern(node) {\n  this.print(node.left, node);\n  if (node.left.optional) this.token(\"?\");\n  this.print(node.left.typeAnnotation, node);\n  this.space();\n  this.token(\"=\");\n  this.space();\n  this.print(node.right, node);\n}\n\nfunction AssignmentExpression(node, parent) {\n  const parens = this.inForStatementInitCounter && node.operator === \"in\" && !n.needsParens(node, parent);\n\n  if (parens) {\n    this.token(\"(\");\n  }\n\n  this.print(node.left, node);\n  this.space();\n\n  if (node.operator === \"in\" || node.operator === \"instanceof\") {\n    this.word(node.operator);\n  } else {\n    this.token(node.operator);\n  }\n\n  this.space();\n  this.print(node.right, node);\n\n  if (parens) {\n    this.token(\")\");\n  }\n}\n\nfunction BindExpression(node) {\n  this.print(node.object, node);\n  this.token(\"::\");\n  this.print(node.callee, node);\n}\n\nfunction MemberExpression(node) {\n  this.print(node.object, node);\n\n  if (!node.computed && t().isMemberExpression(node.property)) {\n    throw new TypeError(\"Got a MemberExpression for MemberExpression property\");\n  }\n\n  let computed = node.computed;\n\n  if (t().isLiteral(node.property) && typeof node.property.value === \"number\") {\n    computed = true;\n  }\n\n  if (computed) {\n    this.token(\"[\");\n    this.print(node.property, node);\n    this.token(\"]\");\n  } else {\n    this.token(\".\");\n    this.print(node.property, node);\n  }\n}\n\nfunction MetaProperty(node) {\n  this.print(node.meta, node);\n  this.token(\".\");\n  this.print(node.property, node);\n}\n\nfunction PrivateName(node) {\n  this.token(\"#\");\n  this.print(node.id, node);\n}"
  },
  {
    "path": "packages/mvvm-babel-generator/lib/generators/flow.js",
    "content": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.AnyTypeAnnotation = AnyTypeAnnotation;\nexports.ArrayTypeAnnotation = ArrayTypeAnnotation;\nexports.BooleanTypeAnnotation = BooleanTypeAnnotation;\nexports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation;\nexports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation;\nexports.DeclareClass = DeclareClass;\nexports.DeclareFunction = DeclareFunction;\nexports.InferredPredicate = InferredPredicate;\nexports.DeclaredPredicate = DeclaredPredicate;\nexports.DeclareInterface = DeclareInterface;\nexports.DeclareModule = DeclareModule;\nexports.DeclareModuleExports = DeclareModuleExports;\nexports.DeclareTypeAlias = DeclareTypeAlias;\nexports.DeclareOpaqueType = DeclareOpaqueType;\nexports.DeclareVariable = DeclareVariable;\nexports.DeclareExportDeclaration = DeclareExportDeclaration;\nexports.DeclareExportAllDeclaration = DeclareExportAllDeclaration;\nexports.ExistsTypeAnnotation = ExistsTypeAnnotation;\nexports.FunctionTypeAnnotation = FunctionTypeAnnotation;\nexports.FunctionTypeParam = FunctionTypeParam;\nexports.GenericTypeAnnotation = exports.ClassImplements = exports.InterfaceExtends = InterfaceExtends;\nexports._interfaceish = _interfaceish;\nexports._variance = _variance;\nexports.InterfaceDeclaration = InterfaceDeclaration;\nexports.InterfaceTypeAnnotation = InterfaceTypeAnnotation;\nexports.IntersectionTypeAnnotation = IntersectionTypeAnnotation;\nexports.MixedTypeAnnotation = MixedTypeAnnotation;\nexports.EmptyTypeAnnotation = EmptyTypeAnnotation;\nexports.NullableTypeAnnotation = NullableTypeAnnotation;\nexports.NumberTypeAnnotation = NumberTypeAnnotation;\nexports.StringTypeAnnotation = StringTypeAnnotation;\nexports.ThisTypeAnnotation = ThisTypeAnnotation;\nexports.TupleTypeAnnotation = TupleTypeAnnotation;\nexports.TypeofTypeAnnotation = TypeofTypeAnnotation;\nexports.TypeAlias = TypeAlias;\nexports.TypeAnnotation = TypeAnnotation;\nexports.TypeParameterDeclaration = exports.TypeParameterInstantiation = TypeParameterInstantiation;\nexports.TypeParameter = TypeParameter;\nexports.OpaqueType = OpaqueType;\nexports.ObjectTypeAnnotation = ObjectTypeAnnotation;\nexports.ObjectTypeInternalSlot = ObjectTypeInternalSlot;\nexports.ObjectTypeCallProperty = ObjectTypeCallProperty;\nexports.ObjectTypeIndexer = ObjectTypeIndexer;\nexports.ObjectTypeProperty = ObjectTypeProperty;\nexports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty;\nexports.QualifiedTypeIdentifier = QualifiedTypeIdentifier;\nexports.UnionTypeAnnotation = UnionTypeAnnotation;\nexports.TypeCastExpression = TypeCastExpression;\nexports.Variance = Variance;\nexports.VoidTypeAnnotation = VoidTypeAnnotation;\nObject.defineProperty(exports, \"NumberLiteralTypeAnnotation\", {\n  enumerable: true,\n  get: function () {\n    return _types2.NumericLiteral;\n  }\n});\nObject.defineProperty(exports, \"StringLiteralTypeAnnotation\", {\n  enumerable: true,\n  get: function () {\n    return _types2.StringLiteral;\n  }\n});\n\nfunction t() {\n  const data = _interopRequireWildcard(require(\"@babel/types/lib\"));\n\n  t = function () {\n    return data;\n  };\n\n  return data;\n}\n\nvar _modules = require(\"./modules\");\n\nvar _types2 = require(\"./types\");\n\nfunction _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; } }\n\nfunction AnyTypeAnnotation() {\n  this.word(\"any\");\n}\n\nfunction ArrayTypeAnnotation(node) {\n  this.print(node.elementType, node);\n  this.token(\"[\");\n  this.token(\"]\");\n}\n\nfunction BooleanTypeAnnotation() {\n  this.word(\"boolean\");\n}\n\nfunction BooleanLiteralTypeAnnotation(node) {\n  this.word(node.value ? \"true\" : \"false\");\n}\n\nfunction NullLiteralTypeAnnotation() {\n  this.word(\"null\");\n}\n\nfunction DeclareClass(node, parent) {\n  if (!t().isDeclareExportDeclaration(parent)) {\n    this.word(\"declare\");\n    this.space();\n  }\n\n  this.word(\"class\");\n  this.space();\n\n  this._interfaceish(node);\n}\n\nfunction DeclareFunction(node, parent) {\n  if (!t().isDeclareExportDeclaration(parent)) {\n    this.word(\"declare\");\n    this.space();\n  }\n\n  this.word(\"function\");\n  this.space();\n  this.print(node.id, node);\n  this.print(node.id.typeAnnotation.typeAnnotation, node);\n\n  if (node.predicate) {\n    this.space();\n    this.print(node.predicate, node);\n  }\n\n  this.semicolon();\n}\n\nfunction InferredPredicate() {\n  this.token(\"%\");\n  this.word(\"checks\");\n}\n\nfunction DeclaredPredicate(node) {\n  this.token(\"%\");\n  this.word(\"checks\");\n  this.token(\"(\");\n  this.print(node.value, node);\n  this.token(\")\");\n}\n\nfunction DeclareInterface(node) {\n  this.word(\"declare\");\n  this.space();\n  this.InterfaceDeclaration(node);\n}\n\nfunction DeclareModule(node) {\n  this.word(\"declare\");\n  this.space();\n  this.word(\"module\");\n  this.space();\n  this.print(node.id, node);\n  this.space();\n  this.print(node.body, node);\n}\n\nfunction DeclareModuleExports(node) {\n  this.word(\"declare\");\n  this.space();\n  this.word(\"module\");\n  this.token(\".\");\n  this.word(\"exports\");\n  this.print(node.typeAnnotation, node);\n}\n\nfunction DeclareTypeAlias(node) {\n  this.word(\"declare\");\n  this.space();\n  this.TypeAlias(node);\n}\n\nfunction DeclareOpaqueType(node, parent) {\n  if (!t().isDeclareExportDeclaration(parent)) {\n    this.word(\"declare\");\n    this.space();\n  }\n\n  this.OpaqueType(node);\n}\n\nfunction DeclareVariable(node, parent) {\n  if (!t().isDeclareExportDeclaration(parent)) {\n    this.word(\"declare\");\n    this.space();\n  }\n\n  this.word(\"var\");\n  this.space();\n  this.print(node.id, node);\n  this.print(node.id.typeAnnotation, node);\n  this.semicolon();\n}\n\nfunction DeclareExportDeclaration(node) {\n  this.word(\"declare\");\n  this.space();\n  this.word(\"export\");\n  this.space();\n\n  if (node.default) {\n    this.word(\"default\");\n    this.space();\n  }\n\n  FlowExportDeclaration.apply(this, arguments);\n}\n\nfunction DeclareExportAllDeclaration() {\n  this.word(\"declare\");\n  this.space();\n\n  _modules.ExportAllDeclaration.apply(this, arguments);\n}\n\nfunction FlowExportDeclaration(node) {\n  if (node.declaration) {\n    const declar = node.declaration;\n    this.print(declar, node);\n    if (!t().isStatement(declar)) this.semicolon();\n  } else {\n    this.token(\"{\");\n\n    if (node.specifiers.length) {\n      this.space();\n      this.printList(node.specifiers, node);\n      this.space();\n    }\n\n    this.token(\"}\");\n\n    if (node.source) {\n      this.space();\n      this.word(\"from\");\n      this.space();\n      this.print(node.source, node);\n    }\n\n    this.semicolon();\n  }\n}\n\nfunction ExistsTypeAnnotation() {\n  this.token(\"*\");\n}\n\nfunction FunctionTypeAnnotation(node, parent) {\n  this.print(node.typeParameters, node);\n  this.token(\"(\");\n  this.printList(node.params, node);\n\n  if (node.rest) {\n    if (node.params.length) {\n      this.token(\",\");\n      this.space();\n    }\n\n    this.token(\"...\");\n    this.print(node.rest, node);\n  }\n\n  this.token(\")\");\n\n  if (parent.type === \"ObjectTypeCallProperty\" || parent.type === \"DeclareFunction\" || parent.type === \"ObjectTypeProperty\" && parent.method) {\n    this.token(\":\");\n  } else {\n    this.space();\n    this.token(\"=>\");\n  }\n\n  this.space();\n  this.print(node.returnType, node);\n}\n\nfunction FunctionTypeParam(node) {\n  this.print(node.name, node);\n  if (node.optional) this.token(\"?\");\n\n  if (node.name) {\n    this.token(\":\");\n    this.space();\n  }\n\n  this.print(node.typeAnnotation, node);\n}\n\nfunction InterfaceExtends(node) {\n  this.print(node.id, node);\n  this.print(node.typeParameters, node);\n}\n\nfunction _interfaceish(node) {\n  this.print(node.id, node);\n  this.print(node.typeParameters, node);\n\n  if (node.extends.length) {\n    this.space();\n    this.word(\"extends\");\n    this.space();\n    this.printList(node.extends, node);\n  }\n\n  if (node.mixins && node.mixins.length) {\n    this.space();\n    this.word(\"mixins\");\n    this.space();\n    this.printList(node.mixins, node);\n  }\n\n  if (node.implements && node.implements.length) {\n    this.space();\n    this.word(\"implements\");\n    this.space();\n    this.printList(node.implements, node);\n  }\n\n  this.space();\n  this.print(node.body, node);\n}\n\nfunction _variance(node) {\n  if (node.variance) {\n    if (node.variance.kind === \"plus\") {\n      this.token(\"+\");\n    } else if (node.variance.kind === \"minus\") {\n      this.token(\"-\");\n    }\n  }\n}\n\nfunction InterfaceDeclaration(node) {\n  this.word(\"interface\");\n  this.space();\n\n  this._interfaceish(node);\n}\n\nfunction andSeparator() {\n  this.space();\n  this.token(\"&\");\n  this.space();\n}\n\nfunction InterfaceTypeAnnotation(node) {\n  this.word(\"interface\");\n\n  if (node.extends && node.extends.length) {\n    this.space();\n    this.word(\"extends\");\n    this.space();\n    this.printList(node.extends, node);\n  }\n\n  this.space();\n  this.print(node.body, node);\n}\n\nfunction IntersectionTypeAnnotation(node) {\n  this.printJoin(node.types, node, {\n    separator: andSeparator\n  });\n}\n\nfunction MixedTypeAnnotation() {\n  this.word(\"mixed\");\n}\n\nfunction EmptyTypeAnnotation() {\n  this.word(\"empty\");\n}\n\nfunction NullableTypeAnnotation(node) {\n  this.token(\"?\");\n  this.print(node.typeAnnotation, node);\n}\n\nfunction NumberTypeAnnotation() {\n  this.word(\"number\");\n}\n\nfunction StringTypeAnnotation() {\n  this.word(\"string\");\n}\n\nfunction ThisTypeAnnotation() {\n  this.word(\"this\");\n}\n\nfunction TupleTypeAnnotation(node) {\n  this.token(\"[\");\n  this.printList(node.types, node);\n  this.token(\"]\");\n}\n\nfunction TypeofTypeAnnotation(node) {\n  this.word(\"typeof\");\n  this.space();\n  this.print(node.argument, node);\n}\n\nfunction TypeAlias(node) {\n  this.word(\"type\");\n  this.space();\n  this.print(node.id, node);\n  this.print(node.typeParameters, node);\n  this.space();\n  this.token(\"=\");\n  this.space();\n  this.print(node.right, node);\n  this.semicolon();\n}\n\nfunction TypeAnnotation(node) {\n  this.token(\":\");\n  this.space();\n  if (node.optional) this.token(\"?\");\n  this.print(node.typeAnnotation, node);\n}\n\nfunction TypeParameterInstantiation(node) {\n  this.token(\"<\");\n  this.printList(node.params, node, {});\n  this.token(\">\");\n}\n\nfunction TypeParameter(node) {\n  this._variance(node);\n\n  this.word(node.name);\n\n  if (node.bound) {\n    this.print(node.bound, node);\n  }\n\n  if (node.default) {\n    this.space();\n    this.token(\"=\");\n    this.space();\n    this.print(node.default, node);\n  }\n}\n\nfunction OpaqueType(node) {\n  this.word(\"opaque\");\n  this.space();\n  this.word(\"type\");\n  this.space();\n  this.print(node.id, node);\n  this.print(node.typeParameters, node);\n\n  if (node.supertype) {\n    this.token(\":\");\n    this.space();\n    this.print(node.supertype, node);\n  }\n\n  if (node.impltype) {\n    this.space();\n    this.token(\"=\");\n    this.space();\n    this.print(node.impltype, node);\n  }\n\n  this.semicolon();\n}\n\nfunction ObjectTypeAnnotation(node) {\n  if (node.exact) {\n    this.token(\"{|\");\n  } else {\n    this.token(\"{\");\n  }\n\n  const props = node.properties.concat(node.callProperties || [], node.indexers || [], node.internalSlots || []);\n\n  if (props.length) {\n    this.space();\n    this.printJoin(props, node, {\n      addNewlines(leading) {\n        if (leading && !props[0]) return 1;\n      },\n\n      indent: true,\n      statement: true,\n      iterator: () => {\n        if (props.length !== 1) {\n          this.token(\",\");\n          this.space();\n        }\n      }\n    });\n    this.space();\n  }\n\n  if (node.exact) {\n    this.token(\"|}\");\n  } else {\n    this.token(\"}\");\n  }\n}\n\nfunction ObjectTypeInternalSlot(node) {\n  if (node.static) {\n    this.word(\"static\");\n    this.space();\n  }\n\n  this.token(\"[\");\n  this.token(\"[\");\n  this.print(node.id, node);\n  this.token(\"]\");\n  this.token(\"]\");\n  if (node.optional) this.token(\"?\");\n\n  if (!node.method) {\n    this.token(\":\");\n    this.space();\n  }\n\n  this.print(node.value, node);\n}\n\nfunction ObjectTypeCallProperty(node) {\n  if (node.static) {\n    this.word(\"static\");\n    this.space();\n  }\n\n  this.print(node.value, node);\n}\n\nfunction ObjectTypeIndexer(node) {\n  if (node.static) {\n    this.word(\"static\");\n    this.space();\n  }\n\n  this._variance(node);\n\n  this.token(\"[\");\n\n  if (node.id) {\n    this.print(node.id, node);\n    this.token(\":\");\n    this.space();\n  }\n\n  this.print(node.key, node);\n  this.token(\"]\");\n  this.token(\":\");\n  this.space();\n  this.print(node.value, node);\n}\n\nfunction ObjectTypeProperty(node) {\n  if (node.proto) {\n    this.word(\"proto\");\n    this.space();\n  }\n\n  if (node.static) {\n    this.word(\"static\");\n    this.space();\n  }\n\n  this._variance(node);\n\n  this.print(node.key, node);\n  if (node.optional) this.token(\"?\");\n\n  if (!node.method) {\n    this.token(\":\");\n    this.space();\n  }\n\n  this.print(node.value, node);\n}\n\nfunction ObjectTypeSpreadProperty(node) {\n  this.token(\"...\");\n  this.print(node.argument, node);\n}\n\nfunction QualifiedTypeIdentifier(node) {\n  this.print(node.qualification, node);\n  this.token(\".\");\n  this.print(node.id, node);\n}\n\nfunction orSeparator() {\n  this.space();\n  this.token(\"|\");\n  this.space();\n}\n\nfunction UnionTypeAnnotation(node) {\n  this.printJoin(node.types, node, {\n    separator: orSeparator\n  });\n}\n\nfunction TypeCastExpression(node) {\n  this.token(\"(\");\n  this.print(node.expression, node);\n  this.print(node.typeAnnotation, node);\n  this.token(\")\");\n}\n\nfunction Variance(node) {\n  if (node.kind === \"plus\") {\n    this.token(\"+\");\n  } else {\n    this.token(\"-\");\n  }\n}\n\nfunction VoidTypeAnnotation() {\n  this.word(\"void\");\n}"
  },
  {
    "path": "packages/mvvm-babel-generator/lib/generators/index.js",
    "content": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\n\nvar _templateLiterals = require(\"./template-literals\");\n\nObject.keys(_templateLiterals).forEach(function (key) {\n  if (key === \"default\" || key === \"__esModule\") return;\n  Object.defineProperty(exports, key, {\n    enumerable: true,\n    get: function () {\n      return _templateLiterals[key];\n    }\n  });\n});\n\nvar _expressions = require(\"./expressions\");\n\nObject.keys(_expressions).forEach(function (key) {\n  if (key === \"default\" || key === \"__esModule\") return;\n  Object.defineProperty(exports, key, {\n    enumerable: true,\n    get: function () {\n      return _expressions[key];\n    }\n  });\n});\n\nvar _statements = require(\"./statements\");\n\nObject.keys(_statements).forEach(function (key) {\n  if (key === \"default\" || key === \"__esModule\") return;\n  Object.defineProperty(exports, key, {\n    enumerable: true,\n    get: function () {\n      return _statements[key];\n    }\n  });\n});\n\nvar _classes = require(\"./classes\");\n\nObject.keys(_classes).forEach(function (key) {\n  if (key === \"default\" || key === \"__esModule\") return;\n  Object.defineProperty(exports, key, {\n    enumerable: true,\n    get: function () {\n      return _classes[key];\n    }\n  });\n});\n\nvar _methods = require(\"./methods\");\n\nObject.keys(_methods).forEach(function (key) {\n  if (key === \"default\" || key === \"__esModule\") return;\n  Object.defineProperty(exports, key, {\n    enumerable: true,\n    get: function () {\n      return _methods[key];\n    }\n  });\n});\n\nvar _modules = require(\"./modules\");\n\nObject.keys(_modules).forEach(function (key) {\n  if (key === \"default\" || key === \"__esModule\") return;\n  Object.defineProperty(exports, key, {\n    enumerable: true,\n    get: function () {\n      return _modules[key];\n    }\n  });\n});\n\nvar _types = require(\"./types\");\n\nObject.keys(_types).forEach(function (key) {\n  if (key === \"default\" || key === \"__esModule\") return;\n  Object.defineProperty(exports, key, {\n    enumerable: true,\n    get: function () {\n      return _types[key];\n    }\n  });\n});\n\nvar _flow = require(\"./flow\");\n\nObject.keys(_flow).forEach(function (key) {\n  if (key === \"default\" || key === \"__esModule\") return;\n  Object.defineProperty(exports, key, {\n    enumerable: true,\n    get: function () {\n      return _flow[key];\n    }\n  });\n});\n\nvar _base = require(\"./base\");\n\nObject.keys(_base).forEach(function (key) {\n  if (key === \"default\" || key === \"__esModule\") return;\n  Object.defineProperty(exports, key, {\n    enumerable: true,\n    get: function () {\n      return _base[key];\n    }\n  });\n});\n\nvar _jsx = require(\"./jsx\");\n\nObject.keys(_jsx).forEach(function (key) {\n  if (key === \"default\" || key === \"__esModule\") return;\n  Object.defineProperty(exports, key, {\n    enumerable: true,\n    get: function () {\n      return _jsx[key];\n    }\n  });\n});\n\nvar _typescript = require(\"./typescript\");\n\nObject.keys(_typescript).forEach(function (key) {\n  if (key === \"default\" || key === \"__esModule\") return;\n  Object.defineProperty(exports, key, {\n    enumerable: true,\n    get: function () {\n      return _typescript[key];\n    }\n  });\n});"
  },
  {
    "path": "packages/mvvm-babel-generator/lib/generators/jsx.js",
    "content": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.JSXAttribute = JSXAttribute;\nexports.JSXIdentifier = JSXIdentifier;\nexports.JSXNamespacedName = JSXNamespacedName;\nexports.JSXMemberExpression = JSXMemberExpression;\nexports.JSXSpreadAttribute = JSXSpreadAttribute;\nexports.JSXExpressionContainer = JSXExpressionContainer;\nexports.JSXSpreadChild = JSXSpreadChild;\nexports.JSXText = JSXText;\nexports.JSXElement = JSXElement;\nexports.JSXOpeningElement = JSXOpeningElement;\nexports.JSXClosingElement = JSXClosingElement;\nexports.JSXEmptyExpression = JSXEmptyExpression;\nexports.JSXFragment = JSXFragment;\nexports.JSXOpeningFragment = JSXOpeningFragment;\nexports.JSXClosingFragment = JSXClosingFragment;\n\nfunction JSXAttribute(node) {\n  this.print(node.name, node);\n\n  if (node.value) {\n    this.token(\"=\");\n    this.print(node.value, node);\n  }\n}\n\nfunction JSXIdentifier(node) {\n  this.word(node.name);\n}\n\nfunction JSXNamespacedName(node) {\n  this.print(node.namespace, node);\n  this.token(\":\");\n  this.print(node.name, node);\n}\n\nfunction JSXMemberExpression(node) {\n  this.print(node.object, node);\n  this.token(\".\");\n  this.print(node.property, node);\n}\n\nfunction JSXSpreadAttribute(node) {\n  this.token(\"{\");\n  this.token(\"...\");\n  this.print(node.argument, node);\n  this.token(\"}\");\n}\n//这里编译 标签中的 `{item.id}` ==> `{{item.id}}`\nfunction JSXExpressionContainer(node) {\n  this.token(\"{{\");\n  this.print(node.expression, node);\n  this.token(\"}}\");\n}\n\nfunction JSXSpreadChild(node) {\n  this.token(\"{\");\n  this.token(\"...\");\n  this.print(node.expression, node);\n  this.token(\"}\");\n}\n\nfunction JSXText(node) {\n  const raw = this.getPossibleRaw(node);\n\n  if (raw != null) {\n    this.token(raw);\n  } else {\n    this.token(node.value);\n  }\n}\n\nfunction JSXElement(node) {\n  const open = node.openingElement;\n  this.print(open, node);\n  if (open.selfClosing) return;\n  this.indent();\n\n  for (const child of node.children) {\n    this.print(child, node);\n  }\n\n  this.dedent();\n  this.print(node.closingElement, node);\n}\n\nfunction spaceSeparator() {\n  this.space();\n}\n\nfunction JSXOpeningElement(node) {\n  this.token(\"<\");\n  this.print(node.name, node);\n  this.print(node.typeParameters, node);\n\n  if (node.attributes.length > 0) {\n    this.space();\n    this.printJoin(node.attributes, node, {\n      separator: spaceSeparator\n    });\n  }\n\n  if (node.selfClosing) {\n    this.space();\n    this.token(\"/>\");\n  } else {\n    this.token(\">\");\n  }\n}\n\nfunction JSXClosingElement(node) {\n  this.token(\"</\");\n  this.print(node.name, node);\n  this.token(\">\");\n}\n\nfunction JSXEmptyExpression(node) {\n  this.printInnerComments(node);\n}\n\nfunction JSXFragment(node) {\n  this.print(node.openingFragment, node);\n  this.indent();\n\n  for (const child of node.children) {\n    this.print(child, node);\n  }\n\n  this.dedent();\n  this.print(node.closingFragment, node);\n}\n\nfunction JSXOpeningFragment() {\n  this.token(\"<\");\n  this.token(\">\");\n}\n\nfunction JSXClosingFragment() {\n  this.token(\"</\");\n  this.token(\">\");\n}"
  },
  {
    "path": "packages/mvvm-babel-generator/lib/generators/methods.js",
    "content": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports._params = _params;\nexports._parameters = _parameters;\nexports._param = _param;\nexports._methodHead = _methodHead;\nexports._predicate = _predicate;\nexports._functionHead = _functionHead;\nexports.FunctionDeclaration = exports.FunctionExpression = FunctionExpression;\nexports.ArrowFunctionExpression = ArrowFunctionExpression;\n\nfunction t() {\n  const data = _interopRequireWildcard(require(\"@babel/types/lib\"));\n\n  t = function () {\n    return data;\n  };\n\n  return data;\n}\n\nfunction _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; } }\n\nfunction _params(node) {\n  this.print(node.typeParameters, node);\n  this.token(\"(\");\n\n  this._parameters(node.params, node);\n\n  this.token(\")\");\n  this.print(node.returnType, node);\n}\n\nfunction _parameters(parameters, parent) {\n  for (let i = 0; i < parameters.length; i++) {\n    this._param(parameters[i], parent);\n\n    if (i < parameters.length - 1) {\n      this.token(\",\");\n      this.space();\n    }\n  }\n}\n\nfunction _param(parameter, parent) {\n  this.printJoin(parameter.decorators, parameter);\n  this.print(parameter, parent);\n  if (parameter.optional) this.token(\"?\");\n  this.print(parameter.typeAnnotation, parameter);\n}\n\nfunction _methodHead(node) {\n  const kind = node.kind;\n  const key = node.key;\n\n  if (kind === \"get\" || kind === \"set\") {\n    this.word(kind);\n    this.space();\n  }\n\n  if (node.async) {\n    this.word(\"async\");\n    this.space();\n  }\n\n  if (kind === \"method\" || kind === \"init\") {\n    if (node.generator) {\n      this.token(\"*\");\n    }\n  }\n\n  if (node.computed) {\n    this.token(\"[\");\n    this.print(key, node);\n    this.token(\"]\");\n  } else {\n    this.print(key, node);\n  }\n\n  if (node.optional) {\n    this.token(\"?\");\n  }\n\n  this._params(node);\n}\n\nfunction _predicate(node) {\n  if (node.predicate) {\n    if (!node.returnType) {\n      this.token(\":\");\n    }\n\n    this.space();\n    this.print(node.predicate, node);\n  }\n}\n\nfunction _functionHead(node) {\n  if (node.async) {\n    this.word(\"async\");\n    this.space();\n  }\n\n  this.word(\"function\");\n  if (node.generator) this.token(\"*\");\n  this.space();\n\n  if (node.id) {\n    this.print(node.id, node);\n  }\n\n  this._params(node);\n\n  this._predicate(node);\n}\n\nfunction FunctionExpression(node) {\n  this._functionHead(node);\n\n  this.space();\n  this.print(node.body, node);\n}\n\nfunction ArrowFunctionExpression(node) {\n  if (node.async) {\n    this.word(\"async\");\n    this.space();\n  }\n\n  const firstParam = node.params[0];\n\n  if (node.params.length === 1 && t().isIdentifier(firstParam) && !hasTypes(node, firstParam)) {\n    if (this.format.retainLines && node.loc && node.body.loc && node.loc.start.line < node.body.loc.start.line) {\n      this.token(\"(\");\n\n      if (firstParam.loc && firstParam.loc.start.line > node.loc.start.line) {\n        this.indent();\n        this.print(firstParam, node);\n        this.dedent();\n\n        this._catchUp(\"start\", node.body.loc);\n      } else {\n        this.print(firstParam, node);\n      }\n\n      this.token(\")\");\n    } else {\n      this.print(firstParam, node);\n    }\n  } else {\n    this._params(node);\n  }\n\n  this._predicate(node);\n\n  this.space();\n  this.token(\"=>\");\n  this.space();\n  this.print(node.body, node);\n}\n\nfunction hasTypes(node, param) {\n  return node.typeParameters || node.returnType || param.typeAnnotation || param.optional || param.trailingComments;\n}"
  },
  {
    "path": "packages/mvvm-babel-generator/lib/generators/modules.js",
    "content": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.ImportSpecifier = ImportSpecifier;\nexports.ImportDefaultSpecifier = ImportDefaultSpecifier;\nexports.ExportDefaultSpecifier = ExportDefaultSpecifier;\nexports.ExportSpecifier = ExportSpecifier;\nexports.ExportNamespaceSpecifier = ExportNamespaceSpecifier;\nexports.ExportAllDeclaration = ExportAllDeclaration;\nexports.ExportNamedDeclaration = ExportNamedDeclaration;\nexports.ExportDefaultDeclaration = ExportDefaultDeclaration;\nexports.ImportDeclaration = ImportDeclaration;\nexports.ImportNamespaceSpecifier = ImportNamespaceSpecifier;\n\nfunction t() {\n  const data = _interopRequireWildcard(require(\"@babel/types/lib\"));\n\n  t = function () {\n    return data;\n  };\n\n  return data;\n}\n\nfunction _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; } }\n\nfunction ImportSpecifier(node) {\n  if (node.importKind === \"type\" || node.importKind === \"typeof\") {\n    this.word(node.importKind);\n    this.space();\n  }\n\n  this.print(node.imported, node);\n\n  if (node.local && node.local.name !== node.imported.name) {\n    this.space();\n    this.word(\"as\");\n    this.space();\n    this.print(node.local, node);\n  }\n}\n\nfunction ImportDefaultSpecifier(node) {\n  this.print(node.local, node);\n}\n\nfunction ExportDefaultSpecifier(node) {\n  this.print(node.exported, node);\n}\n\nfunction ExportSpecifier(node) {\n  this.print(node.local, node);\n\n  if (node.exported && node.local.name !== node.exported.name) {\n    this.space();\n    this.word(\"as\");\n    this.space();\n    this.print(node.exported, node);\n  }\n}\n\nfunction ExportNamespaceSpecifier(node) {\n  this.token(\"*\");\n  this.space();\n  this.word(\"as\");\n  this.space();\n  this.print(node.exported, node);\n}\n\nfunction ExportAllDeclaration(node) {\n  this.word(\"export\");\n  this.space();\n\n  if (node.exportKind === \"type\") {\n    this.word(\"type\");\n    this.space();\n  }\n\n  this.token(\"*\");\n  this.space();\n  this.word(\"from\");\n  this.space();\n  this.print(node.source, node);\n  this.semicolon();\n}\n\nfunction ExportNamedDeclaration(node) {\n  if (this.format.decoratorsBeforeExport && t().isClassDeclaration(node.declaration)) {\n    this.printJoin(node.declaration.decorators, node);\n  }\n\n  this.word(\"export\");\n  this.space();\n  ExportDeclaration.apply(this, arguments);\n}\n\nfunction ExportDefaultDeclaration(node) {\n  if (this.format.decoratorsBeforeExport && t().isClassDeclaration(node.declaration)) {\n    this.printJoin(node.declaration.decorators, node);\n  }\n\n  this.word(\"export\");\n  this.space();\n  this.word(\"default\");\n  this.space();\n  ExportDeclaration.apply(this, arguments);\n}\n\nfunction ExportDeclaration(node) {\n  if (node.declaration) {\n    const declar = node.declaration;\n    this.print(declar, node);\n    if (!t().isStatement(declar)) this.semicolon();\n  } else {\n    if (node.exportKind === \"type\") {\n      this.word(\"type\");\n      this.space();\n    }\n\n    const specifiers = node.specifiers.slice(0);\n    let hasSpecial = false;\n\n    while (true) {\n      const first = specifiers[0];\n\n      if (t().isExportDefaultSpecifier(first) || t().isExportNamespaceSpecifier(first)) {\n        hasSpecial = true;\n        this.print(specifiers.shift(), node);\n\n        if (specifiers.length) {\n          this.token(\",\");\n          this.space();\n        }\n      } else {\n        break;\n      }\n    }\n\n    if (specifiers.length || !specifiers.length && !hasSpecial) {\n      this.token(\"{\");\n\n      if (specifiers.length) {\n        this.space();\n        this.printList(specifiers, node);\n        this.space();\n      }\n\n      this.token(\"}\");\n    }\n\n    if (node.source) {\n      this.space();\n      this.word(\"from\");\n      this.space();\n      this.print(node.source, node);\n    }\n\n    this.semicolon();\n  }\n}\n\nfunction ImportDeclaration(node) {\n  this.word(\"import\");\n  this.space();\n\n  if (node.importKind === \"type\" || node.importKind === \"typeof\") {\n    this.word(node.importKind);\n    this.space();\n  }\n\n  const specifiers = node.specifiers.slice(0);\n\n  if (specifiers && specifiers.length) {\n    while (true) {\n      const first = specifiers[0];\n\n      if (t().isImportDefaultSpecifier(first) || t().isImportNamespaceSpecifier(first)) {\n        this.print(specifiers.shift(), node);\n\n        if (specifiers.length) {\n          this.token(\",\");\n          this.space();\n        }\n      } else {\n        break;\n      }\n    }\n\n    if (specifiers.length) {\n      this.token(\"{\");\n      this.space();\n      this.printList(specifiers, node);\n      this.space();\n      this.token(\"}\");\n    }\n\n    this.space();\n    this.word(\"from\");\n    this.space();\n  }\n\n  this.print(node.source, node);\n  this.semicolon();\n}\n\nfunction ImportNamespaceSpecifier(node) {\n  this.token(\"*\");\n  this.space();\n  this.word(\"as\");\n  this.space();\n  this.print(node.local, node);\n}"
  },
  {
    "path": "packages/mvvm-babel-generator/lib/generators/statements.js",
    "content": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.WithStatement = WithStatement;\nexports.IfStatement = IfStatement;\nexports.ForStatement = ForStatement;\nexports.WhileStatement = WhileStatement;\nexports.DoWhileStatement = DoWhileStatement;\nexports.LabeledStatement = LabeledStatement;\nexports.TryStatement = TryStatement;\nexports.CatchClause = CatchClause;\nexports.SwitchStatement = SwitchStatement;\nexports.SwitchCase = SwitchCase;\nexports.DebuggerStatement = DebuggerStatement;\nexports.VariableDeclaration = VariableDeclaration;\nexports.VariableDeclarator = VariableDeclarator;\nexports.ThrowStatement = exports.BreakStatement = exports.ReturnStatement = exports.ContinueStatement = exports.ForOfStatement = exports.ForInStatement = void 0;\n\nfunction t() {\n  const data = _interopRequireWildcard(require(\"@babel/types/lib\"));\n\n  t = function () {\n    return data;\n  };\n\n  return data;\n}\n\nfunction _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; } }\n\nfunction WithStatement(node) {\n  this.word(\"with\");\n  this.space();\n  this.token(\"(\");\n  this.print(node.object, node);\n  this.token(\")\");\n  this.printBlock(node);\n}\n\nfunction IfStatement(node) {\n  this.word(\"if\");\n  this.space();\n  this.token(\"(\");\n  this.print(node.test, node);\n  this.token(\")\");\n  this.space();\n  const needsBlock = node.alternate && t().isIfStatement(getLastStatement(node.consequent));\n\n  if (needsBlock) {\n    this.token(\"{\");\n    this.newline();\n    this.indent();\n  }\n\n  this.printAndIndentOnComments(node.consequent, node);\n\n  if (needsBlock) {\n    this.dedent();\n    this.newline();\n    this.token(\"}\");\n  }\n\n  if (node.alternate) {\n    if (this.endsWith(\"}\")) this.space();\n    this.word(\"else\");\n    this.space();\n    this.printAndIndentOnComments(node.alternate, node);\n  }\n}\n\nfunction getLastStatement(statement) {\n  if (!t().isStatement(statement.body)) return statement;\n  return getLastStatement(statement.body);\n}\n\nfunction ForStatement(node) {\n  this.word(\"for\");\n  this.space();\n  this.token(\"(\");\n  this.inForStatementInitCounter++;\n  this.print(node.init, node);\n  this.inForStatementInitCounter--;\n  this.token(\";\");\n\n  if (node.test) {\n    this.space();\n    this.print(node.test, node);\n  }\n\n  this.token(\";\");\n\n  if (node.update) {\n    this.space();\n    this.print(node.update, node);\n  }\n\n  this.token(\")\");\n  this.printBlock(node);\n}\n\nfunction WhileStatement(node) {\n  this.word(\"while\");\n  this.space();\n  this.token(\"(\");\n  this.print(node.test, node);\n  this.token(\")\");\n  this.printBlock(node);\n}\n\nconst buildForXStatement = function (op) {\n  return function (node) {\n    this.word(\"for\");\n    this.space();\n\n    if (op === \"of\" && node.await) {\n      this.word(\"await\");\n      this.space();\n    }\n\n    this.token(\"(\");\n    this.print(node.left, node);\n    this.space();\n    this.word(op);\n    this.space();\n    this.print(node.right, node);\n    this.token(\")\");\n    this.printBlock(node);\n  };\n};\n\nconst ForInStatement = buildForXStatement(\"in\");\nexports.ForInStatement = ForInStatement;\nconst ForOfStatement = buildForXStatement(\"of\");\nexports.ForOfStatement = ForOfStatement;\n\nfunction DoWhileStatement(node) {\n  this.word(\"do\");\n  this.space();\n  this.print(node.body, node);\n  this.space();\n  this.word(\"while\");\n  this.space();\n  this.token(\"(\");\n  this.print(node.test, node);\n  this.token(\")\");\n  this.semicolon();\n}\n\nfunction buildLabelStatement(prefix, key = \"label\") {\n  return function (node) {\n    this.word(prefix);\n    const label = node[key];\n\n    if (label) {\n      this.space();\n      const isLabel = key == \"label\";\n      const terminatorState = this.startTerminatorless(isLabel);\n      this.print(label, node);\n      this.endTerminatorless(terminatorState);\n    }\n\n    this.semicolon();\n  };\n}\n\nconst ContinueStatement = buildLabelStatement(\"continue\");\nexports.ContinueStatement = ContinueStatement;\nconst ReturnStatement = buildLabelStatement(\"return\", \"argument\");\nexports.ReturnStatement = ReturnStatement;\nconst BreakStatement = buildLabelStatement(\"break\");\nexports.BreakStatement = BreakStatement;\nconst ThrowStatement = buildLabelStatement(\"throw\", \"argument\");\nexports.ThrowStatement = ThrowStatement;\n\nfunction LabeledStatement(node) {\n  this.print(node.label, node);\n  this.token(\":\");\n  this.space();\n  this.print(node.body, node);\n}\n\nfunction TryStatement(node) {\n  this.word(\"try\");\n  this.space();\n  this.print(node.block, node);\n  this.space();\n\n  if (node.handlers) {\n    this.print(node.handlers[0], node);\n  } else {\n    this.print(node.handler, node);\n  }\n\n  if (node.finalizer) {\n    this.space();\n    this.word(\"finally\");\n    this.space();\n    this.print(node.finalizer, node);\n  }\n}\n\nfunction CatchClause(node) {\n  this.word(\"catch\");\n  this.space();\n\n  if (node.param) {\n    this.token(\"(\");\n    this.print(node.param, node);\n    this.token(\")\");\n    this.space();\n  }\n\n  this.print(node.body, node);\n}\n\nfunction SwitchStatement(node) {\n  this.word(\"switch\");\n  this.space();\n  this.token(\"(\");\n  this.print(node.discriminant, node);\n  this.token(\")\");\n  this.space();\n  this.token(\"{\");\n  this.printSequence(node.cases, node, {\n    indent: true,\n\n    addNewlines(leading, cas) {\n      if (!leading && node.cases[node.cases.length - 1] === cas) return -1;\n    }\n\n  });\n  this.token(\"}\");\n}\n\nfunction SwitchCase(node) {\n  if (node.test) {\n    this.word(\"case\");\n    this.space();\n    this.print(node.test, node);\n    this.token(\":\");\n  } else {\n    this.word(\"default\");\n    this.token(\":\");\n  }\n\n  if (node.consequent.length) {\n    this.newline();\n    this.printSequence(node.consequent, node, {\n      indent: true\n    });\n  }\n}\n\nfunction DebuggerStatement() {\n  this.word(\"debugger\");\n  this.semicolon();\n}\n\nfunction variableDeclarationIndent() {\n  this.token(\",\");\n  this.newline();\n  if (this.endsWith(\"\\n\")) for (let i = 0; i < 4; i++) this.space(true);\n}\n\nfunction constDeclarationIndent() {\n  this.token(\",\");\n  this.newline();\n  if (this.endsWith(\"\\n\")) for (let i = 0; i < 6; i++) this.space(true);\n}\n\nfunction VariableDeclaration(node, parent) {\n  if (node.declare) {\n    this.word(\"declare\");\n    this.space();\n  }\n\n  this.word(node.kind);\n  this.space();\n  let hasInits = false;\n\n  if (!t().isFor(parent)) {\n    for (const declar of node.declarations) {\n      if (declar.init) {\n        hasInits = true;\n      }\n    }\n  }\n\n  let separator;\n\n  if (hasInits) {\n    separator = node.kind === \"const\" ? constDeclarationIndent : variableDeclarationIndent;\n  }\n\n  this.printList(node.declarations, node, {\n    separator\n  });\n\n  if (t().isFor(parent)) {\n    if (parent.left === node || parent.init === node) return;\n  }\n\n  this.semicolon();\n}\n\nfunction VariableDeclarator(node) {\n  this.print(node.id, node);\n  if (node.definite) this.token(\"!\");\n  this.print(node.id.typeAnnotation, node);\n\n  if (node.init) {\n    this.space();\n    this.token(\"=\");\n    this.space();\n    this.print(node.init, node);\n  }\n}"
  },
  {
    "path": "packages/mvvm-babel-generator/lib/generators/template-literals.js",
    "content": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.TaggedTemplateExpression = TaggedTemplateExpression;\nexports.TemplateElement = TemplateElement;\nexports.TemplateLiteral = TemplateLiteral;\n\nfunction TaggedTemplateExpression(node) {\n  this.print(node.tag, node);\n  this.print(node.typeParameters, node);\n  this.print(node.quasi, node);\n}\n\nfunction TemplateElement(node, parent) {\n  const isFirst = parent.quasis[0] === node;\n  const isLast = parent.quasis[parent.quasis.length - 1] === node;\n  const value = (isFirst ? \"`\" : \"}\") + node.value.raw + (isLast ? \"`\" : \"${\");\n  this.token(value);\n}\n\nfunction TemplateLiteral(node) {\n  const quasis = node.quasis;\n\n  for (let i = 0; i < quasis.length; i++) {\n    this.print(quasis[i], node);\n\n    if (i + 1 < quasis.length) {\n      this.print(node.expressions[i], node);\n    }\n  }\n}"
  },
  {
    "path": "packages/mvvm-babel-generator/lib/generators/types.js",
    "content": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.Identifier = Identifier;\nexports.SpreadElement = exports.RestElement = RestElement;\nexports.ObjectPattern = exports.ObjectExpression = ObjectExpression;\nexports.ObjectMethod = ObjectMethod;\nexports.ObjectProperty = ObjectProperty;\nexports.ArrayPattern = exports.ArrayExpression = ArrayExpression;\nexports.RegExpLiteral = RegExpLiteral;\nexports.BooleanLiteral = BooleanLiteral;\nexports.NullLiteral = NullLiteral;\nexports.NumericLiteral = NumericLiteral;\nexports.StringLiteral = StringLiteral;\nexports.BigIntLiteral = BigIntLiteral;\nexports.PipelineTopicExpression = PipelineTopicExpression;\nexports.PipelineBareFunction = PipelineBareFunction;\nexports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference;\n\nfunction t() {\n  const data = _interopRequireWildcard(require(\"@babel/types/lib\"));\n\n  t = function () {\n    return data;\n  };\n\n  return data;\n}\n\nfunction _jsesc() {\n  const data = _interopRequireDefault(require(\"jsesc/jsesc\"));\n\n  _jsesc = function () {\n    return data;\n  };\n\n  return data;\n}\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _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; } }\n\nfunction Identifier(node) {\n  this.exactSource(node.loc, () => {\n    this.word(node.name);\n  });\n}\n\nfunction RestElement(node) {\n  this.token(\"...\");\n  this.print(node.argument, node);\n}\n\nfunction ObjectExpression(node) {\n  const props = node.properties;\n  this.token(\"{\");\n  this.printInnerComments(node);\n\n  if (props.length) {\n    this.space();\n    this.printList(props, node, {\n      indent: true,\n      statement: true\n    });\n    this.space();\n  }\n\n  this.token(\"}\");\n}\n\nfunction ObjectMethod(node) {\n  this.printJoin(node.decorators, node);\n\n  this._methodHead(node);\n\n  this.space();\n  this.print(node.body, node);\n}\n\nfunction ObjectProperty(node) {\n  this.printJoin(node.decorators, node);\n\n  if (node.computed) {\n    this.token(\"[\");\n    this.print(node.key, node);\n    this.token(\"]\");\n  } else {\n    if (t().isAssignmentPattern(node.value) && t().isIdentifier(node.key) && node.key.name === node.value.left.name) {\n      this.print(node.value, node);\n      return;\n    }\n\n    this.print(node.key, node);\n\n    if (node.shorthand && t().isIdentifier(node.key) && t().isIdentifier(node.value) && node.key.name === node.value.name) {\n      return;\n    }\n  }\n\n  this.token(\":\");\n  this.space();\n  this.print(node.value, node);\n}\n\nfunction ArrayExpression(node) {\n  const elems = node.elements;\n  const len = elems.length;\n  this.token(\"[\");\n  this.printInnerComments(node);\n\n  for (let i = 0; i < elems.length; i++) {\n    const elem = elems[i];\n\n    if (elem) {\n      if (i > 0) this.space();\n      this.print(elem, node);\n      if (i < len - 1) this.token(\",\");\n    } else {\n      this.token(\",\");\n    }\n  }\n\n  this.token(\"]\");\n}\n\nfunction RegExpLiteral(node) {\n  this.word(`/${node.pattern}/${node.flags}`);\n}\n\nfunction BooleanLiteral(node) {\n  this.word(node.value ? \"true\" : \"false\");\n}\n\nfunction NullLiteral() {\n  this.word(\"null\");\n}\n\nfunction NumericLiteral(node) {\n  const raw = this.getPossibleRaw(node);\n  const value = node.value + \"\";\n\n  if (raw == null) {\n    this.number(value);\n  } else if (this.format.minified) {\n    this.number(raw.length < value.length ? raw : value);\n  } else {\n    this.number(raw);\n  }\n}\n\nfunction StringLiteral(node) {\n  const raw = this.getPossibleRaw(node);\n\n  if (!this.format.minified && raw != null) {\n    this.token(raw);\n    return;\n  }\n\n  const opts = this.format.jsescOption;\n\n  if (this.format.jsonCompatibleStrings) {\n    opts.json = true;\n  }\n\n  const val = (0, _jsesc().default)(node.value, opts);\n  return this.token(val);\n}\n\nfunction BigIntLiteral(node) {\n  const raw = this.getPossibleRaw(node);\n\n  if (!this.format.minified && raw != null) {\n    this.token(raw);\n    return;\n  }\n\n  this.token(node.value);\n}\n\nfunction PipelineTopicExpression(node) {\n  this.print(node.expression, node);\n}\n\nfunction PipelineBareFunction(node) {\n  this.print(node.callee, node);\n}\n\nfunction PipelinePrimaryTopicReference() {\n  this.token(\"#\");\n}"
  },
  {
    "path": "packages/mvvm-babel-generator/lib/generators/typescript.js",
    "content": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.TSTypeAnnotation = TSTypeAnnotation;\nexports.TSTypeParameterDeclaration = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation;\nexports.TSTypeParameter = TSTypeParameter;\nexports.TSParameterProperty = TSParameterProperty;\nexports.TSDeclareFunction = TSDeclareFunction;\nexports.TSDeclareMethod = TSDeclareMethod;\nexports.TSQualifiedName = TSQualifiedName;\nexports.TSCallSignatureDeclaration = TSCallSignatureDeclaration;\nexports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration;\nexports.TSPropertySignature = TSPropertySignature;\nexports.tsPrintPropertyOrMethodName = tsPrintPropertyOrMethodName;\nexports.TSMethodSignature = TSMethodSignature;\nexports.TSIndexSignature = TSIndexSignature;\nexports.TSAnyKeyword = TSAnyKeyword;\nexports.TSUnknownKeyword = TSUnknownKeyword;\nexports.TSNumberKeyword = TSNumberKeyword;\nexports.TSObjectKeyword = TSObjectKeyword;\nexports.TSBooleanKeyword = TSBooleanKeyword;\nexports.TSStringKeyword = TSStringKeyword;\nexports.TSSymbolKeyword = TSSymbolKeyword;\nexports.TSVoidKeyword = TSVoidKeyword;\nexports.TSUndefinedKeyword = TSUndefinedKeyword;\nexports.TSNullKeyword = TSNullKeyword;\nexports.TSNeverKeyword = TSNeverKeyword;\nexports.TSThisType = TSThisType;\nexports.TSFunctionType = TSFunctionType;\nexports.TSConstructorType = TSConstructorType;\nexports.tsPrintFunctionOrConstructorType = tsPrintFunctionOrConstructorType;\nexports.TSTypeReference = TSTypeReference;\nexports.TSTypePredicate = TSTypePredicate;\nexports.TSTypeQuery = TSTypeQuery;\nexports.TSTypeLiteral = TSTypeLiteral;\nexports.tsPrintTypeLiteralOrInterfaceBody = tsPrintTypeLiteralOrInterfaceBody;\nexports.tsPrintBraced = tsPrintBraced;\nexports.TSArrayType = TSArrayType;\nexports.TSTupleType = TSTupleType;\nexports.TSOptionalType = TSOptionalType;\nexports.TSRestType = TSRestType;\nexports.TSUnionType = TSUnionType;\nexports.TSIntersectionType = TSIntersectionType;\nexports.tsPrintUnionOrIntersectionType = tsPrintUnionOrIntersectionType;\nexports.TSConditionalType = TSConditionalType;\nexports.TSInferType = TSInferType;\nexports.TSParenthesizedType = TSParenthesizedType;\nexports.TSTypeOperator = TSTypeOperator;\nexports.TSIndexedAccessType = TSIndexedAccessType;\nexports.TSMappedType = TSMappedType;\nexports.TSLiteralType = TSLiteralType;\nexports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments;\nexports.TSInterfaceDeclaration = TSInterfaceDeclaration;\nexports.TSInterfaceBody = TSInterfaceBody;\nexports.TSTypeAliasDeclaration = TSTypeAliasDeclaration;\nexports.TSAsExpression = TSAsExpression;\nexports.TSTypeAssertion = TSTypeAssertion;\nexports.TSEnumDeclaration = TSEnumDeclaration;\nexports.TSEnumMember = TSEnumMember;\nexports.TSModuleDeclaration = TSModuleDeclaration;\nexports.TSModuleBlock = TSModuleBlock;\nexports.TSImportType = TSImportType;\nexports.TSImportEqualsDeclaration = TSImportEqualsDeclaration;\nexports.TSExternalModuleReference = TSExternalModuleReference;\nexports.TSNonNullExpression = TSNonNullExpression;\nexports.TSExportAssignment = TSExportAssignment;\nexports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration;\nexports.tsPrintSignatureDeclarationBase = tsPrintSignatureDeclarationBase;\n\nfunction TSTypeAnnotation(node) {\n  this.token(\":\");\n  this.space();\n  if (node.optional) this.token(\"?\");\n  this.print(node.typeAnnotation, node);\n}\n\nfunction TSTypeParameterInstantiation(node) {\n  this.token(\"<\");\n  this.printList(node.params, node, {});\n  this.token(\">\");\n}\n\nfunction TSTypeParameter(node) {\n  this.word(node.name);\n\n  if (node.constraint) {\n    this.space();\n    this.word(\"extends\");\n    this.space();\n    this.print(node.constraint, node);\n  }\n\n  if (node.default) {\n    this.space();\n    this.token(\"=\");\n    this.space();\n    this.print(node.default, node);\n  }\n}\n\nfunction TSParameterProperty(node) {\n  if (node.accessibility) {\n    this.word(node.accessibility);\n    this.space();\n  }\n\n  if (node.readonly) {\n    this.word(\"readonly\");\n    this.space();\n  }\n\n  this._param(node.parameter);\n}\n\nfunction TSDeclareFunction(node) {\n  if (node.declare) {\n    this.word(\"declare\");\n    this.space();\n  }\n\n  this._functionHead(node);\n\n  this.token(\";\");\n}\n\nfunction TSDeclareMethod(node) {\n  this._classMethodHead(node);\n\n  this.token(\";\");\n}\n\nfunction TSQualifiedName(node) {\n  this.print(node.left, node);\n  this.token(\".\");\n  this.print(node.right, node);\n}\n\nfunction TSCallSignatureDeclaration(node) {\n  this.tsPrintSignatureDeclarationBase(node);\n}\n\nfunction TSConstructSignatureDeclaration(node) {\n  this.word(\"new\");\n  this.space();\n  this.tsPrintSignatureDeclarationBase(node);\n}\n\nfunction TSPropertySignature(node) {\n  const {\n    readonly,\n    initializer\n  } = node;\n\n  if (readonly) {\n    this.word(\"readonly\");\n    this.space();\n  }\n\n  this.tsPrintPropertyOrMethodName(node);\n  this.print(node.typeAnnotation, node);\n\n  if (initializer) {\n    this.space();\n    this.token(\"=\");\n    this.space();\n    this.print(initializer, node);\n  }\n\n  this.token(\";\");\n}\n\nfunction tsPrintPropertyOrMethodName(node) {\n  if (node.computed) {\n    this.token(\"[\");\n  }\n\n  this.print(node.key, node);\n\n  if (node.computed) {\n    this.token(\"]\");\n  }\n\n  if (node.optional) {\n    this.token(\"?\");\n  }\n}\n\nfunction TSMethodSignature(node) {\n  this.tsPrintPropertyOrMethodName(node);\n  this.tsPrintSignatureDeclarationBase(node);\n  this.token(\";\");\n}\n\nfunction TSIndexSignature(node) {\n  const {\n    readonly\n  } = node;\n\n  if (readonly) {\n    this.word(\"readonly\");\n    this.space();\n  }\n\n  this.token(\"[\");\n\n  this._parameters(node.parameters, node);\n\n  this.token(\"]\");\n  this.print(node.typeAnnotation, node);\n  this.token(\";\");\n}\n\nfunction TSAnyKeyword() {\n  this.word(\"any\");\n}\n\nfunction TSUnknownKeyword() {\n  this.word(\"unknown\");\n}\n\nfunction TSNumberKeyword() {\n  this.word(\"number\");\n}\n\nfunction TSObjectKeyword() {\n  this.word(\"object\");\n}\n\nfunction TSBooleanKeyword() {\n  this.word(\"boolean\");\n}\n\nfunction TSStringKeyword() {\n  this.word(\"string\");\n}\n\nfunction TSSymbolKeyword() {\n  this.word(\"symbol\");\n}\n\nfunction TSVoidKeyword() {\n  this.word(\"void\");\n}\n\nfunction TSUndefinedKeyword() {\n  this.word(\"undefined\");\n}\n\nfunction TSNullKeyword() {\n  this.word(\"null\");\n}\n\nfunction TSNeverKeyword() {\n  this.word(\"never\");\n}\n\nfunction TSThisType() {\n  this.word(\"this\");\n}\n\nfunction TSFunctionType(node) {\n  this.tsPrintFunctionOrConstructorType(node);\n}\n\nfunction TSConstructorType(node) {\n  this.word(\"new\");\n  this.space();\n  this.tsPrintFunctionOrConstructorType(node);\n}\n\nfunction tsPrintFunctionOrConstructorType(node) {\n  const {\n    typeParameters,\n    parameters\n  } = node;\n  this.print(typeParameters, node);\n  this.token(\"(\");\n\n  this._parameters(parameters, node);\n\n  this.token(\")\");\n  this.space();\n  this.token(\"=>\");\n  this.space();\n  this.print(node.typeAnnotation.typeAnnotation, node);\n}\n\nfunction TSTypeReference(node) {\n  this.print(node.typeName, node);\n  this.print(node.typeParameters, node);\n}\n\nfunction TSTypePredicate(node) {\n  this.print(node.parameterName);\n  this.space();\n  this.word(\"is\");\n  this.space();\n  this.print(node.typeAnnotation.typeAnnotation);\n}\n\nfunction TSTypeQuery(node) {\n  this.word(\"typeof\");\n  this.space();\n  this.print(node.exprName);\n}\n\nfunction TSTypeLiteral(node) {\n  this.tsPrintTypeLiteralOrInterfaceBody(node.members, node);\n}\n\nfunction tsPrintTypeLiteralOrInterfaceBody(members, node) {\n  this.tsPrintBraced(members, node);\n}\n\nfunction tsPrintBraced(members, node) {\n  this.token(\"{\");\n\n  if (members.length) {\n    this.indent();\n    this.newline();\n\n    for (const member of members) {\n      this.print(member, node);\n      this.newline();\n    }\n\n    this.dedent();\n    this.rightBrace();\n  } else {\n    this.token(\"}\");\n  }\n}\n\nfunction TSArrayType(node) {\n  this.print(node.elementType, node);\n  this.token(\"[]\");\n}\n\nfunction TSTupleType(node) {\n  this.token(\"[\");\n  this.printList(node.elementTypes, node);\n  this.token(\"]\");\n}\n\nfunction TSOptionalType(node) {\n  this.print(node.typeAnnotation, node);\n  this.token(\"?\");\n}\n\nfunction TSRestType(node) {\n  this.token(\"...\");\n  this.print(node.typeAnnotation, node);\n}\n\nfunction TSUnionType(node) {\n  this.tsPrintUnionOrIntersectionType(node, \"|\");\n}\n\nfunction TSIntersectionType(node) {\n  this.tsPrintUnionOrIntersectionType(node, \"&\");\n}\n\nfunction tsPrintUnionOrIntersectionType(node, sep) {\n  this.printJoin(node.types, node, {\n    separator() {\n      this.space();\n      this.token(sep);\n      this.space();\n    }\n\n  });\n}\n\nfunction TSConditionalType(node) {\n  this.print(node.checkType);\n  this.space();\n  this.word(\"extends\");\n  this.space();\n  this.print(node.extendsType);\n  this.space();\n  this.token(\"?\");\n  this.space();\n  this.print(node.trueType);\n  this.space();\n  this.token(\":\");\n  this.space();\n  this.print(node.falseType);\n}\n\nfunction TSInferType(node) {\n  this.token(\"infer\");\n  this.space();\n  this.print(node.typeParameter);\n}\n\nfunction TSParenthesizedType(node) {\n  this.token(\"(\");\n  this.print(node.typeAnnotation, node);\n  this.token(\")\");\n}\n\nfunction TSTypeOperator(node) {\n  this.token(node.operator);\n  this.space();\n  this.print(node.typeAnnotation, node);\n}\n\nfunction TSIndexedAccessType(node) {\n  this.print(node.objectType, node);\n  this.token(\"[\");\n  this.print(node.indexType, node);\n  this.token(\"]\");\n}\n\nfunction TSMappedType(node) {\n  const {\n    readonly,\n    typeParameter,\n    optional\n  } = node;\n  this.token(\"{\");\n  this.space();\n\n  if (readonly) {\n    tokenIfPlusMinus(this, readonly);\n    this.word(\"readonly\");\n    this.space();\n  }\n\n  this.token(\"[\");\n  this.word(typeParameter.name);\n  this.space();\n  this.word(\"in\");\n  this.space();\n  this.print(typeParameter.constraint, typeParameter);\n  this.token(\"]\");\n\n  if (optional) {\n    tokenIfPlusMinus(this, optional);\n    this.token(\"?\");\n  }\n\n  this.token(\":\");\n  this.space();\n  this.print(node.typeAnnotation, node);\n  this.space();\n  this.token(\"}\");\n}\n\nfunction tokenIfPlusMinus(self, tok) {\n  if (tok !== true) {\n    self.token(tok);\n  }\n}\n\nfunction TSLiteralType(node) {\n  this.print(node.literal, node);\n}\n\nfunction TSExpressionWithTypeArguments(node) {\n  this.print(node.expression, node);\n  this.print(node.typeParameters, node);\n}\n\nfunction TSInterfaceDeclaration(node) {\n  const {\n    declare,\n    id,\n    typeParameters,\n    extends: extendz,\n    body\n  } = node;\n\n  if (declare) {\n    this.word(\"declare\");\n    this.space();\n  }\n\n  this.word(\"interface\");\n  this.space();\n  this.print(id, node);\n  this.print(typeParameters, node);\n\n  if (extendz) {\n    this.space();\n    this.word(\"extends\");\n    this.space();\n    this.printList(extendz, node);\n  }\n\n  this.space();\n  this.print(body, node);\n}\n\nfunction TSInterfaceBody(node) {\n  this.tsPrintTypeLiteralOrInterfaceBody(node.body, node);\n}\n\nfunction TSTypeAliasDeclaration(node) {\n  const {\n    declare,\n    id,\n    typeParameters,\n    typeAnnotation\n  } = node;\n\n  if (declare) {\n    this.word(\"declare\");\n    this.space();\n  }\n\n  this.word(\"type\");\n  this.space();\n  this.print(id, node);\n  this.print(typeParameters, node);\n  this.space();\n  this.token(\"=\");\n  this.space();\n  this.print(typeAnnotation, node);\n  this.token(\";\");\n}\n\nfunction TSAsExpression(node) {\n  const {\n    expression,\n    typeAnnotation\n  } = node;\n  this.print(expression, node);\n  this.space();\n  this.word(\"as\");\n  this.space();\n  this.print(typeAnnotation, node);\n}\n\nfunction TSTypeAssertion(node) {\n  const {\n    typeAnnotation,\n    expression\n  } = node;\n  this.token(\"<\");\n  this.print(typeAnnotation, node);\n  this.token(\">\");\n  this.space();\n  this.print(expression, node);\n}\n\nfunction TSEnumDeclaration(node) {\n  const {\n    declare,\n    const: isConst,\n    id,\n    members\n  } = node;\n\n  if (declare) {\n    this.word(\"declare\");\n    this.space();\n  }\n\n  if (isConst) {\n    this.word(\"const\");\n    this.space();\n  }\n\n  this.word(\"enum\");\n  this.space();\n  this.print(id, node);\n  this.space();\n  this.tsPrintBraced(members, node);\n}\n\nfunction TSEnumMember(node) {\n  const {\n    id,\n    initializer\n  } = node;\n  this.print(id, node);\n\n  if (initializer) {\n    this.space();\n    this.token(\"=\");\n    this.space();\n    this.print(initializer, node);\n  }\n\n  this.token(\",\");\n}\n\nfunction TSModuleDeclaration(node) {\n  const {\n    declare,\n    id\n  } = node;\n\n  if (declare) {\n    this.word(\"declare\");\n    this.space();\n  }\n\n  if (!node.global) {\n    this.word(id.type === \"Identifier\" ? \"namespace\" : \"module\");\n    this.space();\n  }\n\n  this.print(id, node);\n\n  if (!node.body) {\n    this.token(\";\");\n    return;\n  }\n\n  let body = node.body;\n\n  while (body.type === \"TSModuleDeclaration\") {\n    this.token(\".\");\n    this.print(body.id, body);\n    body = body.body;\n  }\n\n  this.space();\n  this.print(body, node);\n}\n\nfunction TSModuleBlock(node) {\n  this.tsPrintBraced(node.body, node);\n}\n\nfunction TSImportType(node) {\n  const {\n    argument,\n    qualifier,\n    typeParameters\n  } = node;\n  this.word(\"import\");\n  this.token(\"(\");\n  this.print(argument, node);\n  this.token(\")\");\n\n  if (qualifier) {\n    this.token(\".\");\n    this.print(qualifier, node);\n  }\n\n  if (typeParameters) {\n    this.print(typeParameters, node);\n  }\n}\n\nfunction TSImportEqualsDeclaration(node) {\n  const {\n    isExport,\n    id,\n    moduleReference\n  } = node;\n\n  if (isExport) {\n    this.word(\"export\");\n    this.space();\n  }\n\n  this.word(\"import\");\n  this.space();\n  this.print(id, node);\n  this.space();\n  this.token(\"=\");\n  this.space();\n  this.print(moduleReference, node);\n  this.token(\";\");\n}\n\nfunction TSExternalModuleReference(node) {\n  this.token(\"require(\");\n  this.print(node.expression, node);\n  this.token(\")\");\n}\n\nfunction TSNonNullExpression(node) {\n  this.print(node.expression, node);\n  this.token(\"!\");\n}\n\nfunction TSExportAssignment(node) {\n  this.word(\"export\");\n  this.space();\n  this.token(\"=\");\n  this.space();\n  this.print(node.expression, node);\n  this.token(\";\");\n}\n\nfunction TSNamespaceExportDeclaration(node) {\n  this.word(\"export\");\n  this.space();\n  this.word(\"as\");\n  this.space();\n  this.word(\"namespace\");\n  this.space();\n  this.print(node.id, node);\n}\n\nfunction tsPrintSignatureDeclarationBase(node) {\n  const {\n    typeParameters,\n    parameters\n  } = node;\n  this.print(typeParameters, node);\n  this.token(\"(\");\n\n  this._parameters(parameters, node);\n\n  this.token(\")\");\n  this.print(node.typeAnnotation, node);\n}"
  },
  {
    "path": "packages/mvvm-babel-generator/lib/index.js",
    "content": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = _default;\nexports.CodeGenerator = void 0;\n\nvar _sourceMap = _interopRequireDefault(require(\"./source-map\"));\n\nvar _printer = _interopRequireDefault(require(\"./printer\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass Generator extends _printer.default {\n  constructor(ast, opts = {}, code) {\n    const format = normalizeOptions(code, opts);\n    const map = opts.sourceMaps ? new _sourceMap.default(opts, code) : null;\n    super(format, map);\n    this.ast = ast;\n  }\n\n  generate() {\n    return super.generate(this.ast);\n  }\n\n}\n\nfunction normalizeOptions(code, opts) {\n  const format = {\n    auxiliaryCommentBefore: opts.auxiliaryCommentBefore,\n    auxiliaryCommentAfter: opts.auxiliaryCommentAfter,\n    shouldPrintComment: opts.shouldPrintComment,\n    retainLines: opts.retainLines,\n    retainFunctionParens: opts.retainFunctionParens,\n    comments: opts.comments == null || opts.comments,\n    compact: opts.compact,\n    minified: opts.minified,\n    concise: opts.concise,\n    jsonCompatibleStrings: opts.jsonCompatibleStrings,\n    indent: {\n      adjustMultilineComment: true,\n      style: \"  \",\n      base: 0\n    },\n    decoratorsBeforeExport: !!opts.decoratorsBeforeExport,\n    jsescOption: Object.assign({\n      quotes: \"double\",\n      wrap: true\n    }, opts.jsescOption)\n  };\n\n  if (format.minified) {\n    format.compact = true;\n\n    format.shouldPrintComment = format.shouldPrintComment || (() => format.comments);\n  } else {\n    format.shouldPrintComment = format.shouldPrintComment || (value => format.comments || value.indexOf(\"@license\") >= 0 || value.indexOf(\"@preserve\") >= 0);\n  }\n\n  if (format.compact === \"auto\") {\n    format.compact = code.length > 500000;\n\n    if (format.compact) {\n      console.error(\"[BABEL] Note: The code generator has deoptimised the styling of \" + `${opts.filename} as it exceeds the max of ${\"500KB\"}.`);\n    }\n  }\n\n  if (format.compact) {\n    format.indent.adjustMultilineComment = false;\n  }\n\n  return format;\n}\n\nclass CodeGenerator {\n  constructor(ast, opts, code) {\n    this._generator = new Generator(ast, opts, code);\n  }\n\n  generate() {\n    return this._generator.generate();\n  }\n\n}\n\nexports.CodeGenerator = CodeGenerator;\n\nfunction _default(ast, opts, code) {\n  const gen = new Generator(ast, opts, code);\n  return gen.generate();\n}"
  },
  {
    "path": "packages/mvvm-babel-generator/lib/node/index.js",
    "content": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.needsWhitespace = needsWhitespace;\nexports.needsWhitespaceBefore = needsWhitespaceBefore;\nexports.needsWhitespaceAfter = needsWhitespaceAfter;\nexports.needsParens = needsParens;\n\nvar whitespace = _interopRequireWildcard(require(\"./whitespace\"));\n\nvar parens = _interopRequireWildcard(require(\"./parentheses\"));\n\nfunction t() {\n  const data = _interopRequireWildcard(require(\"@babel/types/lib\"));\n\n  t = function () {\n    return data;\n  };\n\n  return data;\n}\n\nfunction _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; } }\n\nfunction expandAliases(obj) {\n  const newObj = {};\n\n  function add(type, func) {\n    const fn = newObj[type];\n    newObj[type] = fn ? function (node, parent, stack) {\n      const result = fn(node, parent, stack);\n      return result == null ? func(node, parent, stack) : result;\n    } : func;\n  }\n\n  for (const type of Object.keys(obj)) {\n    const aliases = t().FLIPPED_ALIAS_KEYS[type];\n\n    if (aliases) {\n      for (const alias of aliases) {\n        add(alias, obj[type]);\n      }\n    } else {\n      add(type, obj[type]);\n    }\n  }\n\n  return newObj;\n}\n\nconst expandedParens = expandAliases(parens);\nconst expandedWhitespaceNodes = expandAliases(whitespace.nodes);\nconst expandedWhitespaceList = expandAliases(whitespace.list);\n\nfunction find(obj, node, parent, printStack) {\n  const fn = obj[node.type];\n  return fn ? fn(node, parent, printStack) : null;\n}\n\nfunction isOrHasCallExpression(node) {\n  if (t().isCallExpression(node)) {\n    return true;\n  }\n\n  if (t().isMemberExpression(node)) {\n    return isOrHasCallExpression(node.object) || !node.computed && isOrHasCallExpression(node.property);\n  } else {\n    return false;\n  }\n}\n\nfunction needsWhitespace(node, parent, type) {\n  if (!node) return 0;\n\n  if (t().isExpressionStatement(node)) {\n    node = node.expression;\n  }\n\n  let linesInfo = find(expandedWhitespaceNodes, node, parent);\n\n  if (!linesInfo) {\n    const items = find(expandedWhitespaceList, node, parent);\n\n    if (items) {\n      for (let i = 0; i < items.length; i++) {\n        linesInfo = needsWhitespace(items[i], node, type);\n        if (linesInfo) break;\n      }\n    }\n  }\n\n  if (typeof linesInfo === \"object\" && linesInfo !== null) {\n    return linesInfo[type] || 0;\n  }\n\n  return 0;\n}\n\nfunction needsWhitespaceBefore(node, parent) {\n  return needsWhitespace(node, parent, \"before\");\n}\n\nfunction needsWhitespaceAfter(node, parent) {\n  return needsWhitespace(node, parent, \"after\");\n}\n\nfunction needsParens(node, parent, printStack) {\n  if (!parent) return false;\n\n  if (t().isNewExpression(parent) && parent.callee === node) {\n    if (isOrHasCallExpression(node)) return true;\n  }\n\n  return find(expandedParens, node, parent, printStack);\n}"
  },
  {
    "path": "packages/mvvm-babel-generator/lib/node/parentheses.js",
    "content": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.NullableTypeAnnotation = NullableTypeAnnotation;\nexports.FunctionTypeAnnotation = FunctionTypeAnnotation;\nexports.UpdateExpression = UpdateExpression;\nexports.ObjectExpression = ObjectExpression;\nexports.DoExpression = DoExpression;\nexports.Binary = Binary;\nexports.IntersectionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation;\nexports.TSAsExpression = TSAsExpression;\nexports.TSTypeAssertion = TSTypeAssertion;\nexports.TSIntersectionType = exports.TSUnionType = TSUnionType;\nexports.BinaryExpression = BinaryExpression;\nexports.SequenceExpression = SequenceExpression;\nexports.AwaitExpression = exports.YieldExpression = YieldExpression;\nexports.ClassExpression = ClassExpression;\nexports.UnaryLike = UnaryLike;\nexports.FunctionExpression = FunctionExpression;\nexports.ArrowFunctionExpression = ArrowFunctionExpression;\nexports.ConditionalExpression = ConditionalExpression;\nexports.OptionalMemberExpression = OptionalMemberExpression;\nexports.AssignmentExpression = AssignmentExpression;\nexports.NewExpression = NewExpression;\n\nfunction t() {\n  const data = _interopRequireWildcard(require(\"@babel/types/lib\"));\n\n  t = function () {\n    return data;\n  };\n\n  return data;\n}\n\nfunction _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; } }\n\nconst PRECEDENCE = {\n  \"||\": 0,\n  \"&&\": 1,\n  \"|\": 2,\n  \"^\": 3,\n  \"&\": 4,\n  \"==\": 5,\n  \"===\": 5,\n  \"!=\": 5,\n  \"!==\": 5,\n  \"<\": 6,\n  \">\": 6,\n  \"<=\": 6,\n  \">=\": 6,\n  in: 6,\n  instanceof: 6,\n  \">>\": 7,\n  \"<<\": 7,\n  \">>>\": 7,\n  \"+\": 8,\n  \"-\": 8,\n  \"*\": 9,\n  \"/\": 9,\n  \"%\": 9,\n  \"**\": 10\n};\n\nconst isClassExtendsClause = (node, parent) => (t().isClassDeclaration(parent) || t().isClassExpression(parent)) && parent.superClass === node;\n\nfunction NullableTypeAnnotation(node, parent) {\n  return t().isArrayTypeAnnotation(parent);\n}\n\nfunction FunctionTypeAnnotation(node, parent) {\n  return t().isUnionTypeAnnotation(parent) || t().isIntersectionTypeAnnotation(parent) || t().isArrayTypeAnnotation(parent);\n}\n\nfunction UpdateExpression(node, parent) {\n  return t().isMemberExpression(parent, {\n    object: node\n  }) || t().isCallExpression(parent, {\n    callee: node\n  }) || t().isNewExpression(parent, {\n    callee: node\n  }) || isClassExtendsClause(node, parent);\n}\n\nfunction ObjectExpression(node, parent, printStack) {\n  return isFirstInStatement(printStack, {\n    considerArrow: true\n  });\n}\n\nfunction DoExpression(node, parent, printStack) {\n  return isFirstInStatement(printStack);\n}\n\nfunction Binary(node, parent) {\n  if (node.operator === \"**\" && t().isBinaryExpression(parent, {\n    operator: \"**\"\n  })) {\n    return parent.left === node;\n  }\n\n  if (isClassExtendsClause(node, parent)) {\n    return true;\n  }\n\n  if ((t().isCallExpression(parent) || t().isNewExpression(parent)) && parent.callee === node || t().isUnaryLike(parent) || t().isMemberExpression(parent) && parent.object === node || t().isAwaitExpression(parent)) {\n    return true;\n  }\n\n  if (t().isBinary(parent)) {\n    const parentOp = parent.operator;\n    const parentPos = PRECEDENCE[parentOp];\n    const nodeOp = node.operator;\n    const nodePos = PRECEDENCE[nodeOp];\n\n    if (parentPos === nodePos && parent.right === node && !t().isLogicalExpression(parent) || parentPos > nodePos) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\nfunction UnionTypeAnnotation(node, parent) {\n  return t().isArrayTypeAnnotation(parent) || t().isNullableTypeAnnotation(parent) || t().isIntersectionTypeAnnotation(parent) || t().isUnionTypeAnnotation(parent);\n}\n\nfunction TSAsExpression() {\n  return true;\n}\n\nfunction TSTypeAssertion() {\n  return true;\n}\n\nfunction TSUnionType(node, parent) {\n  return t().isTSArrayType(parent) || t().isTSOptionalType(parent) || t().isTSIntersectionType(parent) || t().isTSUnionType(parent) || t().isTSRestType(parent);\n}\n\nfunction BinaryExpression(node, parent) {\n  return node.operator === \"in\" && (t().isVariableDeclarator(parent) || t().isFor(parent));\n}\n\nfunction SequenceExpression(node, parent) {\n  if (t().isForStatement(parent) || t().isThrowStatement(parent) || t().isReturnStatement(parent) || t().isIfStatement(parent) && parent.test === node || t().isWhileStatement(parent) && parent.test === node || t().isForInStatement(parent) && parent.right === node || t().isSwitchStatement(parent) && parent.discriminant === node || t().isExpressionStatement(parent) && parent.expression === node) {\n    return false;\n  }\n\n  return true;\n}\n\nfunction YieldExpression(node, parent) {\n  return t().isBinary(parent) || t().isUnaryLike(parent) || t().isCallExpression(parent) || t().isMemberExpression(parent) || t().isNewExpression(parent) || t().isAwaitExpression(parent) && t().isYieldExpression(node) || t().isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent);\n}\n\nfunction ClassExpression(node, parent, printStack) {\n  return isFirstInStatement(printStack, {\n    considerDefaultExports: true\n  });\n}\n\nfunction UnaryLike(node, parent) {\n  return t().isMemberExpression(parent, {\n    object: node\n  }) || t().isCallExpression(parent, {\n    callee: node\n  }) || t().isNewExpression(parent, {\n    callee: node\n  }) || t().isBinaryExpression(parent, {\n    operator: \"**\",\n    left: node\n  }) || isClassExtendsClause(node, parent);\n}\n\nfunction FunctionExpression(node, parent, printStack) {\n  return isFirstInStatement(printStack, {\n    considerDefaultExports: true\n  });\n}\n\nfunction ArrowFunctionExpression(node, parent) {\n  return t().isExportDeclaration(parent) || ConditionalExpression(node, parent);\n}\n\nfunction ConditionalExpression(node, parent) {\n  if (t().isUnaryLike(parent) || t().isBinary(parent) || t().isConditionalExpression(parent, {\n    test: node\n  }) || t().isAwaitExpression(parent) || t().isOptionalMemberExpression(parent) || t().isTaggedTemplateExpression(parent) || t().isTSTypeAssertion(parent) || t().isTSAsExpression(parent)) {\n    return true;\n  }\n\n  return UnaryLike(node, parent);\n}\n\nfunction OptionalMemberExpression(node, parent) {\n  return t().isCallExpression(parent) || t().isMemberExpression(parent);\n}\n\nfunction AssignmentExpression(node) {\n  if (t().isObjectPattern(node.left)) {\n    return true;\n  } else {\n    return ConditionalExpression(...arguments);\n  }\n}\n\nfunction NewExpression(node, parent) {\n  return isClassExtendsClause(node, parent);\n}\n\nfunction isFirstInStatement(printStack, {\n  considerArrow = false,\n  considerDefaultExports = false\n} = {}) {\n  let i = printStack.length - 1;\n  let node = printStack[i];\n  i--;\n  let parent = printStack[i];\n\n  while (i > 0) {\n    if (t().isExpressionStatement(parent, {\n      expression: node\n    }) || t().isTaggedTemplateExpression(parent) || considerDefaultExports && t().isExportDefaultDeclaration(parent, {\n      declaration: node\n    }) || considerArrow && t().isArrowFunctionExpression(parent, {\n      body: node\n    })) {\n      return true;\n    }\n\n    if (t().isCallExpression(parent, {\n      callee: node\n    }) || t().isSequenceExpression(parent) && parent.expressions[0] === node || t().isMemberExpression(parent, {\n      object: node\n    }) || t().isConditional(parent, {\n      test: node\n    }) || t().isBinary(parent, {\n      left: node\n    }) || t().isAssignmentExpression(parent, {\n      left: node\n    })) {\n      node = parent;\n      i--;\n      parent = printStack[i];\n    } else {\n      return false;\n    }\n  }\n\n  return false;\n}"
  },
  {
    "path": "packages/mvvm-babel-generator/lib/node/whitespace.js",
    "content": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.list = exports.nodes = void 0;\n\nfunction t() {\n  const data = _interopRequireWildcard(require(\"@babel/types/lib\"));\n\n  t = function () {\n    return data;\n  };\n\n  return data;\n}\n\nfunction _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; } }\n\nfunction crawl(node, state = {}) {\n  if (t().isMemberExpression(node)) {\n    crawl(node.object, state);\n    if (node.computed) crawl(node.property, state);\n  } else if (t().isBinary(node) || t().isAssignmentExpression(node)) {\n    crawl(node.left, state);\n    crawl(node.right, state);\n  } else if (t().isCallExpression(node)) {\n    state.hasCall = true;\n    crawl(node.callee, state);\n  } else if (t().isFunction(node)) {\n    state.hasFunction = true;\n  } else if (t().isIdentifier(node)) {\n    state.hasHelper = state.hasHelper || isHelper(node.callee);\n  }\n\n  return state;\n}\n\nfunction isHelper(node) {\n  if (t().isMemberExpression(node)) {\n    return isHelper(node.object) || isHelper(node.property);\n  } else if (t().isIdentifier(node)) {\n    return node.name === \"require\" || node.name[0] === \"_\";\n  } else if (t().isCallExpression(node)) {\n    return isHelper(node.callee);\n  } else if (t().isBinary(node) || t().isAssignmentExpression(node)) {\n    return t().isIdentifier(node.left) && isHelper(node.left) || isHelper(node.right);\n  } else {\n    return false;\n  }\n}\n\nfunction isType(node) {\n  return t().isLiteral(node) || t().isObjectExpression(node) || t().isArrayExpression(node) || t().isIdentifier(node) || t().isMemberExpression(node);\n}\n\nconst nodes = {\n  AssignmentExpression(node) {\n    const state = crawl(node.right);\n\n    if (state.hasCall && state.hasHelper || state.hasFunction) {\n      return {\n        before: state.hasFunction,\n        after: true\n      };\n    }\n  },\n\n  SwitchCase(node, parent) {\n    return {\n      before: node.consequent.length || parent.cases[0] === node,\n      after: !node.consequent.length && parent.cases[parent.cases.length - 1] === node\n    };\n  },\n\n  LogicalExpression(node) {\n    if (t().isFunction(node.left) || t().isFunction(node.right)) {\n      return {\n        after: true\n      };\n    }\n  },\n\n  Literal(node) {\n    if (node.value === \"use strict\") {\n      return {\n        after: true\n      };\n    }\n  },\n\n  CallExpression(node) {\n    if (t().isFunction(node.callee) || isHelper(node)) {\n      return {\n        before: true,\n        after: true\n      };\n    }\n  },\n\n  VariableDeclaration(node) {\n    for (let i = 0; i < node.declarations.length; i++) {\n      const declar = node.declarations[i];\n      let enabled = isHelper(declar.id) && !isType(declar.init);\n\n      if (!enabled) {\n        const state = crawl(declar.init);\n        enabled = isHelper(declar.init) && state.hasCall || state.hasFunction;\n      }\n\n      if (enabled) {\n        return {\n          before: true,\n          after: true\n        };\n      }\n    }\n  },\n\n  IfStatement(node) {\n    if (t().isBlockStatement(node.consequent)) {\n      return {\n        before: true,\n        after: true\n      };\n    }\n  }\n\n};\nexports.nodes = nodes;\n\nnodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function (node, parent) {\n  if (parent.properties[0] === node) {\n    return {\n      before: true\n    };\n  }\n};\n\nnodes.ObjectTypeCallProperty = function (node, parent) {\n  if (parent.callProperties[0] === node && (!parent.properties || !parent.properties.length)) {\n    return {\n      before: true\n    };\n  }\n};\n\nnodes.ObjectTypeIndexer = function (node, parent) {\n  if (parent.indexers[0] === node && (!parent.properties || !parent.properties.length) && (!parent.callProperties || !parent.callProperties.length)) {\n    return {\n      before: true\n    };\n  }\n};\n\nnodes.ObjectTypeInternalSlot = function (node, parent) {\n  if (parent.internalSlots[0] === node && (!parent.properties || !parent.properties.length) && (!parent.callProperties || !parent.callProperties.length) && (!parent.indexers || !parent.indexers.length)) {\n    return {\n      before: true\n    };\n  }\n};\n\nconst list = {\n  VariableDeclaration(node) {\n    return node.declarations.map(decl => decl.init);\n  },\n\n  ArrayExpression(node) {\n    return node.elements;\n  },\n\n  ObjectExpression(node) {\n    return node.properties;\n  }\n\n};\nexports.list = list;\n[[\"Function\", true], [\"Class\", true], [\"Loop\", true], [\"LabeledStatement\", true], [\"SwitchStatement\", true], [\"TryStatement\", true]].forEach(function ([type, amounts]) {\n  if (typeof amounts === \"boolean\") {\n    amounts = {\n      after: amounts,\n      before: amounts\n    };\n  }\n\n  [type].concat(t().FLIPPED_ALIAS_KEYS[type] || []).forEach(function (type) {\n    nodes[type] = function () {\n      return amounts;\n    };\n  });\n});"
  },
  {
    "path": "packages/mvvm-babel-generator/lib/printer.js",
    "content": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\n\nfunction _isInteger() {\n  const data = _interopRequireDefault(require(\"lodash/isInteger\"));\n\n  _isInteger = function () {\n    return data;\n  };\n\n  return data;\n}\n\nfunction _repeat() {\n  const data = _interopRequireDefault(require(\"lodash/repeat\"));\n\n  _repeat = function () {\n    return data;\n  };\n\n  return data;\n}\n\nvar _buffer = _interopRequireDefault(require(\"./buffer\"));\n\nvar n = _interopRequireWildcard(require(\"./node\"));\n\nfunction t() {\n  const data = _interopRequireWildcard(require(\"@babel/types/lib\"));\n\n\n  t = function () {\n    return data;\n  };\n\n  return data;\n}\n\nvar generatorFunctions = _interopRequireWildcard(require(\"./generators\"));\n\nfunction _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; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst SCIENTIFIC_NOTATION = /e/i;\nconst ZERO_DECIMAL_INTEGER = /\\.0+$/;\nconst NON_DECIMAL_LITERAL = /^0[box]/;\n\nclass Printer {\n  constructor(format, map) {\n    this.inForStatementInitCounter = 0;\n    this._printStack = [];\n    this._indent = 0;\n    this._insideAux = false;\n    this._printedCommentStarts = {};\n    this._parenPushNewlineState = null;\n    this._noLineTerminator = false;\n    this._printAuxAfterOnNextUserNode = false;\n    this._printedComments = new WeakSet();\n    this._endsWithInteger = false;\n    this._endsWithWord = false;\n    this.format = format || {};\n    this._buf = new _buffer.default(map);\n  }\n\n  generate(ast) {\n    this.print(ast);\n\n    this._maybeAddAuxComment();\n\n    return this._buf.get();\n  }\n\n  indent() {\n    if (this.format.compact || this.format.concise) return;\n    this._indent++;\n  }\n\n  dedent() {\n    if (this.format.compact || this.format.concise) return;\n    this._indent--;\n  }\n\n  semicolon(force = false) {\n    this._maybeAddAuxComment();\n\n    this._append(\";\", !force);\n  }\n\n  rightBrace() {\n    if (this.format.minified) {\n      this._buf.removeLastSemicolon();\n    }\n    this.token(\"}\");\n  }\n\n  space(force = false) {\n    if (this.format.compact) return;\n\n    if (this._buf.hasContent() && !this.endsWith(\" \") && !this.endsWith(\"\\n\") || force) {\n      this._space();\n    }\n  }\n\n  word(str) {\n    if (this._endsWithWord || this.endsWith(\"/\") && str.indexOf(\"/\") === 0) {\n      this._space();\n    }\n\n    this._maybeAddAuxComment();\n\n    this._append(str);\n\n    this._endsWithWord = true;\n  }\n\n  number(str) {\n    this.word(str);\n    this._endsWithInteger = (0, _isInteger().default)(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str[str.length - 1] !== \".\";\n  }\n\n  token(str) {\n    if (str === \"--\" && this.endsWith(\"!\") || str[0] === \"+\" && this.endsWith(\"+\") || str[0] === \"-\" && this.endsWith(\"-\") || str[0] === \".\" && this._endsWithInteger) {\n      this._space();\n    }\n\n    this._maybeAddAuxComment();\n\n    this._append(str);\n  }\n\n  newline(i) {\n    if (this.format.retainLines || this.format.compact) return;\n\n    if (this.format.concise) {\n      this.space();\n      return;\n    }\n\n    if (this.endsWith(\"\\n\\n\")) return;\n    if (typeof i !== \"number\") i = 1;\n    i = Math.min(2, i);\n    if (this.endsWith(\"{\\n\") || this.endsWith(\":\\n\")) i--;\n    if (i <= 0) return;\n\n    for (let j = 0; j < i; j++) {\n      this._newline();\n    }\n  }\n\n  endsWith(str) {\n    return this._buf.endsWith(str);\n  }\n\n  removeTrailingNewline() {\n    this._buf.removeTrailingNewline();\n  }\n\n  exactSource(loc, cb) {\n    this._catchUp(\"start\", loc);\n\n    this._buf.exactSource(loc, cb);\n  }\n\n  source(prop, loc) {\n    this._catchUp(prop, loc);\n\n    this._buf.source(prop, loc);\n  }\n\n  withSource(prop, loc, cb) {\n    this._catchUp(prop, loc);\n\n    this._buf.withSource(prop, loc, cb);\n  }\n\n  _space() {\n    this._append(\" \", true);\n  }\n\n  _newline() {\n    this._append(\"\\n\", true);\n  }\n\n  _append(str, queue = false) {\n    this._maybeAddParen(str);\n\n    this._maybeIndent(str);\n\n    if (queue) this._buf.queue(str);else this._buf.append(str);\n    this._endsWithWord = false;\n    this._endsWithInteger = false;\n  }\n\n  _maybeIndent(str) {\n    if (this._indent && this.endsWith(\"\\n\") && str[0] !== \"\\n\") {\n      this._buf.queue(this._getIndent());\n    }\n  }\n\n  _maybeAddParen(str) {\n    const parenPushNewlineState = this._parenPushNewlineState;\n    if (!parenPushNewlineState) return;\n    this._parenPushNewlineState = null;\n    let i;\n\n    for (i = 0; i < str.length && str[i] === \" \"; i++) continue;\n\n    if (i === str.length) return;\n    const cha = str[i];\n\n    if (cha !== \"\\n\") {\n      if (cha !== \"/\") return;\n      if (i + 1 === str.length) return;\n      const chaPost = str[i + 1];\n      if (chaPost !== \"/\" && chaPost !== \"*\") return;\n    }\n\n    this.token(\"(\");\n    this.indent();\n    parenPushNewlineState.printed = true;\n  }\n\n  _catchUp(prop, loc) {\n    if (!this.format.retainLines) return;\n    const pos = loc ? loc[prop] : null;\n\n    if (pos && pos.line !== null) {\n      const count = pos.line - this._buf.getCurrentLine();\n\n      for (let i = 0; i < count; i++) {\n        this._newline();\n      }\n    }\n  }\n\n  _getIndent() {\n    return (0, _repeat().default)(this.format.indent.style, this._indent);\n  }\n\n  startTerminatorless(isLabel = false) {\n    if (isLabel) {\n      this._noLineTerminator = true;\n      return null;\n    } else {\n      return this._parenPushNewlineState = {\n        printed: false\n      };\n    }\n  }\n\n  endTerminatorless(state) {\n    this._noLineTerminator = false;\n\n    if (state && state.printed) {\n      this.dedent();\n      this.newline();\n      this.token(\")\");\n    }\n  }\n\n  print(node, parent) {\n    if (!node) return;\n    const oldConcise = this.format.concise;\n\n    if (node._compact) {\n      this.format.concise = true;\n    }\n\n    const printMethod = this[node.type];\n\n    if (!printMethod) {\n      throw new ReferenceError(`unknown node of type ${JSON.stringify(node.type)} with constructor ${JSON.stringify(node && node.constructor.name)}`);\n    }\n\n    this._printStack.push(node);\n\n    const oldInAux = this._insideAux;\n    this._insideAux = !node.loc;\n\n    this._maybeAddAuxComment(this._insideAux && !oldInAux);\n\n    let needsParens = n.needsParens(node, parent, this._printStack);\n\n    if (this.format.retainFunctionParens && node.type === \"FunctionExpression\" && node.extra && node.extra.parenthesized) {\n      needsParens = true;\n    }\n\n    if (needsParens) this.token(\"(\");\n\n    this._printLeadingComments(node);\n\n    const loc = t().isProgram(node) || t().isFile(node) ? null : node.loc;\n    this.withSource(\"start\", loc, () => {\n      this[node.type](node, parent);\n    });\n\n    this._printTrailingComments(node);\n\n    if (needsParens) this.token(\")\");\n\n    this._printStack.pop();\n\n    this.format.concise = oldConcise;\n    this._insideAux = oldInAux;\n  }\n\n  _maybeAddAuxComment(enteredPositionlessNode) {\n    if (enteredPositionlessNode) this._printAuxBeforeComment();\n    if (!this._insideAux) this._printAuxAfterComment();\n  }\n\n  _printAuxBeforeComment() {\n    if (this._printAuxAfterOnNextUserNode) return;\n    this._printAuxAfterOnNextUserNode = true;\n    const comment = this.format.auxiliaryCommentBefore;\n\n    if (comment) {\n      this._printComment({\n        type: \"CommentBlock\",\n        value: comment\n      });\n    }\n  }\n\n  _printAuxAfterComment() {\n    if (!this._printAuxAfterOnNextUserNode) return;\n    this._printAuxAfterOnNextUserNode = false;\n    const comment = this.format.auxiliaryCommentAfter;\n\n    if (comment) {\n      this._printComment({\n        type: \"CommentBlock\",\n        value: comment\n      });\n    }\n  }\n\n  getPossibleRaw(node) {\n    const extra = node.extra;\n\n    if (extra && extra.raw != null && extra.rawValue != null && node.value === extra.rawValue) {\n      return extra.raw;\n    }\n  }\n\n  printJoin(nodes, parent, opts = {}) {\n    if (!nodes || !nodes.length) return;\n    if (opts.indent) this.indent();\n    const newlineOpts = {\n      addNewlines: opts.addNewlines\n    };\n\n    for (let i = 0; i < nodes.length; i++) {\n      const node = nodes[i];\n      if (!node) continue;\n      if (opts.statement) this._printNewline(true, node, parent, newlineOpts);\n      this.print(node, parent);\n\n      if (opts.iterator) {\n        opts.iterator(node, i);\n      }\n\n      if (opts.separator && i < nodes.length - 1) {\n        opts.separator.call(this);\n      }\n\n      if (opts.statement) this._printNewline(false, node, parent, newlineOpts);\n    }\n\n    if (opts.indent) this.dedent();\n  }\n\n  printAndIndentOnComments(node, parent) {\n    const indent = node.leadingComments && node.leadingComments.length > 0;\n    if (indent) this.indent();\n    this.print(node, parent);\n    if (indent) this.dedent();\n  }\n\n  printBlock(parent) {\n    const node = parent.body;\n\n    if (!t().isEmptyStatement(node)) {\n      this.space();\n    }\n\n    this.print(node, parent);\n  }\n\n  _printTrailingComments(node) {\n    this._printComments(this._getComments(false, node));\n  }\n\n  _printLeadingComments(node) {\n    this._printComments(this._getComments(true, node));\n  }\n\n  printInnerComments(node, indent = true) {\n    if (!node.innerComments || !node.innerComments.length) return;\n    if (indent) this.indent();\n\n    this._printComments(node.innerComments);\n\n    if (indent) this.dedent();\n  }\n\n  printSequence(nodes, parent, opts = {}) {\n    opts.statement = true;\n    return this.printJoin(nodes, parent, opts);\n  }\n\n  printList(items, parent, opts = {}) {\n    if (opts.separator == null) {\n      opts.separator = commaSeparator;\n    }\n\n    return this.printJoin(items, parent, opts);\n  }\n\n  _printNewline(leading, node, parent, opts) {\n    if (this.format.retainLines || this.format.compact) return;\n\n    if (this.format.concise) {\n      this.space();\n      return;\n    }\n\n    let lines = 0;\n\n    if (this._buf.hasContent()) {\n      if (!leading) lines++;\n      if (opts.addNewlines) lines += opts.addNewlines(leading, node) || 0;\n      const needs = leading ? n.needsWhitespaceBefore : n.needsWhitespaceAfter;\n      if (needs(node, parent)) lines++;\n    }\n\n    this.newline(lines);\n  }\n\n  _getComments(leading, node) {\n    return node && (leading ? node.leadingComments : node.trailingComments) || [];\n  }\n\n  _printComment(comment) {\n    if (!this.format.shouldPrintComment(comment.value)) return;\n    if (comment.ignore) return;\n    if (this._printedComments.has(comment)) return;\n\n    this._printedComments.add(comment);\n\n    if (comment.start != null) {\n      if (this._printedCommentStarts[comment.start]) return;\n      this._printedCommentStarts[comment.start] = true;\n    }\n\n    const isBlockComment = comment.type === \"CommentBlock\";\n    this.newline(this._buf.hasContent() && !this._noLineTerminator && isBlockComment ? 1 : 0);\n    if (!this.endsWith(\"[\") && !this.endsWith(\"{\")) this.space();\n    let val = !isBlockComment && !this._noLineTerminator ? `//${comment.value}\\n` : `/*${comment.value}*/`;\n\n    if (isBlockComment && this.format.indent.adjustMultilineComment) {\n      const offset = comment.loc && comment.loc.start.column;\n\n      if (offset) {\n        const newlineRegex = new RegExp(\"\\\\n\\\\s{1,\" + offset + \"}\", \"g\");\n        val = val.replace(newlineRegex, \"\\n\");\n      }\n\n      const indentSize = Math.max(this._getIndent().length, this._buf.getCurrentColumn());\n      val = val.replace(/\\n(?!$)/g, `\\n${(0, _repeat().default)(\" \", indentSize)}`);\n    }\n\n    if (this.endsWith(\"/\")) this._space();\n    this.withSource(\"start\", comment.loc, () => {\n      this._append(val);\n    });\n    this.newline(isBlockComment && !this._noLineTerminator ? 1 : 0);\n  }\n\n  _printComments(comments) {\n    if (!comments || !comments.length) return;\n\n    for (const comment of comments) {\n      this._printComment(comment);\n    }\n  }\n\n}\n\nexports.default = Printer;\nObject.assign(Printer.prototype, generatorFunctions);\n\nfunction commaSeparator() {\n  this.token(\",\");\n  this.space();\n}"
  },
  {
    "path": "packages/mvvm-babel-generator/lib/source-map.js",
    "content": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.default = void 0;\n\nfunction _sourceMap() {\n  const data = _interopRequireDefault(require(\"source-map/source-map\"));\n\n  _sourceMap = function () {\n    return data;\n  };\n\n  return data;\n}\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nclass SourceMap {\n  constructor(opts, code) {\n    this._cachedMap = null;\n    this._code = code;\n    this._opts = opts;\n    this._rawMappings = [];\n  }\n\n  get() {\n    if (!this._cachedMap) {\n      const map = this._cachedMap = new (_sourceMap().default.SourceMapGenerator)({\n        sourceRoot: this._opts.sourceRoot\n      });\n      const code = this._code;\n\n      if (typeof code === \"string\") {\n        map.setSourceContent(this._opts.sourceFileName, code);\n      } else if (typeof code === \"object\") {\n        Object.keys(code).forEach(sourceFileName => {\n          map.setSourceContent(sourceFileName, code[sourceFileName]);\n        });\n      }\n\n      this._rawMappings.forEach(map.addMapping, map);\n    }\n\n    return this._cachedMap.toJSON();\n  }\n\n  getRawMappings() {\n    return this._rawMappings.slice();\n  }\n\n  mark(generatedLine, generatedColumn, line, column, identifierName, filename, force) {\n    if (this._lastGenLine !== generatedLine && line === null) return;\n\n    if (!force && this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) {\n      return;\n    }\n\n    this._cachedMap = null;\n    this._lastGenLine = generatedLine;\n    this._lastSourceLine = line;\n    this._lastSourceColumn = column;\n\n    this._rawMappings.push({\n      name: identifierName || undefined,\n      generated: {\n        line: generatedLine,\n        column: generatedColumn\n      },\n      source: line == null ? undefined : filename || this._opts.sourceFileName,\n      original: line == null ? undefined : {\n        line: line,\n        column: column\n      }\n    });\n  }\n\n}\n\nexports.default = SourceMap;"
  },
  {
    "path": "packages/mvvm-babel-generator/package.json",
    "content": "{\n  \"name\": \"mvvm-babel-generator\",\n  \"version\": \"1.0.8\",\n  \"description\": \"Turns an AST into code.\",\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"publishConfig\": {\n    \"access\": \"public\"\n  },\n  \"repository\": \"https://github.com/babel/babel/tree/master/packages/babel-generator\",\n  \"main\": \"lib/index.js\",\n  \"files\": [\n    \"lib\"\n  ],\n  \"dependencies\": {\n    \"@babel/types\": \"^7.1.2\",\n    \"jsesc\": \"^2.5.1\",\n    \"lodash\": \"^4.17.10\",\n    \"source-map\": \"^0.5.0\",\n    \"trim-right\": \"^1.0.1\"\n  },\n  \"devDependencies\": {\n    \"@babel/helper-fixtures\": \"^7.0.0\",\n    \"@babel/parser\": \"^7.0.0\"\n  }\n}"
  },
  {
    "path": "packages/mvvm-babel-parser/.eslintrc",
    "content": "{\n  // 在配置文件里配置全局变量时，使用 globals 指出你要使用的全局变量。将变量设置为 true 将允许变量被重写，或 false 将不允许被重写\n  \"globals\": {\n      \"cml\": false\n  },\n  // 环境定义了预定义的全局变量。\n  \"env\": {\n      //环境定义了预定义的全局变量。更多在官网查看\n      \"browser\": true,\n      \"node\": true,\n      \"commonjs\": true,\n      \"amd\": true,\n      \"es6\": true,\n      \"mocha\": true\n  },\n  // JavaScript 语言选项\n  \"parserOptions\": {\n      // ECMAScript 版本\n      \"ecmaVersion\": 9,\n      \"sourceType\": \"module\", //设置为 \"script\" (默认) 或 \"module\"（如果你的代码是 ECMAScript 模块)。\n      //想使用的额外的语言特性:\n      \"ecmaFeatures\": {\n          // 允许在全局作用域下使用 return 语句\n          \"globalReturn\": true,\n          // impliedStric\n          \"impliedStrict\": true,\n          // 启用 JSX\n          \"jsx\": true,\n          \"modules\": true\n      }\n  },\n  //-----让eslint支持 JSX start\n  \"plugins\": [\n\n  ],\n  \"extends\": [\n      \"eslint:recommended\"\n  ],\n  //-----让eslint支持 JSX end\n\n\n  /**\n   * \"off\" 或 0 - 关闭规则\n   * \"warn\" 或 1 - 开启规则，使用警告级别的错误：warn (不会导致程序退出),\n   * \"error\" 或 2 - 开启规则，使用错误级别的错误：error (当被触发的时候，程序会退出)\n   */\n  \"rules\": {\n\n      ////////////////\n      // 可能的错误 //\n      ////////////////\n\n      // 禁止条件表达式中出现赋值操作符\n      \"no-cond-assign\": 2,\n      // 禁用 console\n      \"no-console\": 0,\n      // 禁止在条件中使用常量表达式\n      // if (false) {\n      // doSomethingUnfinished();\n      // } //cuowu\n      \"no-constant-condition\": 2,\n      // 禁止在正则表达式中使用控制字符 ：new RegExp(\"\\x1f\")\n      \"no-control-regex\": 2,\n      // 数组和对象键值对最后一个逗号， never参数：不能带末尾的逗号, always参数：必须带末尾的逗号，\n      // always-multiline：多行模式必须带逗号，单行模式不能带逗号\n      \"comma-dangle\": [1, \"never\"],\n      // 禁用 debugger\n      \"no-debugger\": 2,\n      // 禁止 function 定义中出现重名参数\n      \"no-dupe-args\": 2,\n      // 禁止对象字面量中出现重复的 key\n      \"no-dupe-keys\": 2,\n      // 禁止重复的 case 标签\n      \"no-duplicate-case\": 2,\n      // 禁止空语句块\n      \"no-empty\": 2,\n      // 禁止在正则表达式中使用空字符集 (/^abc[]/)\n      \"no-empty-character-class\": 2,\n      // 禁止对 catch 子句的参数重新赋值\n      \"no-ex-assign\": 2,\n      // 禁止不必要的布尔转换\n      \"no-extra-boolean-cast\": 2,\n      // 禁止不必要的括号 //(a * b) + c;//报错\n      \"no-extra-parens\": 0,\n      // 禁止不必要的分号\n      \"no-extra-semi\": 2,\n      // 禁止对 function 声明重新赋值\n      \"no-func-assign\": 2,\n      // 禁止在嵌套的块中出现 function 或 var 声明\n      \"no-inner-declarations\": [2, \"functions\"],\n      // 禁止 RegExp 构造函数中无效的正则表达式字符串\n      \"no-invalid-regexp\": 2,\n      // 禁止在字符串和注释之外不规则的空白\n      \"no-irregular-whitespace\": 2,\n      // 禁止在 in 表达式中出现否定的左操作数\n      \"no-negated-in-lhs\": 2,\n      // 禁止把全局对象 (Math 和 JSON) 作为函数调用 错误：var math = Math();\n      \"no-obj-calls\": 2,\n      // 禁止直接使用 Object.prototypes 的内置属性\n      \"no-prototype-builtins\": 0,\n      // 禁止正则表达式字面量中出现多个空格\n      \"no-regex-spaces\": 2,\n      // 禁用稀疏数组\n      \"no-sparse-arrays\": 2,\n      // 禁止出现令人困惑的多行表达式\n      \"no-unexpected-multiline\": 2,\n      // 禁止在return、throw、continue 和 break语句之后出现不可达代码\n      \"no-unreachable\": 2,\n      // 要求使用 isNaN() 检查 NaN\n      \"use-isnan\": 2,\n      // 强制使用有效的 JSDoc 注释\n      \"valid-jsdoc\": 0,\n      // 强制 typeof 表达式与有效的字符串进行比较\n      // typeof foo === \"undefimed\" 错误\n      \"valid-typeof\": 2,\n\n\n      //////////////\n      // 最佳实践 //\n      //////////////\n\n      // 定义对象的set存取器属性时，强制定义get\n      \"accessor-pairs\": 2,\n      // 强制数组方法的回调函数中有 return 语句\n      \"array-callback-return\": 0,\n      // 强制把变量的使用限制在其定义的作用域范围内\n      \"block-scoped-var\": 0,\n      // 限制圈复杂度，也就是类似if else能连续接多少个\n      \"complexity\": [2, 9],\n      // 要求 return 语句要么总是指定返回的值，要么不指定\n      \"consistent-return\": 0,\n      // 强制所有控制语句使用一致的括号风格\n      \"curly\": [2, \"all\"],\n      // switch 语句强制 default 分支，也可添加 // no default 注释取消此次警告\n      \"default-case\": 2,\n      // 强制object.key 中 . 的位置，参数:\n      // property，'.'号应与属性在同一行\n      // object, '.' 号应与对象名在同一行\n      \"dot-location\": [2, \"property\"],\n      // 强制使用.号取属性\n      // 参数： allowKeywords：true 使用保留字做属性名时，只能使用.方式取属性\n      // false 使用保留字做属性名时, 只能使用[]方式取属性 e.g [2, {\"allowKeywords\": false}]\n      // allowPattern: 当属性名匹配提供的正则表达式时，允许使用[]方式取值,否则只能用.号取值 e.g [2, {\"allowPattern\": \"^[a-z]+(_[a-z]+)+$\"}]\n      \"dot-notation\": [2, {\n          \"allowKeywords\": false\n      }],\n      // 使用 === 替代 == allow-null允许null和undefined==\n      \"eqeqeq\": [0, \"allow-null\"],\n      // 要求 for-in 循环中有一个 if 语句\n      \"guard-for-in\": 2,\n      // 禁用 alert、confirm 和 prompt\n      \"no-alert\": 0,\n      // 禁用 arguments.caller 或 arguments.callee\n      \"no-caller\": 2,\n      // 不允许在 case 子句中使用词法声明\n      \"no-case-declarations\": 2,\n      // 禁止除法操作符显式的出现在正则表达式开始的位置\n      \"no-div-regex\": 2,\n      // 禁止 if 语句中有 return 之后有 else\n      \"no-else-return\": 0,\n      // 禁止出现空函数.如果一个函数包含了一条注释，它将不会被认为有问题。\n      \"no-empty-function\": 2,\n      // 禁止使用空解构模式no-empty-pattern\n      \"no-empty-pattern\": 2,\n      // 禁止在没有类型检查操作符的情况下与 null 进行比较\n      \"no-eq-null\": 1,\n      // 禁用 eval()\n      \"no-eval\": 2,\n      // 禁止扩展原生类型\n      \"no-extend-native\": 2,\n      // 禁止不必要的 .bind() 调用\n      \"no-extra-bind\": 2,\n      // 禁用不必要的标签\n      \"no-extra-label:\": 0,\n      // 禁止 case 语句落空\n      \"no-fallthrough\": 2,\n      // 禁止数字字面量中使用前导和末尾小数点\n      \"no-floating-decimal\": 2,\n      // 禁止使用短符号进行类型转换(!!fOO)\n      \"no-implicit-coercion\": 0,\n      // 禁止在全局范围内使用 var 和命名的 function 声明\n      \"no-implicit-globals\": 1,\n      // 禁止使用类似 eval() 的方法\n      \"no-implied-eval\": 2,\n      // 禁止 this 关键字出现在类和类对象之外\n      \"no-invalid-this\": 0,\n      // 禁用 __iterator__ 属性\n      \"no-iterator\": 2,\n      // 禁用标签语句\n      \"no-labels\": 2,\n      // 禁用不必要的嵌套块\n      \"no-lone-blocks\": 2,\n      // 禁止在循环中出现 function 声明和表达式\n      \"no-loop-func\": 1,\n      // 禁用魔术数字(3.14什么的用常量代替)\n      \"no-magic-numbers\": [1, {\n          \"ignore\": [0, -1, 1]\n      }],\n      // 禁止使用多个空格\n      \"no-multi-spaces\": 2,\n      // 禁止使用多行字符串，在 JavaScript 中，可以在新行之前使用斜线创建多行字符串\n      \"no-multi-str\": 2,\n      // 禁止对原生对象赋值\n      \"no-native-reassign\": 2,\n      // 禁止在非赋值或条件语句中使用 new 操作符\n      \"no-new\": 2,\n      // 禁止对 Function 对象使用 new 操作符\n      \"no-new-func\": 0,\n      // 禁止对 String，Number 和 Boolean 使用 new 操作符\n      \"no-new-wrappers\": 2,\n      // 禁用八进制字面量\n      \"no-octal\": 2,\n      // 禁止在字符串中使用八进制转义序列\n      \"no-octal-escape\": 2,\n      // 不允许对 function 的参数进行重新赋值\n      \"no-param-reassign\": 0,\n      // 禁用 __proto__ 属性\n      \"no-proto\": 2,\n      // 禁止使用 var 多次声明同一变量\n      \"no-redeclare\": 2,\n      // 禁用指定的通过 require 加载的模块\n      \"no-return-assign\": 0,\n      // 禁止使用 javascript: url\n      \"no-script-url\": 0,\n      // 禁止自我赋值\n      \"no-self-assign\": 2,\n      // 禁止自身比较\n      \"no-self-compare\": 2,\n      // 禁用逗号操作符\n      \"no-sequences\": 2,\n      // 禁止抛出非异常字面量\n      \"no-throw-literal\": 2,\n      // 禁用一成不变的循环条件\n      \"no-unmodified-loop-condition\": 2,\n      // 禁止出现未使用过的表达式\n      \"no-unused-expressions\": 0,\n      // 禁用未使用过的标签\n      \"no-unused-labels\": 2,\n      // 禁止不必要的 .call() 和 .apply()\n      \"no-useless-call\": 2,\n      // 禁止不必要的字符串字面量或模板字面量的连接\n      \"no-useless-concat\": 0,\n      // 禁用不必要的转义字符\n      \"no-useless-escape\": 0,\n      // 禁用 void 操作符\n      \"no-void\": 0,\n      // 禁止在注释中使用特定的警告术语\n      \"no-warning-comments\": 0,\n      // 禁用 with 语句\n      \"no-with\": 2,\n      // 强制在parseInt()使用基数参数\n      \"radix\": 2,\n      // 要求所有的 var 声明出现在它们所在的作用域顶部\n      \"vars-on-top\": 0,\n      // 要求 IIFE 使用括号括起来\n      \"wrap-iife\": [2, \"any\"],\n      // 要求或禁止 “Yoda” 条件\n      \"yoda\": [2, \"never\"],\n      // 要求或禁止使用严格模式指令\n      \"strict\": 0,\n\n\n      //////////////\n      // 变量声明 //\n      //////////////\n\n      // 要求或禁止 var 声明中的初始化(初值)\n      \"init-declarations\": 0,\n      // 不允许 catch 子句的参数与外层作用域中的变量同名\n      \"no-catch-shadow\": 0,\n      // 禁止删除变量\n      \"no-delete-var\": 2,\n      // 不允许标签与变量同名\n      \"no-label-var\": 2,\n      // 禁用特定的全局变量\n      \"no-restricted-globals\": 0,\n      // 禁止 var 声明 与外层作用域的变量同名\n      \"no-shadow\": 0,\n      // 禁止覆盖受限制的标识符\n      \"no-shadow-restricted-names\": 2,\n      // 禁用未声明的变量，除非它们在 /*global */ 注释中被提到\n      \"no-undef\": 2,\n      // 禁止将变量初始化为 undefined\n      \"no-undef-init\": 2,\n      // 禁止将 undefined 作为标识符\n      \"no-undefined\": 0,\n      // 禁止出现未使用过的变量\n      \"no-unused-vars\": [2, {\n          \"vars\": \"all\",\n          \"args\": \"none\"\n      }],\n      // 不允许在变量定义之前使用它们\n      \"no-use-before-define\": 0,\n\n      //////////////////////////\n      // Node.js and CommonJS //\n      //////////////////////////\n\n      // require return statements after callbacks\n      \"callback-return\": 0,\n      // 要求 require() 出现在顶层模块作用域中\n      \"global-require\": 1,\n      // 要求回调函数中有容错处理\n      \"handle-callback-err\": [2, \"^(err|error)$\"],\n      // 禁止混合常规 var 声明和 require 调用\n      \"no-mixed-requires\": 0,\n      // 禁止调用 require 时使用 new 操作符\n      \"no-new-require\": 2,\n      // 禁止对 __dirname 和 __filename进行字符串连接\n      \"no-path-concat\": 0,\n      // 禁用 process.env\n      \"no-process-env\": 0,\n      // 禁用 process.exit()\n      \"no-process-exit\": 0,\n      // 禁用同步方法\n      \"no-sync\": 0,\n\n      //////////////\n      // 风格指南 //\n      //////////////\n\n      // 指定数组的元素之间要以空格隔开(, 后面)， never参数：[ 之前和 ] 之后不能带空格，always参数：[ 之前和 ] 之后必须带空格\n      \"array-bracket-spacing\": [2, \"never\"],\n      // 禁止或强制在单行代码块中使用空格(禁用)\n      \"block-spacing\": [1, \"never\"],\n      //强制使用一致的缩进 第二个参数为 \"tab\" 时，会使用tab，\n      // if while function 后面的{必须与if在同一行，java风格。\n      \"brace-style\": [2, \"1tbs\", {\n          \"allowSingleLine\": true\n      }],\n      // 双峰驼命名格式\n      \"camelcase\": 2,\n      // 控制逗号前后的空格\n      \"comma-spacing\": [2, {\n          \"before\": false,\n          \"after\": true\n      }],\n      // 控制逗号在行尾出现还是在行首出现 (默认行尾)\n      // http://eslint.org/docs/rules/comma-style\n      \"comma-style\": [2, \"last\"],\n      //\"SwitchCase\" (默认：0) 强制 switch 语句中的 case 子句的缩进水平\n      // 以方括号取对象属性时，[ 后面和 ] 前面是否需要空格, 可选参数 never, always\n      \"computed-property-spacing\": [2, \"never\"],\n      // 用于指统一在回调函数中指向this的变量名，箭头函数中的this已经可以指向外层调用者，应该没卵用了\n      // e.g [0,\"that\"] 指定只能 var that = this. that不能指向其他任何值，this也不能赋值给that以外的其他值\n      \"consistent-this\": [1, \"that\"],\n      // 强制使用命名的 function 表达式\n      \"func-names\": 0,\n      // 文件末尾强制换行\n      \"eol-last\": 2,\n      \"indent\": [2, 2, {\n          \"SwitchCase\": 1\n      }],\n      // 强制在对象字面量的属性中键和值之间使用一致的间距\n      \"key-spacing\": [2, {\n          \"beforeColon\": false,\n          \"afterColon\": true\n      }],\n      // 强制使用一致的换行风格\n      \"linebreak-style\": [1, \"unix\"],\n      // 要求在注释周围有空行 ( 要求在块级注释之前有一空行)\n      \"lines-around-comment\": [1, {\n          \"beforeBlockComment\": true\n      }],\n      // 强制一致地使用函数声明或函数表达式，方法定义风格，参数：\n      // declaration: 强制使用方法声明的方式，function f(){} e.g [2, \"declaration\"]\n      // expression：强制使用方法表达式的方式，var f = function() {} e.g [2, \"expression\"]\n      // allowArrowFunctions: declaration风格中允许箭头函数。 e.g [2, \"declaration\", { \"allowArrowFunctions\": true }]\n      \"func-style\": 0,\n      // 强制回调函数最大嵌套深度 5层\n      \"max-nested-callbacks\": [1, 5],\n      // 禁止使用指定的标识符\n      \"id-blacklist\": 0,\n      // 强制标识符的最新和最大长度\n      \"id-length\": 0,\n      // 要求标识符匹配一个指定的正则表达式\n      \"id-match\": 0,\n      // 强制在 JSX 属性中一致地使用双引号或单引号\n      \"jsx-quotes\": 0,\n      // 强制在关键字前后使用一致的空格 (前后腰需要)\n      \"keyword-spacing\": 2,\n      // 强制一行的最大长度\n      \"max-len\": [1, 200],\n      // 强制最大行数\n      \"max-lines\": 0,\n      // 强制 function 定义中最多允许的参数数量\n      \"max-params\": [1, 7],\n      // 强制 function 块最多允许的的语句数量\n      \"max-statements\": [1, 200],\n      // 强制每一行中所允许的最大语句数量\n      \"max-statements-per-line\": 0,\n      // 要求构造函数首字母大写 （要求调用 new 操作符时有首字母大小的函数，允许调用首字母大写的函数时没有 new 操作符。）\n      \"new-cap\": [2, {\n          \"newIsCap\": true,\n          \"capIsNew\": false\n      }],\n      // 要求调用无参构造函数时有圆括号\n      \"new-parens\": 2,\n      // 要求或禁止 var 声明语句后有一行空行\n      \"newline-after-var\": 0,\n      // 禁止使用 Array 构造函数\n      \"no-array-constructor\": 2,\n      // 禁用按位运算符\n      \"no-bitwise\": 0,\n      // 要求 return 语句之前有一空行\n      \"newline-before-return\": 0,\n      // 要求方法链中每个调用都有一个换行符\n      \"newline-per-chained-call\": 1,\n      // 禁用 continue 语句\n      \"no-continue\": 0,\n      // 禁止在代码行后使用内联注释\n      \"no-inline-comments\": 0,\n      // 禁止 if 作为唯一的语句出现在 else 语句中\n      \"no-lonely-if\": 0,\n      // 禁止混合使用不同的操作符\n      \"no-mixed-operators\": 0,\n      // 不允许空格和 tab 混合缩进\n      \"no-mixed-spaces-and-tabs\": 2,\n      // 不允许多个空行\n      \"no-multiple-empty-lines\": [2, {\n          \"max\": 2\n      }],\n      // 不允许否定的表达式\n      \"no-negated-condition\": 0,\n      // 不允许使用嵌套的三元表达式\n      \"no-nested-ternary\": 0,\n      // 禁止使用 Object 的构造函数\n      \"no-new-object\": 2,\n      // 禁止使用一元操作符 ++ 和 --\n      \"no-plusplus\": 0,\n      // 禁止使用特定的语法\n      \"no-restricted-syntax\": 0,\n      // 禁止 function 标识符和括号之间出现空格\n      \"no-spaced-func\": 2,\n      // 不允许使用三元操作符\n      \"no-ternary\": 0,\n      // 禁用行尾空格\n      \"no-trailing-spaces\": 2,\n      // 禁止标识符中有悬空下划线_bar\n      \"no-underscore-dangle\": 0,\n      // 禁止可以在有更简单的可替代的表达式时使用三元操作符\n      \"no-unneeded-ternary\": 2,\n      // 禁止属性前有空白\n      \"no-whitespace-before-property\": 0,\n      // 强制花括号内换行符的一致性\n      \"object-curly-newline\": 0,\n      // 强制在花括号中使用一致的空格\n      \"object-curly-spacing\": 0,\n      // 强制将对象的属性放在不同的行上\n      \"object-property-newline\": 0,\n      // 强制函数中的变量要么一起声明要么分开声明\n      \"one-var\": [2, {\n          \"initialized\": \"never\"\n      }],\n      // 要求或禁止在 var 声明周围换行\n      \"one-var-declaration-per-line\": 0,\n      // 要求或禁止在可能的情况下要求使用简化的赋值操作符\n      \"operator-assignment\": 0,\n      // 强制操作符使用一致的换行符\n      \"operator-linebreak\": [2, \"after\", {\n          \"overrides\": {\n              \"?\": \"before\",\n              \":\": \"before\"\n          }\n      }],\n      // 要求或禁止块内填充\n      \"padded-blocks\": 0,\n      // 要求对象字面量属性名称用引号括起来\n      \"quote-props\": 0,\n      // 强制使用一致的反勾号、双引号或单引号\n      // \"quotes\": [2, \"single\", \"avoid-escape\"],\n      // 要求使用 JSDoc 注释\n      \"require-jsdoc\": 0,\n      // 要求或禁止使用分号而不是 ASI（这个才是控制行尾部分号的，）\n      \"semi\": [0, \"always\"],\n      // 强制分号之前和之后使用一致的空格\n      \"semi-spacing\": 0,\n      // 要求同一个声明块中的变量按顺序排列\n      \"sort-vars\": 0,\n      // 强制在块之前使用一致的空格\n      \"space-before-blocks\": [2, \"always\"],\n      // 强制在 function的左括号之前使用一致的空格\n      \"space-before-function-paren\": [0, \"always\"],\n      // 强制在圆括号内使用一致的空格\n      \"space-in-parens\": [2, \"never\"],\n      // 要求操作符周围有空格\n      \"space-infix-ops\": 2,\n      // 强制在一元操作符前后使用一致的空格\n      \"space-unary-ops\": [2, {\n          \"words\": true,\n          \"nonwords\": false\n      }],\n      // 强制在注释中 // 或 /* 使用一致的空格\n      \"spaced-comment\": [2, \"always\", {\n          \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n      }],\n      // 要求或禁止 Unicode BOM\n      \"unicode-bom\": 0,\n      // 要求正则表达式被括号括起来\n      \"wrap-regex\": 0,\n\n      //////////////\n      // ES6.相关 //\n      //////////////\n\n      // 要求箭头函数体使用大括号\n      \"arrow-body-style\": 2,\n      // 要求箭头函数的参数使用圆括号\n      \"arrow-parens\": 0,\n      \"arrow-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 强制在子类构造函数中用super()调用父类构造函数，TypeScrip的编译器也会提示\n      \"constructor-super\": 0,\n      // 强制 generator 函数中 * 号周围使用一致的空格\n      \"generator-star-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 禁止修改类声明的变量\n      \"no-class-assign\": 2,\n      // 不允许箭头功能，在那里他们可以混淆的比较\n      \"no-confusing-arrow\": 0,\n      // 禁止修改 const 声明的变量\n      \"no-const-assign\": 2,\n      // 禁止类成员中出现重复的名称\n      \"no-dupe-class-members\": 2,\n      // 不允许复制模块的进口\n      \"no-duplicate-imports\": 0,\n      // 禁止 Symbol 的构造函数\n      \"no-new-symbol\": 2,\n      // 允许指定模块加载时的进口\n      \"no-restricted-imports\": 0,\n      // 禁止在构造函数中，在调用 super() 之前使用 this 或 super\n      \"no-this-before-super\": 2,\n      // 禁止不必要的计算性能键对象的文字\n      \"no-useless-computed-key\": 0,\n      // 要求使用 let 或 const 而不是 var\n      \"no-var\": 0,\n      // 要求或禁止对象字面量中方法和属性使用简写语法\n      \"object-shorthand\": 0,\n      // 要求使用箭头函数作为回调\n      \"prefer-arrow-callback\": 0,\n      // 要求使用 const 声明那些声明后不再被修改的变量\n      \"prefer-const\": 0,\n      // 要求在合适的地方使用 Reflect 方法\n      \"prefer-reflect\": 0,\n      // 要求使用扩展运算符而非 .apply()\n      \"prefer-spread\": 0,\n      // 要求使用模板字面量而非字符串连接\n      \"prefer-template\": 0,\n      // Suggest using the rest parameters instead of arguments\n      \"prefer-rest-params\": 0,\n      // 要求generator 函数内有 yield\n      \"require-yield\": 0,\n      // enforce spacing between rest and spread operators and their expressions\n      \"rest-spread-spacing\": 0,\n      // 强制模块内的 import 排序\n      \"sort-imports\": 0,\n      // 要求或禁止模板字符串中的嵌入表达式周围空格的使用\n      \"template-curly-spacing\": 1,\n      // 强制在 yield* 表达式中 * 周围使用空格\n      \"yield-star-spacing\": 2\n  }\n}\n"
  },
  {
    "path": "packages/mvvm-babel-parser/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n.vscode\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\ncoverage\ndist\npackage-lock.json\n"
  },
  {
    "path": "packages/mvvm-babel-parser/.istanbul.yml",
    "content": "\nverbose: false\ninstrumentation:\n    root: .\n    extensions:\n        - .js\n    default-excludes: true\n    excludes: [\n      '**/node_modules/**'\n    ]\n    embed-source: false\n    variable: __coverage__\n    compact: true\n    preserve-comments: false\n    complete-copy: false\n    save-baseline: false\n    baseline-file: ./coverage/coverage-baseline.json\n    include-all-sources: false\n    include-pid: false\n    es-modules: false\nreporting:\n    print: summary\n    reports:\n        - lcov\n    dir: ./coverage\n    watermarks:\n        statements: [50, 80]\n        lines: [50, 80]\n        functions: [50, 80]\n        branches: [50, 80]\n    report-config:\n        clover: {file: clover.xml}\n        cobertura: {file: cobertura-coverage.xml}\n        json: {file: coverage-final.json}\n        json-summary: {file: coverage-summary.json}\n        lcovonly: {file: lcov.info}\n        teamcity: {file: null, blockName: Code Coverage Summary}\n        text: {file: null, maxCols: 0}\n        text-lcov: {file: lcov.info}\n        text-summary: {file: null}\nhooks:\n    hook-run-in-context: false\n    post-require-hook: null\n    handle-sigint: false\ncheck:\n    global:\n        statements: 0\n        lines: 0\n        branches: 0\n        functions: 0\n        excludes: []\n    each:\n        statements: 0\n        lines: 0\n        branches: 0\n        functions: 0\n        excludes: []"
  },
  {
    "path": "packages/mvvm-babel-parser/.travis.yml",
    "content": "language: node_js\nnode_js:\n  - \"8\"\nscript:\n  - npm run cover\nafter_script: \"cat coverage/lcov.info | node_modules/coveralls/bin/coveralls.js\"\n"
  },
  {
    "path": "packages/mvvm-babel-parser/LICENSE",
    "content": "Copyright (C) 2012-2014 by various contributors (see AUTHORS)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "packages/mvvm-babel-parser/README.md",
    "content": "####  基于  @babel/parser@7.1.0 进行改造 jsx支持cml语法"
  },
  {
    "path": "packages/mvvm-babel-parser/lib/index.js",
    "content": "'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _AwaitValue(value) {\n  this.wrapped = value;\n}\n\nfunction _AsyncGenerator(gen) {\n  var front, back;\n\n  function send(key, arg) {\n    return new Promise(function (resolve, reject) {\n      var request = {\n        key: key,\n        arg: arg,\n        resolve: resolve,\n        reject: reject,\n        next: null\n      };\n\n      if (back) {\n        back = back.next = request;\n      } else {\n        front = back = request;\n        resume(key, arg);\n      }\n    });\n  }\n\n  function resume(key, arg) {\n    try {\n      var result = gen[key](arg);\n      var value = result.value;\n      var wrappedAwait = value instanceof _AwaitValue;\n      Promise.resolve(wrappedAwait ? value.wrapped : value).then(function (arg) {\n        if (wrappedAwait) {\n          resume(\"next\", arg);\n          return;\n        }\n\n        settle(result.done ? \"return\" : \"normal\", arg);\n      }, function (err) {\n        resume(\"throw\", err);\n      });\n    } catch (err) {\n      settle(\"throw\", err);\n    }\n  }\n\n  function settle(type, value) {\n    switch (type) {\n      case \"return\":\n        front.resolve({\n          value: value,\n          done: true\n        });\n        break;\n\n      case \"throw\":\n        front.reject(value);\n        break;\n\n      default:\n        front.resolve({\n          value: value,\n          done: false\n        });\n        break;\n    }\n\n    front = front.next;\n\n    if (front) {\n      resume(front.key, front.arg);\n    } else {\n      back = null;\n    }\n  }\n\n  this._invoke = send;\n\n  if (typeof gen.return !== \"function\") {\n    this.return = undefined;\n  }\n}\n\nif (typeof Symbol === \"function\" && Symbol.asyncIterator) {\n  _AsyncGenerator.prototype[Symbol.asyncIterator] = function () {\n    return this;\n  };\n}\n\n_AsyncGenerator.prototype.next = function (arg) {\n  return this._invoke(\"next\", arg);\n};\n\n_AsyncGenerator.prototype.throw = function (arg) {\n  return this._invoke(\"throw\", arg);\n};\n\n_AsyncGenerator.prototype.return = function (arg) {\n  return this._invoke(\"return\", arg);\n};\n\nfunction _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n  subClass.__proto__ = superClass;\n}\n\nvar beforeExpr = true;\nvar startsExpr = true;\nvar isLoop = true;\nvar isAssign = true;\nvar prefix = true;\nvar postfix = true;\nvar TokenType = function TokenType(label, conf) {\n  if (conf === void 0) {\n    conf = {};\n  }\n\n  this.label = label;\n  this.keyword = conf.keyword;\n  this.beforeExpr = !!conf.beforeExpr;\n  this.startsExpr = !!conf.startsExpr;\n  this.rightAssociative = !!conf.rightAssociative;\n  this.isLoop = !!conf.isLoop;\n  this.isAssign = !!conf.isAssign;\n  this.prefix = !!conf.prefix;\n  this.postfix = !!conf.postfix;\n  this.binop = conf.binop === 0 ? 0 : conf.binop || null;\n  this.updateContext = null;\n};\n\nfunction KeywordTokenType(keyword, options) {\n  if (options === void 0) {\n    options = {};\n  }\n\n  return new TokenType(keyword, Object.assign({}, options, {\n    keyword: keyword\n  }));\n}\n\nfunction BinopTokenType(name, binop) {\n  return new TokenType(name, {\n    beforeExpr: beforeExpr,\n    binop: binop\n  });\n}\n\nvar types = {\n  num: new TokenType(\"num\", {\n    startsExpr: startsExpr\n  }),\n  bigint: new TokenType(\"bigint\", {\n    startsExpr: startsExpr\n  }),\n  regexp: new TokenType(\"regexp\", {\n    startsExpr: startsExpr\n  }),\n  string: new TokenType(\"string\", {\n    startsExpr: startsExpr\n  }),\n  name: new TokenType(\"name\", {\n    startsExpr: startsExpr\n  }),\n  eof: new TokenType(\"eof\"),\n  bracketL: new TokenType(\"[\", {\n    beforeExpr: beforeExpr,\n    startsExpr: startsExpr\n  }),\n  bracketR: new TokenType(\"]\"),\n  braceL: new TokenType(\"{{\", { // jsx支持cml语法\n    beforeExpr: beforeExpr,\n    startsExpr: startsExpr\n  }),\n  braceBarL: new TokenType(\"{|\", {\n    beforeExpr: beforeExpr,\n    startsExpr: startsExpr\n  }),\n  braceR: new TokenType(\"}}\"), // jsx支持cml语法\n  braceBarR: new TokenType(\"|}\"),\n  parenL: new TokenType(\"(\", {\n    beforeExpr: beforeExpr,\n    startsExpr: startsExpr\n  }),\n  parenR: new TokenType(\")\"),\n  comma: new TokenType(\",\", {\n    beforeExpr: beforeExpr\n  }),\n  semi: new TokenType(\";\", {\n    beforeExpr: beforeExpr\n  }),\n  colon: new TokenType(\":\", {\n    beforeExpr: beforeExpr\n  }),\n  doubleColon: new TokenType(\"::\", {\n    beforeExpr: beforeExpr\n  }),\n  dot: new TokenType(\".\"),\n  question: new TokenType(\"?\", {\n    beforeExpr: beforeExpr\n  }),\n  questionDot: new TokenType(\"?.\"),\n  arrow: new TokenType(\"=>\", {\n    beforeExpr: beforeExpr\n  }),\n  template: new TokenType(\"template\"),\n  ellipsis: new TokenType(\"...\", {\n    beforeExpr: beforeExpr\n  }),\n  backQuote: new TokenType(\"`\", {\n    startsExpr: startsExpr\n  }),\n  dollarBraceL: new TokenType(\"${\", {\n    beforeExpr: beforeExpr,\n    startsExpr: startsExpr\n  }),\n  at: new TokenType(\"@\"),\n  hash: new TokenType(\"#\"),\n  interpreterDirective: new TokenType(\"#!...\"),\n  eq: new TokenType(\"=\", {\n    beforeExpr: beforeExpr,\n    isAssign: isAssign\n  }),\n  assign: new TokenType(\"_=\", {\n    beforeExpr: beforeExpr,\n    isAssign: isAssign\n  }),\n  incDec: new TokenType(\"++/--\", {\n    prefix: prefix,\n    postfix: postfix,\n    startsExpr: startsExpr\n  }),\n  bang: new TokenType(\"!\", {\n    beforeExpr: beforeExpr,\n    prefix: prefix,\n    startsExpr: startsExpr\n  }),\n  tilde: new TokenType(\"~\", {\n    beforeExpr: beforeExpr,\n    prefix: prefix,\n    startsExpr: startsExpr\n  }),\n  pipeline: new BinopTokenType(\"|>\", 0),\n  nullishCoalescing: new BinopTokenType(\"??\", 1),\n  logicalOR: new BinopTokenType(\"||\", 1),\n  logicalAND: new BinopTokenType(\"&&\", 2),\n  bitwiseOR: new BinopTokenType(\"|\", 3),\n  bitwiseXOR: new BinopTokenType(\"^\", 4),\n  bitwiseAND: new BinopTokenType(\"&\", 5),\n  equality: new BinopTokenType(\"==/!=\", 6),\n  relational: new BinopTokenType(\"</>\", 7),\n  bitShift: new BinopTokenType(\"<</>>\", 8),\n  plusMin: new TokenType(\"+/-\", {\n    beforeExpr: beforeExpr,\n    binop: 9,\n    prefix: prefix,\n    startsExpr: startsExpr\n  }),\n  modulo: new BinopTokenType(\"%\", 10),\n  star: new BinopTokenType(\"*\", 10),\n  slash: new BinopTokenType(\"/\", 10),\n  exponent: new TokenType(\"**\", {\n    beforeExpr: beforeExpr,\n    binop: 11,\n    rightAssociative: true\n  })\n};\nvar keywords = {\n  break: new KeywordTokenType(\"break\"),\n  case: new KeywordTokenType(\"case\", {\n    beforeExpr: beforeExpr\n  }),\n  catch: new KeywordTokenType(\"catch\"),\n  continue: new KeywordTokenType(\"continue\"),\n  debugger: new KeywordTokenType(\"debugger\"),\n  default: new KeywordTokenType(\"default\", {\n    beforeExpr: beforeExpr\n  }),\n  do: new KeywordTokenType(\"do\", {\n    isLoop: isLoop,\n    beforeExpr: beforeExpr\n  }),\n  else: new KeywordTokenType(\"else\", {\n    beforeExpr: beforeExpr\n  }),\n  finally: new KeywordTokenType(\"finally\"),\n  for: new KeywordTokenType(\"for\", {\n    isLoop: isLoop\n  }),\n  function: new KeywordTokenType(\"function\", {\n    startsExpr: startsExpr\n  }),\n  if: new KeywordTokenType(\"if\"),\n  return: new KeywordTokenType(\"return\", {\n    beforeExpr: beforeExpr\n  }),\n  switch: new KeywordTokenType(\"switch\"),\n  throw: new KeywordTokenType(\"throw\", {\n    beforeExpr: beforeExpr,\n    prefix: prefix,\n    startsExpr: startsExpr\n  }),\n  try: new KeywordTokenType(\"try\"),\n  var: new KeywordTokenType(\"var\"),\n  let: new KeywordTokenType(\"let\"),\n  const: new KeywordTokenType(\"const\"),\n  while: new KeywordTokenType(\"while\", {\n    isLoop: isLoop\n  }),\n  with: new KeywordTokenType(\"with\"),\n  new: new KeywordTokenType(\"new\", {\n    beforeExpr: beforeExpr,\n    startsExpr: startsExpr\n  }),\n  this: new KeywordTokenType(\"this\", {\n    startsExpr: startsExpr\n  }),\n  super: new KeywordTokenType(\"super\", {\n    startsExpr: startsExpr\n  }),\n  class: new KeywordTokenType(\"class\"),\n  extends: new KeywordTokenType(\"extends\", {\n    beforeExpr: beforeExpr\n  }),\n  export: new KeywordTokenType(\"export\"),\n  import: new KeywordTokenType(\"import\", {\n    startsExpr: startsExpr\n  }),\n  yield: new KeywordTokenType(\"yield\", {\n    beforeExpr: beforeExpr,\n    startsExpr: startsExpr\n  }),\n  null: new KeywordTokenType(\"null\", {\n    startsExpr: startsExpr\n  }),\n  true: new KeywordTokenType(\"true\", {\n    startsExpr: startsExpr\n  }),\n  false: new KeywordTokenType(\"false\", {\n    startsExpr: startsExpr\n  }),\n  in: new KeywordTokenType(\"in\", {\n    beforeExpr: beforeExpr,\n    binop: 7\n  }),\n  instanceof: new KeywordTokenType(\"instanceof\", {\n    beforeExpr: beforeExpr,\n    binop: 7\n  }),\n  typeof: new KeywordTokenType(\"typeof\", {\n    beforeExpr: beforeExpr,\n    prefix: prefix,\n    startsExpr: startsExpr\n  }),\n  void: new KeywordTokenType(\"void\", {\n    beforeExpr: beforeExpr,\n    prefix: prefix,\n    startsExpr: startsExpr\n  }),\n  delete: new KeywordTokenType(\"delete\", {\n    beforeExpr: beforeExpr,\n    prefix: prefix,\n    startsExpr: startsExpr\n  })\n};\nObject.keys(keywords).forEach(function (name) {\n  types[\"_\" + name] = keywords[name];\n});\n\nfunction isSimpleProperty(node) {\n  return node != null && node.type === \"Property\" && node.kind === \"init\" && node.method === false;\n}\n\nvar estree = (function (superClass) {\n  return function (_superClass) {\n    _inheritsLoose(_class, _superClass);\n\n    function _class() {\n      return _superClass.apply(this, arguments) || this;\n    }\n\n    var _proto = _class.prototype;\n\n    _proto.estreeParseRegExpLiteral = function estreeParseRegExpLiteral(_ref) {\n      var pattern = _ref.pattern,\n          flags = _ref.flags;\n      var regex = null;\n\n      try {\n        regex = new RegExp(pattern, flags);\n      } catch (e) {}\n\n      var node = this.estreeParseLiteral(regex);\n      node.regex = {\n        pattern: pattern,\n        flags: flags\n      };\n      return node;\n    };\n\n    _proto.estreeParseLiteral = function estreeParseLiteral(value) {\n      return this.parseLiteral(value, \"Literal\");\n    };\n\n    _proto.directiveToStmt = function directiveToStmt(directive) {\n      var directiveLiteral = directive.value;\n      var stmt = this.startNodeAt(directive.start, directive.loc.start);\n      var expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start);\n      expression.value = directiveLiteral.value;\n      expression.raw = directiveLiteral.extra.raw;\n      stmt.expression = this.finishNodeAt(expression, \"Literal\", directiveLiteral.end, directiveLiteral.loc.end);\n      stmt.directive = directiveLiteral.extra.raw.slice(1, -1);\n      return this.finishNodeAt(stmt, \"ExpressionStatement\", directive.end, directive.loc.end);\n    };\n\n    _proto.initFunction = function initFunction(node, isAsync) {\n      _superClass.prototype.initFunction.call(this, node, isAsync);\n\n      node.expression = false;\n    };\n\n    _proto.checkDeclaration = function checkDeclaration(node) {\n      if (isSimpleProperty(node)) {\n        this.checkDeclaration(node.value);\n      } else {\n        _superClass.prototype.checkDeclaration.call(this, node);\n      }\n    };\n\n    _proto.checkGetterSetterParams = function checkGetterSetterParams(method) {\n      var prop = method;\n      var paramCount = prop.kind === \"get\" ? 0 : 1;\n      var start = prop.start;\n\n      if (prop.value.params.length !== paramCount) {\n        if (prop.kind === \"get\") {\n          this.raise(start, \"getter must not have any formal parameters\");\n        } else {\n          this.raise(start, \"setter must have exactly one formal parameter\");\n        }\n      }\n\n      if (prop.kind === \"set\" && prop.value.params[0].type === \"RestElement\") {\n        this.raise(start, \"setter function argument must not be a rest parameter\");\n      }\n    };\n\n    _proto.checkLVal = function checkLVal(expr, isBinding, checkClashes, contextDescription) {\n      var _this = this;\n\n      switch (expr.type) {\n        case \"ObjectPattern\":\n          expr.properties.forEach(function (prop) {\n            _this.checkLVal(prop.type === \"Property\" ? prop.value : prop, isBinding, checkClashes, \"object destructuring pattern\");\n          });\n          break;\n\n        default:\n          _superClass.prototype.checkLVal.call(this, expr, isBinding, checkClashes, contextDescription);\n\n      }\n    };\n\n    _proto.checkPropClash = function checkPropClash(prop, propHash) {\n      if (prop.computed || !isSimpleProperty(prop)) return;\n      var key = prop.key;\n      var name = key.type === \"Identifier\" ? key.name : String(key.value);\n\n      if (name === \"__proto__\") {\n        if (propHash.proto) {\n          this.raise(key.start, \"Redefinition of __proto__ property\");\n        }\n\n        propHash.proto = true;\n      }\n    };\n\n    _proto.isStrictBody = function isStrictBody(node) {\n      var isBlockStatement = node.body.type === \"BlockStatement\";\n\n      if (isBlockStatement && node.body.body.length > 0) {\n        for (var _i2 = 0, _node$body$body2 = node.body.body; _i2 < _node$body$body2.length; _i2++) {\n          var directive = _node$body$body2[_i2];\n\n          if (directive.type === \"ExpressionStatement\" && directive.expression.type === \"Literal\") {\n            if (directive.expression.value === \"use strict\") return true;\n          } else {\n            break;\n          }\n        }\n      }\n\n      return false;\n    };\n\n    _proto.isValidDirective = function isValidDirective(stmt) {\n      return stmt.type === \"ExpressionStatement\" && stmt.expression.type === \"Literal\" && typeof stmt.expression.value === \"string\" && (!stmt.expression.extra || !stmt.expression.extra.parenthesized);\n    };\n\n    _proto.stmtToDirective = function stmtToDirective(stmt) {\n      var directive = _superClass.prototype.stmtToDirective.call(this, stmt);\n\n      var value = stmt.expression.value;\n      directive.value.value = value;\n      return directive;\n    };\n\n    _proto.parseBlockBody = function parseBlockBody(node, allowDirectives, topLevel, end) {\n      var _this2 = this;\n\n      _superClass.prototype.parseBlockBody.call(this, node, allowDirectives, topLevel, end);\n\n      var directiveStatements = node.directives.map(function (d) {\n        return _this2.directiveToStmt(d);\n      });\n      node.body = directiveStatements.concat(node.body);\n      delete node.directives;\n    };\n\n    _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor) {\n      this.parseMethod(method, isGenerator, isAsync, isConstructor, \"MethodDefinition\");\n\n      if (method.typeParameters) {\n        method.value.typeParameters = method.typeParameters;\n        delete method.typeParameters;\n      }\n\n      classBody.body.push(method);\n    };\n\n    _proto.parseExprAtom = function parseExprAtom(refShorthandDefaultPos) {\n      switch (this.state.type) {\n        case types.regexp:\n          return this.estreeParseRegExpLiteral(this.state.value);\n\n        case types.num:\n        case types.string:\n          return this.estreeParseLiteral(this.state.value);\n\n        case types._null:\n          return this.estreeParseLiteral(null);\n\n        case types._true:\n          return this.estreeParseLiteral(true);\n\n        case types._false:\n          return this.estreeParseLiteral(false);\n\n        default:\n          return _superClass.prototype.parseExprAtom.call(this, refShorthandDefaultPos);\n      }\n    };\n\n    _proto.parseLiteral = function parseLiteral(value, type, startPos, startLoc) {\n      var node = _superClass.prototype.parseLiteral.call(this, value, type, startPos, startLoc);\n\n      node.raw = node.extra.raw;\n      delete node.extra;\n      return node;\n    };\n\n    _proto.parseFunctionBody = function parseFunctionBody(node, allowExpression) {\n      _superClass.prototype.parseFunctionBody.call(this, node, allowExpression);\n\n      node.expression = node.body.type !== \"BlockStatement\";\n    };\n\n    _proto.parseMethod = function parseMethod(node, isGenerator, isAsync, isConstructor, type) {\n      var funcNode = this.startNode();\n      funcNode.kind = node.kind;\n      funcNode = _superClass.prototype.parseMethod.call(this, funcNode, isGenerator, isAsync, isConstructor, \"FunctionExpression\");\n      delete funcNode.kind;\n      node.value = funcNode;\n      return this.finishNode(node, type);\n    };\n\n    _proto.parseObjectMethod = function parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) {\n      var node = _superClass.prototype.parseObjectMethod.call(this, prop, isGenerator, isAsync, isPattern, containsEsc);\n\n      if (node) {\n        node.type = \"Property\";\n        if (node.kind === \"method\") node.kind = \"init\";\n        node.shorthand = false;\n      }\n\n      return node;\n    };\n\n    _proto.parseObjectProperty = function parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos) {\n      var node = _superClass.prototype.parseObjectProperty.call(this, prop, startPos, startLoc, isPattern, refShorthandDefaultPos);\n\n      if (node) {\n        node.kind = \"init\";\n        node.type = \"Property\";\n      }\n\n      return node;\n    };\n\n    _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) {\n      if (isSimpleProperty(node)) {\n        this.toAssignable(node.value, isBinding, contextDescription);\n        return node;\n      }\n\n      return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription);\n    };\n\n    _proto.toAssignableObjectExpressionProp = function toAssignableObjectExpressionProp(prop, isBinding, isLast) {\n      if (prop.kind === \"get\" || prop.kind === \"set\") {\n        this.raise(prop.key.start, \"Object pattern can't contain getter or setter\");\n      } else if (prop.method) {\n        this.raise(prop.key.start, \"Object pattern can't contain methods\");\n      } else {\n        _superClass.prototype.toAssignableObjectExpressionProp.call(this, prop, isBinding, isLast);\n      }\n    };\n\n    return _class;\n  }(superClass);\n});\n\nfunction makePredicate(words) {\n  var wordsArr = words.split(\" \");\n  return function (str) {\n    return wordsArr.indexOf(str) >= 0;\n  };\n}\n\nvar reservedWords = {\n  \"6\": makePredicate(\"enum await\"),\n  strict: makePredicate(\"implements interface let package private protected public static yield\"),\n  strictBind: makePredicate(\"eval arguments\")\n};\nvar isKeyword = makePredicate(\"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\");\nvar nonASCIIidentifierStartChars = \"\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\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-\\u1878\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\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-\\u312F\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FEF\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7B9\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\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\";\nvar nonASCIIidentifierChars = \"\\u200C\\u200D\\xB7\\u0300-\\u036F\\u0387\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u0669\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u06F0-\\u06F9\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07C0-\\u07C9\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D3-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096F\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09E6-\\u09EF\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A66-\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AE6-\\u0AEF\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B66-\\u0B6F\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C04\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0CE6-\\u0CEF\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D66-\\u0D6F\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0E50-\\u0E59\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1040-\\u1049\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F-\\u109D\\u135D-\\u135F\\u1369-\\u1371\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u194F\\u19D0-\\u19DA\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AB0-\\u1ABD\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BB0-\\u1BB9\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1C40-\\u1C49\\u1C50-\\u1C59\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DF9\\u1DFB-\\u1DFF\\u203F\\u2040\\u2054\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA620-\\uA629\\uA66F\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F1\\uA8FF-\\uA909\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9D0-\\uA9D9\\uA9E5\\uA9F0-\\uA9F9\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA50-\\uAA59\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF10-\\uFF19\\uFF3F\";\nvar nonASCIIidentifierStart = new RegExp(\"[\" + nonASCIIidentifierStartChars + \"]\");\nvar nonASCIIidentifier = new RegExp(\"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\");\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null;\nvar astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 477, 28, 11, 0, 9, 21, 190, 52, 76, 44, 33, 24, 27, 35, 30, 0, 12, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 54, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 86, 26, 230, 43, 117, 63, 32, 0, 257, 0, 11, 39, 8, 0, 22, 0, 12, 39, 3, 3, 20, 0, 35, 56, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 270, 921, 103, 110, 18, 195, 2749, 1070, 4050, 582, 8634, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 68, 12, 0, 67, 12, 65, 1, 31, 6129, 15, 754, 9486, 286, 82, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 4149, 196, 60, 67, 1213, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 3, 5761, 15, 7472, 3104, 541];\nvar astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 525, 10, 176, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 4, 9, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 280, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 2214, 6, 110, 6, 6, 9, 792487, 239];\n\nfunction isInAstralSet(code, set) {\n  var pos = 0x10000;\n\n  for (var i = 0; i < set.length; i += 2) {\n    pos += set[i];\n    if (pos > code) return false;\n    pos += set[i + 1];\n    if (pos >= code) return true;\n  }\n\n  return false;\n}\n\nfunction isIdentifierStart(code) {\n  if (code < 65) return code === 36;\n  if (code <= 90) return true;\n  if (code < 97) return code === 95;\n  if (code <= 122) return true;\n\n  if (code <= 0xffff) {\n    return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));\n  }\n\n  return isInAstralSet(code, astralIdentifierStartCodes);\n}\nfunction isIteratorStart(current, next) {\n  return current === 64 && next === 64;\n}\nfunction isIdentifierChar(code) {\n  if (code < 48) return code === 36;\n  if (code < 58) return true;\n  if (code < 65) return false;\n  if (code <= 90) return true;\n  if (code < 97) return code === 95;\n  if (code <= 122) return true;\n\n  if (code <= 0xffff) {\n    return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n  }\n\n  return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);\n}\n\nvar primitiveTypes = [\"any\", \"bool\", \"boolean\", \"empty\", \"false\", \"mixed\", \"null\", \"number\", \"static\", \"string\", \"true\", \"typeof\", \"void\"];\n\nfunction isEsModuleType(bodyElement) {\n  return bodyElement.type === \"DeclareExportAllDeclaration\" || bodyElement.type === \"DeclareExportDeclaration\" && (!bodyElement.declaration || bodyElement.declaration.type !== \"TypeAlias\" && bodyElement.declaration.type !== \"InterfaceDeclaration\");\n}\n\nfunction hasTypeImportKind(node) {\n  return node.importKind === \"type\" || node.importKind === \"typeof\";\n}\n\nfunction isMaybeDefaultImport(state) {\n  return (state.type === types.name || !!state.type.keyword) && state.value !== \"from\";\n}\n\nvar exportSuggestions = {\n  const: \"declare export var\",\n  let: \"declare export var\",\n  type: \"export type\",\n  interface: \"export interface\"\n};\n\nfunction partition(list, test) {\n  var list1 = [];\n  var list2 = [];\n\n  for (var i = 0; i < list.length; i++) {\n    (test(list[i], i, list) ? list1 : list2).push(list[i]);\n  }\n\n  return [list1, list2];\n}\n\nvar FLOW_PRAGMA_REGEX = /\\*?\\s*@((?:no)?flow)\\b/;\nvar flow = (function (superClass) {\n  return function (_superClass) {\n    _inheritsLoose(_class, _superClass);\n\n    function _class(options, input) {\n      var _this;\n\n      _this = _superClass.call(this, options, input) || this;\n      _this.flowPragma = undefined;\n      return _this;\n    }\n\n    var _proto = _class.prototype;\n\n    _proto.shouldParseTypes = function shouldParseTypes() {\n      return this.getPluginOption(\"flow\", \"all\") || this.flowPragma === \"flow\";\n    };\n\n    _proto.addComment = function addComment(comment) {\n      if (this.flowPragma === undefined) {\n        var matches = FLOW_PRAGMA_REGEX.exec(comment.value);\n\n        if (!matches) {\n          this.flowPragma = null;\n        } else if (matches[1] === \"flow\") {\n          this.flowPragma = \"flow\";\n        } else if (matches[1] === \"noflow\") {\n          this.flowPragma = \"noflow\";\n        } else {\n          throw new Error(\"Unexpected flow pragma\");\n        }\n      }\n\n      return _superClass.prototype.addComment.call(this, comment);\n    };\n\n    _proto.flowParseTypeInitialiser = function flowParseTypeInitialiser(tok) {\n      var oldInType = this.state.inType;\n      this.state.inType = true;\n      this.expect(tok || types.colon);\n      var type = this.flowParseType();\n      this.state.inType = oldInType;\n      return type;\n    };\n\n    _proto.flowParsePredicate = function flowParsePredicate() {\n      var node = this.startNode();\n      var moduloLoc = this.state.startLoc;\n      var moduloPos = this.state.start;\n      this.expect(types.modulo);\n      var checksLoc = this.state.startLoc;\n      this.expectContextual(\"checks\");\n\n      if (moduloLoc.line !== checksLoc.line || moduloLoc.column !== checksLoc.column - 1) {\n        this.raise(moduloPos, \"Spaces between ´%´ and ´checks´ are not allowed here.\");\n      }\n\n      if (this.eat(types.parenL)) {\n        node.value = this.parseExpression();\n        this.expect(types.parenR);\n        return this.finishNode(node, \"DeclaredPredicate\");\n      } else {\n        return this.finishNode(node, \"InferredPredicate\");\n      }\n    };\n\n    _proto.flowParseTypeAndPredicateInitialiser = function flowParseTypeAndPredicateInitialiser() {\n      var oldInType = this.state.inType;\n      this.state.inType = true;\n      this.expect(types.colon);\n      var type = null;\n      var predicate = null;\n\n      if (this.match(types.modulo)) {\n        this.state.inType = oldInType;\n        predicate = this.flowParsePredicate();\n      } else {\n        type = this.flowParseType();\n        this.state.inType = oldInType;\n\n        if (this.match(types.modulo)) {\n          predicate = this.flowParsePredicate();\n        }\n      }\n\n      return [type, predicate];\n    };\n\n    _proto.flowParseDeclareClass = function flowParseDeclareClass(node) {\n      this.next();\n      this.flowParseInterfaceish(node, true);\n      return this.finishNode(node, \"DeclareClass\");\n    };\n\n    _proto.flowParseDeclareFunction = function flowParseDeclareFunction(node) {\n      this.next();\n      var id = node.id = this.parseIdentifier();\n      var typeNode = this.startNode();\n      var typeContainer = this.startNode();\n\n      if (this.isRelational(\"<\")) {\n        typeNode.typeParameters = this.flowParseTypeParameterDeclaration();\n      } else {\n        typeNode.typeParameters = null;\n      }\n\n      this.expect(types.parenL);\n      var tmp = this.flowParseFunctionTypeParams();\n      typeNode.params = tmp.params;\n      typeNode.rest = tmp.rest;\n      this.expect(types.parenR);\n\n      var _this$flowParseTypeAn = this.flowParseTypeAndPredicateInitialiser();\n\n      typeNode.returnType = _this$flowParseTypeAn[0];\n      node.predicate = _this$flowParseTypeAn[1];\n      typeContainer.typeAnnotation = this.finishNode(typeNode, \"FunctionTypeAnnotation\");\n      id.typeAnnotation = this.finishNode(typeContainer, \"TypeAnnotation\");\n      this.finishNode(id, id.type);\n      this.semicolon();\n      return this.finishNode(node, \"DeclareFunction\");\n    };\n\n    _proto.flowParseDeclare = function flowParseDeclare(node, insideModule) {\n      if (this.match(types._class)) {\n        return this.flowParseDeclareClass(node);\n      } else if (this.match(types._function)) {\n        return this.flowParseDeclareFunction(node);\n      } else if (this.match(types._var)) {\n        return this.flowParseDeclareVariable(node);\n      } else if (this.isContextual(\"module\")) {\n        if (this.lookahead().type === types.dot) {\n          return this.flowParseDeclareModuleExports(node);\n        } else {\n          if (insideModule) {\n            this.unexpected(null, \"`declare module` cannot be used inside another `declare module`\");\n          }\n\n          return this.flowParseDeclareModule(node);\n        }\n      } else if (this.isContextual(\"type\")) {\n        return this.flowParseDeclareTypeAlias(node);\n      } else if (this.isContextual(\"opaque\")) {\n        return this.flowParseDeclareOpaqueType(node);\n      } else if (this.isContextual(\"interface\")) {\n        return this.flowParseDeclareInterface(node);\n      } else if (this.match(types._export)) {\n        return this.flowParseDeclareExportDeclaration(node, insideModule);\n      } else {\n        throw this.unexpected();\n      }\n    };\n\n    _proto.flowParseDeclareVariable = function flowParseDeclareVariable(node) {\n      this.next();\n      node.id = this.flowParseTypeAnnotatableIdentifier(true);\n      this.semicolon();\n      return this.finishNode(node, \"DeclareVariable\");\n    };\n\n    _proto.flowParseDeclareModule = function flowParseDeclareModule(node) {\n      var _this2 = this;\n\n      this.next();\n\n      if (this.match(types.string)) {\n        node.id = this.parseExprAtom();\n      } else {\n        node.id = this.parseIdentifier();\n      }\n\n      var bodyNode = node.body = this.startNode();\n      var body = bodyNode.body = [];\n      this.expect(types.braceL);\n\n      while (!this.match(types.braceR)) {\n        var _bodyNode = this.startNode();\n\n        if (this.match(types._import)) {\n          var lookahead = this.lookahead();\n\n          if (lookahead.value !== \"type\" && lookahead.value !== \"typeof\") {\n            this.unexpected(null, \"Imports within a `declare module` body must always be `import type` or `import typeof`\");\n          }\n\n          this.next();\n          this.parseImport(_bodyNode);\n        } else {\n          this.expectContextual(\"declare\", \"Only declares and type imports are allowed inside declare module\");\n          _bodyNode = this.flowParseDeclare(_bodyNode, true);\n        }\n\n        body.push(_bodyNode);\n      }\n\n      this.expect(types.braceR);\n      this.finishNode(bodyNode, \"BlockStatement\");\n      var kind = null;\n      var hasModuleExport = false;\n      var errorMessage = \"Found both `declare module.exports` and `declare export` in the same module. \" + \"Modules can only have 1 since they are either an ES module or they are a CommonJS module\";\n      body.forEach(function (bodyElement) {\n        if (isEsModuleType(bodyElement)) {\n          if (kind === \"CommonJS\") {\n            _this2.unexpected(bodyElement.start, errorMessage);\n          }\n\n          kind = \"ES\";\n        } else if (bodyElement.type === \"DeclareModuleExports\") {\n          if (hasModuleExport) {\n            _this2.unexpected(bodyElement.start, \"Duplicate `declare module.exports` statement\");\n          }\n\n          if (kind === \"ES\") _this2.unexpected(bodyElement.start, errorMessage);\n          kind = \"CommonJS\";\n          hasModuleExport = true;\n        }\n      });\n      node.kind = kind || \"CommonJS\";\n      return this.finishNode(node, \"DeclareModule\");\n    };\n\n    _proto.flowParseDeclareExportDeclaration = function flowParseDeclareExportDeclaration(node, insideModule) {\n      this.expect(types._export);\n\n      if (this.eat(types._default)) {\n        if (this.match(types._function) || this.match(types._class)) {\n          node.declaration = this.flowParseDeclare(this.startNode());\n        } else {\n          node.declaration = this.flowParseType();\n          this.semicolon();\n        }\n\n        node.default = true;\n        return this.finishNode(node, \"DeclareExportDeclaration\");\n      } else {\n        if (this.match(types._const) || this.match(types._let) || (this.isContextual(\"type\") || this.isContextual(\"interface\")) && !insideModule) {\n          var label = this.state.value;\n          var suggestion = exportSuggestions[label];\n          this.unexpected(this.state.start, \"`declare export \" + label + \"` is not supported. Use `\" + suggestion + \"` instead\");\n        }\n\n        if (this.match(types._var) || this.match(types._function) || this.match(types._class) || this.isContextual(\"opaque\")) {\n            node.declaration = this.flowParseDeclare(this.startNode());\n            node.default = false;\n            return this.finishNode(node, \"DeclareExportDeclaration\");\n          } else if (this.match(types.star) || this.match(types.braceL) || this.isContextual(\"interface\") || this.isContextual(\"type\") || this.isContextual(\"opaque\")) {\n            node = this.parseExport(node);\n\n            if (node.type === \"ExportNamedDeclaration\") {\n              node.type = \"ExportDeclaration\";\n              node.default = false;\n              delete node.exportKind;\n            }\n\n            node.type = \"Declare\" + node.type;\n            return node;\n          }\n      }\n\n      throw this.unexpected();\n    };\n\n    _proto.flowParseDeclareModuleExports = function flowParseDeclareModuleExports(node) {\n      this.expectContextual(\"module\");\n      this.expect(types.dot);\n      this.expectContextual(\"exports\");\n      node.typeAnnotation = this.flowParseTypeAnnotation();\n      this.semicolon();\n      return this.finishNode(node, \"DeclareModuleExports\");\n    };\n\n    _proto.flowParseDeclareTypeAlias = function flowParseDeclareTypeAlias(node) {\n      this.next();\n      this.flowParseTypeAlias(node);\n      return this.finishNode(node, \"DeclareTypeAlias\");\n    };\n\n    _proto.flowParseDeclareOpaqueType = function flowParseDeclareOpaqueType(node) {\n      this.next();\n      this.flowParseOpaqueType(node, true);\n      return this.finishNode(node, \"DeclareOpaqueType\");\n    };\n\n    _proto.flowParseDeclareInterface = function flowParseDeclareInterface(node) {\n      this.next();\n      this.flowParseInterfaceish(node);\n      return this.finishNode(node, \"DeclareInterface\");\n    };\n\n    _proto.flowParseInterfaceish = function flowParseInterfaceish(node, isClass) {\n      if (isClass === void 0) {\n        isClass = false;\n      }\n\n      node.id = this.flowParseRestrictedIdentifier(!isClass);\n\n      if (this.isRelational(\"<\")) {\n        node.typeParameters = this.flowParseTypeParameterDeclaration();\n      } else {\n        node.typeParameters = null;\n      }\n\n      node.extends = [];\n      node.implements = [];\n      node.mixins = [];\n\n      if (this.eat(types._extends)) {\n        do {\n          node.extends.push(this.flowParseInterfaceExtends());\n        } while (!isClass && this.eat(types.comma));\n      }\n\n      if (this.isContextual(\"mixins\")) {\n        this.next();\n\n        do {\n          node.mixins.push(this.flowParseInterfaceExtends());\n        } while (this.eat(types.comma));\n      }\n\n      if (this.isContextual(\"implements\")) {\n        this.next();\n\n        do {\n          node.implements.push(this.flowParseInterfaceExtends());\n        } while (this.eat(types.comma));\n      }\n\n      node.body = this.flowParseObjectType(isClass, false, false, isClass);\n    };\n\n    _proto.flowParseInterfaceExtends = function flowParseInterfaceExtends() {\n      var node = this.startNode();\n      node.id = this.flowParseQualifiedTypeIdentifier();\n\n      if (this.isRelational(\"<\")) {\n        node.typeParameters = this.flowParseTypeParameterInstantiation();\n      } else {\n        node.typeParameters = null;\n      }\n\n      return this.finishNode(node, \"InterfaceExtends\");\n    };\n\n    _proto.flowParseInterface = function flowParseInterface(node) {\n      this.flowParseInterfaceish(node);\n      return this.finishNode(node, \"InterfaceDeclaration\");\n    };\n\n    _proto.checkReservedType = function checkReservedType(word, startLoc) {\n      if (primitiveTypes.indexOf(word) > -1) {\n        this.raise(startLoc, \"Cannot overwrite primitive type \" + word);\n      }\n    };\n\n    _proto.flowParseRestrictedIdentifier = function flowParseRestrictedIdentifier(liberal) {\n      this.checkReservedType(this.state.value, this.state.start);\n      return this.parseIdentifier(liberal);\n    };\n\n    _proto.flowParseTypeAlias = function flowParseTypeAlias(node) {\n      node.id = this.flowParseRestrictedIdentifier();\n\n      if (this.isRelational(\"<\")) {\n        node.typeParameters = this.flowParseTypeParameterDeclaration();\n      } else {\n        node.typeParameters = null;\n      }\n\n      node.right = this.flowParseTypeInitialiser(types.eq);\n      this.semicolon();\n      return this.finishNode(node, \"TypeAlias\");\n    };\n\n    _proto.flowParseOpaqueType = function flowParseOpaqueType(node, declare) {\n      this.expectContextual(\"type\");\n      node.id = this.flowParseRestrictedIdentifier(true);\n\n      if (this.isRelational(\"<\")) {\n        node.typeParameters = this.flowParseTypeParameterDeclaration();\n      } else {\n        node.typeParameters = null;\n      }\n\n      node.supertype = null;\n\n      if (this.match(types.colon)) {\n        node.supertype = this.flowParseTypeInitialiser(types.colon);\n      }\n\n      node.impltype = null;\n\n      if (!declare) {\n        node.impltype = this.flowParseTypeInitialiser(types.eq);\n      }\n\n      this.semicolon();\n      return this.finishNode(node, \"OpaqueType\");\n    };\n\n    _proto.flowParseTypeParameter = function flowParseTypeParameter(allowDefault, requireDefault) {\n      if (allowDefault === void 0) {\n        allowDefault = true;\n      }\n\n      if (requireDefault === void 0) {\n        requireDefault = false;\n      }\n\n      if (!allowDefault && requireDefault) {\n        throw new Error(\"Cannot disallow a default value (`allowDefault`) while also requiring it (`requireDefault`).\");\n      }\n\n      var nodeStart = this.state.start;\n      var node = this.startNode();\n      var variance = this.flowParseVariance();\n      var ident = this.flowParseTypeAnnotatableIdentifier();\n      node.name = ident.name;\n      node.variance = variance;\n      node.bound = ident.typeAnnotation;\n\n      if (this.match(types.eq)) {\n        if (allowDefault) {\n          this.eat(types.eq);\n          node.default = this.flowParseType();\n        } else {\n          this.unexpected();\n        }\n      } else {\n        if (requireDefault) {\n          this.unexpected(nodeStart, \"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.\");\n        }\n      }\n\n      return this.finishNode(node, \"TypeParameter\");\n    };\n\n    _proto.flowParseTypeParameterDeclaration = function flowParseTypeParameterDeclaration(allowDefault) {\n      if (allowDefault === void 0) {\n        allowDefault = true;\n      }\n\n      var oldInType = this.state.inType;\n      var node = this.startNode();\n      node.params = [];\n      this.state.inType = true;\n\n      if (this.isRelational(\"<\") || this.match(types.jsxTagStart)) {\n        this.next();\n      } else {\n        this.unexpected();\n      }\n\n      var defaultRequired = false;\n\n      do {\n        var typeParameter = this.flowParseTypeParameter(allowDefault, defaultRequired);\n        node.params.push(typeParameter);\n\n        if (typeParameter.default) {\n          defaultRequired = true;\n        }\n\n        if (!this.isRelational(\">\")) {\n          this.expect(types.comma);\n        }\n      } while (!this.isRelational(\">\"));\n\n      this.expectRelational(\">\");\n      this.state.inType = oldInType;\n      return this.finishNode(node, \"TypeParameterDeclaration\");\n    };\n\n    _proto.flowParseTypeParameterInstantiation = function flowParseTypeParameterInstantiation() {\n      var node = this.startNode();\n      var oldInType = this.state.inType;\n      node.params = [];\n      this.state.inType = true;\n      this.expectRelational(\"<\");\n\n      while (!this.isRelational(\">\")) {\n        node.params.push(this.flowParseType());\n\n        if (!this.isRelational(\">\")) {\n          this.expect(types.comma);\n        }\n      }\n\n      this.expectRelational(\">\");\n      this.state.inType = oldInType;\n      return this.finishNode(node, \"TypeParameterInstantiation\");\n    };\n\n    _proto.flowParseInterfaceType = function flowParseInterfaceType() {\n      var node = this.startNode();\n      this.expectContextual(\"interface\");\n      node.extends = [];\n\n      if (this.eat(types._extends)) {\n        do {\n          node.extends.push(this.flowParseInterfaceExtends());\n        } while (this.eat(types.comma));\n      }\n\n      node.body = this.flowParseObjectType(false, false, false, false);\n      return this.finishNode(node, \"InterfaceTypeAnnotation\");\n    };\n\n    _proto.flowParseObjectPropertyKey = function flowParseObjectPropertyKey() {\n      return this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseIdentifier(true);\n    };\n\n    _proto.flowParseObjectTypeIndexer = function flowParseObjectTypeIndexer(node, isStatic, variance) {\n      node.static = isStatic;\n\n      if (this.lookahead().type === types.colon) {\n        node.id = this.flowParseObjectPropertyKey();\n        node.key = this.flowParseTypeInitialiser();\n      } else {\n        node.id = null;\n        node.key = this.flowParseType();\n      }\n\n      this.expect(types.bracketR);\n      node.value = this.flowParseTypeInitialiser();\n      node.variance = variance;\n      return this.finishNode(node, \"ObjectTypeIndexer\");\n    };\n\n    _proto.flowParseObjectTypeInternalSlot = function flowParseObjectTypeInternalSlot(node, isStatic) {\n      node.static = isStatic;\n      node.id = this.flowParseObjectPropertyKey();\n      this.expect(types.bracketR);\n      this.expect(types.bracketR);\n\n      if (this.isRelational(\"<\") || this.match(types.parenL)) {\n        node.method = true;\n        node.optional = false;\n        node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));\n      } else {\n        node.method = false;\n\n        if (this.eat(types.question)) {\n          node.optional = true;\n        }\n\n        node.value = this.flowParseTypeInitialiser();\n      }\n\n      return this.finishNode(node, \"ObjectTypeInternalSlot\");\n    };\n\n    _proto.flowParseObjectTypeMethodish = function flowParseObjectTypeMethodish(node) {\n      node.params = [];\n      node.rest = null;\n      node.typeParameters = null;\n\n      if (this.isRelational(\"<\")) {\n        node.typeParameters = this.flowParseTypeParameterDeclaration(false);\n      }\n\n      this.expect(types.parenL);\n\n      while (!this.match(types.parenR) && !this.match(types.ellipsis)) {\n        node.params.push(this.flowParseFunctionTypeParam());\n\n        if (!this.match(types.parenR)) {\n          this.expect(types.comma);\n        }\n      }\n\n      if (this.eat(types.ellipsis)) {\n        node.rest = this.flowParseFunctionTypeParam();\n      }\n\n      this.expect(types.parenR);\n      node.returnType = this.flowParseTypeInitialiser();\n      return this.finishNode(node, \"FunctionTypeAnnotation\");\n    };\n\n    _proto.flowParseObjectTypeCallProperty = function flowParseObjectTypeCallProperty(node, isStatic) {\n      var valueNode = this.startNode();\n      node.static = isStatic;\n      node.value = this.flowParseObjectTypeMethodish(valueNode);\n      return this.finishNode(node, \"ObjectTypeCallProperty\");\n    };\n\n    _proto.flowParseObjectType = function flowParseObjectType(allowStatic, allowExact, allowSpread, allowProto) {\n      var oldInType = this.state.inType;\n      this.state.inType = true;\n      var nodeStart = this.startNode();\n      nodeStart.callProperties = [];\n      nodeStart.properties = [];\n      nodeStart.indexers = [];\n      nodeStart.internalSlots = [];\n      var endDelim;\n      var exact;\n\n      if (allowExact && this.match(types.braceBarL)) {\n        this.expect(types.braceBarL);\n        endDelim = types.braceBarR;\n        exact = true;\n      } else {\n        this.expect(types.braceL);\n        endDelim = types.braceR;\n        exact = false;\n      }\n\n      nodeStart.exact = exact;\n\n      while (!this.match(endDelim)) {\n        var isStatic = false;\n        var protoStart = null;\n        var node = this.startNode();\n\n        if (allowProto && this.isContextual(\"proto\")) {\n          var lookahead = this.lookahead();\n\n          if (lookahead.type !== types.colon && lookahead.type !== types.question) {\n            this.next();\n            protoStart = this.state.start;\n            allowStatic = false;\n          }\n        }\n\n        if (allowStatic && this.isContextual(\"static\")) {\n          var _lookahead = this.lookahead();\n\n          if (_lookahead.type !== types.colon && _lookahead.type !== types.question) {\n            this.next();\n            isStatic = true;\n          }\n        }\n\n        var variance = this.flowParseVariance();\n\n        if (this.eat(types.bracketL)) {\n          if (protoStart != null) {\n            this.unexpected(protoStart);\n          }\n\n          if (this.eat(types.bracketL)) {\n            if (variance) {\n              this.unexpected(variance.start);\n            }\n\n            nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic));\n          } else {\n            nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance));\n          }\n        } else if (this.match(types.parenL) || this.isRelational(\"<\")) {\n          if (protoStart != null) {\n            this.unexpected(protoStart);\n          }\n\n          if (variance) {\n            this.unexpected(variance.start);\n          }\n\n          nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic));\n        } else {\n          var kind = \"init\";\n\n          if (this.isContextual(\"get\") || this.isContextual(\"set\")) {\n            var _lookahead2 = this.lookahead();\n\n            if (_lookahead2.type === types.name || _lookahead2.type === types.string || _lookahead2.type === types.num) {\n              kind = this.state.value;\n              this.next();\n            }\n          }\n\n          nodeStart.properties.push(this.flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread));\n        }\n\n        this.flowObjectTypeSemicolon();\n      }\n\n      this.expect(endDelim);\n      var out = this.finishNode(nodeStart, \"ObjectTypeAnnotation\");\n      this.state.inType = oldInType;\n      return out;\n    };\n\n    _proto.flowParseObjectTypeProperty = function flowParseObjectTypeProperty(node, isStatic, protoStart, variance, kind, allowSpread) {\n      if (this.match(types.ellipsis)) {\n        if (!allowSpread) {\n          this.unexpected(null, \"Spread operator cannot appear in class or interface definitions\");\n        }\n\n        if (protoStart != null) {\n          this.unexpected(protoStart);\n        }\n\n        if (variance) {\n          this.unexpected(variance.start, \"Spread properties cannot have variance\");\n        }\n\n        this.expect(types.ellipsis);\n        node.argument = this.flowParseType();\n        return this.finishNode(node, \"ObjectTypeSpreadProperty\");\n      } else {\n        node.key = this.flowParseObjectPropertyKey();\n        node.static = isStatic;\n        node.proto = protoStart != null;\n        node.kind = kind;\n        var optional = false;\n\n        if (this.isRelational(\"<\") || this.match(types.parenL)) {\n          node.method = true;\n\n          if (protoStart != null) {\n            this.unexpected(protoStart);\n          }\n\n          if (variance) {\n            this.unexpected(variance.start);\n          }\n\n          node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));\n\n          if (kind === \"get\" || kind === \"set\") {\n            this.flowCheckGetterSetterParams(node);\n          }\n        } else {\n          if (kind !== \"init\") this.unexpected();\n          node.method = false;\n\n          if (this.eat(types.question)) {\n            optional = true;\n          }\n\n          node.value = this.flowParseTypeInitialiser();\n          node.variance = variance;\n        }\n\n        node.optional = optional;\n        return this.finishNode(node, \"ObjectTypeProperty\");\n      }\n    };\n\n    _proto.flowCheckGetterSetterParams = function flowCheckGetterSetterParams(property) {\n      var paramCount = property.kind === \"get\" ? 0 : 1;\n      var start = property.start;\n      var length = property.value.params.length + (property.value.rest ? 1 : 0);\n\n      if (length !== paramCount) {\n        if (property.kind === \"get\") {\n          this.raise(start, \"getter must not have any formal parameters\");\n        } else {\n          this.raise(start, \"setter must have exactly one formal parameter\");\n        }\n      }\n\n      if (property.kind === \"set\" && property.value.rest) {\n        this.raise(start, \"setter function argument must not be a rest parameter\");\n      }\n    };\n\n    _proto.flowObjectTypeSemicolon = function flowObjectTypeSemicolon() {\n      if (!this.eat(types.semi) && !this.eat(types.comma) && !this.match(types.braceR) && !this.match(types.braceBarR)) {\n        this.unexpected();\n      }\n    };\n\n    _proto.flowParseQualifiedTypeIdentifier = function flowParseQualifiedTypeIdentifier(startPos, startLoc, id) {\n      startPos = startPos || this.state.start;\n      startLoc = startLoc || this.state.startLoc;\n      var node = id || this.parseIdentifier();\n\n      while (this.eat(types.dot)) {\n        var node2 = this.startNodeAt(startPos, startLoc);\n        node2.qualification = node;\n        node2.id = this.parseIdentifier();\n        node = this.finishNode(node2, \"QualifiedTypeIdentifier\");\n      }\n\n      return node;\n    };\n\n    _proto.flowParseGenericType = function flowParseGenericType(startPos, startLoc, id) {\n      var node = this.startNodeAt(startPos, startLoc);\n      node.typeParameters = null;\n      node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id);\n\n      if (this.isRelational(\"<\")) {\n        node.typeParameters = this.flowParseTypeParameterInstantiation();\n      }\n\n      return this.finishNode(node, \"GenericTypeAnnotation\");\n    };\n\n    _proto.flowParseTypeofType = function flowParseTypeofType() {\n      var node = this.startNode();\n      this.expect(types._typeof);\n      node.argument = this.flowParsePrimaryType();\n      return this.finishNode(node, \"TypeofTypeAnnotation\");\n    };\n\n    _proto.flowParseTupleType = function flowParseTupleType() {\n      var node = this.startNode();\n      node.types = [];\n      this.expect(types.bracketL);\n\n      while (this.state.pos < this.input.length && !this.match(types.bracketR)) {\n        node.types.push(this.flowParseType());\n        if (this.match(types.bracketR)) break;\n        this.expect(types.comma);\n      }\n\n      this.expect(types.bracketR);\n      return this.finishNode(node, \"TupleTypeAnnotation\");\n    };\n\n    _proto.flowParseFunctionTypeParam = function flowParseFunctionTypeParam() {\n      var name = null;\n      var optional = false;\n      var typeAnnotation = null;\n      var node = this.startNode();\n      var lh = this.lookahead();\n\n      if (lh.type === types.colon || lh.type === types.question) {\n        name = this.parseIdentifier();\n\n        if (this.eat(types.question)) {\n          optional = true;\n        }\n\n        typeAnnotation = this.flowParseTypeInitialiser();\n      } else {\n        typeAnnotation = this.flowParseType();\n      }\n\n      node.name = name;\n      node.optional = optional;\n      node.typeAnnotation = typeAnnotation;\n      return this.finishNode(node, \"FunctionTypeParam\");\n    };\n\n    _proto.reinterpretTypeAsFunctionTypeParam = function reinterpretTypeAsFunctionTypeParam(type) {\n      var node = this.startNodeAt(type.start, type.loc.start);\n      node.name = null;\n      node.optional = false;\n      node.typeAnnotation = type;\n      return this.finishNode(node, \"FunctionTypeParam\");\n    };\n\n    _proto.flowParseFunctionTypeParams = function flowParseFunctionTypeParams(params) {\n      if (params === void 0) {\n        params = [];\n      }\n\n      var rest = null;\n\n      while (!this.match(types.parenR) && !this.match(types.ellipsis)) {\n        params.push(this.flowParseFunctionTypeParam());\n\n        if (!this.match(types.parenR)) {\n          this.expect(types.comma);\n        }\n      }\n\n      if (this.eat(types.ellipsis)) {\n        rest = this.flowParseFunctionTypeParam();\n      }\n\n      return {\n        params: params,\n        rest: rest\n      };\n    };\n\n    _proto.flowIdentToTypeAnnotation = function flowIdentToTypeAnnotation(startPos, startLoc, node, id) {\n      switch (id.name) {\n        case \"any\":\n          return this.finishNode(node, \"AnyTypeAnnotation\");\n\n        case \"void\":\n          return this.finishNode(node, \"VoidTypeAnnotation\");\n\n        case \"bool\":\n        case \"boolean\":\n          return this.finishNode(node, \"BooleanTypeAnnotation\");\n\n        case \"mixed\":\n          return this.finishNode(node, \"MixedTypeAnnotation\");\n\n        case \"empty\":\n          return this.finishNode(node, \"EmptyTypeAnnotation\");\n\n        case \"number\":\n          return this.finishNode(node, \"NumberTypeAnnotation\");\n\n        case \"string\":\n          return this.finishNode(node, \"StringTypeAnnotation\");\n\n        default:\n          return this.flowParseGenericType(startPos, startLoc, id);\n      }\n    };\n\n    _proto.flowParsePrimaryType = function flowParsePrimaryType() {\n      var startPos = this.state.start;\n      var startLoc = this.state.startLoc;\n      var node = this.startNode();\n      var tmp;\n      var type;\n      var isGroupedType = false;\n      var oldNoAnonFunctionType = this.state.noAnonFunctionType;\n\n      switch (this.state.type) {\n        case types.name:\n          if (this.isContextual(\"interface\")) {\n            return this.flowParseInterfaceType();\n          }\n\n          return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier());\n\n        case types.braceL:\n          return this.flowParseObjectType(false, false, true, false);\n\n        case types.braceBarL:\n          return this.flowParseObjectType(false, true, true, false);\n\n        case types.bracketL:\n          return this.flowParseTupleType();\n\n        case types.relational:\n          if (this.state.value === \"<\") {\n            node.typeParameters = this.flowParseTypeParameterDeclaration(false);\n            this.expect(types.parenL);\n            tmp = this.flowParseFunctionTypeParams();\n            node.params = tmp.params;\n            node.rest = tmp.rest;\n            this.expect(types.parenR);\n            this.expect(types.arrow);\n            node.returnType = this.flowParseType();\n            return this.finishNode(node, \"FunctionTypeAnnotation\");\n          }\n\n          break;\n\n        case types.parenL:\n          this.next();\n\n          if (!this.match(types.parenR) && !this.match(types.ellipsis)) {\n            if (this.match(types.name)) {\n              var token = this.lookahead().type;\n              isGroupedType = token !== types.question && token !== types.colon;\n            } else {\n              isGroupedType = true;\n            }\n          }\n\n          if (isGroupedType) {\n            this.state.noAnonFunctionType = false;\n            type = this.flowParseType();\n            this.state.noAnonFunctionType = oldNoAnonFunctionType;\n\n            if (this.state.noAnonFunctionType || !(this.match(types.comma) || this.match(types.parenR) && this.lookahead().type === types.arrow)) {\n              this.expect(types.parenR);\n              return type;\n            } else {\n              this.eat(types.comma);\n            }\n          }\n\n          if (type) {\n            tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]);\n          } else {\n            tmp = this.flowParseFunctionTypeParams();\n          }\n\n          node.params = tmp.params;\n          node.rest = tmp.rest;\n          this.expect(types.parenR);\n          this.expect(types.arrow);\n          node.returnType = this.flowParseType();\n          node.typeParameters = null;\n          return this.finishNode(node, \"FunctionTypeAnnotation\");\n\n        case types.string:\n          return this.parseLiteral(this.state.value, \"StringLiteralTypeAnnotation\");\n\n        case types._true:\n        case types._false:\n          node.value = this.match(types._true);\n          this.next();\n          return this.finishNode(node, \"BooleanLiteralTypeAnnotation\");\n\n        case types.plusMin:\n          if (this.state.value === \"-\") {\n            this.next();\n\n            if (!this.match(types.num)) {\n              this.unexpected(null, \"Unexpected token, expected \\\"number\\\"\");\n            }\n\n            return this.parseLiteral(-this.state.value, \"NumberLiteralTypeAnnotation\", node.start, node.loc.start);\n          }\n\n          this.unexpected();\n\n        case types.num:\n          return this.parseLiteral(this.state.value, \"NumberLiteralTypeAnnotation\");\n\n        case types._null:\n          this.next();\n          return this.finishNode(node, \"NullLiteralTypeAnnotation\");\n\n        case types._this:\n          this.next();\n          return this.finishNode(node, \"ThisTypeAnnotation\");\n\n        case types.star:\n          this.next();\n          return this.finishNode(node, \"ExistsTypeAnnotation\");\n\n        default:\n          if (this.state.type.keyword === \"typeof\") {\n            return this.flowParseTypeofType();\n          }\n\n      }\n\n      throw this.unexpected();\n    };\n\n    _proto.flowParsePostfixType = function flowParsePostfixType() {\n      var startPos = this.state.start,\n          startLoc = this.state.startLoc;\n      var type = this.flowParsePrimaryType();\n\n      while (!this.canInsertSemicolon() && this.match(types.bracketL)) {\n        var node = this.startNodeAt(startPos, startLoc);\n        node.elementType = type;\n        this.expect(types.bracketL);\n        this.expect(types.bracketR);\n        type = this.finishNode(node, \"ArrayTypeAnnotation\");\n      }\n\n      return type;\n    };\n\n    _proto.flowParsePrefixType = function flowParsePrefixType() {\n      var node = this.startNode();\n\n      if (this.eat(types.question)) {\n        node.typeAnnotation = this.flowParsePrefixType();\n        return this.finishNode(node, \"NullableTypeAnnotation\");\n      } else {\n        return this.flowParsePostfixType();\n      }\n    };\n\n    _proto.flowParseAnonFunctionWithoutParens = function flowParseAnonFunctionWithoutParens() {\n      var param = this.flowParsePrefixType();\n\n      if (!this.state.noAnonFunctionType && this.eat(types.arrow)) {\n        var node = this.startNodeAt(param.start, param.loc.start);\n        node.params = [this.reinterpretTypeAsFunctionTypeParam(param)];\n        node.rest = null;\n        node.returnType = this.flowParseType();\n        node.typeParameters = null;\n        return this.finishNode(node, \"FunctionTypeAnnotation\");\n      }\n\n      return param;\n    };\n\n    _proto.flowParseIntersectionType = function flowParseIntersectionType() {\n      var node = this.startNode();\n      this.eat(types.bitwiseAND);\n      var type = this.flowParseAnonFunctionWithoutParens();\n      node.types = [type];\n\n      while (this.eat(types.bitwiseAND)) {\n        node.types.push(this.flowParseAnonFunctionWithoutParens());\n      }\n\n      return node.types.length === 1 ? type : this.finishNode(node, \"IntersectionTypeAnnotation\");\n    };\n\n    _proto.flowParseUnionType = function flowParseUnionType() {\n      var node = this.startNode();\n      this.eat(types.bitwiseOR);\n      var type = this.flowParseIntersectionType();\n      node.types = [type];\n\n      while (this.eat(types.bitwiseOR)) {\n        node.types.push(this.flowParseIntersectionType());\n      }\n\n      return node.types.length === 1 ? type : this.finishNode(node, \"UnionTypeAnnotation\");\n    };\n\n    _proto.flowParseType = function flowParseType() {\n      var oldInType = this.state.inType;\n      this.state.inType = true;\n      var type = this.flowParseUnionType();\n      this.state.inType = oldInType;\n      this.state.exprAllowed = this.state.exprAllowed || this.state.noAnonFunctionType;\n      return type;\n    };\n\n    _proto.flowParseTypeAnnotation = function flowParseTypeAnnotation() {\n      var node = this.startNode();\n      node.typeAnnotation = this.flowParseTypeInitialiser();\n      return this.finishNode(node, \"TypeAnnotation\");\n    };\n\n    _proto.flowParseTypeAnnotatableIdentifier = function flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) {\n      var ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier();\n\n      if (this.match(types.colon)) {\n        ident.typeAnnotation = this.flowParseTypeAnnotation();\n        this.finishNode(ident, ident.type);\n      }\n\n      return ident;\n    };\n\n    _proto.typeCastToParameter = function typeCastToParameter(node) {\n      node.expression.typeAnnotation = node.typeAnnotation;\n      return this.finishNodeAt(node.expression, node.expression.type, node.typeAnnotation.end, node.typeAnnotation.loc.end);\n    };\n\n    _proto.flowParseVariance = function flowParseVariance() {\n      var variance = null;\n\n      if (this.match(types.plusMin)) {\n        variance = this.startNode();\n\n        if (this.state.value === \"+\") {\n          variance.kind = \"plus\";\n        } else {\n          variance.kind = \"minus\";\n        }\n\n        this.next();\n        this.finishNode(variance, \"Variance\");\n      }\n\n      return variance;\n    };\n\n    _proto.parseFunctionBody = function parseFunctionBody(node, allowExpressionBody) {\n      var _this3 = this;\n\n      if (allowExpressionBody) {\n        return this.forwardNoArrowParamsConversionAt(node, function () {\n          return _superClass.prototype.parseFunctionBody.call(_this3, node, true);\n        });\n      }\n\n      return _superClass.prototype.parseFunctionBody.call(this, node, false);\n    };\n\n    _proto.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, allowExpressionBody) {\n      if (!allowExpressionBody && this.match(types.colon)) {\n        var typeNode = this.startNode();\n\n        var _this$flowParseTypeAn2 = this.flowParseTypeAndPredicateInitialiser();\n\n        typeNode.typeAnnotation = _this$flowParseTypeAn2[0];\n        node.predicate = _this$flowParseTypeAn2[1];\n        node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, \"TypeAnnotation\") : null;\n      }\n\n      _superClass.prototype.parseFunctionBodyAndFinish.call(this, node, type, allowExpressionBody);\n    };\n\n    _proto.parseStatement = function parseStatement(declaration, topLevel) {\n      if (this.state.strict && this.match(types.name) && this.state.value === \"interface\") {\n        var node = this.startNode();\n        this.next();\n        return this.flowParseInterface(node);\n      } else {\n        var stmt = _superClass.prototype.parseStatement.call(this, declaration, topLevel);\n\n        if (this.flowPragma === undefined && !this.isValidDirective(stmt)) {\n          this.flowPragma = null;\n        }\n\n        return stmt;\n      }\n    };\n\n    _proto.parseExpressionStatement = function parseExpressionStatement(node, expr) {\n      if (expr.type === \"Identifier\") {\n        if (expr.name === \"declare\") {\n          if (this.match(types._class) || this.match(types.name) || this.match(types._function) || this.match(types._var) || this.match(types._export)) {\n            return this.flowParseDeclare(node);\n          }\n        } else if (this.match(types.name)) {\n          if (expr.name === \"interface\") {\n            return this.flowParseInterface(node);\n          } else if (expr.name === \"type\") {\n            return this.flowParseTypeAlias(node);\n          } else if (expr.name === \"opaque\") {\n            return this.flowParseOpaqueType(node, false);\n          }\n        }\n      }\n\n      return _superClass.prototype.parseExpressionStatement.call(this, node, expr);\n    };\n\n    _proto.shouldParseExportDeclaration = function shouldParseExportDeclaration() {\n      return this.isContextual(\"type\") || this.isContextual(\"interface\") || this.isContextual(\"opaque\") || _superClass.prototype.shouldParseExportDeclaration.call(this);\n    };\n\n    _proto.isExportDefaultSpecifier = function isExportDefaultSpecifier() {\n      if (this.match(types.name) && (this.state.value === \"type\" || this.state.value === \"interface\" || this.state.value == \"opaque\")) {\n        return false;\n      }\n\n      return _superClass.prototype.isExportDefaultSpecifier.call(this);\n    };\n\n    _proto.parseConditional = function parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) {\n      var _this4 = this;\n\n      if (!this.match(types.question)) return expr;\n\n      if (refNeedsArrowPos) {\n        var _state = this.state.clone();\n\n        try {\n          return _superClass.prototype.parseConditional.call(this, expr, noIn, startPos, startLoc);\n        } catch (err) {\n          if (err instanceof SyntaxError) {\n            this.state = _state;\n            refNeedsArrowPos.start = err.pos || this.state.start;\n            return expr;\n          } else {\n            throw err;\n          }\n        }\n      }\n\n      this.expect(types.question);\n      var state = this.state.clone();\n      var originalNoArrowAt = this.state.noArrowAt;\n      var node = this.startNodeAt(startPos, startLoc);\n\n      var _this$tryParseConditi = this.tryParseConditionalConsequent(),\n          consequent = _this$tryParseConditi.consequent,\n          failed = _this$tryParseConditi.failed;\n\n      var _this$getArrowLikeExp = this.getArrowLikeExpressions(consequent),\n          valid = _this$getArrowLikeExp[0],\n          invalid = _this$getArrowLikeExp[1];\n\n      if (failed || invalid.length > 0) {\n        var noArrowAt = originalNoArrowAt.concat();\n\n        if (invalid.length > 0) {\n          this.state = state;\n          this.state.noArrowAt = noArrowAt;\n\n          for (var i = 0; i < invalid.length; i++) {\n            noArrowAt.push(invalid[i].start);\n          }\n\n          var _this$tryParseConditi2 = this.tryParseConditionalConsequent();\n\n          consequent = _this$tryParseConditi2.consequent;\n          failed = _this$tryParseConditi2.failed;\n\n          var _this$getArrowLikeExp2 = this.getArrowLikeExpressions(consequent);\n\n          valid = _this$getArrowLikeExp2[0];\n          invalid = _this$getArrowLikeExp2[1];\n        }\n\n        if (failed && valid.length > 1) {\n          this.raise(state.start, \"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.\");\n        }\n\n        if (failed && valid.length === 1) {\n          this.state = state;\n          this.state.noArrowAt = noArrowAt.concat(valid[0].start);\n\n          var _this$tryParseConditi3 = this.tryParseConditionalConsequent();\n\n          consequent = _this$tryParseConditi3.consequent;\n          failed = _this$tryParseConditi3.failed;\n        }\n\n        this.getArrowLikeExpressions(consequent, true);\n      }\n\n      this.state.noArrowAt = originalNoArrowAt;\n      this.expect(types.colon);\n      node.test = expr;\n      node.consequent = consequent;\n      node.alternate = this.forwardNoArrowParamsConversionAt(node, function () {\n        return _this4.parseMaybeAssign(noIn, undefined, undefined, undefined);\n      });\n      return this.finishNode(node, \"ConditionalExpression\");\n    };\n\n    _proto.tryParseConditionalConsequent = function tryParseConditionalConsequent() {\n      this.state.noArrowParamsConversionAt.push(this.state.start);\n      var consequent = this.parseMaybeAssign();\n      var failed = !this.match(types.colon);\n      this.state.noArrowParamsConversionAt.pop();\n      return {\n        consequent: consequent,\n        failed: failed\n      };\n    };\n\n    _proto.getArrowLikeExpressions = function getArrowLikeExpressions(node, disallowInvalid) {\n      var _this5 = this;\n\n      var stack = [node];\n      var arrows = [];\n\n      while (stack.length !== 0) {\n        var _node = stack.pop();\n\n        if (_node.type === \"ArrowFunctionExpression\") {\n          if (_node.typeParameters || !_node.returnType) {\n            this.toAssignableList(_node.params, true, \"arrow function parameters\");\n\n            _superClass.prototype.checkFunctionNameAndParams.call(this, _node, true);\n          } else {\n            arrows.push(_node);\n          }\n\n          stack.push(_node.body);\n        } else if (_node.type === \"ConditionalExpression\") {\n          stack.push(_node.consequent);\n          stack.push(_node.alternate);\n        }\n      }\n\n      if (disallowInvalid) {\n        for (var i = 0; i < arrows.length; i++) {\n          this.toAssignableList(node.params, true, \"arrow function parameters\");\n        }\n\n        return [arrows, []];\n      }\n\n      return partition(arrows, function (node) {\n        try {\n          _this5.toAssignableList(node.params, true, \"arrow function parameters\");\n\n          return true;\n        } catch (err) {\n          return false;\n        }\n      });\n    };\n\n    _proto.forwardNoArrowParamsConversionAt = function forwardNoArrowParamsConversionAt(node, parse) {\n      var result;\n\n      if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {\n        this.state.noArrowParamsConversionAt.push(this.state.start);\n        result = parse();\n        this.state.noArrowParamsConversionAt.pop();\n      } else {\n        result = parse();\n      }\n\n      return result;\n    };\n\n    _proto.parseParenItem = function parseParenItem(node, startPos, startLoc) {\n      node = _superClass.prototype.parseParenItem.call(this, node, startPos, startLoc);\n\n      if (this.eat(types.question)) {\n        node.optional = true;\n      }\n\n      if (this.match(types.colon)) {\n        var typeCastNode = this.startNodeAt(startPos, startLoc);\n        typeCastNode.expression = node;\n        typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();\n        return this.finishNode(typeCastNode, \"TypeCastExpression\");\n      }\n\n      return node;\n    };\n\n    _proto.assertModuleNodeAllowed = function assertModuleNodeAllowed(node) {\n      if (node.type === \"ImportDeclaration\" && (node.importKind === \"type\" || node.importKind === \"typeof\") || node.type === \"ExportNamedDeclaration\" && node.exportKind === \"type\" || node.type === \"ExportAllDeclaration\" && node.exportKind === \"type\") {\n        return;\n      }\n\n      _superClass.prototype.assertModuleNodeAllowed.call(this, node);\n    };\n\n    _proto.parseExport = function parseExport(node) {\n      node = _superClass.prototype.parseExport.call(this, node);\n\n      if (node.type === \"ExportNamedDeclaration\" || node.type === \"ExportAllDeclaration\") {\n        node.exportKind = node.exportKind || \"value\";\n      }\n\n      return node;\n    };\n\n    _proto.parseExportDeclaration = function parseExportDeclaration(node) {\n      if (this.isContextual(\"type\")) {\n        node.exportKind = \"type\";\n        var declarationNode = this.startNode();\n        this.next();\n\n        if (this.match(types.braceL)) {\n          node.specifiers = this.parseExportSpecifiers();\n          this.parseExportFrom(node);\n          return null;\n        } else {\n          return this.flowParseTypeAlias(declarationNode);\n        }\n      } else if (this.isContextual(\"opaque\")) {\n        node.exportKind = \"type\";\n\n        var _declarationNode = this.startNode();\n\n        this.next();\n        return this.flowParseOpaqueType(_declarationNode, false);\n      } else if (this.isContextual(\"interface\")) {\n        node.exportKind = \"type\";\n\n        var _declarationNode2 = this.startNode();\n\n        this.next();\n        return this.flowParseInterface(_declarationNode2);\n      } else {\n        return _superClass.prototype.parseExportDeclaration.call(this, node);\n      }\n    };\n\n    _proto.shouldParseExportStar = function shouldParseExportStar() {\n      return _superClass.prototype.shouldParseExportStar.call(this) || this.isContextual(\"type\") && this.lookahead().type === types.star;\n    };\n\n    _proto.parseExportStar = function parseExportStar(node) {\n      if (this.eatContextual(\"type\")) {\n        node.exportKind = \"type\";\n      }\n\n      return _superClass.prototype.parseExportStar.call(this, node);\n    };\n\n    _proto.parseExportNamespace = function parseExportNamespace(node) {\n      if (node.exportKind === \"type\") {\n        this.unexpected();\n      }\n\n      return _superClass.prototype.parseExportNamespace.call(this, node);\n    };\n\n    _proto.parseClassId = function parseClassId(node, isStatement, optionalId) {\n      _superClass.prototype.parseClassId.call(this, node, isStatement, optionalId);\n\n      if (this.isRelational(\"<\")) {\n        node.typeParameters = this.flowParseTypeParameterDeclaration();\n      }\n    };\n\n    _proto.isKeyword = function isKeyword$$1(name) {\n      if (this.state.inType && name === \"void\") {\n        return false;\n      } else {\n        return _superClass.prototype.isKeyword.call(this, name);\n      }\n    };\n\n    _proto.readToken = function readToken(code) {\n      var next = this.input.charCodeAt(this.state.pos + 1);\n\n      if (this.state.inType && (code === 62 || code === 60)) {\n        return this.finishOp(types.relational, 1);\n      } else if (isIteratorStart(code, next)) {\n        this.state.isIterator = true;\n        return _superClass.prototype.readWord.call(this);\n      } else {\n        return _superClass.prototype.readToken.call(this, code);\n      }\n    };\n\n    _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) {\n      if (node.type === \"TypeCastExpression\") {\n        return _superClass.prototype.toAssignable.call(this, this.typeCastToParameter(node), isBinding, contextDescription);\n      } else {\n        return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription);\n      }\n    };\n\n    _proto.toAssignableList = function toAssignableList(exprList, isBinding, contextDescription) {\n      for (var i = 0; i < exprList.length; i++) {\n        var expr = exprList[i];\n\n        if (expr && expr.type === \"TypeCastExpression\") {\n          exprList[i] = this.typeCastToParameter(expr);\n        }\n      }\n\n      return _superClass.prototype.toAssignableList.call(this, exprList, isBinding, contextDescription);\n    };\n\n    _proto.toReferencedList = function toReferencedList(exprList) {\n      for (var i = 0; i < exprList.length; i++) {\n        var expr = exprList[i];\n\n        if (expr && expr._exprListItem && expr.type === \"TypeCastExpression\") {\n          this.raise(expr.start, \"Unexpected type cast\");\n        }\n      }\n\n      return exprList;\n    };\n\n    _proto.parseExprListItem = function parseExprListItem(allowEmpty, refShorthandDefaultPos, refNeedsArrowPos) {\n      var container = this.startNode();\n\n      var node = _superClass.prototype.parseExprListItem.call(this, allowEmpty, refShorthandDefaultPos, refNeedsArrowPos);\n\n      if (this.match(types.colon)) {\n        container._exprListItem = true;\n        container.expression = node;\n        container.typeAnnotation = this.flowParseTypeAnnotation();\n        return this.finishNode(container, \"TypeCastExpression\");\n      } else {\n        return node;\n      }\n    };\n\n    _proto.checkLVal = function checkLVal(expr, isBinding, checkClashes, contextDescription) {\n      if (expr.type !== \"TypeCastExpression\") {\n        return _superClass.prototype.checkLVal.call(this, expr, isBinding, checkClashes, contextDescription);\n      }\n    };\n\n    _proto.parseClassProperty = function parseClassProperty(node) {\n      if (this.match(types.colon)) {\n        node.typeAnnotation = this.flowParseTypeAnnotation();\n      }\n\n      return _superClass.prototype.parseClassProperty.call(this, node);\n    };\n\n    _proto.parseClassPrivateProperty = function parseClassPrivateProperty(node) {\n      if (this.match(types.colon)) {\n        node.typeAnnotation = this.flowParseTypeAnnotation();\n      }\n\n      return _superClass.prototype.parseClassPrivateProperty.call(this, node);\n    };\n\n    _proto.isClassMethod = function isClassMethod() {\n      return this.isRelational(\"<\") || _superClass.prototype.isClassMethod.call(this);\n    };\n\n    _proto.isClassProperty = function isClassProperty() {\n      return this.match(types.colon) || _superClass.prototype.isClassProperty.call(this);\n    };\n\n    _proto.isNonstaticConstructor = function isNonstaticConstructor(method) {\n      return !this.match(types.colon) && _superClass.prototype.isNonstaticConstructor.call(this, method);\n    };\n\n    _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor) {\n      if (method.variance) {\n        this.unexpected(method.variance.start);\n      }\n\n      delete method.variance;\n\n      if (this.isRelational(\"<\")) {\n        method.typeParameters = this.flowParseTypeParameterDeclaration(false);\n      }\n\n      _superClass.prototype.pushClassMethod.call(this, classBody, method, isGenerator, isAsync, isConstructor);\n    };\n\n    _proto.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {\n      if (method.variance) {\n        this.unexpected(method.variance.start);\n      }\n\n      delete method.variance;\n\n      if (this.isRelational(\"<\")) {\n        method.typeParameters = this.flowParseTypeParameterDeclaration();\n      }\n\n      _superClass.prototype.pushClassPrivateMethod.call(this, classBody, method, isGenerator, isAsync);\n    };\n\n    _proto.parseClassSuper = function parseClassSuper(node) {\n      _superClass.prototype.parseClassSuper.call(this, node);\n\n      if (node.superClass && this.isRelational(\"<\")) {\n        node.superTypeParameters = this.flowParseTypeParameterInstantiation();\n      }\n\n      if (this.isContextual(\"implements\")) {\n        this.next();\n        var implemented = node.implements = [];\n\n        do {\n          var _node2 = this.startNode();\n\n          _node2.id = this.flowParseRestrictedIdentifier(true);\n\n          if (this.isRelational(\"<\")) {\n            _node2.typeParameters = this.flowParseTypeParameterInstantiation();\n          } else {\n            _node2.typeParameters = null;\n          }\n\n          implemented.push(this.finishNode(_node2, \"ClassImplements\"));\n        } while (this.eat(types.comma));\n      }\n    };\n\n    _proto.parsePropertyName = function parsePropertyName(node) {\n      var variance = this.flowParseVariance();\n\n      var key = _superClass.prototype.parsePropertyName.call(this, node);\n\n      node.variance = variance;\n      return key;\n    };\n\n    _proto.parseObjPropValue = function parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc) {\n      if (prop.variance) {\n        this.unexpected(prop.variance.start);\n      }\n\n      delete prop.variance;\n      var typeParameters;\n\n      if (this.isRelational(\"<\")) {\n        typeParameters = this.flowParseTypeParameterDeclaration(false);\n        if (!this.match(types.parenL)) this.unexpected();\n      }\n\n      _superClass.prototype.parseObjPropValue.call(this, prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc);\n\n      if (typeParameters) {\n        (prop.value || prop).typeParameters = typeParameters;\n      }\n    };\n\n    _proto.parseAssignableListItemTypes = function parseAssignableListItemTypes(param) {\n      if (this.eat(types.question)) {\n        if (param.type !== \"Identifier\") {\n          throw this.raise(param.start, \"A binding pattern parameter cannot be optional in an implementation signature.\");\n        }\n\n        param.optional = true;\n      }\n\n      if (this.match(types.colon)) {\n        param.typeAnnotation = this.flowParseTypeAnnotation();\n      }\n\n      this.finishNode(param, param.type);\n      return param;\n    };\n\n    _proto.parseMaybeDefault = function parseMaybeDefault(startPos, startLoc, left) {\n      var node = _superClass.prototype.parseMaybeDefault.call(this, startPos, startLoc, left);\n\n      if (node.type === \"AssignmentPattern\" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {\n        this.raise(node.typeAnnotation.start, \"Type annotations must come before default assignments, \" + \"e.g. instead of `age = 25: number` use `age: number = 25`\");\n      }\n\n      return node;\n    };\n\n    _proto.shouldParseDefaultImport = function shouldParseDefaultImport(node) {\n      if (!hasTypeImportKind(node)) {\n        return _superClass.prototype.shouldParseDefaultImport.call(this, node);\n      }\n\n      return isMaybeDefaultImport(this.state);\n    };\n\n    _proto.parseImportSpecifierLocal = function parseImportSpecifierLocal(node, specifier, type, contextDescription) {\n      specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true) : this.parseIdentifier();\n      this.checkLVal(specifier.local, true, undefined, contextDescription);\n      node.specifiers.push(this.finishNode(specifier, type));\n    };\n\n    _proto.parseImportSpecifiers = function parseImportSpecifiers(node) {\n      node.importKind = \"value\";\n      var kind = null;\n\n      if (this.match(types._typeof)) {\n        kind = \"typeof\";\n      } else if (this.isContextual(\"type\")) {\n        kind = \"type\";\n      }\n\n      if (kind) {\n        var lh = this.lookahead();\n\n        if (kind === \"type\" && lh.type === types.star) {\n          this.unexpected(lh.start);\n        }\n\n        if (isMaybeDefaultImport(lh) || lh.type === types.braceL || lh.type === types.star) {\n          this.next();\n          node.importKind = kind;\n        }\n      }\n\n      _superClass.prototype.parseImportSpecifiers.call(this, node);\n    };\n\n    _proto.parseImportSpecifier = function parseImportSpecifier(node) {\n      var specifier = this.startNode();\n      var firstIdentLoc = this.state.start;\n      var firstIdent = this.parseIdentifier(true);\n      var specifierTypeKind = null;\n\n      if (firstIdent.name === \"type\") {\n        specifierTypeKind = \"type\";\n      } else if (firstIdent.name === \"typeof\") {\n        specifierTypeKind = \"typeof\";\n      }\n\n      var isBinding = false;\n\n      if (this.isContextual(\"as\") && !this.isLookaheadContextual(\"as\")) {\n        var as_ident = this.parseIdentifier(true);\n\n        if (specifierTypeKind !== null && !this.match(types.name) && !this.state.type.keyword) {\n          specifier.imported = as_ident;\n          specifier.importKind = specifierTypeKind;\n          specifier.local = as_ident.__clone();\n        } else {\n          specifier.imported = firstIdent;\n          specifier.importKind = null;\n          specifier.local = this.parseIdentifier();\n        }\n      } else if (specifierTypeKind !== null && (this.match(types.name) || this.state.type.keyword)) {\n        specifier.imported = this.parseIdentifier(true);\n        specifier.importKind = specifierTypeKind;\n\n        if (this.eatContextual(\"as\")) {\n          specifier.local = this.parseIdentifier();\n        } else {\n          isBinding = true;\n          specifier.local = specifier.imported.__clone();\n        }\n      } else {\n        isBinding = true;\n        specifier.imported = firstIdent;\n        specifier.importKind = null;\n        specifier.local = specifier.imported.__clone();\n      }\n\n      var nodeIsTypeImport = hasTypeImportKind(node);\n      var specifierIsTypeImport = hasTypeImportKind(specifier);\n\n      if (nodeIsTypeImport && specifierIsTypeImport) {\n        this.raise(firstIdentLoc, \"The `type` and `typeof` keywords on named imports can only be used on regular \" + \"`import` statements. It cannot be used with `import type` or `import typeof` statements\");\n      }\n\n      if (nodeIsTypeImport || specifierIsTypeImport) {\n        this.checkReservedType(specifier.local.name, specifier.local.start);\n      }\n\n      if (isBinding && !nodeIsTypeImport && !specifierIsTypeImport) {\n        this.checkReservedWord(specifier.local.name, specifier.start, true, true);\n      }\n\n      this.checkLVal(specifier.local, true, undefined, \"import specifier\");\n      node.specifiers.push(this.finishNode(specifier, \"ImportSpecifier\"));\n    };\n\n    _proto.parseFunctionParams = function parseFunctionParams(node) {\n      var kind = node.kind;\n\n      if (kind !== \"get\" && kind !== \"set\" && this.isRelational(\"<\")) {\n        node.typeParameters = this.flowParseTypeParameterDeclaration(false);\n      }\n\n      _superClass.prototype.parseFunctionParams.call(this, node);\n    };\n\n    _proto.parseVarHead = function parseVarHead(decl) {\n      _superClass.prototype.parseVarHead.call(this, decl);\n\n      if (this.match(types.colon)) {\n        decl.id.typeAnnotation = this.flowParseTypeAnnotation();\n        this.finishNode(decl.id, decl.id.type);\n      }\n    };\n\n    _proto.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) {\n      if (this.match(types.colon)) {\n        var oldNoAnonFunctionType = this.state.noAnonFunctionType;\n        this.state.noAnonFunctionType = true;\n        node.returnType = this.flowParseTypeAnnotation();\n        this.state.noAnonFunctionType = oldNoAnonFunctionType;\n      }\n\n      return _superClass.prototype.parseAsyncArrowFromCallExpression.call(this, node, call);\n    };\n\n    _proto.shouldParseAsyncArrow = function shouldParseAsyncArrow() {\n      return this.match(types.colon) || _superClass.prototype.shouldParseAsyncArrow.call(this);\n    };\n\n    _proto.parseMaybeAssign = function parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) {\n      var _this6 = this;\n\n      var jsxError = null;\n\n      if (types.jsxTagStart && this.match(types.jsxTagStart)) {\n        var state = this.state.clone();\n\n        try {\n          return _superClass.prototype.parseMaybeAssign.call(this, noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos);\n        } catch (err) {\n          if (err instanceof SyntaxError) {\n            this.state = state;\n            this.state.context.length -= 2;\n            jsxError = err;\n          } else {\n            throw err;\n          }\n        }\n      }\n\n      if (jsxError != null || this.isRelational(\"<\")) {\n        var arrowExpression;\n        var typeParameters;\n\n        try {\n          typeParameters = this.flowParseTypeParameterDeclaration();\n          arrowExpression = this.forwardNoArrowParamsConversionAt(typeParameters, function () {\n            return _superClass.prototype.parseMaybeAssign.call(_this6, noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos);\n          });\n          arrowExpression.typeParameters = typeParameters;\n          this.resetStartLocationFromNode(arrowExpression, typeParameters);\n        } catch (err) {\n          throw jsxError || err;\n        }\n\n        if (arrowExpression.type === \"ArrowFunctionExpression\") {\n          return arrowExpression;\n        } else if (jsxError != null) {\n          throw jsxError;\n        } else {\n          this.raise(typeParameters.start, \"Expected an arrow function after this type parameter declaration\");\n        }\n      }\n\n      return _superClass.prototype.parseMaybeAssign.call(this, noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos);\n    };\n\n    _proto.parseArrow = function parseArrow(node) {\n      if (this.match(types.colon)) {\n        var state = this.state.clone();\n\n        try {\n          var oldNoAnonFunctionType = this.state.noAnonFunctionType;\n          this.state.noAnonFunctionType = true;\n          var typeNode = this.startNode();\n\n          var _this$flowParseTypeAn3 = this.flowParseTypeAndPredicateInitialiser();\n\n          typeNode.typeAnnotation = _this$flowParseTypeAn3[0];\n          node.predicate = _this$flowParseTypeAn3[1];\n          this.state.noAnonFunctionType = oldNoAnonFunctionType;\n          if (this.canInsertSemicolon()) this.unexpected();\n          if (!this.match(types.arrow)) this.unexpected();\n          node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, \"TypeAnnotation\") : null;\n        } catch (err) {\n          if (err instanceof SyntaxError) {\n            this.state = state;\n          } else {\n            throw err;\n          }\n        }\n      }\n\n      return _superClass.prototype.parseArrow.call(this, node);\n    };\n\n    _proto.shouldParseArrow = function shouldParseArrow() {\n      return this.match(types.colon) || _superClass.prototype.shouldParseArrow.call(this);\n    };\n\n    _proto.setArrowFunctionParameters = function setArrowFunctionParameters(node, params) {\n      if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {\n        node.params = params;\n      } else {\n        _superClass.prototype.setArrowFunctionParameters.call(this, node, params);\n      }\n    };\n\n    _proto.checkFunctionNameAndParams = function checkFunctionNameAndParams(node, isArrowFunction) {\n      if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {\n        return;\n      }\n\n      return _superClass.prototype.checkFunctionNameAndParams.call(this, node, isArrowFunction);\n    };\n\n    _proto.parseParenAndDistinguishExpression = function parseParenAndDistinguishExpression(canBeArrow) {\n      return _superClass.prototype.parseParenAndDistinguishExpression.call(this, canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1);\n    };\n\n    _proto.parseSubscripts = function parseSubscripts(base, startPos, startLoc, noCalls) {\n      if (base.type === \"Identifier\" && base.name === \"async\" && this.state.noArrowAt.indexOf(startPos) !== -1) {\n        this.next();\n        var node = this.startNodeAt(startPos, startLoc);\n        node.callee = base;\n        node.arguments = this.parseCallExpressionArguments(types.parenR, false);\n        base = this.finishNode(node, \"CallExpression\");\n      } else if (base.type === \"Identifier\" && base.name === \"async\" && this.isRelational(\"<\")) {\n        var state = this.state.clone();\n        var error;\n\n        try {\n          var _node3 = this.parseAsyncArrowWithTypeParameters(startPos, startLoc);\n\n          if (_node3) return _node3;\n        } catch (e) {\n          error = e;\n        }\n\n        this.state = state;\n\n        try {\n          return _superClass.prototype.parseSubscripts.call(this, base, startPos, startLoc, noCalls);\n        } catch (e) {\n          throw error || e;\n        }\n      }\n\n      return _superClass.prototype.parseSubscripts.call(this, base, startPos, startLoc, noCalls);\n    };\n\n    _proto.parseSubscript = function parseSubscript(base, startPos, startLoc, noCalls, subscriptState) {\n      if (this.match(types.questionDot) && this.isLookaheadRelational(\"<\")) {\n        this.expectPlugin(\"optionalChaining\");\n        subscriptState.optionalChainMember = true;\n\n        if (noCalls) {\n          subscriptState.stop = true;\n          return base;\n        }\n\n        this.next();\n        var node = this.startNodeAt(startPos, startLoc);\n        node.callee = base;\n        node.typeArguments = this.flowParseTypeParameterInstantiation();\n        this.expect(types.parenL);\n        node.arguments = this.parseCallExpressionArguments(types.parenR, false);\n        node.optional = true;\n        return this.finishNode(node, \"OptionalCallExpression\");\n      } else if (!noCalls && this.shouldParseTypes() && this.isRelational(\"<\")) {\n        var _node4 = this.startNodeAt(startPos, startLoc);\n\n        _node4.callee = base;\n        var state = this.state.clone();\n\n        try {\n          _node4.typeArguments = this.flowParseTypeParameterInstantiation();\n          this.expect(types.parenL);\n          _node4.arguments = this.parseCallExpressionArguments(types.parenR, false);\n\n          if (subscriptState.optionalChainMember) {\n            _node4.optional = false;\n            return this.finishNode(_node4, \"OptionalCallExpression\");\n          }\n\n          return this.finishNode(_node4, \"CallExpression\");\n        } catch (e) {\n          if (e instanceof SyntaxError) {\n            this.state = state;\n          } else {\n            throw e;\n          }\n        }\n      }\n\n      return _superClass.prototype.parseSubscript.call(this, base, startPos, startLoc, noCalls, subscriptState);\n    };\n\n    _proto.parseNewArguments = function parseNewArguments(node) {\n      var targs = null;\n\n      if (this.shouldParseTypes() && this.isRelational(\"<\")) {\n        var state = this.state.clone();\n\n        try {\n          targs = this.flowParseTypeParameterInstantiation();\n        } catch (e) {\n          if (e instanceof SyntaxError) {\n            this.state = state;\n          } else {\n            throw e;\n          }\n        }\n      }\n\n      node.typeArguments = targs;\n\n      _superClass.prototype.parseNewArguments.call(this, node);\n    };\n\n    _proto.parseAsyncArrowWithTypeParameters = function parseAsyncArrowWithTypeParameters(startPos, startLoc) {\n      var node = this.startNodeAt(startPos, startLoc);\n      this.parseFunctionParams(node);\n      if (!this.parseArrow(node)) return;\n      return this.parseArrowExpression(node, undefined, true);\n    };\n\n    _proto.readToken_mult_modulo = function readToken_mult_modulo(code) {\n      var next = this.input.charCodeAt(this.state.pos + 1);\n\n      if (code === 42 && next === 47 && this.state.hasFlowComment) {\n        this.state.hasFlowComment = false;\n        this.state.pos += 2;\n        this.nextToken();\n        return;\n      }\n\n      _superClass.prototype.readToken_mult_modulo.call(this, code);\n    };\n\n    _proto.skipBlockComment = function skipBlockComment() {\n      if (this.hasPlugin(\"flow\") && this.hasPlugin(\"flowComments\") && this.skipFlowComment()) {\n        this.hasFlowCommentCompletion();\n        this.state.pos += this.skipFlowComment();\n        this.state.hasFlowComment = true;\n        return;\n      }\n\n      var end;\n\n      if (this.hasPlugin(\"flow\") && this.state.hasFlowComment) {\n        end = this.input.indexOf(\"*-/\", this.state.pos += 2);\n        if (end === -1) this.raise(this.state.pos - 2, \"Unterminated comment\");\n        this.state.pos = end + 3;\n        return;\n      }\n\n      _superClass.prototype.skipBlockComment.call(this);\n    };\n\n    _proto.skipFlowComment = function skipFlowComment() {\n      var ch2 = this.input.charCodeAt(this.state.pos + 2);\n      var ch3 = this.input.charCodeAt(this.state.pos + 3);\n\n      if (ch2 === 58 && ch3 === 58) {\n        return 4;\n      }\n\n      if (this.input.slice(this.state.pos + 2, 14) === \"flow-include\") {\n        return 14;\n      }\n\n      if (ch2 === 58 && ch3 !== 58) {\n        return 2;\n      }\n\n      return false;\n    };\n\n    _proto.hasFlowCommentCompletion = function hasFlowCommentCompletion() {\n      var end = this.input.indexOf(\"*/\", this.state.pos);\n\n      if (end === -1) {\n        this.raise(this.state.pos, \"Unterminated comment\");\n      }\n    };\n\n    return _class;\n  }(superClass);\n});\n\nvar entities = {\n  quot: \"\\\"\",\n  amp: \"&\",\n  apos: \"'\",\n  lt: \"<\",\n  gt: \">\",\n  nbsp: \"\\xA0\",\n  iexcl: \"\\xA1\",\n  cent: \"\\xA2\",\n  pound: \"\\xA3\",\n  curren: \"\\xA4\",\n  yen: \"\\xA5\",\n  brvbar: \"\\xA6\",\n  sect: \"\\xA7\",\n  uml: \"\\xA8\",\n  copy: \"\\xA9\",\n  ordf: \"\\xAA\",\n  laquo: \"\\xAB\",\n  not: \"\\xAC\",\n  shy: \"\\xAD\",\n  reg: \"\\xAE\",\n  macr: \"\\xAF\",\n  deg: \"\\xB0\",\n  plusmn: \"\\xB1\",\n  sup2: \"\\xB2\",\n  sup3: \"\\xB3\",\n  acute: \"\\xB4\",\n  micro: \"\\xB5\",\n  para: \"\\xB6\",\n  middot: \"\\xB7\",\n  cedil: \"\\xB8\",\n  sup1: \"\\xB9\",\n  ordm: \"\\xBA\",\n  raquo: \"\\xBB\",\n  frac14: \"\\xBC\",\n  frac12: \"\\xBD\",\n  frac34: \"\\xBE\",\n  iquest: \"\\xBF\",\n  Agrave: \"\\xC0\",\n  Aacute: \"\\xC1\",\n  Acirc: \"\\xC2\",\n  Atilde: \"\\xC3\",\n  Auml: \"\\xC4\",\n  Aring: \"\\xC5\",\n  AElig: \"\\xC6\",\n  Ccedil: \"\\xC7\",\n  Egrave: \"\\xC8\",\n  Eacute: \"\\xC9\",\n  Ecirc: \"\\xCA\",\n  Euml: \"\\xCB\",\n  Igrave: \"\\xCC\",\n  Iacute: \"\\xCD\",\n  Icirc: \"\\xCE\",\n  Iuml: \"\\xCF\",\n  ETH: \"\\xD0\",\n  Ntilde: \"\\xD1\",\n  Ograve: \"\\xD2\",\n  Oacute: \"\\xD3\",\n  Ocirc: \"\\xD4\",\n  Otilde: \"\\xD5\",\n  Ouml: \"\\xD6\",\n  times: \"\\xD7\",\n  Oslash: \"\\xD8\",\n  Ugrave: \"\\xD9\",\n  Uacute: \"\\xDA\",\n  Ucirc: \"\\xDB\",\n  Uuml: \"\\xDC\",\n  Yacute: \"\\xDD\",\n  THORN: \"\\xDE\",\n  szlig: \"\\xDF\",\n  agrave: \"\\xE0\",\n  aacute: \"\\xE1\",\n  acirc: \"\\xE2\",\n  atilde: \"\\xE3\",\n  auml: \"\\xE4\",\n  aring: \"\\xE5\",\n  aelig: \"\\xE6\",\n  ccedil: \"\\xE7\",\n  egrave: \"\\xE8\",\n  eacute: \"\\xE9\",\n  ecirc: \"\\xEA\",\n  euml: \"\\xEB\",\n  igrave: \"\\xEC\",\n  iacute: \"\\xED\",\n  icirc: \"\\xEE\",\n  iuml: \"\\xEF\",\n  eth: \"\\xF0\",\n  ntilde: \"\\xF1\",\n  ograve: \"\\xF2\",\n  oacute: \"\\xF3\",\n  ocirc: \"\\xF4\",\n  otilde: \"\\xF5\",\n  ouml: \"\\xF6\",\n  divide: \"\\xF7\",\n  oslash: \"\\xF8\",\n  ugrave: \"\\xF9\",\n  uacute: \"\\xFA\",\n  ucirc: \"\\xFB\",\n  uuml: \"\\xFC\",\n  yacute: \"\\xFD\",\n  thorn: \"\\xFE\",\n  yuml: \"\\xFF\",\n  OElig: \"\\u0152\",\n  oelig: \"\\u0153\",\n  Scaron: \"\\u0160\",\n  scaron: \"\\u0161\",\n  Yuml: \"\\u0178\",\n  fnof: \"\\u0192\",\n  circ: \"\\u02C6\",\n  tilde: \"\\u02DC\",\n  Alpha: \"\\u0391\",\n  Beta: \"\\u0392\",\n  Gamma: \"\\u0393\",\n  Delta: \"\\u0394\",\n  Epsilon: \"\\u0395\",\n  Zeta: \"\\u0396\",\n  Eta: \"\\u0397\",\n  Theta: \"\\u0398\",\n  Iota: \"\\u0399\",\n  Kappa: \"\\u039A\",\n  Lambda: \"\\u039B\",\n  Mu: \"\\u039C\",\n  Nu: \"\\u039D\",\n  Xi: \"\\u039E\",\n  Omicron: \"\\u039F\",\n  Pi: \"\\u03A0\",\n  Rho: \"\\u03A1\",\n  Sigma: \"\\u03A3\",\n  Tau: \"\\u03A4\",\n  Upsilon: \"\\u03A5\",\n  Phi: \"\\u03A6\",\n  Chi: \"\\u03A7\",\n  Psi: \"\\u03A8\",\n  Omega: \"\\u03A9\",\n  alpha: \"\\u03B1\",\n  beta: \"\\u03B2\",\n  gamma: \"\\u03B3\",\n  delta: \"\\u03B4\",\n  epsilon: \"\\u03B5\",\n  zeta: \"\\u03B6\",\n  eta: \"\\u03B7\",\n  theta: \"\\u03B8\",\n  iota: \"\\u03B9\",\n  kappa: \"\\u03BA\",\n  lambda: \"\\u03BB\",\n  mu: \"\\u03BC\",\n  nu: \"\\u03BD\",\n  xi: \"\\u03BE\",\n  omicron: \"\\u03BF\",\n  pi: \"\\u03C0\",\n  rho: \"\\u03C1\",\n  sigmaf: \"\\u03C2\",\n  sigma: \"\\u03C3\",\n  tau: \"\\u03C4\",\n  upsilon: \"\\u03C5\",\n  phi: \"\\u03C6\",\n  chi: \"\\u03C7\",\n  psi: \"\\u03C8\",\n  omega: \"\\u03C9\",\n  thetasym: \"\\u03D1\",\n  upsih: \"\\u03D2\",\n  piv: \"\\u03D6\",\n  ensp: \"\\u2002\",\n  emsp: \"\\u2003\",\n  thinsp: \"\\u2009\",\n  zwnj: \"\\u200C\",\n  zwj: \"\\u200D\",\n  lrm: \"\\u200E\",\n  rlm: \"\\u200F\",\n  ndash: \"\\u2013\",\n  mdash: \"\\u2014\",\n  lsquo: \"\\u2018\",\n  rsquo: \"\\u2019\",\n  sbquo: \"\\u201A\",\n  ldquo: \"\\u201C\",\n  rdquo: \"\\u201D\",\n  bdquo: \"\\u201E\",\n  dagger: \"\\u2020\",\n  Dagger: \"\\u2021\",\n  bull: \"\\u2022\",\n  hellip: \"\\u2026\",\n  permil: \"\\u2030\",\n  prime: \"\\u2032\",\n  Prime: \"\\u2033\",\n  lsaquo: \"\\u2039\",\n  rsaquo: \"\\u203A\",\n  oline: \"\\u203E\",\n  frasl: \"\\u2044\",\n  euro: \"\\u20AC\",\n  image: \"\\u2111\",\n  weierp: \"\\u2118\",\n  real: \"\\u211C\",\n  trade: \"\\u2122\",\n  alefsym: \"\\u2135\",\n  larr: \"\\u2190\",\n  uarr: \"\\u2191\",\n  rarr: \"\\u2192\",\n  darr: \"\\u2193\",\n  harr: \"\\u2194\",\n  crarr: \"\\u21B5\",\n  lArr: \"\\u21D0\",\n  uArr: \"\\u21D1\",\n  rArr: \"\\u21D2\",\n  dArr: \"\\u21D3\",\n  hArr: \"\\u21D4\",\n  forall: \"\\u2200\",\n  part: \"\\u2202\",\n  exist: \"\\u2203\",\n  empty: \"\\u2205\",\n  nabla: \"\\u2207\",\n  isin: \"\\u2208\",\n  notin: \"\\u2209\",\n  ni: \"\\u220B\",\n  prod: \"\\u220F\",\n  sum: \"\\u2211\",\n  minus: \"\\u2212\",\n  lowast: \"\\u2217\",\n  radic: \"\\u221A\",\n  prop: \"\\u221D\",\n  infin: \"\\u221E\",\n  ang: \"\\u2220\",\n  and: \"\\u2227\",\n  or: \"\\u2228\",\n  cap: \"\\u2229\",\n  cup: \"\\u222A\",\n  int: \"\\u222B\",\n  there4: \"\\u2234\",\n  sim: \"\\u223C\",\n  cong: \"\\u2245\",\n  asymp: \"\\u2248\",\n  ne: \"\\u2260\",\n  equiv: \"\\u2261\",\n  le: \"\\u2264\",\n  ge: \"\\u2265\",\n  sub: \"\\u2282\",\n  sup: \"\\u2283\",\n  nsub: \"\\u2284\",\n  sube: \"\\u2286\",\n  supe: \"\\u2287\",\n  oplus: \"\\u2295\",\n  otimes: \"\\u2297\",\n  perp: \"\\u22A5\",\n  sdot: \"\\u22C5\",\n  lceil: \"\\u2308\",\n  rceil: \"\\u2309\",\n  lfloor: \"\\u230A\",\n  rfloor: \"\\u230B\",\n  lang: \"\\u2329\",\n  rang: \"\\u232A\",\n  loz: \"\\u25CA\",\n  spades: \"\\u2660\",\n  clubs: \"\\u2663\",\n  hearts: \"\\u2665\",\n  diams: \"\\u2666\"\n};\n\nvar lineBreak = /\\r\\n?|\\n|\\u2028|\\u2029/;\nvar lineBreakG = new RegExp(lineBreak.source, \"g\");\nfunction isNewLine(code) {\n  switch (code) {\n    case 10:\n    case 13:\n    case 8232:\n    case 8233:\n      return true;\n\n    default:\n      return false;\n  }\n}\nvar skipWhiteSpace = /(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g;\nfunction isWhitespace(code) {\n  switch (code) {\n    case 0x0009:\n    case 0x000b:\n    case 0x000c:\n    case 32:\n    case 160:\n    case 5760:\n    case 0x2000:\n    case 0x2001:\n    case 0x2002:\n    case 0x2003:\n    case 0x2004:\n    case 0x2005:\n    case 0x2006:\n    case 0x2007:\n    case 0x2008:\n    case 0x2009:\n    case 0x200a:\n    case 0x202f:\n    case 0x205f:\n    case 0x3000:\n    case 0xfeff:\n      return true;\n\n    default:\n      return false;\n  }\n}\n\nvar TokContext = function TokContext(token, isExpr, preserveSpace, override) {\n  this.token = token;\n  this.isExpr = !!isExpr;\n  this.preserveSpace = !!preserveSpace;\n  this.override = override;\n};\nvar types$1 = {\n  braceStatement: new TokContext(\"{\", false),\n  braceExpression: new TokContext(\"{\", true),\n  templateQuasi: new TokContext(\"${\", true),\n  parenStatement: new TokContext(\"(\", false),\n  parenExpression: new TokContext(\"(\", true),\n  template: new TokContext(\"`\", true, true, function (p) {\n    return p.readTmplToken();\n  }),\n  functionExpression: new TokContext(\"function\", true)\n};\n\ntypes.parenR.updateContext = types.braceR.updateContext = function () {\n  if (this.state.context.length === 1) {\n    this.state.exprAllowed = true;\n    return;\n  }\n\n  var out = this.state.context.pop();\n\n  if (out === types$1.braceStatement && this.curContext() === types$1.functionExpression) {\n    this.state.context.pop();\n    this.state.exprAllowed = false;\n  } else if (out === types$1.templateQuasi) {\n    this.state.exprAllowed = true;\n  } else {\n    this.state.exprAllowed = !out.isExpr;\n  }\n};\n\ntypes.name.updateContext = function (prevType) {\n  if (this.state.value === \"of\" && this.curContext() === types$1.parenStatement) {\n    this.state.exprAllowed = !prevType.beforeExpr;\n    return;\n  }\n\n  this.state.exprAllowed = false;\n\n  if (prevType === types._let || prevType === types._const || prevType === types._var) {\n    if (lineBreak.test(this.input.slice(this.state.end))) {\n      this.state.exprAllowed = true;\n    }\n  }\n\n  if (this.state.isIterator) {\n    this.state.isIterator = false;\n  }\n};\n\ntypes.braceL.updateContext = function (prevType) {\n  this.state.context.push(this.braceIsBlock(prevType) ? types$1.braceStatement : types$1.braceExpression);\n  this.state.exprAllowed = true;\n};\n\ntypes.dollarBraceL.updateContext = function () {\n  this.state.context.push(types$1.templateQuasi);\n  this.state.exprAllowed = true;\n};\n\ntypes.parenL.updateContext = function (prevType) {\n  var statementParens = prevType === types._if || prevType === types._for || prevType === types._with || prevType === types._while;\n  this.state.context.push(statementParens ? types$1.parenStatement : types$1.parenExpression);\n  this.state.exprAllowed = true;\n};\n\ntypes.incDec.updateContext = function () {};\n\ntypes._function.updateContext = function (prevType) {\n  if (this.state.exprAllowed && !this.braceIsBlock(prevType)) {\n    this.state.context.push(types$1.functionExpression);\n  }\n\n  this.state.exprAllowed = false;\n};\n\ntypes.backQuote.updateContext = function () {\n  if (this.curContext() === types$1.template) {\n    this.state.context.pop();\n  } else {\n    this.state.context.push(types$1.template);\n  }\n\n  this.state.exprAllowed = false;\n};\n\nvar HEX_NUMBER = /^[\\da-fA-F]+$/;\nvar DECIMAL_NUMBER = /^\\d+$/;\ntypes$1.j_oTag = new TokContext(\"<tag\", false);\ntypes$1.j_cTag = new TokContext(\"</tag\", false);\ntypes$1.j_expr = new TokContext(\"<tag>...</tag>\", true, true);\ntypes.jsxName = new TokenType(\"jsxName\");\ntypes.jsxText = new TokenType(\"jsxText\", {\n  beforeExpr: true\n});\ntypes.jsxTagStart = new TokenType(\"jsxTagStart\", {\n  startsExpr: true\n});\ntypes.jsxTagEnd = new TokenType(\"jsxTagEnd\");\n\ntypes.jsxTagStart.updateContext = function () {\n  this.state.context.push(types$1.j_expr);\n  this.state.context.push(types$1.j_oTag);\n  this.state.exprAllowed = false;\n};\n\ntypes.jsxTagEnd.updateContext = function (prevType) {\n  var out = this.state.context.pop();\n\n  if (out === types$1.j_oTag && prevType === types.slash || out === types$1.j_cTag) {\n    this.state.context.pop();\n    this.state.exprAllowed = this.curContext() === types$1.j_expr;\n  } else {\n    this.state.exprAllowed = true;\n  }\n};\n\nfunction isFragment(object) {\n  return object ? object.type === \"JSXOpeningFragment\" || object.type === \"JSXClosingFragment\" : false;\n}\n\nfunction getQualifiedJSXName(object) {\n  if (object.type === \"JSXIdentifier\") {\n    return object.name;\n  }\n\n  if (object.type === \"JSXNamespacedName\") {\n    return object.namespace.name + \":\" + object.name.name;\n  }\n\n  if (object.type === \"JSXMemberExpression\") {\n    return getQualifiedJSXName(object.object) + \".\" + getQualifiedJSXName(object.property);\n  }\n\n  throw new Error(\"Node had unexpected type: \" + object.type);\n}\n\nvar jsx = (function (superClass) {\n  return function (_superClass) {\n    // debugger\n    _inheritsLoose(_class, _superClass);\n\n    function _class() {\n      return _superClass.apply(this, arguments) || this;\n    }\n\n    var _proto = _class.prototype;\n\n    _proto.jsxReadToken = function jsxReadToken() {\n      var out = \"\";\n      var chunkStart = this.state.pos;\n\n      for (;;) {\n        if (this.state.pos >= this.input.length) {\n          this.raise(this.state.start, \"Unterminated JSX contents\");\n        }\n\n        var ch = this.input.charCodeAt(this.state.pos);\n\n        switch (ch) {\n          case 60:\n          case 123:\n            if (this.state.pos === this.state.start) {\n              if (ch === 60 && this.state.exprAllowed) {\n                ++this.state.pos;\n                return this.finishToken(types.jsxTagStart);\n              }\n\n              return this.getTokenFromCode(ch);\n            }\n\n            out += this.input.slice(chunkStart, this.state.pos);\n            return this.finishToken(types.jsxText, out);\n\n          case 38:\n            out += this.input.slice(chunkStart, this.state.pos);\n            out += this.jsxReadEntity();\n            chunkStart = this.state.pos;\n            break;\n\n          default:\n            if (isNewLine(ch)) {\n              out += this.input.slice(chunkStart, this.state.pos);\n              out += this.jsxReadNewLine(true);\n              chunkStart = this.state.pos;\n            } else {\n              ++this.state.pos;\n            }\n\n        }\n      }\n    };\n\n    _proto.jsxReadNewLine = function jsxReadNewLine(normalizeCRLF) {\n      var ch = this.input.charCodeAt(this.state.pos);\n      var out;\n      ++this.state.pos;\n\n      if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) {\n        ++this.state.pos;\n        out = normalizeCRLF ? \"\\n\" : \"\\r\\n\";\n      } else {\n        out = String.fromCharCode(ch);\n      }\n\n      ++this.state.curLine;\n      this.state.lineStart = this.state.pos;\n      return out;\n    };\n\n    _proto.jsxReadString = function jsxReadString(quote) {\n      var out = \"\";\n      var chunkStart = ++this.state.pos;\n\n      for (;;) {\n        if (this.state.pos >= this.input.length) {\n          this.raise(this.state.start, \"Unterminated string constant\");\n        }\n\n        var ch = this.input.charCodeAt(this.state.pos);\n        if (ch === quote) break;\n\n        if (ch === 38) {\n          out += this.input.slice(chunkStart, this.state.pos);\n          out += this.jsxReadEntity();\n          chunkStart = this.state.pos;\n        } else if (isNewLine(ch)) {\n          out += this.input.slice(chunkStart, this.state.pos);\n          out += this.jsxReadNewLine(false);\n          chunkStart = this.state.pos;\n        } else {\n          ++this.state.pos;\n        }\n      }\n\n      out += this.input.slice(chunkStart, this.state.pos++);\n      return this.finishToken(types.string, out);\n    };\n\n    _proto.jsxReadEntity = function jsxReadEntity() {\n      var str = \"\";\n      var count = 0;\n      var entity;\n      var ch = this.input[this.state.pos];\n      var startPos = ++this.state.pos;\n\n      while (this.state.pos < this.input.length && count++ < 10) {\n        ch = this.input[this.state.pos++];\n\n        if (ch === \";\") {\n          if (str[0] === \"#\") {\n            if (str[1] === \"x\") {\n              str = str.substr(2);\n\n              if (HEX_NUMBER.test(str)) {\n                entity = String.fromCodePoint(parseInt(str, 16));\n              }\n            } else {\n              str = str.substr(1);\n\n              if (DECIMAL_NUMBER.test(str)) {\n                entity = String.fromCodePoint(parseInt(str, 10));\n              }\n            }\n          } else {\n            entity = entities[str];\n          }\n\n          break;\n        }\n\n        str += ch;\n      }\n\n      if (!entity) {\n        this.state.pos = startPos;\n        return \"&\";\n      }\n\n      return entity;\n    };\n\n    _proto.jsxReadWord = function jsxReadWord() {\n      var ch;\n      var start = this.state.pos;\n\n      do {\n        ch = this.input.charCodeAt(++this.state.pos);\n      } while (isIdentifierChar(ch) || ch === 45);\n\n      return this.finishToken(types.jsxName, this.input.slice(start, this.state.pos));\n    };\n\n    _proto.jsxParseIdentifier = function jsxParseIdentifier() {\n      var node = this.startNode();\n\n      if (this.match(types.jsxName)) {\n        node.name = this.state.value;\n      } else if (this.state.type.keyword) {\n        node.name = this.state.type.keyword;\n      } else {\n        this.unexpected();\n      }\n\n      this.next();\n      return this.finishNode(node, \"JSXIdentifier\");\n    };\n\n    _proto.jsxParseNamespacedName = function jsxParseNamespacedName() {\n      var startPos = this.state.start;\n      var startLoc = this.state.startLoc;\n      var name = this.jsxParseIdentifier();\n      if (!this.eat(types.colon)) return name;\n      var node = this.startNodeAt(startPos, startLoc);\n      node.namespace = name;\n      node.name = this.jsxParseIdentifier();\n      return this.finishNode(node, \"JSXNamespacedName\");\n    };\n\n    _proto.jsxParseElementName = function jsxParseElementName() {\n      var startPos = this.state.start;\n      var startLoc = this.state.startLoc;\n      var node = this.jsxParseNamespacedName();\n\n      while (this.eat(types.dot)) {\n        var newNode = this.startNodeAt(startPos, startLoc);\n        newNode.object = node;\n        newNode.property = this.jsxParseIdentifier();\n        node = this.finishNode(newNode, \"JSXMemberExpression\");\n      }\n\n      return node;\n    };\n\n    _proto.jsxParseAttributeValue = function jsxParseAttributeValue() {\n      var node;\n\n      switch (this.state.type) {\n        case types.braceL:\n          node = this.jsxParseExpressionContainer();\n\n          if (node.expression.type === \"JSXEmptyExpression\") {\n            throw this.raise(node.start, \"JSX attributes must only be assigned a non-empty expression\");\n          } else {\n            return node;\n          }\n\n        case types.jsxTagStart:\n        case types.string:\n          return this.parseExprAtom();\n\n        default:\n          throw this.raise(this.state.start, \"JSX value should be either an expression or a quoted JSX text\");\n      }\n    };\n\n    _proto.jsxParseEmptyExpression = function jsxParseEmptyExpression() {\n      var node = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc);\n      return this.finishNodeAt(node, \"JSXEmptyExpression\", this.state.start, this.state.startLoc);\n    };\n\n    _proto.jsxParseSpreadChild = function jsxParseSpreadChild() {\n      var node = this.startNode();\n      this.expect(types.braceL);\n      this.expect(types.ellipsis);\n      node.expression = this.parseExpression();\n      this.expect(types.braceR);\n      return this.finishNode(node, \"JSXSpreadChild\");\n    };\n\n    _proto.jsxParseExpressionContainer = function jsxParseExpressionContainer() {\n      // debugger\n      var node = this.startNode();\n      this.next();\n\n      if (this.match(types.braceR)) {\n        node.expression = this.jsxParseEmptyExpression();\n      } else {\n        node.expression = this.parseExpression();\n      }\n\n      this.expect(types.braceR);\n      return this.finishNode(node, \"JSXExpressionContainer\");\n    };\n\n    _proto.jsxParseAttribute = function jsxParseAttribute() {\n      var node = this.startNode();\n\n      if (this.eat(types.braceL)) {\n        this.expect(types.ellipsis);\n        node.argument = this.parseMaybeAssign();\n        this.expect(types.braceR);\n        return this.finishNode(node, \"JSXSpreadAttribute\");\n      }\n\n      node.name = this.jsxParseNamespacedName();\n      node.value = this.eat(types.eq) ? this.jsxParseAttributeValue() : null;\n      return this.finishNode(node, \"JSXAttribute\");\n    };\n\n    _proto.jsxParseOpeningElementAt = function jsxParseOpeningElementAt(startPos, startLoc) {\n      var node = this.startNodeAt(startPos, startLoc);\n\n      if (this.match(types.jsxTagEnd)) {\n        this.expect(types.jsxTagEnd);\n        return this.finishNode(node, \"JSXOpeningFragment\");\n      }\n\n      node.name = this.jsxParseElementName();\n      return this.jsxParseOpeningElementAfterName(node);\n    };\n\n    _proto.jsxParseOpeningElementAfterName = function jsxParseOpeningElementAfterName(node) {\n      var attributes = [];\n\n      while (!this.match(types.slash) && !this.match(types.jsxTagEnd)) {\n        attributes.push(this.jsxParseAttribute());\n      }\n\n      node.attributes = attributes;\n      node.selfClosing = this.eat(types.slash);\n      this.expect(types.jsxTagEnd);\n      return this.finishNode(node, \"JSXOpeningElement\");\n    };\n\n    _proto.jsxParseClosingElementAt = function jsxParseClosingElementAt(startPos, startLoc) {\n      var node = this.startNodeAt(startPos, startLoc);\n\n      if (this.match(types.jsxTagEnd)) {\n        this.expect(types.jsxTagEnd);\n        return this.finishNode(node, \"JSXClosingFragment\");\n      }\n\n      node.name = this.jsxParseElementName();\n      this.expect(types.jsxTagEnd);\n      return this.finishNode(node, \"JSXClosingElement\");\n    };\n\n    _proto.jsxParseElementAt = function jsxParseElementAt(startPos, startLoc) {\n      var node = this.startNodeAt(startPos, startLoc);\n      var children = [];\n      var openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);\n      var closingElement = null;\n\n      if (!openingElement.selfClosing) {\n        contents: for (;;) {\n          switch (this.state.type) {\n            case types.jsxTagStart:\n              startPos = this.state.start;\n              startLoc = this.state.startLoc;\n              this.next();\n\n              if (this.eat(types.slash)) {\n                closingElement = this.jsxParseClosingElementAt(startPos, startLoc);\n                break contents;\n              }\n\n              children.push(this.jsxParseElementAt(startPos, startLoc));\n              break;\n\n            case types.jsxText:\n              children.push(this.parseExprAtom());\n              break;\n\n            case types.braceL:\n              if (this.lookahead().type === types.ellipsis) {\n                children.push(this.jsxParseSpreadChild());\n              } else {\n                children.push(this.jsxParseExpressionContainer());\n              }\n\n              break;\n\n            default:\n              throw this.unexpected();\n          }\n        }\n\n        if (isFragment(openingElement) && !isFragment(closingElement)) {\n          this.raise(closingElement.start, \"Expected corresponding JSX closing tag for <>\");\n        } else if (!isFragment(openingElement) && isFragment(closingElement)) {\n          this.raise(closingElement.start, \"Expected corresponding JSX closing tag for <\" + getQualifiedJSXName(openingElement.name) + \">\");\n        } else if (!isFragment(openingElement) && !isFragment(closingElement)) {\n          if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {\n            this.raise(closingElement.start, \"Expected corresponding JSX closing tag for <\" + getQualifiedJSXName(openingElement.name) + \">\");\n          }\n        }\n      }\n\n      if (isFragment(openingElement)) {\n        node.openingFragment = openingElement;\n        node.closingFragment = closingElement;\n      } else {\n        node.openingElement = openingElement;\n        node.closingElement = closingElement;\n      }\n\n      node.children = children;\n\n      if (this.match(types.relational) && this.state.value === \"<\") {\n        this.raise(this.state.start, \"Adjacent JSX elements must be wrapped in an enclosing tag. \" + \"Did you want a JSX fragment <>...</>?\");\n      }\n\n      return isFragment(openingElement) ? this.finishNode(node, \"JSXFragment\") : this.finishNode(node, \"JSXElement\");\n    };\n\n    _proto.jsxParseElement = function jsxParseElement() {\n      var startPos = this.state.start;\n      var startLoc = this.state.startLoc;\n      this.next();\n      return this.jsxParseElementAt(startPos, startLoc);\n    };\n\n    _proto.parseExprAtom = function parseExprAtom(refShortHandDefaultPos) {\n      if (this.match(types.jsxText)) {\n        return this.parseLiteral(this.state.value, \"JSXText\");\n      } else if (this.match(types.jsxTagStart)) {\n        return this.jsxParseElement();\n      } else {\n        return _superClass.prototype.parseExprAtom.call(this, refShortHandDefaultPos);\n      }\n    };\n\n    _proto.readToken = function readToken(code) {\n      if (this.state.inPropertyName) return _superClass.prototype.readToken.call(this, code);\n      var context = this.curContext();\n\n      if (context === types$1.j_expr) {\n        return this.jsxReadToken();\n      }\n\n      if (context === types$1.j_oTag || context === types$1.j_cTag) {\n        if (isIdentifierStart(code)) {\n          return this.jsxReadWord();\n        }\n\n        if (code === 62) {\n          ++this.state.pos;\n          return this.finishToken(types.jsxTagEnd);\n        }\n\n        if ((code === 34 || code === 39) && context === types$1.j_oTag) {\n          return this.jsxReadString(code);\n        }\n      }\n\n      if (code === 60 && this.state.exprAllowed) {\n        ++this.state.pos;\n        return this.finishToken(types.jsxTagStart);\n      }\n\n      return _superClass.prototype.readToken.call(this, code);\n    };\n\n    _proto.updateContext = function updateContext(prevType) {\n      if (this.match(types.braceL)) {\n        var curContext = this.curContext();\n\n        if (curContext === types$1.j_oTag) {\n          this.state.context.push(types$1.braceExpression);\n        } else if (curContext === types$1.j_expr) {\n          this.state.context.push(types$1.templateQuasi);\n        } else {\n          _superClass.prototype.updateContext.call(this, prevType);\n        }\n\n        this.state.exprAllowed = true;\n      } else if (this.match(types.slash) && prevType === types.jsxTagStart) {\n        this.state.context.length -= 2;\n        this.state.context.push(types$1.j_cTag);\n        this.state.exprAllowed = false;\n      } else {\n        return _superClass.prototype.updateContext.call(this, prevType);\n      }\n    };\n\n    return _class;\n  }(superClass);\n});\n\nvar defaultOptions = {\n  sourceType: \"script\",\n  sourceFilename: undefined,\n  startLine: 1,\n  allowAwaitOutsideFunction: false,\n  allowReturnOutsideFunction: false,\n  allowImportExportEverywhere: false,\n  allowSuperOutsideMethod: false,\n  plugins: [],\n  strictMode: null,\n  ranges: false,\n  tokens: false\n};\nfunction getOptions(opts) {\n  var options = {};\n\n  for (var key in defaultOptions) {\n    options[key] = opts && opts[key] != null ? opts[key] : defaultOptions[key];\n  }\n\n  return options;\n}\n\nvar Position = function Position(line, col) {\n  this.line = line;\n  this.column = col;\n};\nvar SourceLocation = function SourceLocation(start, end) {\n  this.start = start;\n  this.end = end;\n};\nfunction getLineInfo(input, offset) {\n  var line = 1;\n  var lineStart = 0;\n  var match;\n  lineBreakG.lastIndex = 0;\n\n  while ((match = lineBreakG.exec(input)) && match.index < offset) {\n    line++;\n    lineStart = lineBreakG.lastIndex;\n  }\n\n  return new Position(line, offset - lineStart);\n}\n\nvar BaseParser = function () {\n  function BaseParser() {\n    this.sawUnambiguousESM = false;\n  }\n\n  var _proto = BaseParser.prototype;\n\n  _proto.isReservedWord = function isReservedWord(word) {\n    if (word === \"await\") {\n      return this.inModule;\n    } else {\n      return reservedWords[6](word);\n    }\n  };\n\n  _proto.hasPlugin = function hasPlugin(name) {\n    return Object.hasOwnProperty.call(this.plugins, name);\n  };\n\n  _proto.getPluginOption = function getPluginOption(plugin, name) {\n    if (this.hasPlugin(plugin)) return this.plugins[plugin][name];\n  };\n\n  return BaseParser;\n}();\n\nfunction last(stack) {\n  return stack[stack.length - 1];\n}\n\nvar CommentsParser = function (_BaseParser) {\n  _inheritsLoose(CommentsParser, _BaseParser);\n\n  function CommentsParser() {\n    return _BaseParser.apply(this, arguments) || this;\n  }\n\n  var _proto = CommentsParser.prototype;\n\n  _proto.addComment = function addComment(comment) {\n    if (this.filename) comment.loc.filename = this.filename;\n    this.state.trailingComments.push(comment);\n    this.state.leadingComments.push(comment);\n  };\n\n  _proto.processComment = function processComment(node) {\n    if (node.type === \"Program\" && node.body.length > 0) return;\n    var stack = this.state.commentStack;\n    var firstChild, lastChild, trailingComments, i, j;\n\n    if (this.state.trailingComments.length > 0) {\n      if (this.state.trailingComments[0].start >= node.end) {\n        trailingComments = this.state.trailingComments;\n        this.state.trailingComments = [];\n      } else {\n        this.state.trailingComments.length = 0;\n      }\n    } else if (stack.length > 0) {\n      var lastInStack = last(stack);\n\n      if (lastInStack.trailingComments && lastInStack.trailingComments[0].start >= node.end) {\n        trailingComments = lastInStack.trailingComments;\n        delete lastInStack.trailingComments;\n      }\n    }\n\n    if (stack.length > 0 && last(stack).start >= node.start) {\n      firstChild = stack.pop();\n    }\n\n    while (stack.length > 0 && last(stack).start >= node.start) {\n      lastChild = stack.pop();\n    }\n\n    if (!lastChild && firstChild) lastChild = firstChild;\n\n    if (firstChild && this.state.leadingComments.length > 0) {\n      var lastComment = last(this.state.leadingComments);\n\n      if (firstChild.type === \"ObjectProperty\") {\n        if (lastComment.start >= node.start) {\n          if (this.state.commentPreviousNode) {\n            for (j = 0; j < this.state.leadingComments.length; j++) {\n              if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {\n                this.state.leadingComments.splice(j, 1);\n                j--;\n              }\n            }\n\n            if (this.state.leadingComments.length > 0) {\n              firstChild.trailingComments = this.state.leadingComments;\n              this.state.leadingComments = [];\n            }\n          }\n        }\n      } else if (node.type === \"CallExpression\" && node.arguments && node.arguments.length) {\n        var lastArg = last(node.arguments);\n\n        if (lastArg && lastComment.start >= lastArg.start && lastComment.end <= node.end) {\n          if (this.state.commentPreviousNode) {\n            for (j = 0; j < this.state.leadingComments.length; j++) {\n              if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {\n                this.state.leadingComments.splice(j, 1);\n                j--;\n              }\n            }\n\n            if (this.state.leadingComments.length > 0) {\n              lastArg.trailingComments = this.state.leadingComments;\n              this.state.leadingComments = [];\n            }\n          }\n        }\n      }\n    }\n\n    if (lastChild) {\n      if (lastChild.leadingComments) {\n        if (lastChild !== node && lastChild.leadingComments.length > 0 && last(lastChild.leadingComments).end <= node.start) {\n          node.leadingComments = lastChild.leadingComments;\n          delete lastChild.leadingComments;\n        } else {\n          for (i = lastChild.leadingComments.length - 2; i >= 0; --i) {\n            if (lastChild.leadingComments[i].end <= node.start) {\n              node.leadingComments = lastChild.leadingComments.splice(0, i + 1);\n              break;\n            }\n          }\n        }\n      }\n    } else if (this.state.leadingComments.length > 0) {\n      if (last(this.state.leadingComments).end <= node.start) {\n        if (this.state.commentPreviousNode) {\n          for (j = 0; j < this.state.leadingComments.length; j++) {\n            if (this.state.leadingComments[j].end < this.state.commentPreviousNode.end) {\n              this.state.leadingComments.splice(j, 1);\n              j--;\n            }\n          }\n        }\n\n        if (this.state.leadingComments.length > 0) {\n          node.leadingComments = this.state.leadingComments;\n          this.state.leadingComments = [];\n        }\n      } else {\n        for (i = 0; i < this.state.leadingComments.length; i++) {\n          if (this.state.leadingComments[i].end > node.start) {\n            break;\n          }\n        }\n\n        var leadingComments = this.state.leadingComments.slice(0, i);\n\n        if (leadingComments.length) {\n          node.leadingComments = leadingComments;\n        }\n\n        trailingComments = this.state.leadingComments.slice(i);\n\n        if (trailingComments.length === 0) {\n          trailingComments = null;\n        }\n      }\n    }\n\n    this.state.commentPreviousNode = node;\n\n    if (trailingComments) {\n      if (trailingComments.length && trailingComments[0].start >= node.start && last(trailingComments).end <= node.end) {\n        node.innerComments = trailingComments;\n      } else {\n        node.trailingComments = trailingComments;\n      }\n    }\n\n    stack.push(node);\n  };\n\n  return CommentsParser;\n}(BaseParser);\n\nvar LocationParser = function (_CommentsParser) {\n  _inheritsLoose(LocationParser, _CommentsParser);\n\n  function LocationParser() {\n    return _CommentsParser.apply(this, arguments) || this;\n  }\n\n  var _proto = LocationParser.prototype;\n\n  _proto.raise = function raise(pos, message, _temp) {\n    var _ref = _temp === void 0 ? {} : _temp,\n        missingPluginNames = _ref.missingPluginNames,\n        code = _ref.code;\n\n    var loc = getLineInfo(this.input, pos);\n    message += \" (\" + loc.line + \":\" + loc.column + \")\";\n    var err = new SyntaxError(message);\n    err.pos = pos;\n    err.loc = loc;\n\n    if (missingPluginNames) {\n      err.missingPlugin = missingPluginNames;\n    }\n\n    if (code !== undefined) {\n      err.code = code;\n    }\n\n    throw err;\n  };\n\n  return LocationParser;\n}(CommentsParser);\n\nvar State = function () {\n  function State() {}\n\n  var _proto = State.prototype;\n\n  _proto.init = function init(options, input) {\n    this.strict = options.strictMode === false ? false : options.sourceType === \"module\";\n    this.input = input;\n    this.potentialArrowAt = -1;\n    this.noArrowAt = [];\n    this.noArrowParamsConversionAt = [];\n    this.inMethod = false;\n    this.inFunction = false;\n    this.inParameters = false;\n    this.maybeInArrowParameters = false;\n    this.inGenerator = false;\n    this.inAsync = false;\n    this.inPropertyName = false;\n    this.inType = false;\n    this.inClassProperty = false;\n    this.noAnonFunctionType = false;\n    this.hasFlowComment = false;\n    this.isIterator = false;\n    this.classLevel = 0;\n    this.labels = [];\n    this.decoratorStack = [[]];\n    this.yieldInPossibleArrowParameters = null;\n    this.tokens = [];\n    this.comments = [];\n    this.trailingComments = [];\n    this.leadingComments = [];\n    this.commentStack = [];\n    this.commentPreviousNode = null;\n    this.pos = this.lineStart = 0;\n    this.curLine = options.startLine;\n    this.type = types.eof;\n    this.value = null;\n    this.start = this.end = this.pos;\n    this.startLoc = this.endLoc = this.curPosition();\n    this.lastTokEndLoc = this.lastTokStartLoc = null;\n    this.lastTokStart = this.lastTokEnd = this.pos;\n    this.context = [types$1.braceStatement];\n    this.exprAllowed = true;\n    this.containsEsc = this.containsOctal = false;\n    this.octalPosition = null;\n    this.invalidTemplateEscapePosition = null;\n    this.exportedIdentifiers = [];\n  };\n\n  _proto.curPosition = function curPosition() {\n    return new Position(this.curLine, this.pos - this.lineStart);\n  };\n\n  _proto.clone = function clone(skipArrays) {\n    var _this = this;\n\n    var state = new State();\n    Object.keys(this).forEach(function (key) {\n      var val = _this[key];\n\n      if ((!skipArrays || key === \"context\") && Array.isArray(val)) {\n        val = val.slice();\n      }\n\n      state[key] = val;\n    });\n    return state;\n  };\n\n  return State;\n}();\n\nvar _isDigit = function isDigit(code) {\n  return code >= 48 && code <= 57;\n};\n\nvar VALID_REGEX_FLAGS = \"gmsiyu\";\nvar forbiddenNumericSeparatorSiblings = {\n  decBinOct: [46, 66, 69, 79, 95, 98, 101, 111],\n  hex: [46, 88, 95, 120]\n};\nvar allowedNumericSeparatorSiblings = {};\nallowedNumericSeparatorSiblings.bin = [48, 49];\nallowedNumericSeparatorSiblings.oct = allowedNumericSeparatorSiblings.bin.concat([50, 51, 52, 53, 54, 55]);\nallowedNumericSeparatorSiblings.dec = allowedNumericSeparatorSiblings.oct.concat([56, 57]);\nallowedNumericSeparatorSiblings.hex = allowedNumericSeparatorSiblings.dec.concat([65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102]);\nvar Token = function Token(state) {\n  this.type = state.type;\n  this.value = state.value;\n  this.start = state.start;\n  this.end = state.end;\n  this.loc = new SourceLocation(state.startLoc, state.endLoc);\n};\n\nvar Tokenizer = function (_LocationParser) {\n  _inheritsLoose(Tokenizer, _LocationParser);\n\n  function Tokenizer(options, input) {\n    var _this;\n\n    _this = _LocationParser.call(this) || this;\n    _this.state = new State();\n\n    _this.state.init(options, input);\n\n    _this.isLookahead = false;\n    return _this;\n  }\n\n  var _proto = Tokenizer.prototype;\n\n  _proto.next = function next() {\n    if (this.options.tokens && !this.isLookahead) {\n      this.state.tokens.push(new Token(this.state));\n    }\n\n    this.state.lastTokEnd = this.state.end;\n    this.state.lastTokStart = this.state.start;\n    this.state.lastTokEndLoc = this.state.endLoc;\n    this.state.lastTokStartLoc = this.state.startLoc;\n    this.nextToken();\n  };\n\n  _proto.eat = function eat(type) {\n    if (this.match(type)) {\n      this.next();\n      return true;\n    } else {\n      return false;\n    }\n  };\n\n  _proto.match = function match(type) {\n    return this.state.type === type;\n  };\n\n  _proto.isKeyword = function isKeyword$$1(word) {\n    return isKeyword(word);\n  };\n\n  _proto.lookahead = function lookahead() {\n    var old = this.state;\n    this.state = old.clone(true);\n    this.isLookahead = true;\n    this.next();\n    this.isLookahead = false;\n    var curr = this.state;\n    this.state = old;\n    return curr;\n  };\n\n  _proto.setStrict = function setStrict(strict) {\n    this.state.strict = strict;\n    if (!this.match(types.num) && !this.match(types.string)) return;\n    this.state.pos = this.state.start;\n\n    while (this.state.pos < this.state.lineStart) {\n      this.state.lineStart = this.input.lastIndexOf(\"\\n\", this.state.lineStart - 2) + 1;\n      --this.state.curLine;\n    }\n\n    this.nextToken();\n  };\n\n  _proto.curContext = function curContext() {\n    return this.state.context[this.state.context.length - 1];\n  };\n\n  _proto.nextToken = function nextToken() {\n    var curContext = this.curContext();\n    if (!curContext || !curContext.preserveSpace) this.skipSpace();\n    this.state.containsOctal = false;\n    this.state.octalPosition = null;\n    this.state.start = this.state.pos;\n    this.state.startLoc = this.state.curPosition();\n\n    if (this.state.pos >= this.input.length) {\n      this.finishToken(types.eof);\n      return;\n    }\n\n    if (curContext.override) {\n      curContext.override(this);\n    } else {\n      this.readToken(this.input.codePointAt(this.state.pos));\n    }\n  };\n\n  _proto.readToken = function readToken(code) {\n    if (isIdentifierStart(code) || code === 92) {\n      this.readWord();\n    } else {\n      this.getTokenFromCode(code);\n    }\n  };\n\n  _proto.pushComment = function pushComment(block, text, start, end, startLoc, endLoc) {\n    var comment = {\n      type: block ? \"CommentBlock\" : \"CommentLine\",\n      value: text,\n      start: start,\n      end: end,\n      loc: new SourceLocation(startLoc, endLoc)\n    };\n\n    if (!this.isLookahead) {\n      if (this.options.tokens) this.state.tokens.push(comment);\n      this.state.comments.push(comment);\n      this.addComment(comment);\n    }\n  };\n\n  _proto.skipBlockComment = function skipBlockComment() {\n    var startLoc = this.state.curPosition();\n    var start = this.state.pos;\n    var end = this.input.indexOf(\"*/\", this.state.pos += 2);\n    if (end === -1) this.raise(this.state.pos - 2, \"Unterminated comment\");\n    this.state.pos = end + 2;\n    lineBreakG.lastIndex = start;\n    var match;\n\n    while ((match = lineBreakG.exec(this.input)) && match.index < this.state.pos) {\n      ++this.state.curLine;\n      this.state.lineStart = match.index + match[0].length;\n    }\n\n    this.pushComment(true, this.input.slice(start + 2, end), start, this.state.pos, startLoc, this.state.curPosition());\n  };\n\n  _proto.skipLineComment = function skipLineComment(startSkip) {\n    var start = this.state.pos;\n    var startLoc = this.state.curPosition();\n    var ch = this.input.charCodeAt(this.state.pos += startSkip);\n\n    if (this.state.pos < this.input.length) {\n      while (ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233 && ++this.state.pos < this.input.length) {\n        ch = this.input.charCodeAt(this.state.pos);\n      }\n    }\n\n    this.pushComment(false, this.input.slice(start + startSkip, this.state.pos), start, this.state.pos, startLoc, this.state.curPosition());\n  };\n\n  _proto.skipSpace = function skipSpace() {\n    loop: while (this.state.pos < this.input.length) {\n      var ch = this.input.charCodeAt(this.state.pos);\n\n      switch (ch) {\n        case 13:\n          if (this.input.charCodeAt(this.state.pos + 1) === 10) {\n            ++this.state.pos;\n          }\n\n        case 10:\n        case 8232:\n        case 8233:\n          ++this.state.pos;\n          ++this.state.curLine;\n          this.state.lineStart = this.state.pos;\n          break;\n\n        case 47:\n          switch (this.input.charCodeAt(this.state.pos + 1)) {\n            case 42:\n              this.skipBlockComment();\n              break;\n\n            case 47:\n              this.skipLineComment(2);\n              break;\n\n            default:\n              break loop;\n          }\n\n          break;\n\n        default:\n          if (isWhitespace(ch)) {\n            ++this.state.pos;\n          } else {\n            break loop;\n          }\n\n      }\n    }\n  };\n\n  _proto.finishToken = function finishToken(type, val) {\n    this.state.end = this.state.pos;\n    this.state.endLoc = this.state.curPosition();\n    var prevType = this.state.type;\n    this.state.type = type;\n    this.state.value = val;\n    this.updateContext(prevType);\n  };\n\n  _proto.readToken_dot = function readToken_dot() {\n    var next = this.input.charCodeAt(this.state.pos + 1);\n\n    if (next >= 48 && next <= 57) {\n      this.readNumber(true);\n      return;\n    }\n\n    var next2 = this.input.charCodeAt(this.state.pos + 2);\n\n    if (next === 46 && next2 === 46) {\n      this.state.pos += 3;\n      this.finishToken(types.ellipsis);\n    } else {\n      ++this.state.pos;\n      this.finishToken(types.dot);\n    }\n  };\n\n  _proto.readToken_slash = function readToken_slash() {\n    if (this.state.exprAllowed && !this.state.inType) {\n      ++this.state.pos;\n      this.readRegexp();\n      return;\n    }\n\n    var next = this.input.charCodeAt(this.state.pos + 1);\n\n    if (next === 61) {\n      this.finishOp(types.assign, 2);\n    } else {\n      this.finishOp(types.slash, 1);\n    }\n  };\n\n  _proto.readToken_interpreter = function readToken_interpreter() {\n    if (this.state.pos !== 0 || this.state.input.length < 2) return false;\n    var start = this.state.pos;\n    this.state.pos += 1;\n    var ch = this.input.charCodeAt(this.state.pos);\n    if (ch !== 33) return false;\n\n    while (ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233 && ++this.state.pos < this.input.length) {\n      ch = this.input.charCodeAt(this.state.pos);\n    }\n\n    var value = this.input.slice(start + 2, this.state.pos);\n    this.finishToken(types.interpreterDirective, value);\n    return true;\n  };\n\n  _proto.readToken_mult_modulo = function readToken_mult_modulo(code) {\n    var type = code === 42 ? types.star : types.modulo;\n    var width = 1;\n    var next = this.input.charCodeAt(this.state.pos + 1);\n    var exprAllowed = this.state.exprAllowed;\n\n    if (code === 42 && next === 42) {\n      width++;\n      next = this.input.charCodeAt(this.state.pos + 2);\n      type = types.exponent;\n    }\n\n    if (next === 61 && !exprAllowed) {\n      width++;\n      type = types.assign;\n    }\n\n    this.finishOp(type, width);\n  };\n\n  _proto.readToken_pipe_amp = function readToken_pipe_amp(code) {\n    var next = this.input.charCodeAt(this.state.pos + 1);\n\n    if (next === code) {\n      if (this.input.charCodeAt(this.state.pos + 2) === 61) {\n        this.finishOp(types.assign, 3);\n      } else {\n        this.finishOp(code === 124 ? types.logicalOR : types.logicalAND, 2);\n      }\n\n      return;\n    }\n\n    if (code === 124) {\n      if (next === 62) {\n        this.finishOp(types.pipeline, 2);\n        return;\n      } else if (next === 125 && this.hasPlugin(\"flow\")) {\n        this.finishOp(types.braceBarR, 2);\n        return;\n      }\n    }\n\n    if (next === 61) {\n      this.finishOp(types.assign, 2);\n      return;\n    }\n\n    this.finishOp(code === 124 ? types.bitwiseOR : types.bitwiseAND, 1);\n  };\n\n  _proto.readToken_caret = function readToken_caret() {\n    var next = this.input.charCodeAt(this.state.pos + 1);\n\n    if (next === 61) {\n      this.finishOp(types.assign, 2);\n    } else {\n      this.finishOp(types.bitwiseXOR, 1);\n    }\n  };\n\n  _proto.readToken_plus_min = function readToken_plus_min(code) {\n    var next = this.input.charCodeAt(this.state.pos + 1);\n\n    if (next === code) {\n      if (next === 45 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 62 && lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.pos))) {\n        this.skipLineComment(3);\n        this.skipSpace();\n        this.nextToken();\n        return;\n      }\n\n      this.finishOp(types.incDec, 2);\n      return;\n    }\n\n    if (next === 61) {\n      this.finishOp(types.assign, 2);\n    } else {\n      this.finishOp(types.plusMin, 1);\n    }\n  };\n\n  _proto.readToken_lt_gt = function readToken_lt_gt(code) {\n    var next = this.input.charCodeAt(this.state.pos + 1);\n    var size = 1;\n\n    if (next === code) {\n      size = code === 62 && this.input.charCodeAt(this.state.pos + 2) === 62 ? 3 : 2;\n\n      if (this.input.charCodeAt(this.state.pos + size) === 61) {\n        this.finishOp(types.assign, size + 1);\n        return;\n      }\n\n      this.finishOp(types.bitShift, size);\n      return;\n    }\n\n    if (next === 33 && code === 60 && !this.inModule && this.input.charCodeAt(this.state.pos + 2) === 45 && this.input.charCodeAt(this.state.pos + 3) === 45) {\n      this.skipLineComment(4);\n      this.skipSpace();\n      this.nextToken();\n      return;\n    }\n\n    if (next === 61) {\n      size = 2;\n    }\n\n    this.finishOp(types.relational, size);\n  };\n\n  _proto.readToken_eq_excl = function readToken_eq_excl(code) {\n    var next = this.input.charCodeAt(this.state.pos + 1);\n\n    if (next === 61) {\n      this.finishOp(types.equality, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2);\n      return;\n    }\n\n    if (code === 61 && next === 62) {\n      this.state.pos += 2;\n      this.finishToken(types.arrow);\n      return;\n    }\n\n    this.finishOp(code === 61 ? types.eq : types.bang, 1);\n  };\n\n  _proto.readToken_question = function readToken_question() {\n    var next = this.input.charCodeAt(this.state.pos + 1);\n    var next2 = this.input.charCodeAt(this.state.pos + 2);\n\n    if (next === 63 && !this.state.inType) {\n      if (next2 === 61) {\n        this.finishOp(types.assign, 3);\n      } else {\n        this.finishOp(types.nullishCoalescing, 2);\n      }\n    } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) {\n      this.state.pos += 2;\n      this.finishToken(types.questionDot);\n    } else {\n      ++this.state.pos;\n      this.finishToken(types.question);\n    }\n  };\n\n  _proto.getTokenFromCode = function getTokenFromCode(code) {\n    switch (code) {\n      case 35:\n        if (this.state.pos === 0 && this.readToken_interpreter()) {\n          return;\n        }\n\n        if ((this.hasPlugin(\"classPrivateProperties\") || this.hasPlugin(\"classPrivateMethods\")) && this.state.classLevel > 0) {\n          ++this.state.pos;\n          this.finishToken(types.hash);\n          return;\n        } else {\n          this.raise(this.state.pos, \"Unexpected character '\" + String.fromCodePoint(code) + \"'\");\n        }\n\n      case 46:\n        this.readToken_dot();\n        return;\n\n      case 40:\n        ++this.state.pos;\n        this.finishToken(types.parenL);\n        return;\n\n      case 41:\n        ++this.state.pos;\n        this.finishToken(types.parenR);\n        return;\n\n      case 59:\n        ++this.state.pos;\n        this.finishToken(types.semi);\n        return;\n\n      case 44:\n        ++this.state.pos;\n        this.finishToken(types.comma);\n        return;\n\n      case 91:\n        ++this.state.pos;\n        this.finishToken(types.bracketL);\n        return;\n\n      case 93:\n        ++this.state.pos;\n        this.finishToken(types.bracketR);\n        return;\n\n      case 123:\n        if (this.hasPlugin(\"flow\") && this.input.charCodeAt(this.state.pos + 1) === 124) {\n          this.finishOp(types.braceBarL, 2);\n        } else {\n          // 双{{  jsx支持cml\n          if(this.input.charCodeAt(this.state.pos + 1) === 123) {\n            this.state.pos +=2;\n            this.finishToken(types.braceL);\n            return;\n          }\n        }\n\n        return;\n\n      case 125:\n        // 双}}  jsx支持cml\n        if(this.input.charCodeAt(this.state.pos + 1) === 125) {   \n          this.state.pos += 2;\n          this.finishToken(types.braceR);\n          return;\n        }\n\n      case 58:\n        if (this.hasPlugin(\"functionBind\") && this.input.charCodeAt(this.state.pos + 1) === 58) {\n          this.finishOp(types.doubleColon, 2);\n        } else {\n          ++this.state.pos;\n          this.finishToken(types.colon);\n        }\n\n        return;\n\n      case 63:\n        this.readToken_question();\n        return;\n\n      case 64:\n        ++this.state.pos;\n        this.finishToken(types.at);\n        return;\n\n      case 96:\n        ++this.state.pos;\n        this.finishToken(types.backQuote);\n        return;\n\n      case 48:\n        {\n          var next = this.input.charCodeAt(this.state.pos + 1);\n\n          if (next === 120 || next === 88) {\n            this.readRadixNumber(16);\n            return;\n          }\n\n          if (next === 111 || next === 79) {\n            this.readRadixNumber(8);\n            return;\n          }\n\n          if (next === 98 || next === 66) {\n            this.readRadixNumber(2);\n            return;\n          }\n        }\n\n      case 49:\n      case 50:\n      case 51:\n      case 52:\n      case 53:\n      case 54:\n      case 55:\n      case 56:\n      case 57:\n        this.readNumber(false);\n        return;\n\n      case 34:\n      case 39:\n        this.readString(code);\n        return;\n\n      case 47:\n        this.readToken_slash();\n        return;\n\n      case 37:\n      case 42:\n        this.readToken_mult_modulo(code);\n        return;\n\n      case 124:\n      case 38:\n        this.readToken_pipe_amp(code);\n        return;\n\n      case 94:\n        this.readToken_caret();\n        return;\n\n      case 43:\n      case 45:\n        this.readToken_plus_min(code);\n        return;\n\n      case 60:\n      case 62:\n        this.readToken_lt_gt(code);\n        return;\n\n      case 61:\n      case 33:\n        this.readToken_eq_excl(code);\n        return;\n\n      case 126:\n        this.finishOp(types.tilde, 1);\n        return;\n    }\n\n    this.raise(this.state.pos, \"Unexpected character '\" + String.fromCodePoint(code) + \"'\");\n  };\n\n  _proto.finishOp = function finishOp(type, size) {\n    var str = this.input.slice(this.state.pos, this.state.pos + size);\n    this.state.pos += size;\n    this.finishToken(type, str);\n  };\n\n  _proto.readRegexp = function readRegexp() {\n    var start = this.state.pos;\n    var escaped, inClass;\n\n    for (;;) {\n      if (this.state.pos >= this.input.length) {\n        this.raise(start, \"Unterminated regular expression\");\n      }\n\n      var ch = this.input.charAt(this.state.pos);\n\n      if (lineBreak.test(ch)) {\n        this.raise(start, \"Unterminated regular expression\");\n      }\n\n      if (escaped) {\n        escaped = false;\n      } else {\n        if (ch === \"[\") {\n          inClass = true;\n        } else if (ch === \"]\" && inClass) {\n          inClass = false;\n        } else if (ch === \"/\" && !inClass) {\n          break;\n        }\n\n        escaped = ch === \"\\\\\";\n      }\n\n      ++this.state.pos;\n    }\n\n    var content = this.input.slice(start, this.state.pos);\n    ++this.state.pos;\n    var mods = \"\";\n\n    while (this.state.pos < this.input.length) {\n      var char = this.input[this.state.pos];\n      var charCode = this.input.codePointAt(this.state.pos);\n\n      if (VALID_REGEX_FLAGS.indexOf(char) > -1) {\n        if (mods.indexOf(char) > -1) {\n          this.raise(this.state.pos + 1, \"Duplicate regular expression flag\");\n        }\n\n        ++this.state.pos;\n        mods += char;\n      } else if (isIdentifierChar(charCode) || charCode === 92) {\n        this.raise(this.state.pos + 1, \"Invalid regular expression flag\");\n      } else {\n        break;\n      }\n    }\n\n    this.finishToken(types.regexp, {\n      pattern: content,\n      flags: mods\n    });\n  };\n\n  _proto.readInt = function readInt(radix, len) {\n    var start = this.state.pos;\n    var forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;\n    var allowedSiblings = radix === 16 ? allowedNumericSeparatorSiblings.hex : radix === 10 ? allowedNumericSeparatorSiblings.dec : radix === 8 ? allowedNumericSeparatorSiblings.oct : allowedNumericSeparatorSiblings.bin;\n    var total = 0;\n\n    for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) {\n      var code = this.input.charCodeAt(this.state.pos);\n      var val = void 0;\n\n      if (this.hasPlugin(\"numericSeparator\")) {\n        var prev = this.input.charCodeAt(this.state.pos - 1);\n        var next = this.input.charCodeAt(this.state.pos + 1);\n\n        if (code === 95) {\n          if (allowedSiblings.indexOf(next) === -1) {\n            this.raise(this.state.pos, \"Invalid or unexpected token\");\n          }\n\n          if (forbiddenSiblings.indexOf(prev) > -1 || forbiddenSiblings.indexOf(next) > -1 || Number.isNaN(next)) {\n            this.raise(this.state.pos, \"Invalid or unexpected token\");\n          }\n\n          ++this.state.pos;\n          continue;\n        }\n      }\n\n      if (code >= 97) {\n        val = code - 97 + 10;\n      } else if (code >= 65) {\n        val = code - 65 + 10;\n      } else if (_isDigit(code)) {\n        val = code - 48;\n      } else {\n        val = Infinity;\n      }\n\n      if (val >= radix) break;\n      ++this.state.pos;\n      total = total * radix + val;\n    }\n\n    if (this.state.pos === start || len != null && this.state.pos - start !== len) {\n      return null;\n    }\n\n    return total;\n  };\n\n  _proto.readRadixNumber = function readRadixNumber(radix) {\n    var start = this.state.pos;\n    var isBigInt = false;\n    this.state.pos += 2;\n    var val = this.readInt(radix);\n\n    if (val == null) {\n      this.raise(this.state.start + 2, \"Expected number in radix \" + radix);\n    }\n\n    if (this.hasPlugin(\"bigInt\")) {\n      if (this.input.charCodeAt(this.state.pos) === 110) {\n        ++this.state.pos;\n        isBigInt = true;\n      }\n    }\n\n    if (isIdentifierStart(this.input.codePointAt(this.state.pos))) {\n      this.raise(this.state.pos, \"Identifier directly after number\");\n    }\n\n    if (isBigInt) {\n      var str = this.input.slice(start, this.state.pos).replace(/[_n]/g, \"\");\n      this.finishToken(types.bigint, str);\n      return;\n    }\n\n    this.finishToken(types.num, val);\n  };\n\n  _proto.readNumber = function readNumber(startsWithDot) {\n    var start = this.state.pos;\n    var octal = this.input.charCodeAt(start) === 48;\n    var isFloat = false;\n    var isBigInt = false;\n\n    if (!startsWithDot && this.readInt(10) === null) {\n      this.raise(start, \"Invalid number\");\n    }\n\n    if (octal && this.state.pos == start + 1) octal = false;\n    var next = this.input.charCodeAt(this.state.pos);\n\n    if (next === 46 && !octal) {\n      ++this.state.pos;\n      this.readInt(10);\n      isFloat = true;\n      next = this.input.charCodeAt(this.state.pos);\n    }\n\n    if ((next === 69 || next === 101) && !octal) {\n      next = this.input.charCodeAt(++this.state.pos);\n\n      if (next === 43 || next === 45) {\n        ++this.state.pos;\n      }\n\n      if (this.readInt(10) === null) this.raise(start, \"Invalid number\");\n      isFloat = true;\n      next = this.input.charCodeAt(this.state.pos);\n    }\n\n    if (this.hasPlugin(\"bigInt\")) {\n      if (next === 110) {\n        if (isFloat || octal) this.raise(start, \"Invalid BigIntLiteral\");\n        ++this.state.pos;\n        isBigInt = true;\n      }\n    }\n\n    if (isIdentifierStart(this.input.codePointAt(this.state.pos))) {\n      this.raise(this.state.pos, \"Identifier directly after number\");\n    }\n\n    var str = this.input.slice(start, this.state.pos).replace(/[_n]/g, \"\");\n\n    if (isBigInt) {\n      this.finishToken(types.bigint, str);\n      return;\n    }\n\n    var val;\n\n    if (isFloat) {\n      val = parseFloat(str);\n    } else if (!octal || str.length === 1) {\n      val = parseInt(str, 10);\n    } else if (this.state.strict) {\n      this.raise(start, \"Invalid number\");\n    } else if (/[89]/.test(str)) {\n      val = parseInt(str, 10);\n    } else {\n      val = parseInt(str, 8);\n    }\n\n    this.finishToken(types.num, val);\n  };\n\n  _proto.readCodePoint = function readCodePoint(throwOnInvalid) {\n    var ch = this.input.charCodeAt(this.state.pos);\n    var code;\n\n    if (ch === 123) {\n      var codePos = ++this.state.pos;\n      code = this.readHexChar(this.input.indexOf(\"}\", this.state.pos) - this.state.pos, throwOnInvalid);\n      ++this.state.pos;\n\n      if (code === null) {\n        --this.state.invalidTemplateEscapePosition;\n      } else if (code > 0x10ffff) {\n        if (throwOnInvalid) {\n          this.raise(codePos, \"Code point out of bounds\");\n        } else {\n          this.state.invalidTemplateEscapePosition = codePos - 2;\n          return null;\n        }\n      }\n    } else {\n      code = this.readHexChar(4, throwOnInvalid);\n    }\n\n    return code;\n  };\n\n  _proto.readString = function readString(quote) {\n    var out = \"\",\n        chunkStart = ++this.state.pos;\n    var hasJsonStrings = this.hasPlugin(\"jsonStrings\");\n\n    for (;;) {\n      if (this.state.pos >= this.input.length) {\n        this.raise(this.state.start, \"Unterminated string constant\");\n      }\n\n      var ch = this.input.charCodeAt(this.state.pos);\n      if (ch === quote) break;\n\n      if (ch === 92) {\n        out += this.input.slice(chunkStart, this.state.pos);\n        out += this.readEscapedChar(false);\n        chunkStart = this.state.pos;\n      } else if (hasJsonStrings && (ch === 8232 || ch === 8233)) {\n        ++this.state.pos;\n      } else if (isNewLine(ch)) {\n        this.raise(this.state.start, \"Unterminated string constant\");\n      } else {\n        ++this.state.pos;\n      }\n    }\n\n    out += this.input.slice(chunkStart, this.state.pos++);\n    this.finishToken(types.string, out);\n  };\n\n  _proto.readTmplToken = function readTmplToken() {\n    var out = \"\",\n        chunkStart = this.state.pos,\n        containsInvalid = false;\n\n    for (;;) {\n      if (this.state.pos >= this.input.length) {\n        this.raise(this.state.start, \"Unterminated template\");\n      }\n\n      var ch = this.input.charCodeAt(this.state.pos);\n\n      if (ch === 96 || ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) {\n        if (this.state.pos === this.state.start && this.match(types.template)) {\n          if (ch === 36) {\n            this.state.pos += 2;\n            this.finishToken(types.dollarBraceL);\n            return;\n          } else {\n            ++this.state.pos;\n            this.finishToken(types.backQuote);\n            return;\n          }\n        }\n\n        out += this.input.slice(chunkStart, this.state.pos);\n        this.finishToken(types.template, containsInvalid ? null : out);\n        return;\n      }\n\n      if (ch === 92) {\n        out += this.input.slice(chunkStart, this.state.pos);\n        var escaped = this.readEscapedChar(true);\n\n        if (escaped === null) {\n          containsInvalid = true;\n        } else {\n          out += escaped;\n        }\n\n        chunkStart = this.state.pos;\n      } else if (isNewLine(ch)) {\n        out += this.input.slice(chunkStart, this.state.pos);\n        ++this.state.pos;\n\n        switch (ch) {\n          case 13:\n            if (this.input.charCodeAt(this.state.pos) === 10) {\n              ++this.state.pos;\n            }\n\n          case 10:\n            out += \"\\n\";\n            break;\n\n          default:\n            out += String.fromCharCode(ch);\n            break;\n        }\n\n        ++this.state.curLine;\n        this.state.lineStart = this.state.pos;\n        chunkStart = this.state.pos;\n      } else {\n        ++this.state.pos;\n      }\n    }\n  };\n\n  _proto.readEscapedChar = function readEscapedChar(inTemplate) {\n    var throwOnInvalid = !inTemplate;\n    var ch = this.input.charCodeAt(++this.state.pos);\n    ++this.state.pos;\n\n    switch (ch) {\n      case 110:\n        return \"\\n\";\n\n      case 114:\n        return \"\\r\";\n\n      case 120:\n        {\n          var code = this.readHexChar(2, throwOnInvalid);\n          return code === null ? null : String.fromCharCode(code);\n        }\n\n      case 117:\n        {\n          var _code = this.readCodePoint(throwOnInvalid);\n\n          return _code === null ? null : String.fromCodePoint(_code);\n        }\n\n      case 116:\n        return \"\\t\";\n\n      case 98:\n        return \"\\b\";\n\n      case 118:\n        return \"\\x0B\";\n\n      case 102:\n        return \"\\f\";\n\n      case 13:\n        if (this.input.charCodeAt(this.state.pos) === 10) {\n          ++this.state.pos;\n        }\n\n      case 10:\n        this.state.lineStart = this.state.pos;\n        ++this.state.curLine;\n        return \"\";\n\n      default:\n        if (ch >= 48 && ch <= 55) {\n          var codePos = this.state.pos - 1;\n          var octalStr = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/)[0];\n          var octal = parseInt(octalStr, 8);\n\n          if (octal > 255) {\n            octalStr = octalStr.slice(0, -1);\n            octal = parseInt(octalStr, 8);\n          }\n\n          if (octal > 0) {\n            if (inTemplate) {\n              this.state.invalidTemplateEscapePosition = codePos;\n              return null;\n            } else if (this.state.strict) {\n              this.raise(codePos, \"Octal literal in strict mode\");\n            } else if (!this.state.containsOctal) {\n              this.state.containsOctal = true;\n              this.state.octalPosition = codePos;\n            }\n          }\n\n          this.state.pos += octalStr.length - 1;\n          return String.fromCharCode(octal);\n        }\n\n        return String.fromCharCode(ch);\n    }\n  };\n\n  _proto.readHexChar = function readHexChar(len, throwOnInvalid) {\n    var codePos = this.state.pos;\n    var n = this.readInt(16, len);\n\n    if (n === null) {\n      if (throwOnInvalid) {\n        this.raise(codePos, \"Bad character escape sequence\");\n      } else {\n        this.state.pos = codePos - 1;\n        this.state.invalidTemplateEscapePosition = codePos - 1;\n      }\n    }\n\n    return n;\n  };\n\n  _proto.readWord1 = function readWord1() {\n    this.state.containsEsc = false;\n    var word = \"\",\n        first = true,\n        chunkStart = this.state.pos;\n\n    while (this.state.pos < this.input.length) {\n      var ch = this.input.codePointAt(this.state.pos);\n\n      if (isIdentifierChar(ch)) {\n        this.state.pos += ch <= 0xffff ? 1 : 2;\n      } else if (this.state.isIterator && ch === 64) {\n        this.state.pos += 1;\n      } else if (ch === 92) {\n        this.state.containsEsc = true;\n        word += this.input.slice(chunkStart, this.state.pos);\n        var escStart = this.state.pos;\n\n        if (this.input.charCodeAt(++this.state.pos) !== 117) {\n          this.raise(this.state.pos, \"Expecting Unicode escape sequence \\\\uXXXX\");\n        }\n\n        ++this.state.pos;\n        var esc = this.readCodePoint(true);\n\n        if (!(first ? isIdentifierStart : isIdentifierChar)(esc, true)) {\n          this.raise(escStart, \"Invalid Unicode escape\");\n        }\n\n        word += String.fromCodePoint(esc);\n        chunkStart = this.state.pos;\n      } else {\n        break;\n      }\n\n      first = false;\n    }\n\n    return word + this.input.slice(chunkStart, this.state.pos);\n  };\n\n  _proto.isIterator = function isIterator(word) {\n    return word === \"@@iterator\" || word === \"@@asyncIterator\";\n  };\n\n  _proto.readWord = function readWord() {\n    var word = this.readWord1();\n    var type = types.name;\n\n    if (this.isKeyword(word)) {\n      if (this.state.containsEsc) {\n        this.raise(this.state.pos, \"Escape sequence in keyword \" + word);\n      }\n\n      type = keywords[word];\n    }\n\n    if (this.state.isIterator && (!this.isIterator(word) || !this.state.inType)) {\n      this.raise(this.state.pos, \"Invalid identifier \" + word);\n    }\n\n    this.finishToken(type, word);\n  };\n\n  _proto.braceIsBlock = function braceIsBlock(prevType) {\n    if (prevType === types.colon) {\n      var parent = this.curContext();\n\n      if (parent === types$1.braceStatement || parent === types$1.braceExpression) {\n        return !parent.isExpr;\n      }\n    }\n\n    if (prevType === types._return) {\n      return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start));\n    }\n\n    if (prevType === types._else || prevType === types.semi || prevType === types.eof || prevType === types.parenR) {\n      return true;\n    }\n\n    if (prevType === types.braceL) {\n      return this.curContext() === types$1.braceStatement;\n    }\n\n    if (prevType === types.relational) {\n      return true;\n    }\n\n    return !this.state.exprAllowed;\n  };\n\n  _proto.updateContext = function updateContext(prevType) {\n    var type = this.state.type;\n    var update;\n\n    if (type.keyword && (prevType === types.dot || prevType === types.questionDot)) {\n      this.state.exprAllowed = false;\n    } else if (update = type.updateContext) {\n      update.call(this, prevType);\n    } else {\n      this.state.exprAllowed = type.beforeExpr;\n    }\n  };\n\n  return Tokenizer;\n}(LocationParser);\n\nvar UtilParser = function (_Tokenizer) {\n  _inheritsLoose(UtilParser, _Tokenizer);\n\n  function UtilParser() {\n    return _Tokenizer.apply(this, arguments) || this;\n  }\n\n  var _proto = UtilParser.prototype;\n\n  _proto.addExtra = function addExtra(node, key, val) {\n    if (!node) return;\n    var extra = node.extra = node.extra || {};\n    extra[key] = val;\n  };\n\n  _proto.isRelational = function isRelational(op) {\n    return this.match(types.relational) && this.state.value === op;\n  };\n\n  _proto.isLookaheadRelational = function isLookaheadRelational(op) {\n    var l = this.lookahead();\n    return l.type == types.relational && l.value == op;\n  };\n\n  _proto.expectRelational = function expectRelational(op) {\n    if (this.isRelational(op)) {\n      this.next();\n    } else {\n      this.unexpected(null, types.relational);\n    }\n  };\n\n  _proto.eatRelational = function eatRelational(op) {\n    if (this.isRelational(op)) {\n      this.next();\n      return true;\n    }\n\n    return false;\n  };\n\n  _proto.isContextual = function isContextual(name) {\n    return this.match(types.name) && this.state.value === name && !this.state.containsEsc;\n  };\n\n  _proto.isLookaheadContextual = function isLookaheadContextual(name) {\n    var l = this.lookahead();\n    return l.type === types.name && l.value === name;\n  };\n\n  _proto.eatContextual = function eatContextual(name) {\n    return this.isContextual(name) && this.eat(types.name);\n  };\n\n  _proto.expectContextual = function expectContextual(name, message) {\n    if (!this.eatContextual(name)) this.unexpected(null, message);\n  };\n\n  _proto.canInsertSemicolon = function canInsertSemicolon() {\n    return this.match(types.eof) || this.match(types.braceR) || this.hasPrecedingLineBreak();\n  };\n\n  _proto.hasPrecedingLineBreak = function hasPrecedingLineBreak() {\n    return lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start));\n  };\n\n  _proto.isLineTerminator = function isLineTerminator() {\n    return this.eat(types.semi) || this.canInsertSemicolon();\n  };\n\n  _proto.semicolon = function semicolon() {\n    if (!this.isLineTerminator()) this.unexpected(null, types.semi);\n  };\n\n  _proto.expect = function expect(type, pos) {\n    this.eat(type) || this.unexpected(pos, type);\n  };\n\n  _proto.unexpected = function unexpected(pos, messageOrType) {\n    if (messageOrType === void 0) {\n      messageOrType = \"Unexpected token\";\n    }\n\n    if (typeof messageOrType !== \"string\") {\n      messageOrType = \"Unexpected token, expected \\\"\" + messageOrType.label + \"\\\"\";\n    }\n\n    throw this.raise(pos != null ? pos : this.state.start, messageOrType);\n  };\n\n  _proto.expectPlugin = function expectPlugin(name, pos) {\n    if (!this.hasPlugin(name)) {\n      throw this.raise(pos != null ? pos : this.state.start, \"This experimental syntax requires enabling the parser plugin: '\" + name + \"'\", {\n        missingPluginNames: [name]\n      });\n    }\n\n    return true;\n  };\n\n  _proto.expectOnePlugin = function expectOnePlugin(names, pos) {\n    var _this = this;\n\n    if (!names.some(function (n) {\n      return _this.hasPlugin(n);\n    })) {\n      throw this.raise(pos != null ? pos : this.state.start, \"This experimental syntax requires enabling one of the following parser plugin(s): '\" + names.join(\", \") + \"'\", {\n        missingPluginNames: names\n      });\n    }\n  };\n\n  return UtilParser;\n}(Tokenizer);\n\nvar commentKeys = [\"leadingComments\", \"trailingComments\", \"innerComments\"];\n\nvar Node = function () {\n  function Node(parser, pos, loc) {\n    this.type = \"\";\n    this.start = pos;\n    this.end = 0;\n    this.loc = new SourceLocation(loc);\n    if (parser && parser.options.ranges) this.range = [pos, 0];\n    if (parser && parser.filename) this.loc.filename = parser.filename;\n  }\n\n  var _proto = Node.prototype;\n\n  _proto.__clone = function __clone() {\n    var _this = this;\n\n    var node2 = new Node();\n    Object.keys(this).forEach(function (key) {\n      if (commentKeys.indexOf(key) < 0) {\n        node2[key] = _this[key];\n      }\n    });\n    return node2;\n  };\n\n  return Node;\n}();\n\nvar NodeUtils = function (_UtilParser) {\n  _inheritsLoose(NodeUtils, _UtilParser);\n\n  function NodeUtils() {\n    return _UtilParser.apply(this, arguments) || this;\n  }\n\n  var _proto2 = NodeUtils.prototype;\n\n  _proto2.startNode = function startNode() {\n    return new Node(this, this.state.start, this.state.startLoc);\n  };\n\n  _proto2.startNodeAt = function startNodeAt(pos, loc) {\n    return new Node(this, pos, loc);\n  };\n\n  _proto2.startNodeAtNode = function startNodeAtNode(type) {\n    return this.startNodeAt(type.start, type.loc.start);\n  };\n\n  _proto2.finishNode = function finishNode(node, type) {\n    return this.finishNodeAt(node, type, this.state.lastTokEnd, this.state.lastTokEndLoc);\n  };\n\n  _proto2.finishNodeAt = function finishNodeAt(node, type, pos, loc) {\n    node.type = type;\n    node.end = pos;\n    node.loc.end = loc;\n    if (this.options.ranges) node.range[1] = pos;\n    this.processComment(node);\n    return node;\n  };\n\n  _proto2.resetStartLocationFromNode = function resetStartLocationFromNode(node, locationNode) {\n    node.start = locationNode.start;\n    node.loc.start = locationNode.loc.start;\n    if (this.options.ranges) node.range[0] = locationNode.range[0];\n  };\n\n  return NodeUtils;\n}(UtilParser);\n\nvar LValParser = function (_NodeUtils) {\n  _inheritsLoose(LValParser, _NodeUtils);\n\n  function LValParser() {\n    return _NodeUtils.apply(this, arguments) || this;\n  }\n\n  var _proto = LValParser.prototype;\n\n  _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) {\n    if (node) {\n      switch (node.type) {\n        case \"Identifier\":\n        case \"ObjectPattern\":\n        case \"ArrayPattern\":\n        case \"AssignmentPattern\":\n          break;\n\n        case \"ObjectExpression\":\n          node.type = \"ObjectPattern\";\n\n          for (var index = 0; index < node.properties.length; index++) {\n            var prop = node.properties[index];\n            var isLast = index === node.properties.length - 1;\n            this.toAssignableObjectExpressionProp(prop, isBinding, isLast);\n          }\n\n          break;\n\n        case \"ObjectProperty\":\n          this.toAssignable(node.value, isBinding, contextDescription);\n          break;\n\n        case \"SpreadElement\":\n          {\n            this.checkToRestConversion(node);\n            node.type = \"RestElement\";\n            var arg = node.argument;\n            this.toAssignable(arg, isBinding, contextDescription);\n            break;\n          }\n\n        case \"ArrayExpression\":\n          node.type = \"ArrayPattern\";\n          this.toAssignableList(node.elements, isBinding, contextDescription);\n          break;\n\n        case \"AssignmentExpression\":\n          if (node.operator === \"=\") {\n            node.type = \"AssignmentPattern\";\n            delete node.operator;\n          } else {\n            this.raise(node.left.end, \"Only '=' operator can be used for specifying default value.\");\n          }\n\n          break;\n\n        case \"MemberExpression\":\n          if (!isBinding) break;\n\n        default:\n          {\n            var message = \"Invalid left-hand side\" + (contextDescription ? \" in \" + contextDescription : \"expression\");\n            this.raise(node.start, message);\n          }\n      }\n    }\n\n    return node;\n  };\n\n  _proto.toAssignableObjectExpressionProp = function toAssignableObjectExpressionProp(prop, isBinding, isLast) {\n    if (prop.type === \"ObjectMethod\") {\n      var error = prop.kind === \"get\" || prop.kind === \"set\" ? \"Object pattern can't contain getter or setter\" : \"Object pattern can't contain methods\";\n      this.raise(prop.key.start, error);\n    } else if (prop.type === \"SpreadElement\" && !isLast) {\n      this.raise(prop.start, \"The rest element has to be the last element when destructuring\");\n    } else {\n      this.toAssignable(prop, isBinding, \"object destructuring pattern\");\n    }\n  };\n\n  _proto.toAssignableList = function toAssignableList(exprList, isBinding, contextDescription) {\n    var end = exprList.length;\n\n    if (end) {\n      var last = exprList[end - 1];\n\n      if (last && last.type === \"RestElement\") {\n        --end;\n      } else if (last && last.type === \"SpreadElement\") {\n        last.type = \"RestElement\";\n        var arg = last.argument;\n        this.toAssignable(arg, isBinding, contextDescription);\n\n        if ([\"Identifier\", \"MemberExpression\", \"ArrayPattern\", \"ObjectPattern\"].indexOf(arg.type) === -1) {\n          this.unexpected(arg.start);\n        }\n\n        --end;\n      }\n    }\n\n    for (var i = 0; i < end; i++) {\n      var elt = exprList[i];\n\n      if (elt && elt.type === \"SpreadElement\") {\n        this.raise(elt.start, \"The rest element has to be the last element when destructuring\");\n      }\n\n      if (elt) this.toAssignable(elt, isBinding, contextDescription);\n    }\n\n    return exprList;\n  };\n\n  _proto.toReferencedList = function toReferencedList(exprList) {\n    return exprList;\n  };\n\n  _proto.parseSpread = function parseSpread(refShorthandDefaultPos, refNeedsArrowPos) {\n    var node = this.startNode();\n    this.next();\n    node.argument = this.parseMaybeAssign(false, refShorthandDefaultPos, undefined, refNeedsArrowPos);\n    return this.finishNode(node, \"SpreadElement\");\n  };\n\n  _proto.parseRest = function parseRest() {\n    var node = this.startNode();\n    this.next();\n    node.argument = this.parseBindingAtom();\n    return this.finishNode(node, \"RestElement\");\n  };\n\n  _proto.shouldAllowYieldIdentifier = function shouldAllowYieldIdentifier() {\n    return this.match(types._yield) && !this.state.strict && !this.state.inGenerator;\n  };\n\n  _proto.parseBindingIdentifier = function parseBindingIdentifier() {\n    return this.parseIdentifier(this.shouldAllowYieldIdentifier());\n  };\n\n  _proto.parseBindingAtom = function parseBindingAtom() {\n    switch (this.state.type) {\n      case types._yield:\n      case types.name:\n        return this.parseBindingIdentifier();\n\n      case types.bracketL:\n        {\n          var node = this.startNode();\n          this.next();\n          node.elements = this.parseBindingList(types.bracketR, true);\n          return this.finishNode(node, \"ArrayPattern\");\n        }\n\n      case types.braceL:\n        return this.parseObj(true);\n\n      default:\n        throw this.unexpected();\n    }\n  };\n\n  _proto.parseBindingList = function parseBindingList(close, allowEmpty, allowModifiers) {\n    var elts = [];\n    var first = true;\n\n    while (!this.eat(close)) {\n      if (first) {\n        first = false;\n      } else {\n        this.expect(types.comma);\n      }\n\n      if (allowEmpty && this.match(types.comma)) {\n        elts.push(null);\n      } else if (this.eat(close)) {\n        break;\n      } else if (this.match(types.ellipsis)) {\n        elts.push(this.parseAssignableListItemTypes(this.parseRest()));\n        this.expect(close);\n        break;\n      } else {\n        var decorators = [];\n\n        if (this.match(types.at) && this.hasPlugin(\"decorators\")) {\n          this.raise(this.state.start, \"Stage 2 decorators cannot be used to decorate parameters\");\n        }\n\n        while (this.match(types.at)) {\n          decorators.push(this.parseDecorator());\n        }\n\n        elts.push(this.parseAssignableListItem(allowModifiers, decorators));\n      }\n    }\n\n    return elts;\n  };\n\n  _proto.parseAssignableListItem = function parseAssignableListItem(allowModifiers, decorators) {\n    var left = this.parseMaybeDefault();\n    this.parseAssignableListItemTypes(left);\n    var elt = this.parseMaybeDefault(left.start, left.loc.start, left);\n\n    if (decorators.length) {\n      left.decorators = decorators;\n    }\n\n    return elt;\n  };\n\n  _proto.parseAssignableListItemTypes = function parseAssignableListItemTypes(param) {\n    return param;\n  };\n\n  _proto.parseMaybeDefault = function parseMaybeDefault(startPos, startLoc, left) {\n    startLoc = startLoc || this.state.startLoc;\n    startPos = startPos || this.state.start;\n    left = left || this.parseBindingAtom();\n    if (!this.eat(types.eq)) return left;\n    var node = this.startNodeAt(startPos, startLoc);\n    node.left = left;\n    node.right = this.parseMaybeAssign();\n    return this.finishNode(node, \"AssignmentPattern\");\n  };\n\n  _proto.checkLVal = function checkLVal(expr, isBinding, checkClashes, contextDescription) {\n    switch (expr.type) {\n      case \"Identifier\":\n        this.checkReservedWord(expr.name, expr.start, false, true);\n\n        if (checkClashes) {\n          var _key = \"_\" + expr.name;\n\n          if (checkClashes[_key]) {\n            this.raise(expr.start, \"Argument name clash in strict mode\");\n          } else {\n            checkClashes[_key] = true;\n          }\n        }\n\n        break;\n\n      case \"MemberExpression\":\n        if (isBinding) this.raise(expr.start, \"Binding member expression\");\n        break;\n\n      case \"ObjectPattern\":\n        for (var _i2 = 0, _expr$properties2 = expr.properties; _i2 < _expr$properties2.length; _i2++) {\n          var prop = _expr$properties2[_i2];\n          if (prop.type === \"ObjectProperty\") prop = prop.value;\n          this.checkLVal(prop, isBinding, checkClashes, \"object destructuring pattern\");\n        }\n\n        break;\n\n      case \"ArrayPattern\":\n        for (var _i4 = 0, _expr$elements2 = expr.elements; _i4 < _expr$elements2.length; _i4++) {\n          var elem = _expr$elements2[_i4];\n\n          if (elem) {\n            this.checkLVal(elem, isBinding, checkClashes, \"array destructuring pattern\");\n          }\n        }\n\n        break;\n\n      case \"AssignmentPattern\":\n        this.checkLVal(expr.left, isBinding, checkClashes, \"assignment pattern\");\n        break;\n\n      case \"RestElement\":\n        this.checkLVal(expr.argument, isBinding, checkClashes, \"rest element\");\n        break;\n\n      default:\n        {\n          var message = (isBinding ? \"Binding invalid\" : \"Invalid\") + \" left-hand side\" + (contextDescription ? \" in \" + contextDescription : \"expression\");\n          this.raise(expr.start, message);\n        }\n    }\n  };\n\n  _proto.checkToRestConversion = function checkToRestConversion(node) {\n    var validArgumentTypes = [\"Identifier\", \"MemberExpression\"];\n\n    if (validArgumentTypes.indexOf(node.argument.type) !== -1) {\n      return;\n    }\n\n    this.raise(node.argument.start, \"Invalid rest operator's argument\");\n  };\n\n  return LValParser;\n}(NodeUtils);\n\nvar ExpressionParser = function (_LValParser) {\n  _inheritsLoose(ExpressionParser, _LValParser);\n\n  function ExpressionParser() {\n    return _LValParser.apply(this, arguments) || this;\n  }\n\n  var _proto = ExpressionParser.prototype;\n\n  _proto.checkPropClash = function checkPropClash(prop, propHash) {\n    if (prop.computed || prop.kind) return;\n    var key = prop.key;\n    var name = key.type === \"Identifier\" ? key.name : String(key.value);\n\n    if (name === \"__proto__\") {\n      if (propHash.proto) {\n        this.raise(key.start, \"Redefinition of __proto__ property\");\n      }\n\n      propHash.proto = true;\n    }\n  };\n\n  _proto.getExpression = function getExpression() {\n    this.nextToken();\n    var expr = this.parseExpression();\n\n    if (!this.match(types.eof)) {\n      this.unexpected();\n    }\n\n    expr.comments = this.state.comments;\n    return expr;\n  };\n\n  _proto.parseExpression = function parseExpression(noIn, refShorthandDefaultPos) {\n    var startPos = this.state.start;\n    var startLoc = this.state.startLoc;\n    var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos);\n\n    if (this.match(types.comma)) {\n      var _node = this.startNodeAt(startPos, startLoc);\n\n      _node.expressions = [expr];\n\n      while (this.eat(types.comma)) {\n        _node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos));\n      }\n\n      this.toReferencedList(_node.expressions);\n      return this.finishNode(_node, \"SequenceExpression\");\n    }\n\n    return expr;\n  };\n\n  _proto.parseMaybeAssign = function parseMaybeAssign(noIn, refShorthandDefaultPos, afterLeftParse, refNeedsArrowPos) {\n    var startPos = this.state.start;\n    var startLoc = this.state.startLoc;\n\n    if (this.match(types._yield) && this.state.inGenerator) {\n      var _left = this.parseYield();\n\n      if (afterLeftParse) {\n        _left = afterLeftParse.call(this, _left, startPos, startLoc);\n      }\n\n      return _left;\n    }\n\n    var failOnShorthandAssign;\n\n    if (refShorthandDefaultPos) {\n      failOnShorthandAssign = false;\n    } else {\n      refShorthandDefaultPos = {\n        start: 0\n      };\n      failOnShorthandAssign = true;\n    }\n\n    if (this.match(types.parenL) || this.match(types.name) || this.match(types._yield)) {\n      this.state.potentialArrowAt = this.state.start;\n    }\n\n    var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos);\n\n    if (afterLeftParse) {\n      left = afterLeftParse.call(this, left, startPos, startLoc);\n    }\n\n    if (this.state.type.isAssign) {\n      var _node2 = this.startNodeAt(startPos, startLoc);\n\n      var operator = this.state.value;\n      _node2.operator = operator;\n\n      if (operator === \"??=\") {\n        this.expectPlugin(\"nullishCoalescingOperator\");\n        this.expectPlugin(\"logicalAssignment\");\n      }\n\n      if (operator === \"||=\" || operator === \"&&=\") {\n        this.expectPlugin(\"logicalAssignment\");\n      }\n\n      _node2.left = this.match(types.eq) ? this.toAssignable(left, undefined, \"assignment expression\") : left;\n      refShorthandDefaultPos.start = 0;\n      this.checkLVal(left, undefined, undefined, \"assignment expression\");\n\n      if (left.extra && left.extra.parenthesized) {\n        var errorMsg;\n\n        if (left.type === \"ObjectPattern\") {\n          errorMsg = \"`({a}) = 0` use `({a} = 0)`\";\n        } else if (left.type === \"ArrayPattern\") {\n          errorMsg = \"`([a]) = 0` use `([a] = 0)`\";\n        }\n\n        if (errorMsg) {\n          this.raise(left.start, \"You're trying to assign to a parenthesized expression, eg. instead of \" + errorMsg);\n        }\n      }\n\n      this.next();\n      _node2.right = this.parseMaybeAssign(noIn);\n      return this.finishNode(_node2, \"AssignmentExpression\");\n    } else if (failOnShorthandAssign && refShorthandDefaultPos.start) {\n      this.unexpected(refShorthandDefaultPos.start);\n    }\n\n    return left;\n  };\n\n  _proto.parseMaybeConditional = function parseMaybeConditional(noIn, refShorthandDefaultPos, refNeedsArrowPos) {\n    var startPos = this.state.start;\n    var startLoc = this.state.startLoc;\n    var potentialArrowAt = this.state.potentialArrowAt;\n    var expr = this.parseExprOps(noIn, refShorthandDefaultPos);\n\n    if (expr.type === \"ArrowFunctionExpression\" && expr.start === potentialArrowAt) {\n      return expr;\n    }\n\n    if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;\n    return this.parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos);\n  };\n\n  _proto.parseConditional = function parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) {\n    if (this.eat(types.question)) {\n      var _node3 = this.startNodeAt(startPos, startLoc);\n\n      _node3.test = expr;\n      _node3.consequent = this.parseMaybeAssign();\n      this.expect(types.colon);\n      _node3.alternate = this.parseMaybeAssign(noIn);\n      return this.finishNode(_node3, \"ConditionalExpression\");\n    }\n\n    return expr;\n  };\n\n  _proto.parseExprOps = function parseExprOps(noIn, refShorthandDefaultPos) {\n    var startPos = this.state.start;\n    var startLoc = this.state.startLoc;\n    var potentialArrowAt = this.state.potentialArrowAt;\n    var expr = this.parseMaybeUnary(refShorthandDefaultPos);\n\n    if (expr.type === \"ArrowFunctionExpression\" && expr.start === potentialArrowAt) {\n      return expr;\n    }\n\n    if (refShorthandDefaultPos && refShorthandDefaultPos.start) {\n      return expr;\n    }\n\n    return this.parseExprOp(expr, startPos, startLoc, -1, noIn);\n  };\n\n  _proto.parseExprOp = function parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn) {\n    var prec = this.state.type.binop;\n\n    if (prec != null && (!noIn || !this.match(types._in))) {\n      if (prec > minPrec) {\n        var _node4 = this.startNodeAt(leftStartPos, leftStartLoc);\n\n        var operator = this.state.value;\n        _node4.left = left;\n        _node4.operator = operator;\n\n        if (operator === \"**\" && left.type === \"UnaryExpression\" && !(left.extra && left.extra.parenthesized)) {\n          this.raise(left.argument.start, \"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.\");\n        }\n\n        var op = this.state.type;\n\n        if (op === types.nullishCoalescing) {\n          this.expectPlugin(\"nullishCoalescingOperator\");\n        } else if (op === types.pipeline) {\n          this.expectPlugin(\"pipelineOperator\");\n        }\n\n        this.next();\n        var startPos = this.state.start;\n        var startLoc = this.state.startLoc;\n\n        if (op === types.pipeline) {\n          if (this.match(types.name) && this.state.value === \"await\" && this.state.inAsync) {\n            throw this.raise(this.state.start, \"Unexpected \\\"await\\\" after pipeline body; await must have parentheses in minimal proposal\");\n          }\n        }\n\n        _node4.right = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, op.rightAssociative ? prec - 1 : prec, noIn);\n        this.finishNode(_node4, op === types.logicalOR || op === types.logicalAND || op === types.nullishCoalescing ? \"LogicalExpression\" : \"BinaryExpression\");\n        return this.parseExprOp(_node4, leftStartPos, leftStartLoc, minPrec, noIn);\n      }\n    }\n\n    return left;\n  };\n\n  _proto.parseMaybeUnary = function parseMaybeUnary(refShorthandDefaultPos) {\n    if (this.state.type.prefix) {\n      var _node5 = this.startNode();\n\n      var update = this.match(types.incDec);\n      _node5.operator = this.state.value;\n      _node5.prefix = true;\n\n      if (_node5.operator === \"throw\") {\n        this.expectPlugin(\"throwExpressions\");\n      }\n\n      this.next();\n      _node5.argument = this.parseMaybeUnary();\n\n      if (refShorthandDefaultPos && refShorthandDefaultPos.start) {\n        this.unexpected(refShorthandDefaultPos.start);\n      }\n\n      if (update) {\n        this.checkLVal(_node5.argument, undefined, undefined, \"prefix operation\");\n      } else if (this.state.strict && _node5.operator === \"delete\") {\n        var arg = _node5.argument;\n\n        if (arg.type === \"Identifier\") {\n          this.raise(_node5.start, \"Deleting local variable in strict mode\");\n        } else if (arg.type === \"MemberExpression\" && arg.property.type === \"PrivateName\") {\n          this.raise(_node5.start, \"Deleting a private field is not allowed\");\n        }\n      }\n\n      return this.finishNode(_node5, update ? \"UpdateExpression\" : \"UnaryExpression\");\n    }\n\n    var startPos = this.state.start;\n    var startLoc = this.state.startLoc;\n    var expr = this.parseExprSubscripts(refShorthandDefaultPos);\n    if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;\n\n    while (this.state.type.postfix && !this.canInsertSemicolon()) {\n      var _node6 = this.startNodeAt(startPos, startLoc);\n\n      _node6.operator = this.state.value;\n      _node6.prefix = false;\n      _node6.argument = expr;\n      this.checkLVal(expr, undefined, undefined, \"postfix operation\");\n      this.next();\n      expr = this.finishNode(_node6, \"UpdateExpression\");\n    }\n\n    return expr;\n  };\n\n  _proto.parseExprSubscripts = function parseExprSubscripts(refShorthandDefaultPos) {\n    var startPos = this.state.start;\n    var startLoc = this.state.startLoc;\n    var potentialArrowAt = this.state.potentialArrowAt;\n    var expr = this.parseExprAtom(refShorthandDefaultPos);\n\n    if (expr.type === \"ArrowFunctionExpression\" && expr.start === potentialArrowAt) {\n      return expr;\n    }\n\n    if (refShorthandDefaultPos && refShorthandDefaultPos.start) {\n      return expr;\n    }\n\n    return this.parseSubscripts(expr, startPos, startLoc);\n  };\n\n  _proto.parseSubscripts = function parseSubscripts(base, startPos, startLoc, noCalls) {\n    var state = {\n      optionalChainMember: false,\n      stop: false\n    };\n\n    do {\n      base = this.parseSubscript(base, startPos, startLoc, noCalls, state);\n    } while (!state.stop);\n\n    return base;\n  };\n\n  _proto.parseSubscript = function parseSubscript(base, startPos, startLoc, noCalls, state) {\n    if (!noCalls && this.eat(types.doubleColon)) {\n      var _node7 = this.startNodeAt(startPos, startLoc);\n\n      _node7.object = base;\n      _node7.callee = this.parseNoCallExpr();\n      state.stop = true;\n      return this.parseSubscripts(this.finishNode(_node7, \"BindExpression\"), startPos, startLoc, noCalls);\n    } else if (this.match(types.questionDot)) {\n      this.expectPlugin(\"optionalChaining\");\n      state.optionalChainMember = true;\n\n      if (noCalls && this.lookahead().type == types.parenL) {\n        state.stop = true;\n        return base;\n      }\n\n      this.next();\n\n      var _node8 = this.startNodeAt(startPos, startLoc);\n\n      if (this.eat(types.bracketL)) {\n        _node8.object = base;\n        _node8.property = this.parseExpression();\n        _node8.computed = true;\n        _node8.optional = true;\n        this.expect(types.bracketR);\n        return this.finishNode(_node8, \"OptionalMemberExpression\");\n      } else if (this.eat(types.parenL)) {\n        var possibleAsync = this.atPossibleAsync(base);\n        _node8.callee = base;\n        _node8.arguments = this.parseCallExpressionArguments(types.parenR, possibleAsync);\n        _node8.optional = true;\n        return this.finishNode(_node8, \"OptionalCallExpression\");\n      } else {\n        _node8.object = base;\n        _node8.property = this.parseIdentifier(true);\n        _node8.computed = false;\n        _node8.optional = true;\n        return this.finishNode(_node8, \"OptionalMemberExpression\");\n      }\n    } else if (this.eat(types.dot)) {\n      var _node9 = this.startNodeAt(startPos, startLoc);\n\n      _node9.object = base;\n      _node9.property = this.parseMaybePrivateName();\n      _node9.computed = false;\n\n      if (state.optionalChainMember) {\n        _node9.optional = false;\n        return this.finishNode(_node9, \"OptionalMemberExpression\");\n      }\n\n      return this.finishNode(_node9, \"MemberExpression\");\n    } else if (this.eat(types.bracketL)) {\n      var _node10 = this.startNodeAt(startPos, startLoc);\n\n      _node10.object = base;\n      _node10.property = this.parseExpression();\n      _node10.computed = true;\n      this.expect(types.bracketR);\n\n      if (state.optionalChainMember) {\n        _node10.optional = false;\n        return this.finishNode(_node10, \"OptionalMemberExpression\");\n      }\n\n      return this.finishNode(_node10, \"MemberExpression\");\n    } else if (!noCalls && this.match(types.parenL)) {\n      var _possibleAsync = this.atPossibleAsync(base);\n\n      this.next();\n\n      var _node11 = this.startNodeAt(startPos, startLoc);\n\n      _node11.callee = base;\n      var refTrailingCommaPos = {\n        start: -1\n      };\n      _node11.arguments = this.parseCallExpressionArguments(types.parenR, _possibleAsync, refTrailingCommaPos);\n\n      if (!state.optionalChainMember) {\n        this.finishCallExpression(_node11);\n      } else {\n        this.finishOptionalCallExpression(_node11);\n      }\n\n      if (_possibleAsync && this.shouldParseAsyncArrow()) {\n        state.stop = true;\n\n        if (refTrailingCommaPos.start > -1) {\n          this.raise(refTrailingCommaPos.start, \"A trailing comma is not permitted after the rest element\");\n        }\n\n        return this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), _node11);\n      } else {\n        this.toReferencedList(_node11.arguments);\n      }\n\n      return _node11;\n    } else if (this.match(types.backQuote)) {\n      return this.parseTaggedTemplateExpression(startPos, startLoc, base, state);\n    } else {\n      state.stop = true;\n      return base;\n    }\n  };\n\n  _proto.parseTaggedTemplateExpression = function parseTaggedTemplateExpression(startPos, startLoc, base, state, typeArguments) {\n    var node = this.startNodeAt(startPos, startLoc);\n    node.tag = base;\n    node.quasi = this.parseTemplate(true);\n    if (typeArguments) node.typeParameters = typeArguments;\n\n    if (state.optionalChainMember) {\n      this.raise(startPos, \"Tagged Template Literals are not allowed in optionalChain\");\n    }\n\n    return this.finishNode(node, \"TaggedTemplateExpression\");\n  };\n\n  _proto.atPossibleAsync = function atPossibleAsync(base) {\n    return !this.state.containsEsc && this.state.potentialArrowAt === base.start && base.type === \"Identifier\" && base.name === \"async\" && !this.canInsertSemicolon();\n  };\n\n  _proto.finishCallExpression = function finishCallExpression(node) {\n    if (node.callee.type === \"Import\") {\n      if (node.arguments.length !== 1) {\n        this.raise(node.start, \"import() requires exactly one argument\");\n      }\n\n      var importArg = node.arguments[0];\n\n      if (importArg && importArg.type === \"SpreadElement\") {\n        this.raise(importArg.start, \"... is not allowed in import()\");\n      }\n    }\n\n    return this.finishNode(node, \"CallExpression\");\n  };\n\n  _proto.finishOptionalCallExpression = function finishOptionalCallExpression(node) {\n    if (node.callee.type === \"Import\") {\n      if (node.arguments.length !== 1) {\n        this.raise(node.start, \"import() requires exactly one argument\");\n      }\n\n      var importArg = node.arguments[0];\n\n      if (importArg && importArg.type === \"SpreadElement\") {\n        this.raise(importArg.start, \"... is not allowed in import()\");\n      }\n    }\n\n    return this.finishNode(node, \"OptionalCallExpression\");\n  };\n\n  _proto.parseCallExpressionArguments = function parseCallExpressionArguments(close, possibleAsyncArrow, refTrailingCommaPos) {\n    var elts = [];\n    var innerParenStart;\n    var first = true;\n\n    while (!this.eat(close)) {\n      if (first) {\n        first = false;\n      } else {\n        this.expect(types.comma);\n        if (this.eat(close)) break;\n      }\n\n      if (this.match(types.parenL) && !innerParenStart) {\n        innerParenStart = this.state.start;\n      }\n\n      elts.push(this.parseExprListItem(false, possibleAsyncArrow ? {\n        start: 0\n      } : undefined, possibleAsyncArrow ? {\n        start: 0\n      } : undefined, possibleAsyncArrow ? refTrailingCommaPos : undefined));\n    }\n\n    if (possibleAsyncArrow && innerParenStart && this.shouldParseAsyncArrow()) {\n      this.unexpected();\n    }\n\n    return elts;\n  };\n\n  _proto.shouldParseAsyncArrow = function shouldParseAsyncArrow() {\n    return this.match(types.arrow);\n  };\n\n  _proto.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) {\n    var oldYield = this.state.yieldInPossibleArrowParameters;\n    this.state.yieldInPossibleArrowParameters = null;\n    this.expect(types.arrow);\n    this.parseArrowExpression(node, call.arguments, true);\n    this.state.yieldInPossibleArrowParameters = oldYield;\n    return node;\n  };\n\n  _proto.parseNoCallExpr = function parseNoCallExpr() {\n    var startPos = this.state.start;\n    var startLoc = this.state.startLoc;\n    return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);\n  };\n\n  _proto.parseExprAtom = function parseExprAtom(refShorthandDefaultPos) {\n    var canBeArrow = this.state.potentialArrowAt === this.state.start;\n    var node;\n\n    switch (this.state.type) {\n      case types._super:\n        if (!this.state.inMethod && !this.state.inClassProperty && !this.options.allowSuperOutsideMethod) {\n          this.raise(this.state.start, \"super is only allowed in object methods and classes\");\n        }\n\n        node = this.startNode();\n        this.next();\n\n        if (!this.match(types.parenL) && !this.match(types.bracketL) && !this.match(types.dot)) {\n          this.unexpected();\n        }\n\n        if (this.match(types.parenL) && this.state.inMethod !== \"constructor\" && !this.options.allowSuperOutsideMethod) {\n          this.raise(node.start, \"super() is only valid inside a class constructor. \" + \"Make sure the method name is spelled exactly as 'constructor'.\");\n        }\n\n        return this.finishNode(node, \"Super\");\n\n      case types._import:\n        if (this.lookahead().type === types.dot) {\n          return this.parseImportMetaProperty();\n        }\n\n        this.expectPlugin(\"dynamicImport\");\n        node = this.startNode();\n        this.next();\n\n        if (!this.match(types.parenL)) {\n          this.unexpected(null, types.parenL);\n        }\n\n        return this.finishNode(node, \"Import\");\n\n      case types._this:\n        node = this.startNode();\n        this.next();\n        return this.finishNode(node, \"ThisExpression\");\n\n      case types._yield:\n        if (this.state.inGenerator) this.unexpected();\n\n      case types.name:\n        {\n          node = this.startNode();\n          var allowAwait = this.state.value === \"await\" && (this.state.inAsync || !this.state.inFunction && this.options.allowAwaitOutsideFunction);\n          var containsEsc = this.state.containsEsc;\n          var allowYield = this.shouldAllowYieldIdentifier();\n          var id = this.parseIdentifier(allowAwait || allowYield);\n\n          if (id.name === \"await\") {\n            if (this.state.inAsync || this.inModule || !this.state.inFunction && this.options.allowAwaitOutsideFunction) {\n              return this.parseAwait(node);\n            }\n          } else if (!containsEsc && id.name === \"async\" && this.match(types._function) && !this.canInsertSemicolon()) {\n            this.next();\n            return this.parseFunction(node, false, false, true);\n          } else if (canBeArrow && id.name === \"async\" && this.match(types.name)) {\n            var oldYield = this.state.yieldInPossibleArrowParameters;\n            this.state.yieldInPossibleArrowParameters = null;\n            var params = [this.parseIdentifier()];\n            this.expect(types.arrow);\n            this.parseArrowExpression(node, params, true);\n            this.state.yieldInPossibleArrowParameters = oldYield;\n            return node;\n          }\n\n          if (canBeArrow && !this.canInsertSemicolon() && this.eat(types.arrow)) {\n            var _oldYield = this.state.yieldInPossibleArrowParameters;\n            this.state.yieldInPossibleArrowParameters = null;\n            this.parseArrowExpression(node, [id]);\n            this.state.yieldInPossibleArrowParameters = _oldYield;\n            return node;\n          }\n\n          return id;\n        }\n\n      case types._do:\n        {\n          this.expectPlugin(\"doExpressions\");\n\n          var _node12 = this.startNode();\n\n          this.next();\n          var oldInFunction = this.state.inFunction;\n          var oldLabels = this.state.labels;\n          this.state.labels = [];\n          this.state.inFunction = false;\n          _node12.body = this.parseBlock(false);\n          this.state.inFunction = oldInFunction;\n          this.state.labels = oldLabels;\n          return this.finishNode(_node12, \"DoExpression\");\n        }\n\n      case types.regexp:\n        {\n          var value = this.state.value;\n          node = this.parseLiteral(value.value, \"RegExpLiteral\");\n          node.pattern = value.pattern;\n          node.flags = value.flags;\n          return node;\n        }\n\n      case types.num:\n        return this.parseLiteral(this.state.value, \"NumericLiteral\");\n\n      case types.bigint:\n        return this.parseLiteral(this.state.value, \"BigIntLiteral\");\n\n      case types.string:\n        return this.parseLiteral(this.state.value, \"StringLiteral\");\n\n      case types._null:\n        node = this.startNode();\n        this.next();\n        return this.finishNode(node, \"NullLiteral\");\n\n      case types._true:\n      case types._false:\n        return this.parseBooleanLiteral();\n\n      case types.parenL:\n        return this.parseParenAndDistinguishExpression(canBeArrow);\n\n      case types.bracketL:\n        node = this.startNode();\n        this.next();\n        node.elements = this.parseExprList(types.bracketR, true, refShorthandDefaultPos);\n        this.toReferencedList(node.elements);\n        return this.finishNode(node, \"ArrayExpression\");\n\n      case types.braceL:\n        return this.parseObj(false, refShorthandDefaultPos);\n\n      case types._function:\n        return this.parseFunctionExpression();\n\n      case types.at:\n        this.parseDecorators();\n\n      case types._class:\n        node = this.startNode();\n        this.takeDecorators(node);\n        return this.parseClass(node, false);\n\n      case types._new:\n        return this.parseNew();\n\n      case types.backQuote:\n        return this.parseTemplate(false);\n\n      case types.doubleColon:\n        {\n          node = this.startNode();\n          this.next();\n          node.object = null;\n          var callee = node.callee = this.parseNoCallExpr();\n\n          if (callee.type === \"MemberExpression\") {\n            return this.finishNode(node, \"BindExpression\");\n          } else {\n            throw this.raise(callee.start, \"Binding should be performed on object property.\");\n          }\n        }\n\n      default:\n        throw this.unexpected();\n    }\n  };\n\n  _proto.parseBooleanLiteral = function parseBooleanLiteral() {\n    var node = this.startNode();\n    node.value = this.match(types._true);\n    this.next();\n    return this.finishNode(node, \"BooleanLiteral\");\n  };\n\n  _proto.parseMaybePrivateName = function parseMaybePrivateName() {\n    var isPrivate = this.match(types.hash);\n\n    if (isPrivate) {\n      this.expectOnePlugin([\"classPrivateProperties\", \"classPrivateMethods\"]);\n\n      var _node13 = this.startNode();\n\n      this.next();\n      _node13.id = this.parseIdentifier(true);\n      return this.finishNode(_node13, \"PrivateName\");\n    } else {\n      return this.parseIdentifier(true);\n    }\n  };\n\n  _proto.parseFunctionExpression = function parseFunctionExpression() {\n    var node = this.startNode();\n    var meta = this.parseIdentifier(true);\n\n    if (this.state.inGenerator && this.eat(types.dot)) {\n      return this.parseMetaProperty(node, meta, \"sent\");\n    }\n\n    return this.parseFunction(node, false);\n  };\n\n  _proto.parseMetaProperty = function parseMetaProperty(node, meta, propertyName) {\n    node.meta = meta;\n\n    if (meta.name === \"function\" && propertyName === \"sent\") {\n      if (this.isContextual(propertyName)) {\n        this.expectPlugin(\"functionSent\");\n      } else if (!this.hasPlugin(\"functionSent\")) {\n        this.unexpected();\n      }\n    }\n\n    var containsEsc = this.state.containsEsc;\n    node.property = this.parseIdentifier(true);\n\n    if (node.property.name !== propertyName || containsEsc) {\n      this.raise(node.property.start, \"The only valid meta property for \" + meta.name + \" is \" + meta.name + \".\" + propertyName);\n    }\n\n    return this.finishNode(node, \"MetaProperty\");\n  };\n\n  _proto.parseImportMetaProperty = function parseImportMetaProperty() {\n    var node = this.startNode();\n    var id = this.parseIdentifier(true);\n    this.expect(types.dot);\n\n    if (id.name === \"import\") {\n      if (this.isContextual(\"meta\")) {\n        this.expectPlugin(\"importMeta\");\n      } else if (!this.hasPlugin(\"importMeta\")) {\n        this.raise(id.start, \"Dynamic imports require a parameter: import('a.js')\");\n      }\n    }\n\n    if (!this.inModule) {\n      this.raise(id.start, \"import.meta may appear only with 'sourceType: \\\"module\\\"'\", {\n        code: \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\"\n      });\n    }\n\n    this.sawUnambiguousESM = true;\n    return this.parseMetaProperty(node, id, \"meta\");\n  };\n\n  _proto.parseLiteral = function parseLiteral(value, type, startPos, startLoc) {\n    startPos = startPos || this.state.start;\n    startLoc = startLoc || this.state.startLoc;\n    var node = this.startNodeAt(startPos, startLoc);\n    this.addExtra(node, \"rawValue\", value);\n    this.addExtra(node, \"raw\", this.input.slice(startPos, this.state.end));\n    node.value = value;\n    this.next();\n    return this.finishNode(node, type);\n  };\n\n  _proto.parseParenExpression = function parseParenExpression() {\n    this.expect(types.parenL);\n    var val = this.parseExpression();\n    this.expect(types.parenR);\n    return val;\n  };\n\n  _proto.parseParenAndDistinguishExpression = function parseParenAndDistinguishExpression(canBeArrow) {\n    var startPos = this.state.start;\n    var startLoc = this.state.startLoc;\n    var val;\n    this.expect(types.parenL);\n    var oldMaybeInArrowParameters = this.state.maybeInArrowParameters;\n    var oldYield = this.state.yieldInPossibleArrowParameters;\n    this.state.maybeInArrowParameters = true;\n    this.state.yieldInPossibleArrowParameters = null;\n    var innerStartPos = this.state.start;\n    var innerStartLoc = this.state.startLoc;\n    var exprList = [];\n    var refShorthandDefaultPos = {\n      start: 0\n    };\n    var refNeedsArrowPos = {\n      start: 0\n    };\n    var first = true;\n    var spreadStart;\n    var optionalCommaStart;\n\n    while (!this.match(types.parenR)) {\n      if (first) {\n        first = false;\n      } else {\n        this.expect(types.comma, refNeedsArrowPos.start || null);\n\n        if (this.match(types.parenR)) {\n          optionalCommaStart = this.state.start;\n          break;\n        }\n      }\n\n      if (this.match(types.ellipsis)) {\n        var spreadNodeStartPos = this.state.start;\n        var spreadNodeStartLoc = this.state.startLoc;\n        spreadStart = this.state.start;\n        exprList.push(this.parseParenItem(this.parseRest(), spreadNodeStartPos, spreadNodeStartLoc));\n\n        if (this.match(types.comma) && this.lookahead().type === types.parenR) {\n          this.raise(this.state.start, \"A trailing comma is not permitted after the rest element\");\n        }\n\n        break;\n      } else {\n        exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos));\n      }\n    }\n\n    var innerEndPos = this.state.start;\n    var innerEndLoc = this.state.startLoc;\n    this.expect(types.parenR);\n    this.state.maybeInArrowParameters = oldMaybeInArrowParameters;\n    var arrowNode = this.startNodeAt(startPos, startLoc);\n\n    if (canBeArrow && this.shouldParseArrow() && (arrowNode = this.parseArrow(arrowNode))) {\n      for (var _i2 = 0; _i2 < exprList.length; _i2++) {\n        var param = exprList[_i2];\n\n        if (param.extra && param.extra.parenthesized) {\n          this.unexpected(param.extra.parenStart);\n        }\n      }\n\n      this.parseArrowExpression(arrowNode, exprList);\n      this.state.yieldInPossibleArrowParameters = oldYield;\n      return arrowNode;\n    }\n\n    this.state.yieldInPossibleArrowParameters = oldYield;\n\n    if (!exprList.length) {\n      this.unexpected(this.state.lastTokStart);\n    }\n\n    if (optionalCommaStart) this.unexpected(optionalCommaStart);\n    if (spreadStart) this.unexpected(spreadStart);\n\n    if (refShorthandDefaultPos.start) {\n      this.unexpected(refShorthandDefaultPos.start);\n    }\n\n    if (refNeedsArrowPos.start) this.unexpected(refNeedsArrowPos.start);\n\n    if (exprList.length > 1) {\n      val = this.startNodeAt(innerStartPos, innerStartLoc);\n      val.expressions = exprList;\n      this.toReferencedList(val.expressions);\n      this.finishNodeAt(val, \"SequenceExpression\", innerEndPos, innerEndLoc);\n    } else {\n      val = exprList[0];\n    }\n\n    this.addExtra(val, \"parenthesized\", true);\n    this.addExtra(val, \"parenStart\", startPos);\n    return val;\n  };\n\n  _proto.shouldParseArrow = function shouldParseArrow() {\n    return !this.canInsertSemicolon();\n  };\n\n  _proto.parseArrow = function parseArrow(node) {\n    if (this.eat(types.arrow)) {\n      return node;\n    }\n  };\n\n  _proto.parseParenItem = function parseParenItem(node, startPos, startLoc) {\n    return node;\n  };\n\n  _proto.parseNew = function parseNew() {\n    var node = this.startNode();\n    var meta = this.parseIdentifier(true);\n\n    if (this.eat(types.dot)) {\n      var metaProp = this.parseMetaProperty(node, meta, \"target\");\n\n      if (!this.state.inFunction && !this.state.inClassProperty) {\n        var error = \"new.target can only be used in functions\";\n\n        if (this.hasPlugin(\"classProperties\")) {\n          error += \" or class properties\";\n        }\n\n        this.raise(metaProp.start, error);\n      }\n\n      return metaProp;\n    }\n\n    node.callee = this.parseNoCallExpr();\n\n    if (node.callee.type === \"OptionalMemberExpression\" || node.callee.type === \"OptionalCallExpression\") {\n      this.raise(this.state.lastTokEnd, \"constructors in/after an Optional Chain are not allowed\");\n    }\n\n    if (this.eat(types.questionDot)) {\n      this.raise(this.state.start, \"constructors in/after an Optional Chain are not allowed\");\n    }\n\n    this.parseNewArguments(node);\n    return this.finishNode(node, \"NewExpression\");\n  };\n\n  _proto.parseNewArguments = function parseNewArguments(node) {\n    if (this.eat(types.parenL)) {\n      var args = this.parseExprList(types.parenR);\n      this.toReferencedList(args);\n      node.arguments = args;\n    } else {\n      node.arguments = [];\n    }\n  };\n\n  _proto.parseTemplateElement = function parseTemplateElement(isTagged) {\n    var elem = this.startNode();\n\n    if (this.state.value === null) {\n      if (!isTagged) {\n        this.raise(this.state.invalidTemplateEscapePosition || 0, \"Invalid escape sequence in template\");\n      } else {\n        this.state.invalidTemplateEscapePosition = null;\n      }\n    }\n\n    elem.value = {\n      raw: this.input.slice(this.state.start, this.state.end).replace(/\\r\\n?/g, \"\\n\"),\n      cooked: this.state.value\n    };\n    this.next();\n    elem.tail = this.match(types.backQuote);\n    return this.finishNode(elem, \"TemplateElement\");\n  };\n\n  _proto.parseTemplate = function parseTemplate(isTagged) {\n    var node = this.startNode();\n    this.next();\n    node.expressions = [];\n    var curElt = this.parseTemplateElement(isTagged);\n    node.quasis = [curElt];\n\n    while (!curElt.tail) {\n      this.expect(types.dollarBraceL);\n      node.expressions.push(this.parseExpression());\n      this.expect(types.braceR);\n      node.quasis.push(curElt = this.parseTemplateElement(isTagged));\n    }\n\n    this.next();\n    return this.finishNode(node, \"TemplateLiteral\");\n  };\n\n  _proto.parseObj = function parseObj(isPattern, refShorthandDefaultPos) {\n    var decorators = [];\n    var propHash = Object.create(null);\n    var first = true;\n    var node = this.startNode();\n    node.properties = [];\n    this.next();\n    var firstRestLocation = null;\n\n    while (!this.eat(types.braceR)) {\n      if (first) {\n        first = false;\n      } else {\n        this.expect(types.comma);\n        if (this.eat(types.braceR)) break;\n      }\n\n      if (this.match(types.at)) {\n        if (this.hasPlugin(\"decorators\")) {\n          this.raise(this.state.start, \"Stage 2 decorators disallow object literal property decorators\");\n        } else {\n          while (this.match(types.at)) {\n            decorators.push(this.parseDecorator());\n          }\n        }\n      }\n\n      var prop = this.startNode(),\n          isGenerator = false,\n          _isAsync = false,\n          startPos = void 0,\n          startLoc = void 0;\n\n      if (decorators.length) {\n        prop.decorators = decorators;\n        decorators = [];\n      }\n\n      if (this.match(types.ellipsis)) {\n        this.expectPlugin(\"objectRestSpread\");\n        prop = this.parseSpread(isPattern ? {\n          start: 0\n        } : undefined);\n\n        if (isPattern) {\n          this.toAssignable(prop, true, \"object pattern\");\n        }\n\n        node.properties.push(prop);\n\n        if (isPattern) {\n          var position = this.state.start;\n\n          if (firstRestLocation !== null) {\n            this.unexpected(firstRestLocation, \"Cannot have multiple rest elements when destructuring\");\n          } else if (this.eat(types.braceR)) {\n            break;\n          } else if (this.match(types.comma) && this.lookahead().type === types.braceR) {\n            this.unexpected(position, \"A trailing comma is not permitted after the rest element\");\n          } else {\n            firstRestLocation = position;\n            continue;\n          }\n        } else {\n          continue;\n        }\n      }\n\n      prop.method = false;\n\n      if (isPattern || refShorthandDefaultPos) {\n        startPos = this.state.start;\n        startLoc = this.state.startLoc;\n      }\n\n      if (!isPattern) {\n        isGenerator = this.eat(types.star);\n      }\n\n      var containsEsc = this.state.containsEsc;\n\n      if (!isPattern && this.isContextual(\"async\")) {\n        if (isGenerator) this.unexpected();\n        var asyncId = this.parseIdentifier();\n\n        if (this.match(types.colon) || this.match(types.parenL) || this.match(types.braceR) || this.match(types.eq) || this.match(types.comma)) {\n          prop.key = asyncId;\n          prop.computed = false;\n        } else {\n          _isAsync = true;\n\n          if (this.match(types.star)) {\n            this.expectPlugin(\"asyncGenerators\");\n            this.next();\n            isGenerator = true;\n          }\n\n          this.parsePropertyName(prop);\n        }\n      } else {\n        this.parsePropertyName(prop);\n      }\n\n      this.parseObjPropValue(prop, startPos, startLoc, isGenerator, _isAsync, isPattern, refShorthandDefaultPos, containsEsc);\n      this.checkPropClash(prop, propHash);\n\n      if (prop.shorthand) {\n        this.addExtra(prop, \"shorthand\", true);\n      }\n\n      node.properties.push(prop);\n    }\n\n    if (firstRestLocation !== null) {\n      this.unexpected(firstRestLocation, \"The rest element has to be the last element when destructuring\");\n    }\n\n    if (decorators.length) {\n      this.raise(this.state.start, \"You have trailing decorators with no property\");\n    }\n\n    return this.finishNode(node, isPattern ? \"ObjectPattern\" : \"ObjectExpression\");\n  };\n\n  _proto.isGetterOrSetterMethod = function isGetterOrSetterMethod(prop, isPattern) {\n    return !isPattern && !prop.computed && prop.key.type === \"Identifier\" && (prop.key.name === \"get\" || prop.key.name === \"set\") && (this.match(types.string) || this.match(types.num) || this.match(types.bracketL) || this.match(types.name) || !!this.state.type.keyword);\n  };\n\n  _proto.checkGetterSetterParams = function checkGetterSetterParams(method) {\n    var paramCount = method.kind === \"get\" ? 0 : 1;\n    var start = method.start;\n\n    if (method.params.length !== paramCount) {\n      if (method.kind === \"get\") {\n        this.raise(start, \"getter must not have any formal parameters\");\n      } else {\n        this.raise(start, \"setter must have exactly one formal parameter\");\n      }\n    }\n\n    if (method.kind === \"set\" && method.params[0].type === \"RestElement\") {\n      this.raise(start, \"setter function argument must not be a rest parameter\");\n    }\n  };\n\n  _proto.parseObjectMethod = function parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) {\n    if (isAsync || isGenerator || this.match(types.parenL)) {\n      if (isPattern) this.unexpected();\n      prop.kind = \"method\";\n      prop.method = true;\n      return this.parseMethod(prop, isGenerator, isAsync, false, \"ObjectMethod\");\n    }\n\n    if (!containsEsc && this.isGetterOrSetterMethod(prop, isPattern)) {\n      if (isGenerator || isAsync) this.unexpected();\n      prop.kind = prop.key.name;\n      this.parsePropertyName(prop);\n      this.parseMethod(prop, false, false, false, \"ObjectMethod\");\n      this.checkGetterSetterParams(prop);\n      return prop;\n    }\n  };\n\n  _proto.parseObjectProperty = function parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos) {\n    prop.shorthand = false;\n\n    if (this.eat(types.colon)) {\n      prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos);\n      return this.finishNode(prop, \"ObjectProperty\");\n    }\n\n    if (!prop.computed && prop.key.type === \"Identifier\") {\n      this.checkReservedWord(prop.key.name, prop.key.start, true, true);\n\n      if (isPattern) {\n        prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());\n      } else if (this.match(types.eq) && refShorthandDefaultPos) {\n        if (!refShorthandDefaultPos.start) {\n          refShorthandDefaultPos.start = this.state.start;\n        }\n\n        prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key.__clone());\n      } else {\n        prop.value = prop.key.__clone();\n      }\n\n      prop.shorthand = true;\n      return this.finishNode(prop, \"ObjectProperty\");\n    }\n  };\n\n  _proto.parseObjPropValue = function parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, refShorthandDefaultPos, containsEsc) {\n    var node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, containsEsc) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refShorthandDefaultPos);\n    if (!node) this.unexpected();\n    return node;\n  };\n\n  _proto.parsePropertyName = function parsePropertyName(prop) {\n    if (this.eat(types.bracketL)) {\n      prop.computed = true;\n      prop.key = this.parseMaybeAssign();\n      this.expect(types.bracketR);\n    } else {\n      var oldInPropertyName = this.state.inPropertyName;\n      this.state.inPropertyName = true;\n      prop.key = this.match(types.num) || this.match(types.string) ? this.parseExprAtom() : this.parseMaybePrivateName();\n\n      if (prop.key.type !== \"PrivateName\") {\n        prop.computed = false;\n      }\n\n      this.state.inPropertyName = oldInPropertyName;\n    }\n\n    return prop.key;\n  };\n\n  _proto.initFunction = function initFunction(node, isAsync) {\n    node.id = null;\n    node.generator = false;\n    node.async = !!isAsync;\n  };\n\n  _proto.parseMethod = function parseMethod(node, isGenerator, isAsync, isConstructor, type) {\n    var oldInFunc = this.state.inFunction;\n    var oldInMethod = this.state.inMethod;\n    var oldInGenerator = this.state.inGenerator;\n    this.state.inFunction = true;\n    this.state.inMethod = node.kind || true;\n    this.state.inGenerator = isGenerator;\n    this.initFunction(node, isAsync);\n    node.generator = !!isGenerator;\n    var allowModifiers = isConstructor;\n    this.parseFunctionParams(node, allowModifiers);\n    this.parseFunctionBodyAndFinish(node, type);\n    this.state.inFunction = oldInFunc;\n    this.state.inMethod = oldInMethod;\n    this.state.inGenerator = oldInGenerator;\n    return node;\n  };\n\n  _proto.parseArrowExpression = function parseArrowExpression(node, params, isAsync) {\n    if (this.state.yieldInPossibleArrowParameters) {\n      this.raise(this.state.yieldInPossibleArrowParameters.start, \"yield is not allowed in the parameters of an arrow function\" + \" inside a generator\");\n    }\n\n    var oldInFunc = this.state.inFunction;\n    this.state.inFunction = true;\n    this.initFunction(node, isAsync);\n    if (params) this.setArrowFunctionParameters(node, params);\n    var oldInGenerator = this.state.inGenerator;\n    var oldMaybeInArrowParameters = this.state.maybeInArrowParameters;\n    this.state.inGenerator = false;\n    this.state.maybeInArrowParameters = false;\n    this.parseFunctionBody(node, true);\n    this.state.inGenerator = oldInGenerator;\n    this.state.inFunction = oldInFunc;\n    this.state.maybeInArrowParameters = oldMaybeInArrowParameters;\n    return this.finishNode(node, \"ArrowFunctionExpression\");\n  };\n\n  _proto.setArrowFunctionParameters = function setArrowFunctionParameters(node, params) {\n    node.params = this.toAssignableList(params, true, \"arrow function parameters\");\n  };\n\n  _proto.isStrictBody = function isStrictBody(node) {\n    var isBlockStatement = node.body.type === \"BlockStatement\";\n\n    if (isBlockStatement && node.body.directives.length) {\n      for (var _i4 = 0, _node$body$directives2 = node.body.directives; _i4 < _node$body$directives2.length; _i4++) {\n        var directive = _node$body$directives2[_i4];\n\n        if (directive.value.value === \"use strict\") {\n          return true;\n        }\n      }\n    }\n\n    return false;\n  };\n\n  _proto.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, allowExpressionBody) {\n    this.parseFunctionBody(node, allowExpressionBody);\n    this.finishNode(node, type);\n  };\n\n  _proto.parseFunctionBody = function parseFunctionBody(node, allowExpression) {\n    var isExpression = allowExpression && !this.match(types.braceL);\n    var oldInParameters = this.state.inParameters;\n    var oldInAsync = this.state.inAsync;\n    this.state.inParameters = false;\n    this.state.inAsync = node.async;\n\n    if (isExpression) {\n      node.body = this.parseMaybeAssign();\n    } else {\n      var oldInGen = this.state.inGenerator;\n      var oldInFunc = this.state.inFunction;\n      var oldLabels = this.state.labels;\n      this.state.inGenerator = node.generator;\n      this.state.inFunction = true;\n      this.state.labels = [];\n      node.body = this.parseBlock(true);\n      this.state.inFunction = oldInFunc;\n      this.state.inGenerator = oldInGen;\n      this.state.labels = oldLabels;\n    }\n\n    this.state.inAsync = oldInAsync;\n    this.checkFunctionNameAndParams(node, allowExpression);\n    this.state.inParameters = oldInParameters;\n  };\n\n  _proto.checkFunctionNameAndParams = function checkFunctionNameAndParams(node, isArrowFunction) {\n    var isStrict = this.isStrictBody(node);\n    var checkLVal = this.state.strict || isStrict || isArrowFunction;\n    var oldStrict = this.state.strict;\n    if (isStrict) this.state.strict = isStrict;\n\n    if (checkLVal) {\n      var nameHash = Object.create(null);\n\n      if (node.id) {\n        this.checkLVal(node.id, true, undefined, \"function name\");\n      }\n\n      for (var _i6 = 0, _node$params2 = node.params; _i6 < _node$params2.length; _i6++) {\n        var param = _node$params2[_i6];\n\n        if (isStrict && param.type !== \"Identifier\") {\n          this.raise(param.start, \"Non-simple parameter in strict mode\");\n        }\n\n        this.checkLVal(param, true, nameHash, \"function parameter list\");\n      }\n    }\n\n    this.state.strict = oldStrict;\n  };\n\n  _proto.parseExprList = function parseExprList(close, allowEmpty, refShorthandDefaultPos) {\n    var elts = [];\n    var first = true;\n\n    while (!this.eat(close)) {\n      if (first) {\n        first = false;\n      } else {\n        this.expect(types.comma);\n        if (this.eat(close)) break;\n      }\n\n      elts.push(this.parseExprListItem(allowEmpty, refShorthandDefaultPos));\n    }\n\n    return elts;\n  };\n\n  _proto.parseExprListItem = function parseExprListItem(allowEmpty, refShorthandDefaultPos, refNeedsArrowPos, refTrailingCommaPos) {\n    var elt;\n\n    if (allowEmpty && this.match(types.comma)) {\n      elt = null;\n    } else if (this.match(types.ellipsis)) {\n      var spreadNodeStartPos = this.state.start;\n      var spreadNodeStartLoc = this.state.startLoc;\n      elt = this.parseParenItem(this.parseSpread(refShorthandDefaultPos, refNeedsArrowPos), spreadNodeStartPos, spreadNodeStartLoc);\n\n      if (refTrailingCommaPos && this.match(types.comma)) {\n        refTrailingCommaPos.start = this.state.start;\n      }\n    } else {\n      elt = this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem, refNeedsArrowPos);\n    }\n\n    return elt;\n  };\n\n  _proto.parseIdentifier = function parseIdentifier(liberal) {\n    var node = this.startNode();\n    var name = this.parseIdentifierName(node.start, liberal);\n    node.name = name;\n    node.loc.identifierName = name;\n    return this.finishNode(node, \"Identifier\");\n  };\n\n  _proto.parseIdentifierName = function parseIdentifierName(pos, liberal) {\n    if (!liberal) {\n      this.checkReservedWord(this.state.value, this.state.start, !!this.state.type.keyword, false);\n    }\n\n    var name;\n\n    if (this.match(types.name)) {\n      name = this.state.value;\n    } else if (this.state.type.keyword) {\n      name = this.state.type.keyword;\n    } else {\n      throw this.unexpected();\n    }\n\n    if (!liberal && name === \"await\" && this.state.inAsync) {\n      this.raise(pos, \"invalid use of await inside of an async function\");\n    }\n\n    this.next();\n    return name;\n  };\n\n  _proto.checkReservedWord = function checkReservedWord(word, startLoc, checkKeywords, isBinding) {\n    if (this.state.strict && (reservedWords.strict(word) || isBinding && reservedWords.strictBind(word))) {\n      this.raise(startLoc, word + \" is a reserved word in strict mode\");\n    }\n\n    if (this.state.inGenerator && word === \"yield\") {\n      this.raise(startLoc, \"yield is a reserved word inside generator functions\");\n    }\n\n    if (this.state.inClassProperty && word === \"arguments\") {\n      this.raise(startLoc, \"'arguments' is not allowed in class field initializer\");\n    }\n\n    if (this.isReservedWord(word) || checkKeywords && this.isKeyword(word)) {\n      this.raise(startLoc, word + \" is a reserved word\");\n    }\n  };\n\n  _proto.parseAwait = function parseAwait(node) {\n    if (!this.state.inAsync && (this.state.inFunction || !this.options.allowAwaitOutsideFunction)) {\n      this.unexpected();\n    }\n\n    if (this.match(types.star)) {\n      this.raise(node.start, \"await* has been removed from the async functions proposal. Use Promise.all() instead.\");\n    }\n\n    node.argument = this.parseMaybeUnary();\n    return this.finishNode(node, \"AwaitExpression\");\n  };\n\n  _proto.parseYield = function parseYield() {\n    var node = this.startNode();\n\n    if (this.state.inParameters) {\n      this.raise(node.start, \"yield is not allowed in generator parameters\");\n    }\n\n    if (this.state.maybeInArrowParameters && !this.state.yieldInPossibleArrowParameters) {\n      this.state.yieldInPossibleArrowParameters = node;\n    }\n\n    this.next();\n\n    if (this.match(types.semi) || this.canInsertSemicolon() || !this.match(types.star) && !this.state.type.startsExpr) {\n      node.delegate = false;\n      node.argument = null;\n    } else {\n      node.delegate = this.eat(types.star);\n      node.argument = this.parseMaybeAssign();\n    }\n\n    return this.finishNode(node, \"YieldExpression\");\n  };\n\n  return ExpressionParser;\n}(LValParser);\n\nvar empty = [];\nvar loopLabel = {\n  kind: \"loop\"\n};\nvar switchLabel = {\n  kind: \"switch\"\n};\n\nvar StatementParser = function (_ExpressionParser) {\n  _inheritsLoose(StatementParser, _ExpressionParser);\n\n  function StatementParser() {\n    return _ExpressionParser.apply(this, arguments) || this;\n  }\n\n  var _proto = StatementParser.prototype;\n\n  _proto.parseTopLevel = function parseTopLevel(file, program) {\n    program.sourceType = this.options.sourceType;\n    program.interpreter = this.parseInterpreterDirective();\n    this.parseBlockBody(program, true, true, types.eof);\n    file.program = this.finishNode(program, \"Program\");\n    file.comments = this.state.comments;\n    if (this.options.tokens) file.tokens = this.state.tokens;\n    return this.finishNode(file, \"File\");\n  };\n\n  _proto.stmtToDirective = function stmtToDirective(stmt) {\n    var expr = stmt.expression;\n    var directiveLiteral = this.startNodeAt(expr.start, expr.loc.start);\n    var directive = this.startNodeAt(stmt.start, stmt.loc.start);\n    var raw = this.input.slice(expr.start, expr.end);\n    var val = directiveLiteral.value = raw.slice(1, -1);\n    this.addExtra(directiveLiteral, \"raw\", raw);\n    this.addExtra(directiveLiteral, \"rawValue\", val);\n    directive.value = this.finishNodeAt(directiveLiteral, \"DirectiveLiteral\", expr.end, expr.loc.end);\n    return this.finishNodeAt(directive, \"Directive\", stmt.end, stmt.loc.end);\n  };\n\n  _proto.parseInterpreterDirective = function parseInterpreterDirective() {\n    if (!this.match(types.interpreterDirective)) {\n      return null;\n    }\n\n    var node = this.startNode();\n    node.value = this.state.value;\n    this.next();\n    return this.finishNode(node, \"InterpreterDirective\");\n  };\n\n  _proto.parseStatement = function parseStatement(declaration, topLevel) {\n    if (this.match(types.at)) {\n      this.parseDecorators(true);\n    }\n\n    return this.parseStatementContent(declaration, topLevel);\n  };\n\n  _proto.parseStatementContent = function parseStatementContent(declaration, topLevel) {\n    var starttype = this.state.type;\n    var node = this.startNode();\n\n    switch (starttype) {\n      case types._break:\n      case types._continue:\n        return this.parseBreakContinueStatement(node, starttype.keyword);\n\n      case types._debugger:\n        return this.parseDebuggerStatement(node);\n\n      case types._do:\n        return this.parseDoStatement(node);\n\n      case types._for:\n        return this.parseForStatement(node);\n\n      case types._function:\n        if (this.lookahead().type === types.dot) break;\n        if (!declaration) this.unexpected();\n        return this.parseFunctionStatement(node);\n\n      case types._class:\n        if (!declaration) this.unexpected();\n        return this.parseClass(node, true);\n\n      case types._if:\n        return this.parseIfStatement(node);\n\n      case types._return:\n        return this.parseReturnStatement(node);\n\n      case types._switch:\n        return this.parseSwitchStatement(node);\n\n      case types._throw:\n        return this.parseThrowStatement(node);\n\n      case types._try:\n        return this.parseTryStatement(node);\n\n      case types._let:\n      case types._const:\n        if (!declaration) this.unexpected();\n\n      case types._var:\n        return this.parseVarStatement(node, starttype);\n\n      case types._while:\n        return this.parseWhileStatement(node);\n\n      case types._with:\n        return this.parseWithStatement(node);\n\n      case types.braceL:\n        return this.parseBlock();\n\n      case types.semi:\n        return this.parseEmptyStatement(node);\n\n      case types._export:\n      case types._import:\n        {\n          var nextToken = this.lookahead();\n\n          if (nextToken.type === types.parenL || nextToken.type === types.dot) {\n            break;\n          }\n\n          if (!this.options.allowImportExportEverywhere && !topLevel) {\n            this.raise(this.state.start, \"'import' and 'export' may only appear at the top level\");\n          }\n\n          this.next();\n          var result;\n\n          if (starttype == types._import) {\n            result = this.parseImport(node);\n\n            if (result.type === \"ImportDeclaration\" && (!result.importKind || result.importKind === \"value\")) {\n              this.sawUnambiguousESM = true;\n            }\n          } else {\n            result = this.parseExport(node);\n\n            if (result.type === \"ExportNamedDeclaration\" && (!result.exportKind || result.exportKind === \"value\") || result.type === \"ExportAllDeclaration\" && (!result.exportKind || result.exportKind === \"value\") || result.type === \"ExportDefaultDeclaration\") {\n              this.sawUnambiguousESM = true;\n            }\n          }\n\n          this.assertModuleNodeAllowed(node);\n          return result;\n        }\n\n      case types.name:\n        if (this.isContextual(\"async\")) {\n          var state = this.state.clone();\n          this.next();\n\n          if (this.match(types._function) && !this.canInsertSemicolon()) {\n            this.expect(types._function);\n            return this.parseFunction(node, true, false, true);\n          } else {\n            this.state = state;\n          }\n        }\n\n    }\n\n    var maybeName = this.state.value;\n    var expr = this.parseExpression();\n\n    if (starttype === types.name && expr.type === \"Identifier\" && this.eat(types.colon)) {\n      return this.parseLabeledStatement(node, maybeName, expr);\n    } else {\n      return this.parseExpressionStatement(node, expr);\n    }\n  };\n\n  _proto.assertModuleNodeAllowed = function assertModuleNodeAllowed(node) {\n    if (!this.options.allowImportExportEverywhere && !this.inModule) {\n      this.raise(node.start, \"'import' and 'export' may appear only with 'sourceType: \\\"module\\\"'\", {\n        code: \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\"\n      });\n    }\n  };\n\n  _proto.takeDecorators = function takeDecorators(node) {\n    var decorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];\n\n    if (decorators.length) {\n      node.decorators = decorators;\n      this.resetStartLocationFromNode(node, decorators[0]);\n      this.state.decoratorStack[this.state.decoratorStack.length - 1] = [];\n    }\n  };\n\n  _proto.canHaveLeadingDecorator = function canHaveLeadingDecorator() {\n    return this.match(types._class);\n  };\n\n  _proto.parseDecorators = function parseDecorators(allowExport) {\n    var currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];\n\n    while (this.match(types.at)) {\n      var decorator = this.parseDecorator();\n      currentContextDecorators.push(decorator);\n    }\n\n    if (this.match(types._export)) {\n      if (!allowExport) {\n        this.unexpected();\n      }\n\n      if (this.hasPlugin(\"decorators\") && !this.getPluginOption(\"decorators\", \"decoratorsBeforeExport\")) {\n        this.raise(this.state.start, \"Using the export keyword between a decorator and a class is not allowed. \" + \"Please use `export @dec class` instead.\");\n      }\n    } else if (!this.canHaveLeadingDecorator()) {\n      this.raise(this.state.start, \"Leading decorators must be attached to a class declaration\");\n    }\n  };\n\n  _proto.parseDecorator = function parseDecorator() {\n    this.expectOnePlugin([\"decorators-legacy\", \"decorators\"]);\n    var node = this.startNode();\n    this.next();\n\n    if (this.hasPlugin(\"decorators\")) {\n      this.state.decoratorStack.push([]);\n      var startPos = this.state.start;\n      var startLoc = this.state.startLoc;\n      var expr;\n\n      if (this.eat(types.parenL)) {\n        expr = this.parseExpression();\n        this.expect(types.parenR);\n      } else {\n        expr = this.parseIdentifier(false);\n\n        while (this.eat(types.dot)) {\n          var _node = this.startNodeAt(startPos, startLoc);\n\n          _node.object = expr;\n          _node.property = this.parseIdentifier(true);\n          _node.computed = false;\n          expr = this.finishNode(_node, \"MemberExpression\");\n        }\n      }\n\n      if (this.eat(types.parenL)) {\n        var _node2 = this.startNodeAt(startPos, startLoc);\n\n        _node2.callee = expr;\n        _node2.arguments = this.parseCallExpressionArguments(types.parenR, false);\n        this.toReferencedList(_node2.arguments);\n        expr = this.finishNode(_node2, \"CallExpression\");\n      }\n\n      node.expression = expr;\n      this.state.decoratorStack.pop();\n    } else {\n      node.expression = this.parseMaybeAssign();\n    }\n\n    return this.finishNode(node, \"Decorator\");\n  };\n\n  _proto.parseBreakContinueStatement = function parseBreakContinueStatement(node, keyword) {\n    var isBreak = keyword === \"break\";\n    this.next();\n\n    if (this.isLineTerminator()) {\n      node.label = null;\n    } else if (!this.match(types.name)) {\n      this.unexpected();\n    } else {\n      node.label = this.parseIdentifier();\n      this.semicolon();\n    }\n\n    var i;\n\n    for (i = 0; i < this.state.labels.length; ++i) {\n      var lab = this.state.labels[i];\n\n      if (node.label == null || lab.name === node.label.name) {\n        if (lab.kind != null && (isBreak || lab.kind === \"loop\")) break;\n        if (node.label && isBreak) break;\n      }\n    }\n\n    if (i === this.state.labels.length) {\n      this.raise(node.start, \"Unsyntactic \" + keyword);\n    }\n\n    return this.finishNode(node, isBreak ? \"BreakStatement\" : \"ContinueStatement\");\n  };\n\n  _proto.parseDebuggerStatement = function parseDebuggerStatement(node) {\n    this.next();\n    this.semicolon();\n    return this.finishNode(node, \"DebuggerStatement\");\n  };\n\n  _proto.parseDoStatement = function parseDoStatement(node) {\n    this.next();\n    this.state.labels.push(loopLabel);\n    node.body = this.parseStatement(false);\n    this.state.labels.pop();\n    this.expect(types._while);\n    node.test = this.parseParenExpression();\n    this.eat(types.semi);\n    return this.finishNode(node, \"DoWhileStatement\");\n  };\n\n  _proto.parseForStatement = function parseForStatement(node) {\n    this.next();\n    this.state.labels.push(loopLabel);\n    var forAwait = false;\n\n    if (this.state.inAsync && this.isContextual(\"await\")) {\n      this.expectPlugin(\"asyncGenerators\");\n      forAwait = true;\n      this.next();\n    }\n\n    this.expect(types.parenL);\n\n    if (this.match(types.semi)) {\n      if (forAwait) {\n        this.unexpected();\n      }\n\n      return this.parseFor(node, null);\n    }\n\n    if (this.match(types._var) || this.match(types._let) || this.match(types._const)) {\n      var _init = this.startNode();\n\n      var varKind = this.state.type;\n      this.next();\n      this.parseVar(_init, true, varKind);\n      this.finishNode(_init, \"VariableDeclaration\");\n\n      if (this.match(types._in) || this.isContextual(\"of\")) {\n        if (_init.declarations.length === 1) {\n          var declaration = _init.declarations[0];\n          var isForInInitializer = varKind === types._var && declaration.init && declaration.id.type != \"ObjectPattern\" && declaration.id.type != \"ArrayPattern\" && !this.isContextual(\"of\");\n\n          if (this.state.strict && isForInInitializer) {\n            this.raise(this.state.start, \"for-in initializer in strict mode\");\n          } else if (isForInInitializer || !declaration.init) {\n            return this.parseForIn(node, _init, forAwait);\n          }\n        }\n      }\n\n      if (forAwait) {\n        this.unexpected();\n      }\n\n      return this.parseFor(node, _init);\n    }\n\n    var refShorthandDefaultPos = {\n      start: 0\n    };\n    var init = this.parseExpression(true, refShorthandDefaultPos);\n\n    if (this.match(types._in) || this.isContextual(\"of\")) {\n      var description = this.isContextual(\"of\") ? \"for-of statement\" : \"for-in statement\";\n      this.toAssignable(init, undefined, description);\n      this.checkLVal(init, undefined, undefined, description);\n      return this.parseForIn(node, init, forAwait);\n    } else if (refShorthandDefaultPos.start) {\n      this.unexpected(refShorthandDefaultPos.start);\n    }\n\n    if (forAwait) {\n      this.unexpected();\n    }\n\n    return this.parseFor(node, init);\n  };\n\n  _proto.parseFunctionStatement = function parseFunctionStatement(node) {\n    this.next();\n    return this.parseFunction(node, true);\n  };\n\n  _proto.parseIfStatement = function parseIfStatement(node) {\n    this.next();\n    node.test = this.parseParenExpression();\n    node.consequent = this.parseStatement(false);\n    node.alternate = this.eat(types._else) ? this.parseStatement(false) : null;\n    return this.finishNode(node, \"IfStatement\");\n  };\n\n  _proto.parseReturnStatement = function parseReturnStatement(node) {\n    if (!this.state.inFunction && !this.options.allowReturnOutsideFunction) {\n      this.raise(this.state.start, \"'return' outside of function\");\n    }\n\n    this.next();\n\n    if (this.isLineTerminator()) {\n      node.argument = null;\n    } else {\n      node.argument = this.parseExpression();\n      this.semicolon();\n    }\n\n    return this.finishNode(node, \"ReturnStatement\");\n  };\n\n  _proto.parseSwitchStatement = function parseSwitchStatement(node) {\n    this.next();\n    node.discriminant = this.parseParenExpression();\n    var cases = node.cases = [];\n    this.expect(types.braceL);\n    this.state.labels.push(switchLabel);\n    var cur;\n\n    for (var sawDefault; !this.match(types.braceR);) {\n      if (this.match(types._case) || this.match(types._default)) {\n        var isCase = this.match(types._case);\n        if (cur) this.finishNode(cur, \"SwitchCase\");\n        cases.push(cur = this.startNode());\n        cur.consequent = [];\n        this.next();\n\n        if (isCase) {\n          cur.test = this.parseExpression();\n        } else {\n          if (sawDefault) {\n            this.raise(this.state.lastTokStart, \"Multiple default clauses\");\n          }\n\n          sawDefault = true;\n          cur.test = null;\n        }\n\n        this.expect(types.colon);\n      } else {\n        if (cur) {\n          cur.consequent.push(this.parseStatement(true));\n        } else {\n          this.unexpected();\n        }\n      }\n    }\n\n    if (cur) this.finishNode(cur, \"SwitchCase\");\n    this.next();\n    this.state.labels.pop();\n    return this.finishNode(node, \"SwitchStatement\");\n  };\n\n  _proto.parseThrowStatement = function parseThrowStatement(node) {\n    this.next();\n\n    if (lineBreak.test(this.input.slice(this.state.lastTokEnd, this.state.start))) {\n      this.raise(this.state.lastTokEnd, \"Illegal newline after throw\");\n    }\n\n    node.argument = this.parseExpression();\n    this.semicolon();\n    return this.finishNode(node, \"ThrowStatement\");\n  };\n\n  _proto.parseTryStatement = function parseTryStatement(node) {\n    this.next();\n    node.block = this.parseBlock();\n    node.handler = null;\n\n    if (this.match(types._catch)) {\n      var clause = this.startNode();\n      this.next();\n\n      if (this.match(types.parenL)) {\n        this.expect(types.parenL);\n        clause.param = this.parseBindingAtom();\n        var clashes = Object.create(null);\n        this.checkLVal(clause.param, true, clashes, \"catch clause\");\n        this.expect(types.parenR);\n      } else {\n        this.expectPlugin(\"optionalCatchBinding\");\n        clause.param = null;\n      }\n\n      clause.body = this.parseBlock();\n      node.handler = this.finishNode(clause, \"CatchClause\");\n    }\n\n    node.guardedHandlers = empty;\n    node.finalizer = this.eat(types._finally) ? this.parseBlock() : null;\n\n    if (!node.handler && !node.finalizer) {\n      this.raise(node.start, \"Missing catch or finally clause\");\n    }\n\n    return this.finishNode(node, \"TryStatement\");\n  };\n\n  _proto.parseVarStatement = function parseVarStatement(node, kind) {\n    this.next();\n    this.parseVar(node, false, kind);\n    this.semicolon();\n    return this.finishNode(node, \"VariableDeclaration\");\n  };\n\n  _proto.parseWhileStatement = function parseWhileStatement(node) {\n    this.next();\n    node.test = this.parseParenExpression();\n    this.state.labels.push(loopLabel);\n    node.body = this.parseStatement(false);\n    this.state.labels.pop();\n    return this.finishNode(node, \"WhileStatement\");\n  };\n\n  _proto.parseWithStatement = function parseWithStatement(node) {\n    if (this.state.strict) {\n      this.raise(this.state.start, \"'with' in strict mode\");\n    }\n\n    this.next();\n    node.object = this.parseParenExpression();\n    node.body = this.parseStatement(false);\n    return this.finishNode(node, \"WithStatement\");\n  };\n\n  _proto.parseEmptyStatement = function parseEmptyStatement(node) {\n    this.next();\n    return this.finishNode(node, \"EmptyStatement\");\n  };\n\n  _proto.parseLabeledStatement = function parseLabeledStatement(node, maybeName, expr) {\n    for (var _i2 = 0, _this$state$labels2 = this.state.labels; _i2 < _this$state$labels2.length; _i2++) {\n      var label = _this$state$labels2[_i2];\n\n      if (label.name === maybeName) {\n        this.raise(expr.start, \"Label '\" + maybeName + \"' is already declared\");\n      }\n    }\n\n    var kind = this.state.type.isLoop ? \"loop\" : this.match(types._switch) ? \"switch\" : null;\n\n    for (var i = this.state.labels.length - 1; i >= 0; i--) {\n      var _label = this.state.labels[i];\n\n      if (_label.statementStart === node.start) {\n        _label.statementStart = this.state.start;\n        _label.kind = kind;\n      } else {\n        break;\n      }\n    }\n\n    this.state.labels.push({\n      name: maybeName,\n      kind: kind,\n      statementStart: this.state.start\n    });\n    node.body = this.parseStatement(true);\n\n    if (node.body.type == \"ClassDeclaration\" || node.body.type == \"VariableDeclaration\" && node.body.kind !== \"var\" || node.body.type == \"FunctionDeclaration\" && (this.state.strict || node.body.generator || node.body.async)) {\n      this.raise(node.body.start, \"Invalid labeled declaration\");\n    }\n\n    this.state.labels.pop();\n    node.label = expr;\n    return this.finishNode(node, \"LabeledStatement\");\n  };\n\n  _proto.parseExpressionStatement = function parseExpressionStatement(node, expr) {\n    node.expression = expr;\n    this.semicolon();\n    return this.finishNode(node, \"ExpressionStatement\");\n  };\n\n  _proto.parseBlock = function parseBlock(allowDirectives) {\n    var node = this.startNode();\n    this.expect(types.braceL);\n    this.parseBlockBody(node, allowDirectives, false, types.braceR);\n    return this.finishNode(node, \"BlockStatement\");\n  };\n\n  _proto.isValidDirective = function isValidDirective(stmt) {\n    return stmt.type === \"ExpressionStatement\" && stmt.expression.type === \"StringLiteral\" && !stmt.expression.extra.parenthesized;\n  };\n\n  _proto.parseBlockBody = function parseBlockBody(node, allowDirectives, topLevel, end) {\n    var body = node.body = [];\n    var directives = node.directives = [];\n    this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : undefined, topLevel, end);\n  };\n\n  _proto.parseBlockOrModuleBlockBody = function parseBlockOrModuleBlockBody(body, directives, topLevel, end) {\n    var parsedNonDirective = false;\n    var oldStrict;\n    var octalPosition;\n\n    while (!this.eat(end)) {\n      if (!parsedNonDirective && this.state.containsOctal && !octalPosition) {\n        octalPosition = this.state.octalPosition;\n      }\n\n      var stmt = this.parseStatement(true, topLevel);\n\n      if (directives && !parsedNonDirective && this.isValidDirective(stmt)) {\n        var directive = this.stmtToDirective(stmt);\n        directives.push(directive);\n\n        if (oldStrict === undefined && directive.value.value === \"use strict\") {\n          oldStrict = this.state.strict;\n          this.setStrict(true);\n\n          if (octalPosition) {\n            this.raise(octalPosition, \"Octal literal in strict mode\");\n          }\n        }\n\n        continue;\n      }\n\n      parsedNonDirective = true;\n      body.push(stmt);\n    }\n\n    if (oldStrict === false) {\n      this.setStrict(false);\n    }\n  };\n\n  _proto.parseFor = function parseFor(node, init) {\n    node.init = init;\n    this.expect(types.semi);\n    node.test = this.match(types.semi) ? null : this.parseExpression();\n    this.expect(types.semi);\n    node.update = this.match(types.parenR) ? null : this.parseExpression();\n    this.expect(types.parenR);\n    node.body = this.parseStatement(false);\n    this.state.labels.pop();\n    return this.finishNode(node, \"ForStatement\");\n  };\n\n  _proto.parseForIn = function parseForIn(node, init, forAwait) {\n    var type = this.match(types._in) ? \"ForInStatement\" : \"ForOfStatement\";\n\n    if (forAwait) {\n      this.eatContextual(\"of\");\n    } else {\n      this.next();\n    }\n\n    if (type === \"ForOfStatement\") {\n      node.await = !!forAwait;\n    }\n\n    node.left = init;\n    node.right = this.parseExpression();\n    this.expect(types.parenR);\n    node.body = this.parseStatement(false);\n    this.state.labels.pop();\n    return this.finishNode(node, type);\n  };\n\n  _proto.parseVar = function parseVar(node, isFor, kind) {\n    var declarations = node.declarations = [];\n    node.kind = kind.keyword;\n\n    for (;;) {\n      var decl = this.startNode();\n      this.parseVarHead(decl);\n\n      if (this.eat(types.eq)) {\n        decl.init = this.parseMaybeAssign(isFor);\n      } else {\n        if (kind === types._const && !(this.match(types._in) || this.isContextual(\"of\"))) {\n          if (!this.hasPlugin(\"typescript\")) {\n            this.unexpected();\n          }\n        } else if (decl.id.type !== \"Identifier\" && !(isFor && (this.match(types._in) || this.isContextual(\"of\")))) {\n          this.raise(this.state.lastTokEnd, \"Complex binding patterns require an initialization value\");\n        }\n\n        decl.init = null;\n      }\n\n      declarations.push(this.finishNode(decl, \"VariableDeclarator\"));\n      if (!this.eat(types.comma)) break;\n    }\n\n    return node;\n  };\n\n  _proto.parseVarHead = function parseVarHead(decl) {\n    decl.id = this.parseBindingAtom();\n    this.checkLVal(decl.id, true, undefined, \"variable declaration\");\n  };\n\n  _proto.parseFunction = function parseFunction(node, isStatement, allowExpressionBody, isAsync, optionalId) {\n    var oldInFunc = this.state.inFunction;\n    var oldInMethod = this.state.inMethod;\n    var oldInGenerator = this.state.inGenerator;\n    var oldInClassProperty = this.state.inClassProperty;\n    this.state.inFunction = true;\n    this.state.inMethod = false;\n    this.state.inClassProperty = false;\n    this.initFunction(node, isAsync);\n\n    if (this.match(types.star)) {\n      if (node.async) {\n        this.expectPlugin(\"asyncGenerators\");\n      }\n\n      node.generator = true;\n      this.next();\n    }\n\n    if (isStatement && !optionalId && !this.match(types.name) && !this.match(types._yield)) {\n      this.unexpected();\n    }\n\n    if (!isStatement) this.state.inGenerator = node.generator;\n\n    if (this.match(types.name) || this.match(types._yield)) {\n      node.id = this.parseBindingIdentifier();\n    }\n\n    if (isStatement) this.state.inGenerator = node.generator;\n    this.parseFunctionParams(node);\n    this.parseFunctionBodyAndFinish(node, isStatement ? \"FunctionDeclaration\" : \"FunctionExpression\", allowExpressionBody);\n    this.state.inFunction = oldInFunc;\n    this.state.inMethod = oldInMethod;\n    this.state.inGenerator = oldInGenerator;\n    this.state.inClassProperty = oldInClassProperty;\n    return node;\n  };\n\n  _proto.parseFunctionParams = function parseFunctionParams(node, allowModifiers) {\n    var oldInParameters = this.state.inParameters;\n    this.state.inParameters = true;\n    this.expect(types.parenL);\n    node.params = this.parseBindingList(types.parenR, false, allowModifiers);\n    this.state.inParameters = oldInParameters;\n  };\n\n  _proto.parseClass = function parseClass(node, isStatement, optionalId) {\n    this.next();\n    this.takeDecorators(node);\n    this.parseClassId(node, isStatement, optionalId);\n    this.parseClassSuper(node);\n    this.parseClassBody(node);\n    return this.finishNode(node, isStatement ? \"ClassDeclaration\" : \"ClassExpression\");\n  };\n\n  _proto.isClassProperty = function isClassProperty() {\n    return this.match(types.eq) || this.match(types.semi) || this.match(types.braceR);\n  };\n\n  _proto.isClassMethod = function isClassMethod() {\n    return this.match(types.parenL);\n  };\n\n  _proto.isNonstaticConstructor = function isNonstaticConstructor(method) {\n    return !method.computed && !method.static && (method.key.name === \"constructor\" || method.key.value === \"constructor\");\n  };\n\n  _proto.parseClassBody = function parseClassBody(node) {\n    var oldStrict = this.state.strict;\n    this.state.strict = true;\n    this.state.classLevel++;\n    var state = {\n      hadConstructor: false\n    };\n    var decorators = [];\n    var classBody = this.startNode();\n    classBody.body = [];\n    this.expect(types.braceL);\n\n    while (!this.eat(types.braceR)) {\n      if (this.eat(types.semi)) {\n        if (decorators.length > 0) {\n          this.raise(this.state.lastTokEnd, \"Decorators must not be followed by a semicolon\");\n        }\n\n        continue;\n      }\n\n      if (this.match(types.at)) {\n        decorators.push(this.parseDecorator());\n        continue;\n      }\n\n      var member = this.startNode();\n\n      if (decorators.length) {\n        member.decorators = decorators;\n        this.resetStartLocationFromNode(member, decorators[0]);\n        decorators = [];\n      }\n\n      this.parseClassMember(classBody, member, state);\n\n      if (member.kind === \"constructor\" && member.decorators && member.decorators.length > 0) {\n        this.raise(member.start, \"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?\");\n      }\n    }\n\n    if (decorators.length) {\n      this.raise(this.state.start, \"You have trailing decorators with no method\");\n    }\n\n    node.body = this.finishNode(classBody, \"ClassBody\");\n    this.state.classLevel--;\n    this.state.strict = oldStrict;\n  };\n\n  _proto.parseClassMember = function parseClassMember(classBody, member, state) {\n    var isStatic = false;\n    var containsEsc = this.state.containsEsc;\n\n    if (this.match(types.name) && this.state.value === \"static\") {\n      var key = this.parseIdentifier(true);\n\n      if (this.isClassMethod()) {\n        var method = member;\n        method.kind = \"method\";\n        method.computed = false;\n        method.key = key;\n        method.static = false;\n        this.pushClassMethod(classBody, method, false, false, false);\n        return;\n      } else if (this.isClassProperty()) {\n        var prop = member;\n        prop.computed = false;\n        prop.key = key;\n        prop.static = false;\n        classBody.body.push(this.parseClassProperty(prop));\n        return;\n      } else if (containsEsc) {\n        throw this.unexpected();\n      }\n\n      isStatic = true;\n    }\n\n    this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);\n  };\n\n  _proto.parseClassMemberWithIsStatic = function parseClassMemberWithIsStatic(classBody, member, state, isStatic) {\n    var publicMethod = member;\n    var privateMethod = member;\n    var publicProp = member;\n    var privateProp = member;\n    var method = publicMethod;\n    var publicMember = publicMethod;\n    member.static = isStatic;\n\n    if (this.eat(types.star)) {\n      method.kind = \"method\";\n      this.parseClassPropertyName(method);\n\n      if (method.key.type === \"PrivateName\") {\n        this.pushClassPrivateMethod(classBody, privateMethod, true, false);\n        return;\n      }\n\n      if (this.isNonstaticConstructor(publicMethod)) {\n        this.raise(publicMethod.key.start, \"Constructor can't be a generator\");\n      }\n\n      this.pushClassMethod(classBody, publicMethod, true, false, false);\n      return;\n    }\n\n    var key = this.parseClassPropertyName(member);\n    var isPrivate = key.type === \"PrivateName\";\n    var isSimple = key.type === \"Identifier\";\n    this.parsePostMemberNameModifiers(publicMember);\n\n    if (this.isClassMethod()) {\n      method.kind = \"method\";\n\n      if (isPrivate) {\n        this.pushClassPrivateMethod(classBody, privateMethod, false, false);\n        return;\n      }\n\n      var isConstructor = this.isNonstaticConstructor(publicMethod);\n\n      if (isConstructor) {\n        publicMethod.kind = \"constructor\";\n\n        if (publicMethod.decorators) {\n          this.raise(publicMethod.start, \"You can't attach decorators to a class constructor\");\n        }\n\n        if (state.hadConstructor && !this.hasPlugin(\"typescript\")) {\n          this.raise(key.start, \"Duplicate constructor in the same class\");\n        }\n\n        state.hadConstructor = true;\n      }\n\n      this.pushClassMethod(classBody, publicMethod, false, false, isConstructor);\n    } else if (this.isClassProperty()) {\n      if (isPrivate) {\n        this.pushClassPrivateProperty(classBody, privateProp);\n      } else {\n        this.pushClassProperty(classBody, publicProp);\n      }\n    } else if (isSimple && key.name === \"async\" && !this.isLineTerminator()) {\n      var isGenerator = this.match(types.star);\n\n      if (isGenerator) {\n        this.expectPlugin(\"asyncGenerators\");\n        this.next();\n      }\n\n      method.kind = \"method\";\n      this.parseClassPropertyName(method);\n\n      if (method.key.type === \"PrivateName\") {\n        this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true);\n      } else {\n        if (this.isNonstaticConstructor(publicMethod)) {\n          this.raise(publicMethod.key.start, \"Constructor can't be an async function\");\n        }\n\n        this.pushClassMethod(classBody, publicMethod, isGenerator, true, false);\n      }\n    } else if (isSimple && (key.name === \"get\" || key.name === \"set\") && !(this.isLineTerminator() && this.match(types.star))) {\n      method.kind = key.name;\n      this.parseClassPropertyName(publicMethod);\n\n      if (method.key.type === \"PrivateName\") {\n        this.pushClassPrivateMethod(classBody, privateMethod, false, false);\n      } else {\n        if (this.isNonstaticConstructor(publicMethod)) {\n          this.raise(publicMethod.key.start, \"Constructor can't have get/set modifier\");\n        }\n\n        this.pushClassMethod(classBody, publicMethod, false, false, false);\n      }\n\n      this.checkGetterSetterParams(publicMethod);\n    } else if (this.isLineTerminator()) {\n      if (isPrivate) {\n        this.pushClassPrivateProperty(classBody, privateProp);\n      } else {\n        this.pushClassProperty(classBody, publicProp);\n      }\n    } else {\n      this.unexpected();\n    }\n  };\n\n  _proto.parseClassPropertyName = function parseClassPropertyName(member) {\n    var key = this.parsePropertyName(member);\n\n    if (!member.computed && member.static && (key.name === \"prototype\" || key.value === \"prototype\")) {\n      this.raise(key.start, \"Classes may not have static property named prototype\");\n    }\n\n    if (key.type === \"PrivateName\" && key.id.name === \"constructor\") {\n      this.raise(key.start, \"Classes may not have a private field named '#constructor'\");\n    }\n\n    return key;\n  };\n\n  _proto.pushClassProperty = function pushClassProperty(classBody, prop) {\n    if (this.isNonstaticConstructor(prop)) {\n      this.raise(prop.key.start, \"Classes may not have a non-static field named 'constructor'\");\n    }\n\n    classBody.body.push(this.parseClassProperty(prop));\n  };\n\n  _proto.pushClassPrivateProperty = function pushClassPrivateProperty(classBody, prop) {\n    this.expectPlugin(\"classPrivateProperties\", prop.key.start);\n    classBody.body.push(this.parseClassPrivateProperty(prop));\n  };\n\n  _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor) {\n    classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, \"ClassMethod\"));\n  };\n\n  _proto.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {\n    this.expectPlugin(\"classPrivateMethods\", method.key.start);\n    classBody.body.push(this.parseMethod(method, isGenerator, isAsync, false, \"ClassPrivateMethod\"));\n  };\n\n  _proto.parsePostMemberNameModifiers = function parsePostMemberNameModifiers(methodOrProp) {};\n\n  _proto.parseAccessModifier = function parseAccessModifier() {\n    return undefined;\n  };\n\n  _proto.parseClassPrivateProperty = function parseClassPrivateProperty(node) {\n    var oldInMethod = this.state.inMethod;\n    this.state.inMethod = false;\n    this.state.inClassProperty = true;\n    node.value = this.eat(types.eq) ? this.parseMaybeAssign() : null;\n    this.semicolon();\n    this.state.inClassProperty = false;\n    this.state.inMethod = oldInMethod;\n    return this.finishNode(node, \"ClassPrivateProperty\");\n  };\n\n  _proto.parseClassProperty = function parseClassProperty(node) {\n    if (!node.typeAnnotation) {\n      this.expectPlugin(\"classProperties\");\n    }\n\n    var oldInMethod = this.state.inMethod;\n    this.state.inMethod = false;\n    this.state.inClassProperty = true;\n\n    if (this.match(types.eq)) {\n      this.expectPlugin(\"classProperties\");\n      this.next();\n      node.value = this.parseMaybeAssign();\n    } else {\n      node.value = null;\n    }\n\n    this.semicolon();\n    this.state.inClassProperty = false;\n    this.state.inMethod = oldInMethod;\n    return this.finishNode(node, \"ClassProperty\");\n  };\n\n  _proto.parseClassId = function parseClassId(node, isStatement, optionalId) {\n    if (this.match(types.name)) {\n      node.id = this.parseIdentifier();\n    } else {\n      if (optionalId || !isStatement) {\n        node.id = null;\n      } else {\n        this.unexpected(null, \"A class name is required\");\n      }\n    }\n  };\n\n  _proto.parseClassSuper = function parseClassSuper(node) {\n    node.superClass = this.eat(types._extends) ? this.parseExprSubscripts() : null;\n  };\n\n  _proto.parseExport = function parseExport(node) {\n    if (this.shouldParseExportStar()) {\n      this.parseExportStar(node);\n      if (node.type === \"ExportAllDeclaration\") return node;\n    } else if (this.isExportDefaultSpecifier()) {\n      this.expectPlugin(\"exportDefaultFrom\");\n      var specifier = this.startNode();\n      specifier.exported = this.parseIdentifier(true);\n      var specifiers = [this.finishNode(specifier, \"ExportDefaultSpecifier\")];\n      node.specifiers = specifiers;\n\n      if (this.match(types.comma) && this.lookahead().type === types.star) {\n        this.expect(types.comma);\n\n        var _specifier = this.startNode();\n\n        this.expect(types.star);\n        this.expectContextual(\"as\");\n        _specifier.exported = this.parseIdentifier();\n        specifiers.push(this.finishNode(_specifier, \"ExportNamespaceSpecifier\"));\n      } else {\n        this.parseExportSpecifiersMaybe(node);\n      }\n\n      this.parseExportFrom(node, true);\n    } else if (this.eat(types._default)) {\n      node.declaration = this.parseExportDefaultExpression();\n      this.checkExport(node, true, true);\n      return this.finishNode(node, \"ExportDefaultDeclaration\");\n    } else if (this.shouldParseExportDeclaration()) {\n      if (this.isContextual(\"async\")) {\n        var next = this.lookahead();\n\n        if (next.type !== types._function) {\n          this.unexpected(next.start, \"Unexpected token, expected \\\"function\\\"\");\n        }\n      }\n\n      node.specifiers = [];\n      node.source = null;\n      node.declaration = this.parseExportDeclaration(node);\n    } else {\n      node.declaration = null;\n      node.specifiers = this.parseExportSpecifiers();\n      this.parseExportFrom(node);\n    }\n\n    this.checkExport(node, true);\n    return this.finishNode(node, \"ExportNamedDeclaration\");\n  };\n\n  _proto.isAsyncFunction = function isAsyncFunction() {\n    if (!this.isContextual(\"async\")) return false;\n    var _this$state = this.state,\n        input = _this$state.input,\n        pos = _this$state.pos;\n    skipWhiteSpace.lastIndex = pos;\n    var skip = skipWhiteSpace.exec(input);\n    if (!skip || !skip.length) return false;\n    var next = pos + skip[0].length;\n    return !lineBreak.test(input.slice(pos, next)) && input.slice(next, next + 8) === \"function\" && (next + 8 === input.length || !isIdentifierChar(input.charAt(next + 8)));\n  };\n\n  _proto.parseExportDefaultExpression = function parseExportDefaultExpression() {\n    var expr = this.startNode();\n    var isAsync = this.isAsyncFunction();\n\n    if (this.eat(types._function) || isAsync) {\n      if (isAsync) {\n        this.eatContextual(\"async\");\n        this.expect(types._function);\n      }\n\n      return this.parseFunction(expr, true, false, isAsync, true);\n    } else if (this.match(types._class)) {\n      return this.parseClass(expr, true, true);\n    } else if (this.match(types.at)) {\n      if (this.hasPlugin(\"decorators\") && this.getPluginOption(\"decorators\", \"decoratorsBeforeExport\")) {\n        this.unexpected(this.state.start, \"Decorators must be placed *before* the 'export' keyword.\" + \" You can set the 'decoratorsBeforeExport' option to false to use\" + \" the 'export @decorator class {}' syntax\");\n      }\n\n      this.parseDecorators(false);\n      return this.parseClass(expr, true, true);\n    } else if (this.match(types._let) || this.match(types._const) || this.match(types._var)) {\n      return this.raise(this.state.start, \"Only expressions, functions or classes are allowed as the `default` export.\");\n    } else {\n      var res = this.parseMaybeAssign();\n      this.semicolon();\n      return res;\n    }\n  };\n\n  _proto.parseExportDeclaration = function parseExportDeclaration(node) {\n    return this.parseStatement(true);\n  };\n\n  _proto.isExportDefaultSpecifier = function isExportDefaultSpecifier() {\n    if (this.match(types.name)) {\n      return this.state.value !== \"async\";\n    }\n\n    if (!this.match(types._default)) {\n      return false;\n    }\n\n    var lookahead = this.lookahead();\n    return lookahead.type === types.comma || lookahead.type === types.name && lookahead.value === \"from\";\n  };\n\n  _proto.parseExportSpecifiersMaybe = function parseExportSpecifiersMaybe(node) {\n    if (this.eat(types.comma)) {\n      node.specifiers = node.specifiers.concat(this.parseExportSpecifiers());\n    }\n  };\n\n  _proto.parseExportFrom = function parseExportFrom(node, expect) {\n    if (this.eatContextual(\"from\")) {\n      node.source = this.match(types.string) ? this.parseExprAtom() : this.unexpected();\n      this.checkExport(node);\n    } else {\n      if (expect) {\n        this.unexpected();\n      } else {\n        node.source = null;\n      }\n    }\n\n    this.semicolon();\n  };\n\n  _proto.shouldParseExportStar = function shouldParseExportStar() {\n    return this.match(types.star);\n  };\n\n  _proto.parseExportStar = function parseExportStar(node) {\n    this.expect(types.star);\n\n    if (this.isContextual(\"as\")) {\n      this.parseExportNamespace(node);\n    } else {\n      this.parseExportFrom(node, true);\n      this.finishNode(node, \"ExportAllDeclaration\");\n    }\n  };\n\n  _proto.parseExportNamespace = function parseExportNamespace(node) {\n    this.expectPlugin(\"exportNamespaceFrom\");\n    var specifier = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc);\n    this.next();\n    specifier.exported = this.parseIdentifier(true);\n    node.specifiers = [this.finishNode(specifier, \"ExportNamespaceSpecifier\")];\n    this.parseExportSpecifiersMaybe(node);\n    this.parseExportFrom(node, true);\n  };\n\n  _proto.shouldParseExportDeclaration = function shouldParseExportDeclaration() {\n    if (this.match(types.at)) {\n      this.expectOnePlugin([\"decorators\", \"decorators-legacy\"]);\n\n      if (this.hasPlugin(\"decorators\")) {\n        if (this.getPluginOption(\"decorators\", \"decoratorsBeforeExport\")) {\n          this.unexpected(this.state.start, \"Decorators must be placed *before* the 'export' keyword.\" + \" You can set the 'decoratorsBeforeExport' option to false to use\" + \" the 'export @decorator class {}' syntax\");\n        } else {\n          return true;\n        }\n      }\n    }\n\n    return this.state.type.keyword === \"var\" || this.state.type.keyword === \"const\" || this.state.type.keyword === \"let\" || this.state.type.keyword === \"function\" || this.state.type.keyword === \"class\" || this.isAsyncFunction();\n  };\n\n  _proto.checkExport = function checkExport(node, checkNames, isDefault) {\n    if (checkNames) {\n      if (isDefault) {\n        this.checkDuplicateExports(node, \"default\");\n      } else if (node.specifiers && node.specifiers.length) {\n        for (var _i4 = 0, _node$specifiers2 = node.specifiers; _i4 < _node$specifiers2.length; _i4++) {\n          var specifier = _node$specifiers2[_i4];\n          this.checkDuplicateExports(specifier, specifier.exported.name);\n        }\n      } else if (node.declaration) {\n        if (node.declaration.type === \"FunctionDeclaration\" || node.declaration.type === \"ClassDeclaration\") {\n          var id = node.declaration.id;\n          if (!id) throw new Error(\"Assertion failure\");\n          this.checkDuplicateExports(node, id.name);\n        } else if (node.declaration.type === \"VariableDeclaration\") {\n          for (var _i6 = 0, _node$declaration$dec2 = node.declaration.declarations; _i6 < _node$declaration$dec2.length; _i6++) {\n            var declaration = _node$declaration$dec2[_i6];\n            this.checkDeclaration(declaration.id);\n          }\n        }\n      }\n    }\n\n    var currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];\n\n    if (currentContextDecorators.length) {\n      var isClass = node.declaration && (node.declaration.type === \"ClassDeclaration\" || node.declaration.type === \"ClassExpression\");\n\n      if (!node.declaration || !isClass) {\n        throw this.raise(node.start, \"You can only use decorators on an export when exporting a class\");\n      }\n\n      this.takeDecorators(node.declaration);\n    }\n  };\n\n  _proto.checkDeclaration = function checkDeclaration(node) {\n    if (node.type === \"ObjectPattern\") {\n      for (var _i8 = 0, _node$properties2 = node.properties; _i8 < _node$properties2.length; _i8++) {\n        var prop = _node$properties2[_i8];\n        this.checkDeclaration(prop);\n      }\n    } else if (node.type === \"ArrayPattern\") {\n      for (var _i10 = 0, _node$elements2 = node.elements; _i10 < _node$elements2.length; _i10++) {\n        var elem = _node$elements2[_i10];\n\n        if (elem) {\n          this.checkDeclaration(elem);\n        }\n      }\n    } else if (node.type === \"ObjectProperty\") {\n      this.checkDeclaration(node.value);\n    } else if (node.type === \"RestElement\") {\n      this.checkDeclaration(node.argument);\n    } else if (node.type === \"Identifier\") {\n      this.checkDuplicateExports(node, node.name);\n    }\n  };\n\n  _proto.checkDuplicateExports = function checkDuplicateExports(node, name) {\n    if (this.state.exportedIdentifiers.indexOf(name) > -1) {\n      this.raiseDuplicateExportError(node, name);\n    }\n\n    this.state.exportedIdentifiers.push(name);\n  };\n\n  _proto.raiseDuplicateExportError = function raiseDuplicateExportError(node, name) {\n    throw this.raise(node.start, name === \"default\" ? \"Only one default export allowed per module.\" : \"`\" + name + \"` has already been exported. Exported identifiers must be unique.\");\n  };\n\n  _proto.parseExportSpecifiers = function parseExportSpecifiers() {\n    var nodes = [];\n    var first = true;\n    var needsFrom;\n    this.expect(types.braceL);\n\n    while (!this.eat(types.braceR)) {\n      if (first) {\n        first = false;\n      } else {\n        this.expect(types.comma);\n        if (this.eat(types.braceR)) break;\n      }\n\n      var isDefault = this.match(types._default);\n      if (isDefault && !needsFrom) needsFrom = true;\n      var node = this.startNode();\n      node.local = this.parseIdentifier(isDefault);\n      node.exported = this.eatContextual(\"as\") ? this.parseIdentifier(true) : node.local.__clone();\n      nodes.push(this.finishNode(node, \"ExportSpecifier\"));\n    }\n\n    if (needsFrom && !this.isContextual(\"from\")) {\n      this.unexpected();\n    }\n\n    return nodes;\n  };\n\n  _proto.parseImport = function parseImport(node) {\n    if (this.match(types.string)) {\n      node.specifiers = [];\n      node.source = this.parseExprAtom();\n    } else {\n      node.specifiers = [];\n      this.parseImportSpecifiers(node);\n      this.expectContextual(\"from\");\n      node.source = this.match(types.string) ? this.parseExprAtom() : this.unexpected();\n    }\n\n    this.semicolon();\n    return this.finishNode(node, \"ImportDeclaration\");\n  };\n\n  _proto.shouldParseDefaultImport = function shouldParseDefaultImport(node) {\n    return this.match(types.name);\n  };\n\n  _proto.parseImportSpecifierLocal = function parseImportSpecifierLocal(node, specifier, type, contextDescription) {\n    specifier.local = this.parseIdentifier();\n    this.checkLVal(specifier.local, true, undefined, contextDescription);\n    node.specifiers.push(this.finishNode(specifier, type));\n  };\n\n  _proto.parseImportSpecifiers = function parseImportSpecifiers(node) {\n    var first = true;\n\n    if (this.shouldParseDefaultImport(node)) {\n      this.parseImportSpecifierLocal(node, this.startNode(), \"ImportDefaultSpecifier\", \"default import specifier\");\n      if (!this.eat(types.comma)) return;\n    }\n\n    if (this.match(types.star)) {\n      var specifier = this.startNode();\n      this.next();\n      this.expectContextual(\"as\");\n      this.parseImportSpecifierLocal(node, specifier, \"ImportNamespaceSpecifier\", \"import namespace specifier\");\n      return;\n    }\n\n    this.expect(types.braceL);\n\n    while (!this.eat(types.braceR)) {\n      if (first) {\n        first = false;\n      } else {\n        if (this.eat(types.colon)) {\n          this.unexpected(null, \"ES2015 named imports do not destructure. \" + \"Use another statement for destructuring after the import.\");\n        }\n\n        this.expect(types.comma);\n        if (this.eat(types.braceR)) break;\n      }\n\n      this.parseImportSpecifier(node);\n    }\n  };\n\n  _proto.parseImportSpecifier = function parseImportSpecifier(node) {\n    var specifier = this.startNode();\n    specifier.imported = this.parseIdentifier(true);\n\n    if (this.eatContextual(\"as\")) {\n      specifier.local = this.parseIdentifier();\n    } else {\n      this.checkReservedWord(specifier.imported.name, specifier.start, true, true);\n      specifier.local = specifier.imported.__clone();\n    }\n\n    this.checkLVal(specifier.local, true, undefined, \"import specifier\");\n    node.specifiers.push(this.finishNode(specifier, \"ImportSpecifier\"));\n  };\n\n  return StatementParser;\n}(ExpressionParser);\n\nvar Parser = function (_StatementParser) {\n  _inheritsLoose(Parser, _StatementParser);\n\n  function Parser(options, input) {\n    var _this;\n\n    options = getOptions(options);\n    _this = _StatementParser.call(this, options, input) || this;\n    _this.options = options;\n    _this.inModule = _this.options.sourceType === \"module\";\n    _this.input = input;\n    _this.plugins = pluginsMap(_this.options.plugins);\n    _this.filename = options.sourceFilename;\n    return _this;\n  }\n\n  var _proto = Parser.prototype;\n\n  _proto.parse = function parse() {\n    var file = this.startNode();\n    var program = this.startNode();\n    this.nextToken();\n    return this.parseTopLevel(file, program);\n  };\n\n  return Parser;\n}(StatementParser);\n\nfunction pluginsMap(plugins) {\n  var pluginMap = Object.create(null);\n\n  for (var _i2 = 0; _i2 < plugins.length; _i2++) {\n    var plugin = plugins[_i2];\n\n    var _ref = Array.isArray(plugin) ? plugin : [plugin, {}],\n        name = _ref[0],\n        _ref$ = _ref[1],\n        options = _ref$ === void 0 ? {} : _ref$;\n\n    if (!pluginMap[name]) pluginMap[name] = options || {};\n  }\n\n  return pluginMap;\n}\n\nfunction nonNull(x) {\n  if (x == null) {\n    throw new Error(\"Unexpected \" + x + \" value.\");\n  }\n\n  return x;\n}\n\nfunction assert(x) {\n  if (!x) {\n    throw new Error(\"Assert fail\");\n  }\n}\n\nfunction keywordTypeFromName(value) {\n  switch (value) {\n    case \"any\":\n      return \"TSAnyKeyword\";\n\n    case \"boolean\":\n      return \"TSBooleanKeyword\";\n\n    case \"never\":\n      return \"TSNeverKeyword\";\n\n    case \"number\":\n      return \"TSNumberKeyword\";\n\n    case \"object\":\n      return \"TSObjectKeyword\";\n\n    case \"string\":\n      return \"TSStringKeyword\";\n\n    case \"symbol\":\n      return \"TSSymbolKeyword\";\n\n    case \"undefined\":\n      return \"TSUndefinedKeyword\";\n\n    default:\n      return undefined;\n  }\n}\n\nvar typescript = (function (superClass) {\n  return function (_superClass) {\n    _inheritsLoose(_class, _superClass);\n\n    function _class() {\n      return _superClass.apply(this, arguments) || this;\n    }\n\n    var _proto = _class.prototype;\n\n    _proto.tsIsIdentifier = function tsIsIdentifier() {\n      return this.match(types.name);\n    };\n\n    _proto.tsNextTokenCanFollowModifier = function tsNextTokenCanFollowModifier() {\n      this.next();\n      return !this.hasPrecedingLineBreak() && !this.match(types.parenL) && !this.match(types.parenR) && !this.match(types.colon) && !this.match(types.eq) && !this.match(types.question);\n    };\n\n    _proto.tsParseModifier = function tsParseModifier(allowedModifiers) {\n      if (!this.match(types.name)) {\n        return undefined;\n      }\n\n      var modifier = this.state.value;\n\n      if (allowedModifiers.indexOf(modifier) !== -1 && this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) {\n        return modifier;\n      }\n\n      return undefined;\n    };\n\n    _proto.tsIsListTerminator = function tsIsListTerminator(kind) {\n      switch (kind) {\n        case \"EnumMembers\":\n        case \"TypeMembers\":\n          return this.match(types.braceR);\n\n        case \"HeritageClauseElement\":\n          return this.match(types.braceL);\n\n        case \"TupleElementTypes\":\n          return this.match(types.bracketR);\n\n        case \"TypeParametersOrArguments\":\n          return this.isRelational(\">\");\n      }\n\n      throw new Error(\"Unreachable\");\n    };\n\n    _proto.tsParseList = function tsParseList(kind, parseElement) {\n      var result = [];\n\n      while (!this.tsIsListTerminator(kind)) {\n        result.push(parseElement());\n      }\n\n      return result;\n    };\n\n    _proto.tsParseDelimitedList = function tsParseDelimitedList(kind, parseElement) {\n      return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true));\n    };\n\n    _proto.tsTryParseDelimitedList = function tsTryParseDelimitedList(kind, parseElement) {\n      return this.tsParseDelimitedListWorker(kind, parseElement, false);\n    };\n\n    _proto.tsParseDelimitedListWorker = function tsParseDelimitedListWorker(kind, parseElement, expectSuccess) {\n      var result = [];\n\n      while (true) {\n        if (this.tsIsListTerminator(kind)) {\n          break;\n        }\n\n        var element = parseElement();\n\n        if (element == null) {\n          return undefined;\n        }\n\n        result.push(element);\n\n        if (this.eat(types.comma)) {\n          continue;\n        }\n\n        if (this.tsIsListTerminator(kind)) {\n          break;\n        }\n\n        if (expectSuccess) {\n          this.expect(types.comma);\n        }\n\n        return undefined;\n      }\n\n      return result;\n    };\n\n    _proto.tsParseBracketedList = function tsParseBracketedList(kind, parseElement, bracket, skipFirstToken) {\n      if (!skipFirstToken) {\n        if (bracket) {\n          this.expect(types.bracketL);\n        } else {\n          this.expectRelational(\"<\");\n        }\n      }\n\n      var result = this.tsParseDelimitedList(kind, parseElement);\n\n      if (bracket) {\n        this.expect(types.bracketR);\n      } else {\n        this.expectRelational(\">\");\n      }\n\n      return result;\n    };\n\n    _proto.tsParseEntityName = function tsParseEntityName(allowReservedWords) {\n      var entity = this.parseIdentifier();\n\n      while (this.eat(types.dot)) {\n        var node = this.startNodeAtNode(entity);\n        node.left = entity;\n        node.right = this.parseIdentifier(allowReservedWords);\n        entity = this.finishNode(node, \"TSQualifiedName\");\n      }\n\n      return entity;\n    };\n\n    _proto.tsParseTypeReference = function tsParseTypeReference() {\n      var node = this.startNode();\n      node.typeName = this.tsParseEntityName(false);\n\n      if (!this.hasPrecedingLineBreak() && this.isRelational(\"<\")) {\n        node.typeParameters = this.tsParseTypeArguments();\n      }\n\n      return this.finishNode(node, \"TSTypeReference\");\n    };\n\n    _proto.tsParseThisTypePredicate = function tsParseThisTypePredicate(lhs) {\n      this.next();\n      var node = this.startNode();\n      node.parameterName = lhs;\n      node.typeAnnotation = this.tsParseTypeAnnotation(false);\n      return this.finishNode(node, \"TSTypePredicate\");\n    };\n\n    _proto.tsParseThisTypeNode = function tsParseThisTypeNode() {\n      var node = this.startNode();\n      this.next();\n      return this.finishNode(node, \"TSThisType\");\n    };\n\n    _proto.tsParseTypeQuery = function tsParseTypeQuery() {\n      var node = this.startNode();\n      this.expect(types._typeof);\n      node.exprName = this.tsParseEntityName(true);\n      return this.finishNode(node, \"TSTypeQuery\");\n    };\n\n    _proto.tsParseTypeParameter = function tsParseTypeParameter() {\n      var node = this.startNode();\n      node.name = this.parseIdentifierName(node.start);\n      node.constraint = this.tsEatThenParseType(types._extends);\n      node.default = this.tsEatThenParseType(types.eq);\n      return this.finishNode(node, \"TSTypeParameter\");\n    };\n\n    _proto.tsTryParseTypeParameters = function tsTryParseTypeParameters() {\n      if (this.isRelational(\"<\")) {\n        return this.tsParseTypeParameters();\n      }\n    };\n\n    _proto.tsParseTypeParameters = function tsParseTypeParameters() {\n      var node = this.startNode();\n\n      if (this.isRelational(\"<\") || this.match(types.jsxTagStart)) {\n        this.next();\n      } else {\n        this.unexpected();\n      }\n\n      node.params = this.tsParseBracketedList(\"TypeParametersOrArguments\", this.tsParseTypeParameter.bind(this), false, true);\n      return this.finishNode(node, \"TSTypeParameterDeclaration\");\n    };\n\n    _proto.tsFillSignature = function tsFillSignature(returnToken, signature) {\n      var returnTokenRequired = returnToken === types.arrow;\n      signature.typeParameters = this.tsTryParseTypeParameters();\n      this.expect(types.parenL);\n      signature.parameters = this.tsParseBindingListForSignature();\n\n      if (returnTokenRequired) {\n        signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken);\n      } else if (this.match(returnToken)) {\n        signature.typeAnnotation = this.tsParseTypeOrTypePredicateAnnotation(returnToken);\n      }\n    };\n\n    _proto.tsParseBindingListForSignature = function tsParseBindingListForSignature() {\n      var _this = this;\n\n      return this.parseBindingList(types.parenR).map(function (pattern) {\n        if (pattern.type !== \"Identifier\" && pattern.type !== \"RestElement\") {\n          throw _this.unexpected(pattern.start, \"Name in a signature must be an Identifier.\");\n        }\n\n        return pattern;\n      });\n    };\n\n    _proto.tsParseTypeMemberSemicolon = function tsParseTypeMemberSemicolon() {\n      if (!this.eat(types.comma)) {\n        this.semicolon();\n      }\n    };\n\n    _proto.tsParseSignatureMember = function tsParseSignatureMember(kind) {\n      var node = this.startNode();\n\n      if (kind === \"TSConstructSignatureDeclaration\") {\n        this.expect(types._new);\n      }\n\n      this.tsFillSignature(types.colon, node);\n      this.tsParseTypeMemberSemicolon();\n      return this.finishNode(node, kind);\n    };\n\n    _proto.tsIsUnambiguouslyIndexSignature = function tsIsUnambiguouslyIndexSignature() {\n      this.next();\n      return this.eat(types.name) && this.match(types.colon);\n    };\n\n    _proto.tsTryParseIndexSignature = function tsTryParseIndexSignature(node) {\n      if (!(this.match(types.bracketL) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) {\n        return undefined;\n      }\n\n      this.expect(types.bracketL);\n      var id = this.parseIdentifier();\n      this.expect(types.colon);\n      id.typeAnnotation = this.tsParseTypeAnnotation(false);\n      this.expect(types.bracketR);\n      node.parameters = [id];\n      var type = this.tsTryParseTypeAnnotation();\n      if (type) node.typeAnnotation = type;\n      this.tsParseTypeMemberSemicolon();\n      return this.finishNode(node, \"TSIndexSignature\");\n    };\n\n    _proto.tsParsePropertyOrMethodSignature = function tsParsePropertyOrMethodSignature(node, readonly) {\n      this.parsePropertyName(node);\n      if (this.eat(types.question)) node.optional = true;\n      var nodeAny = node;\n\n      if (!readonly && (this.match(types.parenL) || this.isRelational(\"<\"))) {\n        var method = nodeAny;\n        this.tsFillSignature(types.colon, method);\n        this.tsParseTypeMemberSemicolon();\n        return this.finishNode(method, \"TSMethodSignature\");\n      } else {\n        var property = nodeAny;\n        if (readonly) property.readonly = true;\n        var type = this.tsTryParseTypeAnnotation();\n        if (type) property.typeAnnotation = type;\n        this.tsParseTypeMemberSemicolon();\n        return this.finishNode(property, \"TSPropertySignature\");\n      }\n    };\n\n    _proto.tsParseTypeMember = function tsParseTypeMember() {\n      if (this.match(types.parenL) || this.isRelational(\"<\")) {\n        return this.tsParseSignatureMember(\"TSCallSignatureDeclaration\");\n      }\n\n      if (this.match(types._new) && this.tsLookAhead(this.tsIsStartOfConstructSignature.bind(this))) {\n        return this.tsParseSignatureMember(\"TSConstructSignatureDeclaration\");\n      }\n\n      var node = this.startNode();\n      var readonly = !!this.tsParseModifier([\"readonly\"]);\n      var idx = this.tsTryParseIndexSignature(node);\n\n      if (idx) {\n        if (readonly) node.readonly = true;\n        return idx;\n      }\n\n      return this.tsParsePropertyOrMethodSignature(node, readonly);\n    };\n\n    _proto.tsIsStartOfConstructSignature = function tsIsStartOfConstructSignature() {\n      this.next();\n      return this.match(types.parenL) || this.isRelational(\"<\");\n    };\n\n    _proto.tsParseTypeLiteral = function tsParseTypeLiteral() {\n      var node = this.startNode();\n      node.members = this.tsParseObjectTypeMembers();\n      return this.finishNode(node, \"TSTypeLiteral\");\n    };\n\n    _proto.tsParseObjectTypeMembers = function tsParseObjectTypeMembers() {\n      this.expect(types.braceL);\n      var members = this.tsParseList(\"TypeMembers\", this.tsParseTypeMember.bind(this));\n      this.expect(types.braceR);\n      return members;\n    };\n\n    _proto.tsIsStartOfMappedType = function tsIsStartOfMappedType() {\n      this.next();\n\n      if (this.eat(types.plusMin)) {\n        return this.isContextual(\"readonly\");\n      }\n\n      if (this.isContextual(\"readonly\")) {\n        this.next();\n      }\n\n      if (!this.match(types.bracketL)) {\n        return false;\n      }\n\n      this.next();\n\n      if (!this.tsIsIdentifier()) {\n        return false;\n      }\n\n      this.next();\n      return this.match(types._in);\n    };\n\n    _proto.tsParseMappedTypeParameter = function tsParseMappedTypeParameter() {\n      var node = this.startNode();\n      node.name = this.parseIdentifierName(node.start);\n      node.constraint = this.tsExpectThenParseType(types._in);\n      return this.finishNode(node, \"TSTypeParameter\");\n    };\n\n    _proto.tsParseMappedType = function tsParseMappedType() {\n      var node = this.startNode();\n      this.expect(types.braceL);\n\n      if (this.match(types.plusMin)) {\n        node.readonly = this.state.value;\n        this.next();\n        this.expectContextual(\"readonly\");\n      } else if (this.eatContextual(\"readonly\")) {\n        node.readonly = true;\n      }\n\n      this.expect(types.bracketL);\n      node.typeParameter = this.tsParseMappedTypeParameter();\n      this.expect(types.bracketR);\n\n      if (this.match(types.plusMin)) {\n        node.optional = this.state.value;\n        this.next();\n        this.expect(types.question);\n      } else if (this.eat(types.question)) {\n        node.optional = true;\n      }\n\n      node.typeAnnotation = this.tsTryParseType();\n      this.semicolon();\n      this.expect(types.braceR);\n      return this.finishNode(node, \"TSMappedType\");\n    };\n\n    _proto.tsParseTupleType = function tsParseTupleType() {\n      var node = this.startNode();\n      node.elementTypes = this.tsParseBracketedList(\"TupleElementTypes\", this.tsParseType.bind(this), true, false);\n      return this.finishNode(node, \"TSTupleType\");\n    };\n\n    _proto.tsParseParenthesizedType = function tsParseParenthesizedType() {\n      var node = this.startNode();\n      this.expect(types.parenL);\n      node.typeAnnotation = this.tsParseType();\n      this.expect(types.parenR);\n      return this.finishNode(node, \"TSParenthesizedType\");\n    };\n\n    _proto.tsParseFunctionOrConstructorType = function tsParseFunctionOrConstructorType(type) {\n      var node = this.startNode();\n\n      if (type === \"TSConstructorType\") {\n        this.expect(types._new);\n      }\n\n      this.tsFillSignature(types.arrow, node);\n      return this.finishNode(node, type);\n    };\n\n    _proto.tsParseLiteralTypeNode = function tsParseLiteralTypeNode() {\n      var _this2 = this;\n\n      var node = this.startNode();\n\n      node.literal = function () {\n        switch (_this2.state.type) {\n          case types.num:\n            return _this2.parseLiteral(_this2.state.value, \"NumericLiteral\");\n\n          case types.string:\n            return _this2.parseLiteral(_this2.state.value, \"StringLiteral\");\n\n          case types._true:\n          case types._false:\n            return _this2.parseBooleanLiteral();\n\n          default:\n            throw _this2.unexpected();\n        }\n      }();\n\n      return this.finishNode(node, \"TSLiteralType\");\n    };\n\n    _proto.tsParseNonArrayType = function tsParseNonArrayType() {\n      switch (this.state.type) {\n        case types.name:\n        case types._void:\n        case types._null:\n          {\n            var type = this.match(types._void) ? \"TSVoidKeyword\" : this.match(types._null) ? \"TSNullKeyword\" : keywordTypeFromName(this.state.value);\n\n            if (type !== undefined && this.lookahead().type !== types.dot) {\n              var node = this.startNode();\n              this.next();\n              return this.finishNode(node, type);\n            }\n\n            return this.tsParseTypeReference();\n          }\n\n        case types.string:\n        case types.num:\n        case types._true:\n        case types._false:\n          return this.tsParseLiteralTypeNode();\n\n        case types.plusMin:\n          if (this.state.value === \"-\") {\n            var _node = this.startNode();\n\n            this.next();\n\n            if (!this.match(types.num)) {\n              throw this.unexpected();\n            }\n\n            _node.literal = this.parseLiteral(-this.state.value, \"NumericLiteral\", _node.start, _node.loc.start);\n            return this.finishNode(_node, \"TSLiteralType\");\n          }\n\n          break;\n\n        case types._this:\n          {\n            var thisKeyword = this.tsParseThisTypeNode();\n\n            if (this.isContextual(\"is\") && !this.hasPrecedingLineBreak()) {\n              return this.tsParseThisTypePredicate(thisKeyword);\n            } else {\n              return thisKeyword;\n            }\n          }\n\n        case types._typeof:\n          return this.tsParseTypeQuery();\n\n        case types.braceL:\n          return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral();\n\n        case types.bracketL:\n          return this.tsParseTupleType();\n\n        case types.parenL:\n          return this.tsParseParenthesizedType();\n      }\n\n      throw this.unexpected();\n    };\n\n    _proto.tsParseArrayTypeOrHigher = function tsParseArrayTypeOrHigher() {\n      var type = this.tsParseNonArrayType();\n\n      while (!this.hasPrecedingLineBreak() && this.eat(types.bracketL)) {\n        if (this.match(types.bracketR)) {\n          var node = this.startNodeAtNode(type);\n          node.elementType = type;\n          this.expect(types.bracketR);\n          type = this.finishNode(node, \"TSArrayType\");\n        } else {\n          var _node2 = this.startNodeAtNode(type);\n\n          _node2.objectType = type;\n          _node2.indexType = this.tsParseType();\n          this.expect(types.bracketR);\n          type = this.finishNode(_node2, \"TSIndexedAccessType\");\n        }\n      }\n\n      return type;\n    };\n\n    _proto.tsParseTypeOperator = function tsParseTypeOperator(operator) {\n      var node = this.startNode();\n      this.expectContextual(operator);\n      node.operator = operator;\n      node.typeAnnotation = this.tsParseTypeOperatorOrHigher();\n      return this.finishNode(node, \"TSTypeOperator\");\n    };\n\n    _proto.tsParseInferType = function tsParseInferType() {\n      var node = this.startNode();\n      this.expectContextual(\"infer\");\n      var typeParameter = this.startNode();\n      typeParameter.name = this.parseIdentifierName(typeParameter.start);\n      node.typeParameter = this.finishNode(typeParameter, \"TSTypeParameter\");\n      return this.finishNode(node, \"TSInferType\");\n    };\n\n    _proto.tsParseTypeOperatorOrHigher = function tsParseTypeOperatorOrHigher() {\n      var _this3 = this;\n\n      var operator = [\"keyof\", \"unique\"].find(function (kw) {\n        return _this3.isContextual(kw);\n      });\n      return operator ? this.tsParseTypeOperator(operator) : this.isContextual(\"infer\") ? this.tsParseInferType() : this.tsParseArrayTypeOrHigher();\n    };\n\n    _proto.tsParseUnionOrIntersectionType = function tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {\n      this.eat(operator);\n      var type = parseConstituentType();\n\n      if (this.match(operator)) {\n        var types$$1 = [type];\n\n        while (this.eat(operator)) {\n          types$$1.push(parseConstituentType());\n        }\n\n        var node = this.startNodeAtNode(type);\n        node.types = types$$1;\n        type = this.finishNode(node, kind);\n      }\n\n      return type;\n    };\n\n    _proto.tsParseIntersectionTypeOrHigher = function tsParseIntersectionTypeOrHigher() {\n      return this.tsParseUnionOrIntersectionType(\"TSIntersectionType\", this.tsParseTypeOperatorOrHigher.bind(this), types.bitwiseAND);\n    };\n\n    _proto.tsParseUnionTypeOrHigher = function tsParseUnionTypeOrHigher() {\n      return this.tsParseUnionOrIntersectionType(\"TSUnionType\", this.tsParseIntersectionTypeOrHigher.bind(this), types.bitwiseOR);\n    };\n\n    _proto.tsIsStartOfFunctionType = function tsIsStartOfFunctionType() {\n      if (this.isRelational(\"<\")) {\n        return true;\n      }\n\n      return this.match(types.parenL) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this));\n    };\n\n    _proto.tsSkipParameterStart = function tsSkipParameterStart() {\n      if (this.match(types.name) || this.match(types._this)) {\n        this.next();\n        return true;\n      }\n\n      return false;\n    };\n\n    _proto.tsIsUnambiguouslyStartOfFunctionType = function tsIsUnambiguouslyStartOfFunctionType() {\n      this.next();\n\n      if (this.match(types.parenR) || this.match(types.ellipsis)) {\n        return true;\n      }\n\n      if (this.tsSkipParameterStart()) {\n        if (this.match(types.colon) || this.match(types.comma) || this.match(types.question) || this.match(types.eq)) {\n          return true;\n        }\n\n        if (this.match(types.parenR)) {\n          this.next();\n\n          if (this.match(types.arrow)) {\n            return true;\n          }\n        }\n      }\n\n      return false;\n    };\n\n    _proto.tsParseTypeOrTypePredicateAnnotation = function tsParseTypeOrTypePredicateAnnotation(returnToken) {\n      var _this4 = this;\n\n      return this.tsInType(function () {\n        var t = _this4.startNode();\n\n        _this4.expect(returnToken);\n\n        var typePredicateVariable = _this4.tsIsIdentifier() && _this4.tsTryParse(_this4.tsParseTypePredicatePrefix.bind(_this4));\n\n        if (!typePredicateVariable) {\n          return _this4.tsParseTypeAnnotation(false, t);\n        }\n\n        var type = _this4.tsParseTypeAnnotation(false);\n\n        var node = _this4.startNodeAtNode(typePredicateVariable);\n\n        node.parameterName = typePredicateVariable;\n        node.typeAnnotation = type;\n        t.typeAnnotation = _this4.finishNode(node, \"TSTypePredicate\");\n        return _this4.finishNode(t, \"TSTypeAnnotation\");\n      });\n    };\n\n    _proto.tsTryParseTypeOrTypePredicateAnnotation = function tsTryParseTypeOrTypePredicateAnnotation() {\n      return this.match(types.colon) ? this.tsParseTypeOrTypePredicateAnnotation(types.colon) : undefined;\n    };\n\n    _proto.tsTryParseTypeAnnotation = function tsTryParseTypeAnnotation() {\n      return this.match(types.colon) ? this.tsParseTypeAnnotation() : undefined;\n    };\n\n    _proto.tsTryParseType = function tsTryParseType() {\n      return this.tsEatThenParseType(types.colon);\n    };\n\n    _proto.tsParseTypePredicatePrefix = function tsParseTypePredicatePrefix() {\n      var id = this.parseIdentifier();\n\n      if (this.isContextual(\"is\") && !this.hasPrecedingLineBreak()) {\n        this.next();\n        return id;\n      }\n    };\n\n    _proto.tsParseTypeAnnotation = function tsParseTypeAnnotation(eatColon, t) {\n      var _this5 = this;\n\n      if (eatColon === void 0) {\n        eatColon = true;\n      }\n\n      if (t === void 0) {\n        t = this.startNode();\n      }\n\n      this.tsInType(function () {\n        if (eatColon) _this5.expect(types.colon);\n        t.typeAnnotation = _this5.tsParseType();\n      });\n      return this.finishNode(t, \"TSTypeAnnotation\");\n    };\n\n    _proto.tsParseType = function tsParseType() {\n      assert(this.state.inType);\n      var type = this.tsParseNonConditionalType();\n\n      if (this.hasPrecedingLineBreak() || !this.eat(types._extends)) {\n        return type;\n      }\n\n      var node = this.startNodeAtNode(type);\n      node.checkType = type;\n      node.extendsType = this.tsParseNonConditionalType();\n      this.expect(types.question);\n      node.trueType = this.tsParseType();\n      this.expect(types.colon);\n      node.falseType = this.tsParseType();\n      return this.finishNode(node, \"TSConditionalType\");\n    };\n\n    _proto.tsParseNonConditionalType = function tsParseNonConditionalType() {\n      if (this.tsIsStartOfFunctionType()) {\n        return this.tsParseFunctionOrConstructorType(\"TSFunctionType\");\n      }\n\n      if (this.match(types._new)) {\n        return this.tsParseFunctionOrConstructorType(\"TSConstructorType\");\n      }\n\n      return this.tsParseUnionTypeOrHigher();\n    };\n\n    _proto.tsParseTypeAssertion = function tsParseTypeAssertion() {\n      var _this6 = this;\n\n      var node = this.startNode();\n      node.typeAnnotation = this.tsInType(function () {\n        return _this6.tsParseType();\n      });\n      this.expectRelational(\">\");\n      node.expression = this.parseMaybeUnary();\n      return this.finishNode(node, \"TSTypeAssertion\");\n    };\n\n    _proto.tsParseHeritageClause = function tsParseHeritageClause() {\n      return this.tsParseDelimitedList(\"HeritageClauseElement\", this.tsParseExpressionWithTypeArguments.bind(this));\n    };\n\n    _proto.tsParseExpressionWithTypeArguments = function tsParseExpressionWithTypeArguments() {\n      var node = this.startNode();\n      node.expression = this.tsParseEntityName(false);\n\n      if (this.isRelational(\"<\")) {\n        node.typeParameters = this.tsParseTypeArguments();\n      }\n\n      return this.finishNode(node, \"TSExpressionWithTypeArguments\");\n    };\n\n    _proto.tsParseInterfaceDeclaration = function tsParseInterfaceDeclaration(node) {\n      node.id = this.parseIdentifier();\n      node.typeParameters = this.tsTryParseTypeParameters();\n\n      if (this.eat(types._extends)) {\n        node.extends = this.tsParseHeritageClause();\n      }\n\n      var body = this.startNode();\n      body.body = this.tsParseObjectTypeMembers();\n      node.body = this.finishNode(body, \"TSInterfaceBody\");\n      return this.finishNode(node, \"TSInterfaceDeclaration\");\n    };\n\n    _proto.tsParseTypeAliasDeclaration = function tsParseTypeAliasDeclaration(node) {\n      node.id = this.parseIdentifier();\n      node.typeParameters = this.tsTryParseTypeParameters();\n      node.typeAnnotation = this.tsExpectThenParseType(types.eq);\n      this.semicolon();\n      return this.finishNode(node, \"TSTypeAliasDeclaration\");\n    };\n\n    _proto.tsInNoContext = function tsInNoContext(cb) {\n      var oldContext = this.state.context;\n      this.state.context = [oldContext[0]];\n\n      try {\n        return cb();\n      } finally {\n        this.state.context = oldContext;\n      }\n    };\n\n    _proto.tsInType = function tsInType(cb) {\n      var oldInType = this.state.inType;\n      this.state.inType = true;\n\n      try {\n        return cb();\n      } finally {\n        this.state.inType = oldInType;\n      }\n    };\n\n    _proto.tsEatThenParseType = function tsEatThenParseType(token) {\n      return !this.match(token) ? undefined : this.tsNextThenParseType();\n    };\n\n    _proto.tsExpectThenParseType = function tsExpectThenParseType(token) {\n      var _this7 = this;\n\n      return this.tsDoThenParseType(function () {\n        return _this7.expect(token);\n      });\n    };\n\n    _proto.tsNextThenParseType = function tsNextThenParseType() {\n      var _this8 = this;\n\n      return this.tsDoThenParseType(function () {\n        return _this8.next();\n      });\n    };\n\n    _proto.tsDoThenParseType = function tsDoThenParseType(cb) {\n      var _this9 = this;\n\n      return this.tsInType(function () {\n        cb();\n        return _this9.tsParseType();\n      });\n    };\n\n    _proto.tsParseEnumMember = function tsParseEnumMember() {\n      var node = this.startNode();\n      node.id = this.match(types.string) ? this.parseLiteral(this.state.value, \"StringLiteral\") : this.parseIdentifier(true);\n\n      if (this.eat(types.eq)) {\n        node.initializer = this.parseMaybeAssign();\n      }\n\n      return this.finishNode(node, \"TSEnumMember\");\n    };\n\n    _proto.tsParseEnumDeclaration = function tsParseEnumDeclaration(node, isConst) {\n      if (isConst) node.const = true;\n      node.id = this.parseIdentifier();\n      this.expect(types.braceL);\n      node.members = this.tsParseDelimitedList(\"EnumMembers\", this.tsParseEnumMember.bind(this));\n      this.expect(types.braceR);\n      return this.finishNode(node, \"TSEnumDeclaration\");\n    };\n\n    _proto.tsParseModuleBlock = function tsParseModuleBlock() {\n      var node = this.startNode();\n      this.expect(types.braceL);\n      this.parseBlockOrModuleBlockBody(node.body = [], undefined, true, types.braceR);\n      return this.finishNode(node, \"TSModuleBlock\");\n    };\n\n    _proto.tsParseModuleOrNamespaceDeclaration = function tsParseModuleOrNamespaceDeclaration(node) {\n      node.id = this.parseIdentifier();\n\n      if (this.eat(types.dot)) {\n        var inner = this.startNode();\n        this.tsParseModuleOrNamespaceDeclaration(inner);\n        node.body = inner;\n      } else {\n        node.body = this.tsParseModuleBlock();\n      }\n\n      return this.finishNode(node, \"TSModuleDeclaration\");\n    };\n\n    _proto.tsParseAmbientExternalModuleDeclaration = function tsParseAmbientExternalModuleDeclaration(node) {\n      if (this.isContextual(\"global\")) {\n        node.global = true;\n        node.id = this.parseIdentifier();\n      } else if (this.match(types.string)) {\n        node.id = this.parseExprAtom();\n      } else {\n        this.unexpected();\n      }\n\n      if (this.match(types.braceL)) {\n        node.body = this.tsParseModuleBlock();\n      } else {\n        this.semicolon();\n      }\n\n      return this.finishNode(node, \"TSModuleDeclaration\");\n    };\n\n    _proto.tsParseImportEqualsDeclaration = function tsParseImportEqualsDeclaration(node, isExport) {\n      node.isExport = isExport || false;\n      node.id = this.parseIdentifier();\n      this.expect(types.eq);\n      node.moduleReference = this.tsParseModuleReference();\n      this.semicolon();\n      return this.finishNode(node, \"TSImportEqualsDeclaration\");\n    };\n\n    _proto.tsIsExternalModuleReference = function tsIsExternalModuleReference() {\n      return this.isContextual(\"require\") && this.lookahead().type === types.parenL;\n    };\n\n    _proto.tsParseModuleReference = function tsParseModuleReference() {\n      return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false);\n    };\n\n    _proto.tsParseExternalModuleReference = function tsParseExternalModuleReference() {\n      var node = this.startNode();\n      this.expectContextual(\"require\");\n      this.expect(types.parenL);\n\n      if (!this.match(types.string)) {\n        throw this.unexpected();\n      }\n\n      node.expression = this.parseLiteral(this.state.value, \"StringLiteral\");\n      this.expect(types.parenR);\n      return this.finishNode(node, \"TSExternalModuleReference\");\n    };\n\n    _proto.tsLookAhead = function tsLookAhead(f) {\n      var state = this.state.clone();\n      var res = f();\n      this.state = state;\n      return res;\n    };\n\n    _proto.tsTryParseAndCatch = function tsTryParseAndCatch(f) {\n      var state = this.state.clone();\n\n      try {\n        return f();\n      } catch (e) {\n        if (e instanceof SyntaxError) {\n          this.state = state;\n          return undefined;\n        }\n\n        throw e;\n      }\n    };\n\n    _proto.tsTryParse = function tsTryParse(f) {\n      var state = this.state.clone();\n      var result = f();\n\n      if (result !== undefined && result !== false) {\n        return result;\n      } else {\n        this.state = state;\n        return undefined;\n      }\n    };\n\n    _proto.nodeWithSamePosition = function nodeWithSamePosition(original, type) {\n      var node = this.startNodeAtNode(original);\n      node.type = type;\n      node.end = original.end;\n      node.loc.end = original.loc.end;\n\n      if (original.leadingComments) {\n        node.leadingComments = original.leadingComments;\n      }\n\n      if (original.trailingComments) {\n        node.trailingComments = original.trailingComments;\n      }\n\n      if (original.innerComments) node.innerComments = original.innerComments;\n      return node;\n    };\n\n    _proto.tsTryParseDeclare = function tsTryParseDeclare(nany) {\n      switch (this.state.type) {\n        case types._function:\n          this.next();\n          return this.parseFunction(nany, true);\n\n        case types._class:\n          return this.parseClass(nany, true, false);\n\n        case types._const:\n          if (this.match(types._const) && this.isLookaheadContextual(\"enum\")) {\n            this.expect(types._const);\n            this.expectContextual(\"enum\");\n            return this.tsParseEnumDeclaration(nany, true);\n          }\n\n        case types._var:\n        case types._let:\n          return this.parseVarStatement(nany, this.state.type);\n\n        case types.name:\n          {\n            var value = this.state.value;\n\n            if (value === \"global\") {\n              return this.tsParseAmbientExternalModuleDeclaration(nany);\n            } else {\n              return this.tsParseDeclaration(nany, value, true);\n            }\n          }\n      }\n    };\n\n    _proto.tsTryParseExportDeclaration = function tsTryParseExportDeclaration() {\n      return this.tsParseDeclaration(this.startNode(), this.state.value, true);\n    };\n\n    _proto.tsParseExpressionStatement = function tsParseExpressionStatement(node, expr) {\n      switch (expr.name) {\n        case \"declare\":\n          {\n            var declaration = this.tsTryParseDeclare(node);\n\n            if (declaration) {\n              declaration.declare = true;\n              return declaration;\n            }\n\n            break;\n          }\n\n        case \"global\":\n          if (this.match(types.braceL)) {\n            var mod = node;\n            mod.global = true;\n            mod.id = expr;\n            mod.body = this.tsParseModuleBlock();\n            return this.finishNode(mod, \"TSModuleDeclaration\");\n          }\n\n          break;\n\n        default:\n          return this.tsParseDeclaration(node, expr.name, false);\n      }\n    };\n\n    _proto.tsParseDeclaration = function tsParseDeclaration(node, value, next) {\n      switch (value) {\n        case \"abstract\":\n          if (next || this.match(types._class)) {\n            var cls = node;\n            cls.abstract = true;\n            if (next) this.next();\n            return this.parseClass(cls, true, false);\n          }\n\n          break;\n\n        case \"enum\":\n          if (next || this.match(types.name)) {\n            if (next) this.next();\n            return this.tsParseEnumDeclaration(node, false);\n          }\n\n          break;\n\n        case \"interface\":\n          if (next || this.match(types.name)) {\n            if (next) this.next();\n            return this.tsParseInterfaceDeclaration(node);\n          }\n\n          break;\n\n        case \"module\":\n          if (next) this.next();\n\n          if (this.match(types.string)) {\n            return this.tsParseAmbientExternalModuleDeclaration(node);\n          } else if (next || this.match(types.name)) {\n            return this.tsParseModuleOrNamespaceDeclaration(node);\n          }\n\n          break;\n\n        case \"namespace\":\n          if (next || this.match(types.name)) {\n            if (next) this.next();\n            return this.tsParseModuleOrNamespaceDeclaration(node);\n          }\n\n          break;\n\n        case \"type\":\n          if (next || this.match(types.name)) {\n            if (next) this.next();\n            return this.tsParseTypeAliasDeclaration(node);\n          }\n\n          break;\n      }\n    };\n\n    _proto.tsTryParseGenericAsyncArrowFunction = function tsTryParseGenericAsyncArrowFunction(startPos, startLoc) {\n      var _this10 = this;\n\n      var res = this.tsTryParseAndCatch(function () {\n        var node = _this10.startNodeAt(startPos, startLoc);\n\n        node.typeParameters = _this10.tsParseTypeParameters();\n\n        _superClass.prototype.parseFunctionParams.call(_this10, node);\n\n        node.returnType = _this10.tsTryParseTypeOrTypePredicateAnnotation();\n\n        _this10.expect(types.arrow);\n\n        return node;\n      });\n\n      if (!res) {\n        return undefined;\n      }\n\n      res.id = null;\n      res.generator = false;\n      res.expression = true;\n      res.async = true;\n      this.parseFunctionBody(res, true);\n      return this.finishNode(res, \"ArrowFunctionExpression\");\n    };\n\n    _proto.tsParseTypeArguments = function tsParseTypeArguments() {\n      var _this11 = this;\n\n      var node = this.startNode();\n      node.params = this.tsInType(function () {\n        return _this11.tsInNoContext(function () {\n          _this11.expectRelational(\"<\");\n\n          return _this11.tsParseDelimitedList(\"TypeParametersOrArguments\", _this11.tsParseType.bind(_this11));\n        });\n      });\n      this.state.exprAllowed = false;\n      this.expectRelational(\">\");\n      return this.finishNode(node, \"TSTypeParameterInstantiation\");\n    };\n\n    _proto.tsIsDeclarationStart = function tsIsDeclarationStart() {\n      if (this.match(types.name)) {\n        switch (this.state.value) {\n          case \"abstract\":\n          case \"declare\":\n          case \"enum\":\n          case \"interface\":\n          case \"module\":\n          case \"namespace\":\n          case \"type\":\n            return true;\n        }\n      }\n\n      return false;\n    };\n\n    _proto.isExportDefaultSpecifier = function isExportDefaultSpecifier() {\n      if (this.tsIsDeclarationStart()) return false;\n      return _superClass.prototype.isExportDefaultSpecifier.call(this);\n    };\n\n    _proto.parseAssignableListItem = function parseAssignableListItem(allowModifiers, decorators) {\n      var accessibility;\n      var readonly = false;\n\n      if (allowModifiers) {\n        accessibility = this.parseAccessModifier();\n        readonly = !!this.tsParseModifier([\"readonly\"]);\n      }\n\n      var left = this.parseMaybeDefault();\n      this.parseAssignableListItemTypes(left);\n      var elt = this.parseMaybeDefault(left.start, left.loc.start, left);\n\n      if (accessibility || readonly) {\n        var pp = this.startNodeAtNode(elt);\n\n        if (decorators.length) {\n          pp.decorators = decorators;\n        }\n\n        if (accessibility) pp.accessibility = accessibility;\n        if (readonly) pp.readonly = readonly;\n\n        if (elt.type !== \"Identifier\" && elt.type !== \"AssignmentPattern\") {\n          throw this.raise(pp.start, \"A parameter property may not be declared using a binding pattern.\");\n        }\n\n        pp.parameter = elt;\n        return this.finishNode(pp, \"TSParameterProperty\");\n      } else {\n        if (decorators.length) {\n          left.decorators = decorators;\n        }\n\n        return elt;\n      }\n    };\n\n    _proto.parseFunctionBodyAndFinish = function parseFunctionBodyAndFinish(node, type, allowExpressionBody) {\n      if (!allowExpressionBody && this.match(types.colon)) {\n        node.returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon);\n      }\n\n      var bodilessType = type === \"FunctionDeclaration\" ? \"TSDeclareFunction\" : type === \"ClassMethod\" ? \"TSDeclareMethod\" : undefined;\n\n      if (bodilessType && !this.match(types.braceL) && this.isLineTerminator()) {\n        this.finishNode(node, bodilessType);\n        return;\n      }\n\n      _superClass.prototype.parseFunctionBodyAndFinish.call(this, node, type, allowExpressionBody);\n    };\n\n    _proto.parseSubscript = function parseSubscript(base, startPos, startLoc, noCalls, state) {\n      var _this12 = this;\n\n      if (!this.hasPrecedingLineBreak() && this.match(types.bang)) {\n        this.state.exprAllowed = false;\n        this.next();\n        var nonNullExpression = this.startNodeAt(startPos, startLoc);\n        nonNullExpression.expression = base;\n        return this.finishNode(nonNullExpression, \"TSNonNullExpression\");\n      }\n\n      var result = this.tsTryParseAndCatch(function () {\n        if (_this12.isRelational(\"<\")) {\n          if (!noCalls && _this12.atPossibleAsync(base)) {\n            var asyncArrowFn = _this12.tsTryParseGenericAsyncArrowFunction(startPos, startLoc);\n\n            if (asyncArrowFn) {\n              return asyncArrowFn;\n            }\n          }\n\n          var node = _this12.startNodeAt(startPos, startLoc);\n\n          node.callee = base;\n\n          var typeArguments = _this12.tsParseTypeArguments();\n\n          if (typeArguments) {\n            if (!noCalls && _this12.eat(types.parenL)) {\n              node.arguments = _this12.parseCallExpressionArguments(types.parenR, false);\n              node.typeParameters = typeArguments;\n              return _this12.finishCallExpression(node);\n            } else if (_this12.match(types.backQuote)) {\n              return _this12.parseTaggedTemplateExpression(startPos, startLoc, base, state, typeArguments);\n            }\n          }\n        }\n\n        _this12.unexpected();\n      });\n      if (result) return result;\n      return _superClass.prototype.parseSubscript.call(this, base, startPos, startLoc, noCalls, state);\n    };\n\n    _proto.parseNewArguments = function parseNewArguments(node) {\n      var _this13 = this;\n\n      if (this.isRelational(\"<\")) {\n        var typeParameters = this.tsTryParseAndCatch(function () {\n          var args = _this13.tsParseTypeArguments();\n\n          if (!_this13.match(types.parenL)) _this13.unexpected();\n          return args;\n        });\n\n        if (typeParameters) {\n          node.typeParameters = typeParameters;\n        }\n      }\n\n      _superClass.prototype.parseNewArguments.call(this, node);\n    };\n\n    _proto.parseExprOp = function parseExprOp(left, leftStartPos, leftStartLoc, minPrec, noIn) {\n      if (nonNull(types._in.binop) > minPrec && !this.hasPrecedingLineBreak() && this.isContextual(\"as\")) {\n        var node = this.startNodeAt(leftStartPos, leftStartLoc);\n        node.expression = left;\n        node.typeAnnotation = this.tsNextThenParseType();\n        this.finishNode(node, \"TSAsExpression\");\n        return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn);\n      }\n\n      return _superClass.prototype.parseExprOp.call(this, left, leftStartPos, leftStartLoc, minPrec, noIn);\n    };\n\n    _proto.checkReservedWord = function checkReservedWord(word, startLoc, checkKeywords, isBinding) {};\n\n    _proto.checkDuplicateExports = function checkDuplicateExports() {};\n\n    _proto.parseImport = function parseImport(node) {\n      if (this.match(types.name) && this.lookahead().type === types.eq) {\n        return this.tsParseImportEqualsDeclaration(node);\n      }\n\n      return _superClass.prototype.parseImport.call(this, node);\n    };\n\n    _proto.parseExport = function parseExport(node) {\n      if (this.match(types._import)) {\n        this.expect(types._import);\n        return this.tsParseImportEqualsDeclaration(node, true);\n      } else if (this.eat(types.eq)) {\n        var assign = node;\n        assign.expression = this.parseExpression();\n        this.semicolon();\n        return this.finishNode(assign, \"TSExportAssignment\");\n      } else if (this.eatContextual(\"as\")) {\n        var decl = node;\n        this.expectContextual(\"namespace\");\n        decl.id = this.parseIdentifier();\n        this.semicolon();\n        return this.finishNode(decl, \"TSNamespaceExportDeclaration\");\n      } else {\n        return _superClass.prototype.parseExport.call(this, node);\n      }\n    };\n\n    _proto.isAbstractClass = function isAbstractClass() {\n      return this.isContextual(\"abstract\") && this.lookahead().type === types._class;\n    };\n\n    _proto.parseExportDefaultExpression = function parseExportDefaultExpression() {\n      if (this.isAbstractClass()) {\n        var cls = this.startNode();\n        this.next();\n        this.parseClass(cls, true, true);\n        cls.abstract = true;\n        return cls;\n      }\n\n      if (this.state.value === \"interface\") {\n        var result = this.tsParseDeclaration(this.startNode(), this.state.value, true);\n        if (result) return result;\n      }\n\n      return _superClass.prototype.parseExportDefaultExpression.call(this);\n    };\n\n    _proto.parseStatementContent = function parseStatementContent(declaration, topLevel) {\n      if (this.state.type === types._const) {\n        var ahead = this.lookahead();\n\n        if (ahead.type === types.name && ahead.value === \"enum\") {\n          var node = this.startNode();\n          this.expect(types._const);\n          this.expectContextual(\"enum\");\n          return this.tsParseEnumDeclaration(node, true);\n        }\n      }\n\n      return _superClass.prototype.parseStatementContent.call(this, declaration, topLevel);\n    };\n\n    _proto.parseAccessModifier = function parseAccessModifier() {\n      return this.tsParseModifier([\"public\", \"protected\", \"private\"]);\n    };\n\n    _proto.parseClassMember = function parseClassMember(classBody, member, state) {\n      var accessibility = this.parseAccessModifier();\n      if (accessibility) member.accessibility = accessibility;\n\n      _superClass.prototype.parseClassMember.call(this, classBody, member, state);\n    };\n\n    _proto.parseClassMemberWithIsStatic = function parseClassMemberWithIsStatic(classBody, member, state, isStatic) {\n      var methodOrProp = member;\n      var prop = member;\n      var propOrIdx = member;\n      var abstract = false,\n          readonly = false;\n      var mod = this.tsParseModifier([\"abstract\", \"readonly\"]);\n\n      switch (mod) {\n        case \"readonly\":\n          readonly = true;\n          abstract = !!this.tsParseModifier([\"abstract\"]);\n          break;\n\n        case \"abstract\":\n          abstract = true;\n          readonly = !!this.tsParseModifier([\"readonly\"]);\n          break;\n      }\n\n      if (abstract) methodOrProp.abstract = true;\n      if (readonly) propOrIdx.readonly = true;\n\n      if (!abstract && !isStatic && !methodOrProp.accessibility) {\n        var idx = this.tsTryParseIndexSignature(member);\n\n        if (idx) {\n          classBody.body.push(idx);\n          return;\n        }\n      }\n\n      if (readonly) {\n        methodOrProp.static = isStatic;\n        this.parseClassPropertyName(prop);\n        this.parsePostMemberNameModifiers(methodOrProp);\n        this.pushClassProperty(classBody, prop);\n        return;\n      }\n\n      _superClass.prototype.parseClassMemberWithIsStatic.call(this, classBody, member, state, isStatic);\n    };\n\n    _proto.parsePostMemberNameModifiers = function parsePostMemberNameModifiers(methodOrProp) {\n      var optional = this.eat(types.question);\n      if (optional) methodOrProp.optional = true;\n    };\n\n    _proto.parseExpressionStatement = function parseExpressionStatement(node, expr) {\n      var decl = expr.type === \"Identifier\" ? this.tsParseExpressionStatement(node, expr) : undefined;\n      return decl || _superClass.prototype.parseExpressionStatement.call(this, node, expr);\n    };\n\n    _proto.shouldParseExportDeclaration = function shouldParseExportDeclaration() {\n      if (this.tsIsDeclarationStart()) return true;\n      return _superClass.prototype.shouldParseExportDeclaration.call(this);\n    };\n\n    _proto.parseConditional = function parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos) {\n      if (!refNeedsArrowPos || !this.match(types.question)) {\n        return _superClass.prototype.parseConditional.call(this, expr, noIn, startPos, startLoc, refNeedsArrowPos);\n      }\n\n      var state = this.state.clone();\n\n      try {\n        return _superClass.prototype.parseConditional.call(this, expr, noIn, startPos, startLoc);\n      } catch (err) {\n        if (!(err instanceof SyntaxError)) {\n          throw err;\n        }\n\n        this.state = state;\n        refNeedsArrowPos.start = err.pos || this.state.start;\n        return expr;\n      }\n    };\n\n    _proto.parseParenItem = function parseParenItem(node, startPos, startLoc) {\n      node = _superClass.prototype.parseParenItem.call(this, node, startPos, startLoc);\n\n      if (this.eat(types.question)) {\n        node.optional = true;\n      }\n\n      if (this.match(types.colon)) {\n        var typeCastNode = this.startNodeAt(startPos, startLoc);\n        typeCastNode.expression = node;\n        typeCastNode.typeAnnotation = this.tsParseTypeAnnotation();\n        return this.finishNode(typeCastNode, \"TSTypeCastExpression\");\n      }\n\n      return node;\n    };\n\n    _proto.parseExportDeclaration = function parseExportDeclaration(node) {\n      var isDeclare = this.eatContextual(\"declare\");\n      var declaration;\n\n      if (this.match(types.name)) {\n        declaration = this.tsTryParseExportDeclaration();\n      }\n\n      if (!declaration) {\n        declaration = _superClass.prototype.parseExportDeclaration.call(this, node);\n      }\n\n      if (declaration && isDeclare) {\n        declaration.declare = true;\n      }\n\n      return declaration;\n    };\n\n    _proto.parseClassId = function parseClassId(node, isStatement, optionalId) {\n      if ((!isStatement || optionalId) && this.isContextual(\"implements\")) {\n        return;\n      }\n\n      _superClass.prototype.parseClassId.apply(this, arguments);\n\n      var typeParameters = this.tsTryParseTypeParameters();\n      if (typeParameters) node.typeParameters = typeParameters;\n    };\n\n    _proto.parseClassProperty = function parseClassProperty(node) {\n      if (!node.optional && this.eat(types.bang)) {\n        node.definite = true;\n      }\n\n      var type = this.tsTryParseTypeAnnotation();\n      if (type) node.typeAnnotation = type;\n      return _superClass.prototype.parseClassProperty.call(this, node);\n    };\n\n    _proto.pushClassMethod = function pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor) {\n      var typeParameters = this.tsTryParseTypeParameters();\n      if (typeParameters) method.typeParameters = typeParameters;\n\n      _superClass.prototype.pushClassMethod.call(this, classBody, method, isGenerator, isAsync, isConstructor);\n    };\n\n    _proto.pushClassPrivateMethod = function pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {\n      var typeParameters = this.tsTryParseTypeParameters();\n      if (typeParameters) method.typeParameters = typeParameters;\n\n      _superClass.prototype.pushClassPrivateMethod.call(this, classBody, method, isGenerator, isAsync);\n    };\n\n    _proto.parseClassSuper = function parseClassSuper(node) {\n      _superClass.prototype.parseClassSuper.call(this, node);\n\n      if (node.superClass && this.isRelational(\"<\")) {\n        node.superTypeParameters = this.tsParseTypeArguments();\n      }\n\n      if (this.eatContextual(\"implements\")) {\n        node.implements = this.tsParseHeritageClause();\n      }\n    };\n\n    _proto.parseObjPropValue = function parseObjPropValue(prop) {\n      var _superClass$prototype;\n\n      var typeParameters = this.tsTryParseTypeParameters();\n      if (typeParameters) prop.typeParameters = typeParameters;\n\n      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n        args[_key - 1] = arguments[_key];\n      }\n\n      (_superClass$prototype = _superClass.prototype.parseObjPropValue).call.apply(_superClass$prototype, [this, prop].concat(args));\n    };\n\n    _proto.parseFunctionParams = function parseFunctionParams(node, allowModifiers) {\n      var typeParameters = this.tsTryParseTypeParameters();\n      if (typeParameters) node.typeParameters = typeParameters;\n\n      _superClass.prototype.parseFunctionParams.call(this, node, allowModifiers);\n    };\n\n    _proto.parseVarHead = function parseVarHead(decl) {\n      _superClass.prototype.parseVarHead.call(this, decl);\n\n      if (decl.id.type === \"Identifier\" && this.eat(types.bang)) {\n        decl.definite = true;\n      }\n\n      var type = this.tsTryParseTypeAnnotation();\n\n      if (type) {\n        decl.id.typeAnnotation = type;\n        this.finishNode(decl.id, decl.id.type);\n      }\n    };\n\n    _proto.parseAsyncArrowFromCallExpression = function parseAsyncArrowFromCallExpression(node, call) {\n      if (this.match(types.colon)) {\n        node.returnType = this.tsParseTypeAnnotation();\n      }\n\n      return _superClass.prototype.parseAsyncArrowFromCallExpression.call(this, node, call);\n    };\n\n    _proto.parseMaybeAssign = function parseMaybeAssign() {\n      var jsxError;\n\n      for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n        args[_key2] = arguments[_key2];\n      }\n\n      if (this.match(types.jsxTagStart)) {\n        var context = this.curContext();\n        assert(context === types$1.j_oTag);\n        assert(this.state.context[this.state.context.length - 2] === types$1.j_expr);\n\n        var _state = this.state.clone();\n\n        try {\n          var _superClass$prototype2;\n\n          return (_superClass$prototype2 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype2, [this].concat(args));\n        } catch (err) {\n          if (!(err instanceof SyntaxError)) {\n            throw err;\n          }\n\n          this.state = _state;\n          assert(this.curContext() === types$1.j_oTag);\n          this.state.context.pop();\n          assert(this.curContext() === types$1.j_expr);\n          this.state.context.pop();\n          jsxError = err;\n        }\n      }\n\n      if (jsxError === undefined && !this.isRelational(\"<\")) {\n        var _superClass$prototype3;\n\n        return (_superClass$prototype3 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype3, [this].concat(args));\n      }\n\n      var arrowExpression;\n      var typeParameters;\n      var state = this.state.clone();\n\n      try {\n        var _superClass$prototype4;\n\n        typeParameters = this.tsParseTypeParameters();\n        arrowExpression = (_superClass$prototype4 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype4, [this].concat(args));\n\n        if (arrowExpression.type !== \"ArrowFunctionExpression\") {\n          this.unexpected();\n        }\n      } catch (err) {\n        var _superClass$prototype5;\n\n        if (!(err instanceof SyntaxError)) {\n          throw err;\n        }\n\n        if (jsxError) {\n          throw jsxError;\n        }\n\n        assert(!this.hasPlugin(\"jsx\"));\n        this.state = state;\n        return (_superClass$prototype5 = _superClass.prototype.parseMaybeAssign).call.apply(_superClass$prototype5, [this].concat(args));\n      }\n\n      if (typeParameters && typeParameters.params.length !== 0) {\n        this.resetStartLocationFromNode(arrowExpression, typeParameters.params[0]);\n      }\n\n      arrowExpression.typeParameters = typeParameters;\n      return arrowExpression;\n    };\n\n    _proto.parseMaybeUnary = function parseMaybeUnary(refShorthandDefaultPos) {\n      if (!this.hasPlugin(\"jsx\") && this.eatRelational(\"<\")) {\n        return this.tsParseTypeAssertion();\n      } else {\n        return _superClass.prototype.parseMaybeUnary.call(this, refShorthandDefaultPos);\n      }\n    };\n\n    _proto.parseArrow = function parseArrow(node) {\n      if (this.match(types.colon)) {\n        var state = this.state.clone();\n\n        try {\n          var returnType = this.tsParseTypeOrTypePredicateAnnotation(types.colon);\n          if (this.canInsertSemicolon()) this.unexpected();\n          if (!this.match(types.arrow)) this.unexpected();\n          node.returnType = returnType;\n        } catch (err) {\n          if (err instanceof SyntaxError) {\n            this.state = state;\n          } else {\n            throw err;\n          }\n        }\n      }\n\n      return _superClass.prototype.parseArrow.call(this, node);\n    };\n\n    _proto.parseAssignableListItemTypes = function parseAssignableListItemTypes(param) {\n      if (this.eat(types.question)) {\n        if (param.type !== \"Identifier\") {\n          throw this.raise(param.start, \"A binding pattern parameter cannot be optional in an implementation signature.\");\n        }\n\n        param.optional = true;\n      }\n\n      var type = this.tsTryParseTypeAnnotation();\n      if (type) param.typeAnnotation = type;\n      return this.finishNode(param, param.type);\n    };\n\n    _proto.toAssignable = function toAssignable(node, isBinding, contextDescription) {\n      switch (node.type) {\n        case \"TSTypeCastExpression\":\n          return _superClass.prototype.toAssignable.call(this, this.typeCastToParameter(node), isBinding, contextDescription);\n\n        case \"TSParameterProperty\":\n          return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription);\n\n        case \"TSAsExpression\":\n        case \"TSNonNullExpression\":\n        case \"TSTypeAssertion\":\n          node.expression = this.toAssignable(node.expression, isBinding, contextDescription);\n          return node;\n\n        default:\n          return _superClass.prototype.toAssignable.call(this, node, isBinding, contextDescription);\n      }\n    };\n\n    _proto.checkLVal = function checkLVal(expr, isBinding, checkClashes, contextDescription) {\n      switch (expr.type) {\n        case \"TSTypeCastExpression\":\n          return;\n\n        case \"TSParameterProperty\":\n          this.checkLVal(expr.parameter, isBinding, checkClashes, \"parameter property\");\n          return;\n\n        case \"TSAsExpression\":\n        case \"TSNonNullExpression\":\n        case \"TSTypeAssertion\":\n          this.checkLVal(expr.expression, isBinding, checkClashes, contextDescription);\n          return;\n\n        default:\n          _superClass.prototype.checkLVal.call(this, expr, isBinding, checkClashes, contextDescription);\n\n          return;\n      }\n    };\n\n    _proto.parseBindingAtom = function parseBindingAtom() {\n      switch (this.state.type) {\n        case types._this:\n          return this.parseIdentifier(true);\n\n        default:\n          return _superClass.prototype.parseBindingAtom.call(this);\n      }\n    };\n\n    _proto.isClassMethod = function isClassMethod() {\n      return this.isRelational(\"<\") || _superClass.prototype.isClassMethod.call(this);\n    };\n\n    _proto.isClassProperty = function isClassProperty() {\n      return this.match(types.bang) || this.match(types.colon) || _superClass.prototype.isClassProperty.call(this);\n    };\n\n    _proto.parseMaybeDefault = function parseMaybeDefault() {\n      var _superClass$prototype6;\n\n      for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n        args[_key3] = arguments[_key3];\n      }\n\n      var node = (_superClass$prototype6 = _superClass.prototype.parseMaybeDefault).call.apply(_superClass$prototype6, [this].concat(args));\n\n      if (node.type === \"AssignmentPattern\" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {\n        this.raise(node.typeAnnotation.start, \"Type annotations must come before default assignments, \" + \"e.g. instead of `age = 25: number` use `age: number = 25`\");\n      }\n\n      return node;\n    };\n\n    _proto.readToken = function readToken(code) {\n      if (this.state.inType && (code === 62 || code === 60)) {\n        return this.finishOp(types.relational, 1);\n      } else {\n        return _superClass.prototype.readToken.call(this, code);\n      }\n    };\n\n    _proto.toAssignableList = function toAssignableList(exprList, isBinding, contextDescription) {\n      for (var i = 0; i < exprList.length; i++) {\n        var expr = exprList[i];\n\n        if (expr && expr.type === \"TSTypeCastExpression\") {\n          exprList[i] = this.typeCastToParameter(expr);\n        }\n      }\n\n      return _superClass.prototype.toAssignableList.call(this, exprList, isBinding, contextDescription);\n    };\n\n    _proto.typeCastToParameter = function typeCastToParameter(node) {\n      node.expression.typeAnnotation = node.typeAnnotation;\n      return this.finishNodeAt(node.expression, node.expression.type, node.typeAnnotation.end, node.typeAnnotation.loc.end);\n    };\n\n    _proto.toReferencedList = function toReferencedList(exprList) {\n      for (var i = 0; i < exprList.length; i++) {\n        var expr = exprList[i];\n\n        if (expr && expr._exprListItem && expr.type === \"TsTypeCastExpression\") {\n          this.raise(expr.start, \"Did not expect a type annotation here.\");\n        }\n      }\n\n      return exprList;\n    };\n\n    _proto.shouldParseArrow = function shouldParseArrow() {\n      return this.match(types.colon) || _superClass.prototype.shouldParseArrow.call(this);\n    };\n\n    _proto.shouldParseAsyncArrow = function shouldParseAsyncArrow() {\n      return this.match(types.colon) || _superClass.prototype.shouldParseAsyncArrow.call(this);\n    };\n\n    _proto.canHaveLeadingDecorator = function canHaveLeadingDecorator() {\n      return _superClass.prototype.canHaveLeadingDecorator.call(this) || this.isAbstractClass();\n    };\n\n    _proto.jsxParseOpeningElementAfterName = function jsxParseOpeningElementAfterName(node) {\n      var _this14 = this;\n\n      var typeArguments = this.tsTryParseAndCatch(function () {\n        return _this14.tsParseTypeArguments();\n      });\n      if (typeArguments) node.typeParameters = typeArguments;\n      return _superClass.prototype.jsxParseOpeningElementAfterName.call(this, node);\n    };\n\n    return _class;\n  }(superClass);\n});\n\nfunction hasPlugin(plugins, name) {\n  return plugins.some(function (plugin) {\n    if (Array.isArray(plugin)) {\n      return plugin[0] === name;\n    } else {\n      return plugin === name;\n    }\n  });\n}\nfunction getPluginOption(plugins, name, option) {\n  var plugin = plugins.find(function (plugin) {\n    if (Array.isArray(plugin)) {\n      return plugin[0] === name;\n    } else {\n      return plugin === name;\n    }\n  });\n\n  if (plugin && Array.isArray(plugin)) {\n    return plugin[1][option];\n  }\n\n  return null;\n}\nvar PIPELINE_PROPOSALS = [\"minimal\"];\nfunction validatePlugins(plugins) {\n  if (hasPlugin(plugins, \"decorators\")) {\n    if (hasPlugin(plugins, \"decorators-legacy\")) {\n      throw new Error(\"Cannot use the decorators and decorators-legacy plugin together\");\n    }\n\n    var decoratorsBeforeExport = getPluginOption(plugins, \"decorators\", \"decoratorsBeforeExport\");\n\n    if (decoratorsBeforeExport == null) {\n      throw new Error(\"The 'decorators' plugin requires a 'decoratorsBeforeExport' option,\" + \" whose value must be a boolean. If you are migrating from\" + \" Babylon/Babel 6 or want to use the old decorators proposal, you\" + \" should use the 'decorators-legacy' plugin instead of 'decorators'.\");\n    } else if (typeof decoratorsBeforeExport !== \"boolean\") {\n      throw new Error(\"'decoratorsBeforeExport' must be a boolean.\");\n    }\n  }\n\n  if (hasPlugin(plugins, \"flow\") && hasPlugin(plugins, \"typescript\")) {\n    throw new Error(\"Cannot combine flow and typescript plugins.\");\n  }\n\n  if (hasPlugin(plugins, \"pipelineOperator\") && !PIPELINE_PROPOSALS.includes(getPluginOption(plugins, \"pipelineOperator\", \"proposal\"))) {\n    throw new Error(\"'pipelineOperator' requires 'proposal' option whose value should be one of: \" + PIPELINE_PROPOSALS.join(\", \"));\n  }\n}\nvar mixinPluginNames = [\"estree\", \"jsx\", \"flow\", \"typescript\"];\nvar mixinPlugins = {\n  estree: estree,\n  jsx: jsx,\n  flow: flow,\n  typescript: typescript\n};\n\nfunction parse(input, options) {\n  if (options && options.sourceType === \"unambiguous\") {\n    options = Object.assign({}, options);\n\n    try {\n      options.sourceType = \"module\";\n      var parser = getParser(options, input);\n      var ast = parser.parse();\n      if (!parser.sawUnambiguousESM) ast.program.sourceType = \"script\";\n      return ast;\n    } catch (moduleError) {\n      try {\n        options.sourceType = \"script\";\n        return getParser(options, input).parse();\n      } catch (scriptError) {}\n\n      throw moduleError;\n    }\n  } else {\n    return getParser(options, input).parse();\n  }\n}\nfunction parseExpression(input, options) {\n  var parser = getParser(options, input);\n\n  if (parser.options.strictMode) {\n    parser.state.strict = true;\n  }\n\n  return parser.getExpression();\n}\nfunction getParser(options, input) {\n  var cls = Parser;\n\n  if (options && options.plugins) {\n    validatePlugins(options.plugins);\n    cls = getParserClass(options.plugins);\n  }\n\n  return new cls(options, input);\n}\n\nvar parserClassCache = {};\n\nfunction getParserClass(pluginsFromOptions) {\n  var pluginList = mixinPluginNames.filter(function (name) {\n    return hasPlugin(pluginsFromOptions, name);\n  });\n  var key = pluginList.join(\"/\");\n  var cls = parserClassCache[key];\n\n  if (!cls) {\n    cls = Parser;\n\n    for (var _i2 = 0; _i2 < pluginList.length; _i2++) {\n      var plugin = pluginList[_i2];\n      cls = mixinPlugins[plugin](cls);\n    }\n\n    parserClassCache[key] = cls;\n  }\n\n  return cls;\n}\n\nexports.parse = parse;\nexports.parseExpression = parseExpression;\nexports.tokTypes = types;\n"
  },
  {
    "path": "packages/mvvm-babel-parser/package.json",
    "content": "{\n  \"name\": \"mvvm-babel-parser\",\n  \"version\": \"1.0.8\",\n  \"description\": \"\",\n  \"main\": \"lib/index.js\",\n  \"directories\": {\n    \"lib\": \"lib\",\n    \"test\": \"test\"\n  },\n  \"dependencies\": {\n    \"babel-generator\": \"6.26.1\",\n    \"babel-traverse\": \"6.26.0\",\n    \"babel-types\": \"6.26.0\",\n    \"chai\": \"^4.2.0\"\n  },\n  \"scripts\": {\n    \"test\": \"mocha\"\n  },\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\"\n}"
  },
  {
    "path": "packages/mvvm-babel-parser/test/brace.js",
    "content": "const parser = require('../lib/index.js');\nvar path = require('path');\nvar fs = require('fs');\nconst t = require('babel-types');\nconst expect = require('chai').expect;\nvar code = fs.readFileSync(path.join(__dirname, './testjsx.tpl'), {encoding: 'utf8'});\nconst traverse = require('babel-traverse');\nconst generate = require('babel-generator');\n\ndescribe('brace', function() {\n  it('brace', function() {\n    const ast = parser.parse(code, {\n      sourceType: 'module',\n      plugins: ['jsx']\n    });\n    traverse.default(ast, {\n      enter: (path)=>{\n        if (t.isJSXExpressionContainer(path.node)) {\n          expect(path.node.expression.left.name).to.equal('ss');\n          expect(path.node.expression.operator).to.equal('+');\n          expect(path.node.expression.right.value).to.equal('123');\n          expect(path.node.expression.left.name).to.equal('ss');\n          expect(t.isIdentifier(path.node.expression.left)).to.equal(true);\n          expect(t.isLiteral(path.node.expression.right)).to.equal(true);\n        }\n      }\n    })\n\n    expect(true).to.equal(true);\n  })\n})\n"
  },
  {
    "path": "packages/mvvm-babel-parser/test/testjsx.tpl",
    "content": "<template name=\"{{s+'234'}}\">{{ss+\"123\"}}22</template>"
  },
  {
    "path": "packages/mvvm-cml-loader/.eslintrc",
    "content": "{\n    // 在配置文件里配置全局变量时，使用 globals 指出你要使用的全局变量。将变量设置为 true 将允许变量被重写，或 false 将不允许被重写\n    \"globals\": {\n        \"cml\": false\n    },\n  // 环境定义了预定义的全局变量。\n  \"env\": {\n      //环境定义了预定义的全局变量。更多在官网查看\n      \"browser\": true,\n      \"node\": true,\n      \"commonjs\": true,\n      \"amd\": true,\n      \"es6\": true,\n      \"mocha\": true\n  },\n  // JavaScript 语言选项\n  \"parserOptions\": {\n      // ECMAScript 版本\n      \"ecmaVersion\": 9,\n      \"sourceType\": \"module\", //设置为 \"script\" (默认) 或 \"module\"（如果你的代码是 ECMAScript 模块)。\n      //想使用的额外的语言特性:\n      \"ecmaFeatures\": {\n          // 允许在全局作用域下使用 return 语句\n          \"globalReturn\": true,\n          // impliedStric\n          \"impliedStrict\": true,\n          // 启用 JSX\n          \"jsx\": true,\n          \"modules\": true\n      }\n  },\n  //-----让eslint支持 JSX start\n  \"plugins\": [\n\n  ],\n  \"extends\": [\n      \"eslint:recommended\"\n  ],\n  //-----让eslint支持 JSX end\n\n\n  /**\n   * \"off\" 或 0 - 关闭规则\n   * \"warn\" 或 1 - 开启规则，使用警告级别的错误：warn (不会导致程序退出),\n   * \"error\" 或 2 - 开启规则，使用错误级别的错误：error (当被触发的时候，程序会退出)\n   */\n  \"rules\": {\n\n      ////////////////\n      // 可能的错误 //\n      ////////////////\n\n      // 禁止条件表达式中出现赋值操作符\n      \"no-cond-assign\": 2,\n      // 禁用 console\n      \"no-console\": 0,\n      // 禁止在条件中使用常量表达式\n      // if (false) {\n      // doSomethingUnfinished();\n      // } //cuowu\n      \"no-constant-condition\": 2,\n      // 禁止在正则表达式中使用控制字符 ：new RegExp(\"\\x1f\")\n      \"no-control-regex\": 2,\n      // 数组和对象键值对最后一个逗号， never参数：不能带末尾的逗号, always参数：必须带末尾的逗号，\n      // always-multiline：多行模式必须带逗号，单行模式不能带逗号\n      \"comma-dangle\": [1, \"never\"],\n      // 禁用 debugger\n      \"no-debugger\": 2,\n      // 禁止 function 定义中出现重名参数\n      \"no-dupe-args\": 2,\n      // 禁止对象字面量中出现重复的 key\n      \"no-dupe-keys\": 2,\n      // 禁止重复的 case 标签\n      \"no-duplicate-case\": 2,\n      // 禁止空语句块\n      \"no-empty\": 2,\n      // 禁止在正则表达式中使用空字符集 (/^abc[]/)\n      \"no-empty-character-class\": 2,\n      // 禁止对 catch 子句的参数重新赋值\n      \"no-ex-assign\": 2,\n      // 禁止不必要的布尔转换\n      \"no-extra-boolean-cast\": 2,\n      // 禁止不必要的括号 //(a * b) + c;//报错\n      \"no-extra-parens\": 0,\n      // 禁止不必要的分号\n      \"no-extra-semi\": 2,\n      // 禁止对 function 声明重新赋值\n      \"no-func-assign\": 2,\n      // 禁止在嵌套的块中出现 function 或 var 声明\n      \"no-inner-declarations\": [2, \"functions\"],\n      // 禁止 RegExp 构造函数中无效的正则表达式字符串\n      \"no-invalid-regexp\": 2,\n      // 禁止在字符串和注释之外不规则的空白\n      \"no-irregular-whitespace\": 2,\n      // 禁止在 in 表达式中出现否定的左操作数\n      \"no-negated-in-lhs\": 2,\n      // 禁止把全局对象 (Math 和 JSON) 作为函数调用 错误：var math = Math();\n      \"no-obj-calls\": 2,\n      // 禁止直接使用 Object.prototypes 的内置属性\n      \"no-prototype-builtins\": 0,\n      // 禁止正则表达式字面量中出现多个空格\n      \"no-regex-spaces\": 2,\n      // 禁用稀疏数组\n      \"no-sparse-arrays\": 2,\n      // 禁止出现令人困惑的多行表达式\n      \"no-unexpected-multiline\": 2,\n      // 禁止在return、throw、continue 和 break语句之后出现不可达代码\n      \"no-unreachable\": 2,\n      // 要求使用 isNaN() 检查 NaN\n      \"use-isnan\": 2,\n      // 强制使用有效的 JSDoc 注释\n      \"valid-jsdoc\": 0,\n      // 强制 typeof 表达式与有效的字符串进行比较\n      // typeof foo === \"undefimed\" 错误\n      \"valid-typeof\": 2,\n\n\n      //////////////\n      // 最佳实践 //\n      //////////////\n\n      // 定义对象的set存取器属性时，强制定义get\n      \"accessor-pairs\": 2,\n      // 强制数组方法的回调函数中有 return 语句\n      \"array-callback-return\": 0,\n      // 强制把变量的使用限制在其定义的作用域范围内\n      \"block-scoped-var\": 0,\n      // 限制圈复杂度，也就是类似if else能连续接多少个\n      \"complexity\": [2, 40],\n      // 要求 return 语句要么总是指定返回的值，要么不指定\n      \"consistent-return\": 0,\n      // 强制所有控制语句使用一致的括号风格\n      \"curly\": [2, \"all\"],\n      // switch 语句强制 default 分支，也可添加 // no default 注释取消此次警告\n      \"default-case\": 2,\n      // 强制object.key 中 . 的位置，参数:\n      // property，'.'号应与属性在同一行\n      // object, '.' 号应与对象名在同一行\n      \"dot-location\": [2, \"property\"],\n      // 强制使用.号取属性\n      // 参数： allowKeywords：true 使用保留字做属性名时，只能使用.方式取属性\n      // false 使用保留字做属性名时, 只能使用[]方式取属性 e.g [2, {\"allowKeywords\": false}]\n      // allowPattern: 当属性名匹配提供的正则表达式时，允许使用[]方式取值,否则只能用.号取值 e.g [2, {\"allowPattern\": \"^[a-z]+(_[a-z]+)+$\"}]\n      \"dot-notation\": [2, {\n          \"allowKeywords\": false\n      }],\n      // 使用 === 替代 == allow-null允许null和undefined==\n      \"eqeqeq\": [0, \"allow-null\"],\n      // 要求 for-in 循环中有一个 if 语句\n      \"guard-for-in\": 2,\n      // 禁用 alert、confirm 和 prompt\n      \"no-alert\": 0,\n      // 禁用 arguments.caller 或 arguments.callee\n      \"no-caller\": 2,\n      // 不允许在 case 子句中使用词法声明\n      \"no-case-declarations\": 2,\n      // 禁止除法操作符显式的出现在正则表达式开始的位置\n      \"no-div-regex\": 2,\n      // 禁止 if 语句中有 return 之后有 else\n      \"no-else-return\": 0,\n      // 禁止出现空函数.如果一个函数包含了一条注释，它将不会被认为有问题。\n      \"no-empty-function\": 2,\n      // 禁止使用空解构模式no-empty-pattern\n      \"no-empty-pattern\": 2,\n      // 禁止在没有类型检查操作符的情况下与 null 进行比较\n      \"no-eq-null\": 1,\n      // 禁用 eval()\n      \"no-eval\": 2,\n      // 禁止扩展原生类型\n      \"no-extend-native\": 2,\n      // 禁止不必要的 .bind() 调用\n      \"no-extra-bind\": 2,\n      // 禁用不必要的标签\n      \"no-extra-label:\": 0,\n      // 禁止 case 语句落空\n      \"no-fallthrough\": 2,\n      // 禁止数字字面量中使用前导和末尾小数点\n      \"no-floating-decimal\": 2,\n      // 禁止使用短符号进行类型转换(!!fOO)\n      \"no-implicit-coercion\": 0,\n      // 禁止在全局范围内使用 var 和命名的 function 声明\n      \"no-implicit-globals\": 1,\n      // 禁止使用类似 eval() 的方法\n      \"no-implied-eval\": 2,\n      // 禁止 this 关键字出现在类和类对象之外\n      \"no-invalid-this\": 0,\n      // 禁用 __iterator__ 属性\n      \"no-iterator\": 2,\n      // 禁用标签语句\n      \"no-labels\": 2,\n      // 禁用不必要的嵌套块\n      \"no-lone-blocks\": 2,\n      // 禁止在循环中出现 function 声明和表达式\n      \"no-loop-func\": 1,\n      // 禁用魔术数字(3.14什么的用常量代替)\n      \"no-magic-numbers\": [1, {\n          \"ignore\": [0, -1, 1]\n      }],\n      // 禁止使用多个空格\n      \"no-multi-spaces\": 2,\n      // 禁止使用多行字符串，在 JavaScript 中，可以在新行之前使用斜线创建多行字符串\n      \"no-multi-str\": 2,\n      // 禁止对原生对象赋值\n      \"no-native-reassign\": 2,\n      // 禁止在非赋值或条件语句中使用 new 操作符\n      \"no-new\": 2,\n      // 禁止对 Function 对象使用 new 操作符\n      \"no-new-func\": 0,\n      // 禁止对 String，Number 和 Boolean 使用 new 操作符\n      \"no-new-wrappers\": 2,\n      // 禁用八进制字面量\n      \"no-octal\": 2,\n      // 禁止在字符串中使用八进制转义序列\n      \"no-octal-escape\": 2,\n      // 不允许对 function 的参数进行重新赋值\n      \"no-param-reassign\": 0,\n      // 禁用 __proto__ 属性\n      \"no-proto\": 2,\n      // 禁止使用 var 多次声明同一变量\n      \"no-redeclare\": 2,\n      // 禁用指定的通过 require 加载的模块\n      \"no-return-assign\": 0,\n      // 禁止使用 javascript: url\n      \"no-script-url\": 0,\n      // 禁止自我赋值\n      \"no-self-assign\": 2,\n      // 禁止自身比较\n      \"no-self-compare\": 2,\n      // 禁用逗号操作符\n      \"no-sequences\": 2,\n      // 禁止抛出非异常字面量\n      \"no-throw-literal\": 2,\n      // 禁用一成不变的循环条件\n      \"no-unmodified-loop-condition\": 2,\n      // 禁止出现未使用过的表达式\n      \"no-unused-expressions\": 0,\n      // 禁用未使用过的标签\n      \"no-unused-labels\": 2,\n      // 禁止不必要的 .call() 和 .apply()\n      \"no-useless-call\": 2,\n      // 禁止不必要的字符串字面量或模板字面量的连接\n      \"no-useless-concat\": 0,\n      // 禁用不必要的转义字符\n      \"no-useless-escape\": 0,\n      // 禁用 void 操作符\n      \"no-void\": 0,\n      // 禁止在注释中使用特定的警告术语\n      \"no-warning-comments\": 0,\n      // 禁用 with 语句\n      \"no-with\": 2,\n      // 强制在parseInt()使用基数参数\n      \"radix\": 2,\n      // 要求所有的 var 声明出现在它们所在的作用域顶部\n      \"vars-on-top\": 0,\n      // 要求 IIFE 使用括号括起来\n      \"wrap-iife\": [2, \"any\"],\n      // 要求或禁止 “Yoda” 条件\n      \"yoda\": [2, \"never\"],\n      // 要求或禁止使用严格模式指令\n      \"strict\": 0,\n\n\n      //////////////\n      // 变量声明 //\n      //////////////\n\n      // 要求或禁止 var 声明中的初始化(初值)\n      \"init-declarations\": 0,\n      // 不允许 catch 子句的参数与外层作用域中的变量同名\n      \"no-catch-shadow\": 0,\n      // 禁止删除变量\n      \"no-delete-var\": 2,\n      // 不允许标签与变量同名\n      \"no-label-var\": 2,\n      // 禁用特定的全局变量\n      \"no-restricted-globals\": 0,\n      // 禁止 var 声明 与外层作用域的变量同名\n      \"no-shadow\": 0,\n      // 禁止覆盖受限制的标识符\n      \"no-shadow-restricted-names\": 2,\n      // 禁用未声明的变量，除非它们在 /*global */ 注释中被提到\n      \"no-undef\": 2,\n      // 禁止将变量初始化为 undefined\n      \"no-undef-init\": 2,\n      // 禁止将 undefined 作为标识符\n      \"no-undefined\": 0,\n      // 禁止出现未使用过的变量\n      \"no-unused-vars\": [2, {\n          \"vars\": \"all\",\n          \"args\": \"none\"\n      }],\n      // 不允许在变量定义之前使用它们\n      \"no-use-before-define\": 0,\n\n      //////////////////////////\n      // Node.js and CommonJS //\n      //////////////////////////\n\n      // require return statements after callbacks\n      \"callback-return\": 0,\n      // 要求 require() 出现在顶层模块作用域中\n      \"global-require\": 1,\n      // 要求回调函数中有容错处理\n      \"handle-callback-err\": [2, \"^(err|error)$\"],\n      // 禁止混合常规 var 声明和 require 调用\n      \"no-mixed-requires\": 0,\n      // 禁止调用 require 时使用 new 操作符\n      \"no-new-require\": 2,\n      // 禁止对 __dirname 和 __filename进行字符串连接\n      \"no-path-concat\": 0,\n      // 禁用 process.env\n      \"no-process-env\": 0,\n      // 禁用 process.exit()\n      \"no-process-exit\": 0,\n      // 禁用同步方法\n      \"no-sync\": 0,\n\n      //////////////\n      // 风格指南 //\n      //////////////\n\n      // 指定数组的元素之间要以空格隔开(, 后面)， never参数：[ 之前和 ] 之后不能带空格，always参数：[ 之前和 ] 之后必须带空格\n      \"array-bracket-spacing\": [2, \"never\"],\n      // 禁止或强制在单行代码块中使用空格(禁用)\n      \"block-spacing\": [1, \"never\"],\n      //强制使用一致的缩进 第二个参数为 \"tab\" 时，会使用tab，\n      // if while function 后面的{必须与if在同一行，java风格。\n      \"brace-style\": [2, \"1tbs\", {\n          \"allowSingleLine\": true\n      }],\n      // 双峰驼命名格式\n      \"camelcase\": 2,\n      // 控制逗号前后的空格\n      \"comma-spacing\": [2, {\n          \"before\": false,\n          \"after\": true\n      }],\n      // 控制逗号在行尾出现还是在行首出现 (默认行尾)\n      // http://eslint.org/docs/rules/comma-style\n      \"comma-style\": [2, \"last\"],\n      //\"SwitchCase\" (默认：0) 强制 switch 语句中的 case 子句的缩进水平\n      // 以方括号取对象属性时，[ 后面和 ] 前面是否需要空格, 可选参数 never, always\n      \"computed-property-spacing\": [2, \"never\"],\n      // 用于指统一在回调函数中指向this的变量名，箭头函数中的this已经可以指向外层调用者，应该没卵用了\n      // e.g [0,\"that\"] 指定只能 var that = this. that不能指向其他任何值，this也不能赋值给that以外的其他值\n      \"consistent-this\": [1, \"that\"],\n      // 强制使用命名的 function 表达式\n      \"func-names\": 0,\n      // 文件末尾强制换行\n      \"eol-last\": 2,\n      \"indent\": [2, 2, {\n          \"SwitchCase\": 1\n      }],\n      // 强制在对象字面量的属性中键和值之间使用一致的间距\n      \"key-spacing\": [2, {\n          \"beforeColon\": false,\n          \"afterColon\": true\n      }],\n      // 强制使用一致的换行风格\n      \"linebreak-style\": [1, \"unix\"],\n      // 要求在注释周围有空行 ( 要求在块级注释之前有一空行)\n      \"lines-around-comment\": [1, {\n          \"beforeBlockComment\": true\n      }],\n      // 强制一致地使用函数声明或函数表达式，方法定义风格，参数：\n      // declaration: 强制使用方法声明的方式，function f(){} e.g [2, \"declaration\"]\n      // expression：强制使用方法表达式的方式，var f = function() {} e.g [2, \"expression\"]\n      // allowArrowFunctions: declaration风格中允许箭头函数。 e.g [2, \"declaration\", { \"allowArrowFunctions\": true }]\n      \"func-style\": 0,\n      // 强制回调函数最大嵌套深度 5层\n      \"max-nested-callbacks\": [1, 5],\n      // 禁止使用指定的标识符\n      \"id-blacklist\": 0,\n      // 强制标识符的最新和最大长度\n      \"id-length\": 0,\n      // 要求标识符匹配一个指定的正则表达式\n      \"id-match\": 0,\n      // 强制在 JSX 属性中一致地使用双引号或单引号\n      \"jsx-quotes\": 0,\n      // 强制在关键字前后使用一致的空格 (前后腰需要)\n      \"keyword-spacing\": 2,\n      // 强制一行的最大长度\n      \"max-len\": [1, 200],\n      // 强制最大行数\n      \"max-lines\": 0,\n      // 强制 function 定义中最多允许的参数数量\n      \"max-params\": [1, 7],\n      // 强制 function 块最多允许的的语句数量\n      \"max-statements\": [1, 200],\n      // 强制每一行中所允许的最大语句数量\n      \"max-statements-per-line\": 0,\n      // 要求构造函数首字母大写 （要求调用 new 操作符时有首字母大小的函数，允许调用首字母大写的函数时没有 new 操作符。）\n      \"new-cap\": [2, {\n          \"newIsCap\": true,\n          \"capIsNew\": false\n      }],\n      // 要求调用无参构造函数时有圆括号\n      \"new-parens\": 2,\n      // 要求或禁止 var 声明语句后有一行空行\n      \"newline-after-var\": 0,\n      // 禁止使用 Array 构造函数\n      \"no-array-constructor\": 2,\n      // 禁用按位运算符\n      \"no-bitwise\": 0,\n      // 要求 return 语句之前有一空行\n      \"newline-before-return\": 0,\n      // 要求方法链中每个调用都有一个换行符\n      \"newline-per-chained-call\": 1,\n      // 禁用 continue 语句\n      \"no-continue\": 0,\n      // 禁止在代码行后使用内联注释\n      \"no-inline-comments\": 0,\n      // 禁止 if 作为唯一的语句出现在 else 语句中\n      \"no-lonely-if\": 0,\n      // 禁止混合使用不同的操作符\n      \"no-mixed-operators\": 0,\n      // 不允许空格和 tab 混合缩进\n      \"no-mixed-spaces-and-tabs\": 2,\n      // 不允许多个空行\n      \"no-multiple-empty-lines\": [2, {\n          \"max\": 2\n      }],\n      // 不允许否定的表达式\n      \"no-negated-condition\": 0,\n      // 不允许使用嵌套的三元表达式\n      \"no-nested-ternary\": 0,\n      // 禁止使用 Object 的构造函数\n      \"no-new-object\": 2,\n      // 禁止使用一元操作符 ++ 和 --\n      \"no-plusplus\": 0,\n      // 禁止使用特定的语法\n      \"no-restricted-syntax\": 0,\n      // 禁止 function 标识符和括号之间出现空格\n      \"no-spaced-func\": 2,\n      // 不允许使用三元操作符\n      \"no-ternary\": 0,\n      // 禁用行尾空格\n      \"no-trailing-spaces\": 2,\n      // 禁止标识符中有悬空下划线_bar\n      \"no-underscore-dangle\": 0,\n      // 禁止可以在有更简单的可替代的表达式时使用三元操作符\n      \"no-unneeded-ternary\": 2,\n      // 禁止属性前有空白\n      \"no-whitespace-before-property\": 0,\n      // 强制花括号内换行符的一致性\n      \"object-curly-newline\": 0,\n      // 强制在花括号中使用一致的空格\n      \"object-curly-spacing\": 0,\n      // 强制将对象的属性放在不同的行上\n      \"object-property-newline\": 0,\n      // 强制函数中的变量要么一起声明要么分开声明\n      \"one-var\": [2, {\n          \"initialized\": \"never\"\n      }],\n      // 要求或禁止在 var 声明周围换行\n      \"one-var-declaration-per-line\": 0,\n      // 要求或禁止在可能的情况下要求使用简化的赋值操作符\n      \"operator-assignment\": 0,\n      // 强制操作符使用一致的换行符\n      \"operator-linebreak\": [2, \"after\", {\n          \"overrides\": {\n              \"?\": \"before\",\n              \":\": \"before\"\n          }\n      }],\n      // 要求或禁止块内填充\n      \"padded-blocks\": 0,\n      // 要求对象字面量属性名称用引号括起来\n      \"quote-props\": 0,\n      // 强制使用一致的反勾号、双引号或单引号\n    //   \"quotes\": [2, \"single\",\"double\", \"avoid-escape\"],\n      // 要求使用 JSDoc 注释\n      \"require-jsdoc\": 0,\n      // 要求或禁止使用分号而不是 ASI（这个才是控制行尾部分号的，）\n      \"semi\": [0, \"always\"],\n      // 强制分号之前和之后使用一致的空格\n      \"semi-spacing\": 0,\n      // 要求同一个声明块中的变量按顺序排列\n      \"sort-vars\": 0,\n      // 强制在块之前使用一致的空格\n      \"space-before-blocks\": [2, \"always\"],\n      // 强制在 function的左括号之前使用一致的空格\n      \"space-before-function-paren\": [0, \"always\"],\n      // 强制在圆括号内使用一致的空格\n      \"space-in-parens\": [2, \"never\"],\n      // 要求操作符周围有空格\n      \"space-infix-ops\": 2,\n      // 强制在一元操作符前后使用一致的空格\n      \"space-unary-ops\": [2, {\n          \"words\": true,\n          \"nonwords\": false\n      }],\n      // 强制在注释中 // 或 /* 使用一致的空格\n      \"spaced-comment\": [2, \"always\", {\n          \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n      }],\n      // 要求或禁止 Unicode BOM\n      \"unicode-bom\": 0,\n      // 要求正则表达式被括号括起来\n      \"wrap-regex\": 0,\n\n      //////////////\n      // ES6.相关 //\n      //////////////\n\n      // 要求箭头函数体使用大括号\n      \"arrow-body-style\": 2,\n      // 要求箭头函数的参数使用圆括号\n      \"arrow-parens\": 0,\n      \"arrow-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 强制在子类构造函数中用super()调用父类构造函数，TypeScrip的编译器也会提示\n      \"constructor-super\": 0,\n      // 强制 generator 函数中 * 号周围使用一致的空格\n      \"generator-star-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 禁止修改类声明的变量\n      \"no-class-assign\": 2,\n      // 不允许箭头功能，在那里他们可以混淆的比较\n      \"no-confusing-arrow\": 0,\n      // 禁止修改 const 声明的变量\n      \"no-const-assign\": 2,\n      // 禁止类成员中出现重复的名称\n      \"no-dupe-class-members\": 2,\n      // 不允许复制模块的进口\n      \"no-duplicate-imports\": 0,\n      // 禁止 Symbol 的构造函数\n      \"no-new-symbol\": 2,\n      // 允许指定模块加载时的进口\n      \"no-restricted-imports\": 0,\n      // 禁止在构造函数中，在调用 super() 之前使用 this 或 super\n      \"no-this-before-super\": 2,\n      // 禁止不必要的计算性能键对象的文字\n      \"no-useless-computed-key\": 0,\n      // 要求使用 let 或 const 而不是 var\n      \"no-var\": 0,\n      // 要求或禁止对象字面量中方法和属性使用简写语法\n      \"object-shorthand\": 0,\n      // 要求使用箭头函数作为回调\n      \"prefer-arrow-callback\": 0,\n      // 要求使用 const 声明那些声明后不再被修改的变量\n      \"prefer-const\": 0,\n      // 要求在合适的地方使用 Reflect 方法\n      \"prefer-reflect\": 0,\n      // 要求使用扩展运算符而非 .apply()\n      \"prefer-spread\": 0,\n      // 要求使用模板字面量而非字符串连接\n      \"prefer-template\": 0,\n      // Suggest using the rest parameters instead of arguments\n      \"prefer-rest-params\": 0,\n      // 要求generator 函数内有 yield\n      \"require-yield\": 0,\n      // enforce spacing between rest and spread operators and their expressions\n      \"rest-spread-spacing\": 0,\n      // 强制模块内的 import 排序\n      \"sort-imports\": 0,\n      // 要求或禁止模板字符串中的嵌入表达式周围空格的使用\n      \"template-curly-spacing\": 1,\n      // 强制在 yield* 表达式中 * 周围使用空格\n      \"yield-star-spacing\": 2\n  }\n}\n"
  },
  {
    "path": "packages/mvvm-cml-loader/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\ndist/\n# ///////////////////////////\n\n"
  },
  {
    "path": "packages/mvvm-cml-loader/helper.js",
    "content": "const path = require('path');\nconst loaderUtils = require('loader-utils')\n\nexports.stringifyLoaders = function (loaders) {\n  return loaders\n    .map(\n      obj =>\n        obj && typeof obj === 'object' && typeof obj.loader === 'string'\n          ? obj.loader +\n            (obj.options ? '?' + JSON.stringify(obj.options) : '')\n          : obj\n    )\n    .join('!')\n}\n\nexports.getSelector = function() {\n  return path.resolve(__dirname, './selector.js')\n}\n\nexports.getPartLoaders = function({loaderContext, selectorOptions, partType, lang, loaders, resourcePath}) {\n  selectorOptions.partType = partType;\n\n  let resultLoaders = [\n    {\n      loader: exports.getSelector(),\n      options: selectorOptions\n    }\n  ]\n  switch (partType) {\n    case 'style':\n      var styleLoader = loaders[lang];\n      if (!(styleLoader instanceof Array)) {\n        styleLoader = [styleLoader];\n      }\n      resultLoaders = styleLoader.concat(resultLoaders);\n      break;\n    case 'script':\n      var jsLoader = loaders.js;\n      if (!(jsLoader instanceof Array)) {\n        jsLoader = [jsLoader];\n      }\n      resultLoaders = jsLoader.concat(resultLoaders);\n      break;\n    default:\n      break;\n  }\n  let stringLoaders = exports.stringifyLoaders(resultLoaders);\n  let loaderString = '!!' + stringLoaders + '!' + resourcePath;\n  return loaderUtils.stringifyRequest(\n    loaderContext,\n    loaderString\n  )\n}\n\nexports.toUpperCase = function (content) {\n  return content.replace(/-(\\w)/ig, function (m, s1) {\n    return s1.toUpperCase()\n  })\n}"
  },
  {
    "path": "packages/mvvm-cml-loader/index.js",
    "content": "\nconst loaderUtils = require('loader-utils')\nconst helper = require('./helper.js');\nconst cmlUtils = require('chameleon-tool-utils');\nconst path = require('path');\nconst {vueToCml: templateParse} = require('mvvm-template-parser');\nconst {prepareParseUsingComponents} = require('chameleon-loader/src/loaderMethods.js');\nmodule.exports = function(source) {\n  this._module._cmlSource = source;\n  let output = '';\n  const self = this;\n  const rawOptions = loaderUtils.getOptions(this) || {};\n  let {loaders, cmlType, media, check} = rawOptions;\n  const resourcePath = this.resourcePath;\n  const context = (\n    this.rootContext ||\n    (this.options && this.options.context) ||\n    process.cwd()\n  )\n  let fileType = cmlUtils.getCmlFileType(resourcePath, context, cmlType);\n\n  let selectorOptions = {\n    cmlType,\n    media,\n    check,\n    fileType\n  }\n  let parts = cmlUtils.splitParts({content: source});\n  if (parts.style.length > 1) {\n    throw new Error(`${resourcePath} only allow has one <style></style>`)\n  }\n\n  if (parts.style && parts.style[0]) {\n    let part = parts.style[0];\n    let lang = part.attrs && part.attrs.lang || 'less';\n    output += `\n    var style = require(${helper.getPartLoaders({loaderContext: self, selectorOptions, partType: 'style', lang, loaders, resourcePath})});\n    `\n  }\n  output += `var template = require(${helper.getPartLoaders({loaderContext: self, selectorOptions, partType: 'template', loaders, resourcePath})});\\n`\n  output += `var json = require(${helper.getPartLoaders({loaderContext: self, selectorOptions, partType: 'json', loaders, resourcePath})});\\n`\n  output += `var script = require(${helper.getPartLoaders({loaderContext: self, selectorOptions, partType: 'script', loaders, resourcePath})});\\n`\n  this._module._nodeType = fileType;\n  // app添加page依赖\n  if (fileType === 'app') {\n    self.addDependency(path.join(context, './src/router.config.json'));\n    let {routerConfig, hasError} = cmlUtils.getRouterConfig();\n    if (hasError) {\n      throw new Error('router.config.json read error')\n    } else {\n      routerConfig.routes.forEach(item => {\n        output += ` require(\"$PROJECT/src${item.path}.cml\").default;`\n      })\n    }\n\n    // subProject 中的页面\n    let subProject = cml.config.get().subProject;\n    if (subProject && subProject.length > 0) {\n      subProject.forEach(function(item) {\n        let npmName = cmlUtils.isString(item) ? item : item.npmName;\n        let npmRouterConfig = cml.utils.readsubProjectRouterConfig(cml.projectRoot, npmName);\n        npmRouterConfig.routes && npmRouterConfig.routes.forEach(item => {\n          let cmlFilePath = path.join(cml.projectRoot, 'node_modules', npmName, 'src', item.path + '.cml');\n          output += `require(\"${cmlFilePath}\").default`;\n        })\n      })\n    }\n  }\n\n  let jsonObject = cmlUtils.getJsonFileContent(resourcePath, cmlType);\n  let coms = jsonObject.usingComponents = jsonObject.usingComponents || {};\n  let customComKeys = Object.keys(coms); // 用户自定义组件key\n  let usingComponentsAndFilePath = {}; // 记录文件依赖的组件名称及文件位置\n  let usingComponents = prepareParseUsingComponents({loaderContext: self, context, originObj: coms, cmlType});\n\n  const isBuildInFile = cmlUtils.isBuildIn(self.resourcePath, cmlType, context);\n\n  let buildInComponents = {};\n  // 内置组件库中的cml文件不进行内置组件的替换\n  if (!isBuildInFile) {\n    buildInComponents = cmlUtils.getBuildinComponents(cmlType, context).compileTagMap;\n  }\n  let parseTemplate = parts.template && parts.template[0];\n  let templateContent = (parseTemplate && parseTemplate.content) || '';\n\n  let {source: compiledTemplate, usedBuildInTagMap} = templateParse(templateContent, {\n    buildInComponents, // 对内置组件做替换 并返回用了哪个内置组件\n    usingComponents // 判断是否是原生组件\n  });\n  const currentUsedBuildInTagMap = {};\n\n  // currentUsedBuildInTagMap 中 key为  cml-builtin-button\n  Object.keys(usedBuildInTagMap).forEach(key => {\n    let value = usedBuildInTagMap[key];\n    currentUsedBuildInTagMap[value] = key;\n  })\n\n  // 先遍历usingComponents中的\n  Object.keys(coms).forEach(key => {\n    let comPath = coms[key];\n    let splitInfo = comPath.split('?');\n    comPath = splitInfo[0];\n    let {filePath, refUrl} = cmlUtils.handleComponentUrl(context, self.resourcePath, comPath, cmlType);\n    if (filePath) {\n      coms[key] = refUrl;\n      usingComponentsAndFilePath[key] = filePath;\n      // 建立依赖进行编译\n      output += `\n        import ${helper.toUpperCase(key)} from \"${cmlUtils.handleRelativePath(self.resourcePath, filePath)}\"\\n`;\n\n    } else {\n      if (coms[key].indexOf('plugin://') !== 0) {\n        delete coms[key];\n        cmlUtils.log.error(`can't find component:${coms[key]} in ${self.resourcePath}`);\n      }\n    }\n  })\n\n  let npmComponents = cmlUtils.getTargetInsertComponents(self.resourcePath, cmlType, context) || [];\n  npmComponents = npmComponents.filter(item => {\n    // 如果是内置组件 选择模板中使用了的组件\n    if (item.isBuiltin) {\n      return !!currentUsedBuildInTagMap[item.name];\n      // 如果是其他的npm库组件 选择与用户自定义名称不同的组件\n    } else if (!~customComKeys.indexOf(item.name)) {\n      return true;\n    }\n  })\n\n  npmComponents.forEach(item => {\n    output += `import ${helper.toUpperCase(item.name)} from \"${cmlUtils.handleRelativePath(self.resourcePath, item.filePath)}\" \\n`;\n    usingComponentsAndFilePath[item.name] = item.filePath;\n    let refPath = cmlUtils.npmRefPathToRelative(item.refPath, self.resourcePath, context);\n    coms[item.name] = refPath;\n  })\n\n  Object.keys(coms).forEach(key => {\n    coms[key] = cmlUtils.handleSpecialChar(coms[key])\n  });\n\n\n  this._compiler._mvvmCmlInfo = this._compiler._mvvmCmlInfo || {};\n\n  this._compiler._mvvmCmlInfo[self.resourcePath] = {\n    compiledTemplate,\n    usingComponents,\n    currentUsedBuildInTagMap,\n    compiledJson: jsonObject,\n    componentFiles: usingComponentsAndFilePath\n  }\n  this._module._cmlExtra = {\n    componentFiles: usingComponentsAndFilePath\n  }\n  return output;\n}\n"
  },
  {
    "path": "packages/mvvm-cml-loader/package.json",
    "content": "{\n  \"name\": \"mvvm-cml-loader\",\n  \"version\": \"1.0.8\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"dependencies\": {\n    \"chameleon-loader\": \"1.0.8\",\n    \"chameleon-tool-utils\": \"1.0.8\",\n    \"loader-utils\": \"1.1.0\",\n    \"mvvm-template-parser\": \"1.0.8\"\n  }\n}"
  },
  {
    "path": "packages/mvvm-cml-loader/selector.js",
    "content": "const loaderUtils = require('loader-utils')\nconst cmlUtils = require('chameleon-tool-utils');\nconst { getScriptCode } = require('chameleon-loader/src/interface-check/getScriptCode.js');\nconst helper = require('./helper.js');\n\n\nmodule.exports = function(source) {\n  const self = this;\n  const rawOptions = loaderUtils.getOptions(this) || {};\n  const resourcePath = this.resourcePath;\n  let {partType, cmlType, fileType, media, check} = rawOptions;\n  const context = (\n    this.rootContext ||\n    (this.options && this.options.context) ||\n    process.cwd()\n  )\n  let parts = cmlUtils.splitParts({content: source});\n  this._module._nodeType = 'module';\n  this._module._moduleType = partType;\n  this._module._parentNodeType = fileType;\n\n  let cmlInfo = this._compiler._mvvmCmlInfo[this.resourcePath];\n\n  let output = '';\n  switch (partType) {\n    case 'style':\n      output = parts.style[0].content; // 交给后面loader\n      break;\n    case 'script':\n      parts.script.forEach(item => {  // 交给后面loader\n        if (item.cmlType !== 'json') {\n          let content = item.content;\n          let {runtimeNpmName, runtimeNeedComponents} = this._compiler._platformPlugin;\n          let insertMethodMap = {\n            app: 'createApp',\n            page: 'createPage',\n            component: 'createComponent',\n          }\n          let runtimeScript = '';\n          runtimeScript += `\n          import ${helper.toUpperCase(runtimeNpmName)} from '${runtimeNpmName}';\\n\n          `\n          // runtime方法需要组件\n          if (runtimeNeedComponents) {\n            let {componentFiles} = cmlInfo;\n            let components = ['{'];\n            let comKeys = Object.keys(componentFiles);\n            comKeys.forEach((comName, index) => {\n              content += `\n              import ${helper.toUpperCase(comName)} from \"${cmlUtils.handleRelativePath(self.resourcePath, componentFiles[comName])}\"\\n`;\n              if (comKeys.length - 1 === index) {\n                components.push(`${helper.toUpperCase(comName)}`);\n              } else {\n                components.push(`${helper.toUpperCase(comName)},`);\n              }\n            })\n\n            components.push('}');\n\n            runtimeScript += `\n            exports.default = ${helper.toUpperCase(runtimeNpmName)}.${insertMethodMap[fileType]}(exports.default, ${components.join('')}).getOptions();\\n\n            `\n          } else {\n            runtimeScript += `\n            exports.default = ${helper.toUpperCase(runtimeNpmName)}.${insertMethodMap[fileType]}(exports.default).getOptions();\\n\n            `\n          }\n          content += runtimeScript;\n          output = getScriptCode(self, cmlType, content, media, check);\n        }\n      })\n      break;\n    case 'template':\n      this._module._cmlSource = cmlInfo.compiledTemplate || '';\n      this._module._cmlExtra = {\n        usingComponents: cmlInfo.usingComponents || [],\n        currentUsedBuildInTagMap: cmlInfo.currentUsedBuildInTagMap || []\n      }\n      output = `module.exports = ${JSON.stringify(cmlInfo.compiledTemplate)}`;\n\n      break;\n    case 'json':\n      this._module._cmlSource = JSON.stringify(cmlInfo.compiledJson || {}, '', 4);\n      output = `module.exports = ${this._module._cmlSource}`;\n      break;\n    default:\n      break;\n  }\n  return output;\n}"
  },
  {
    "path": "packages/mvvm-file-loader/README.md",
    "content": "[![npm][npm]][npm-url]\n[![node][node]][node-url]\n[![deps][deps]][deps-url]\n[![tests][tests]][tests-url]\n[![coverage][cover]][cover-url]\n[![chat][chat]][chat-url]\n\n<div align=\"center\">\n  <a href=\"https://github.com/webpack/webpack\">\n    <img width=\"200\" height=\"200\"\n      src=\"https://webpack.js.org/assets/icon-square-big.svg\">\n  </a>\n  <h1>File Loader</h1>\n  <p>Instructs webpack to emit the required object as file and to return its public URL</p>\n</div>\n\n<h2 align=\"center\">Install</h2>\n\n```bash\nnpm install --save-dev file-loader\n```\n\n<h2 align=\"center\"><a href=\"https://webpack.js.org/concepts/loaders\">Usage</a></h2>\n\nBy default the filename of the resulting file is the MD5 hash of the file's contents with the original extension of the required resource.\n\n```js\nimport img from './file.png'\n```\n\n**webpack.config.js**\n```js\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.(png|jpg|gif)$/,\n        use: [\n          {\n            loader: 'file-loader',\n            options: {}  \n          }\n        ]\n      }\n    ]\n  }\n}\n```\n\nEmits `file.png` as file in the output directory and returns the public URL\n\n```\n\"/public/path/0dcbbaa7013869e351f.png\"\n```\n\n<h2 align=\"center\">Options</h2>\n\n|Name|Type|Default|Description|\n|:--:|:--:|:-----:|:----------|\n|**`name`**|`{String\\|Function}`|`[hash].[ext]`|Configure a custom filename template for your file|\n|**`regExp`**|`{RegExp}`|`'undefined'`|Let you extract some parts of the file path to reuse them in the `name` property|\n|**`context`**|`{String}`|`this.options.context`|Configure a custom file context, defaults to `webpack.config.js` [context](https://webpack.js.org/configuration/entry-context/#context)|\n|**`publicPath`**|`{String\\|Function}`|[`__webpack_public_path__ `](https://webpack.js.org/api/module-variables/#__webpack_public_path__-webpack-specific-)|Configure a custom `public` path for your file|\n|**`outputPath`**|`{String\\|Function}`|`'undefined'`|Configure a custom `output` path for your file|\n|**`useRelativePath`**|`{Boolean}`|`false`|Should be `true` if you wish to generate a `context` relative URL for each file|\n|**`emitFile`**|`{Boolean}`|`true`|By default a file is emitted, however this can be disabled if required (e.g. for server side packages)|\n\n### `name`\n\nYou can configure a custom filename template for your file using the query parameter `name`. For instance, to copy a file from your `context` directory into the output directory retaining the full directory structure, you might use\n\n#### `{String}`\n\n**webpack.config.js**\n```js\n{\n  loader: 'file-loader',\n  options: {\n    name: '[path][name].[ext]'\n  }  \n}\n```\n\n#### `{Function}`\n\n**webpack.config.js**\n```js\n{\n  loader: 'file-loader',\n  options: {\n    name (file) {\n      if (env === 'development') {\n        return '[path][name].[ext]'\n      }\n\n      return '[hash].[ext]'\n    }\n  }  \n}\n```\n\n### `regExp`\n\nDefines a `regExp` to match some parts of the file path. These capture groups can be reused in the `name` property using `[N]` placeholder. Note that `[0]` will be replaced by the entire tested string, whereas `[1]` will contain the first capturing parenthesis of your regex and so on...\n\n```js\nimport img from './customer01/file.png'\n```\n\n**webpack.config.js**\n```js\n{\n  loader: 'file-loader',\n  options: {\n    regExp: /\\/([a-z0-9]+)\\/[a-z0-9]+\\.png$/,\n    name: '[1]-[name].[ext]'\n  }  \n}\n```\n\n```\ncustomer01-file.png\n```\n\n#### `placeholders`\n\n|Name|Type|Default|Description|\n|:--:|:--:|:-----:|:----------|\n|**`[ext]`**|`{String}`|`file.extname`|The extension of the resource|\n|**`[name]`**|`{String}`|`file.basename`|The basename of the resource|\n|**`[path]`**|`{String}`|`file.dirname`|The path of the resource relative to the `context`|\n|**`[hash]`**|`{String}`|`md5`|The hash of the content, hashes below for more info|\n|**`[N]`**|`{String}`|``|The `n-th` match obtained from matching the current file name against the `regExp`|\n\n#### `hashes`\n\n`[<hashType>:hash:<digestType>:<length>]` optionally you can configure\n\n|Name|Type|Default|Description|\n|:--:|:--:|:-----:|:----------|\n|**`hashType`**|`{String}`|`md5`|`sha1`, `md5`, `sha256`, `sha512`|\n|**`digestType`**|`{String}`|`hex`|`hex`, `base26`, `base32`, `base36`, `base49`, `base52`, `base58`, `base62`, `base64`|\n|**`length`**|`{Number}`|`9999`|The length in chars|\n\nBy default, the path and name you specify will output the file in that same directory and will also use that same URL path to access the file.\n\n### `context`\n\n**webpack.config.js**\n```js\n{\n  loader: 'file-loader',\n  options: {\n    name: '[path][name].[ext]',\n    context: ''\n  }  \n}\n```\n\nYou can specify custom `output` and `public` paths by using `outputPath`, `publicPath` and `useRelativePath`\n\n### `publicPath`\n\n**webpack.config.js**\n```js\n{\n  loader: 'file-loader',\n  options: {\n    name: '[path][name].[ext]',\n    publicPath: 'assets/'\n  }  \n}\n```\n\n### `outputPath`\n\n**webpack.config.js**\n```js\n{\n  loader: 'file-loader',\n  options: {\n    name: '[path][name].[ext]',\n    outputPath: 'images/'\n  }  \n}\n```\n\n### `useRelativePath`\n\n`useRelativePath` should be `true` if you wish to generate a relative URL to the for each file context.\n\n```js\n{\n  loader: 'file-loader',\n  options: {\n    useRelativePath: process.env.NODE_ENV === \"production\"\n  }\n}\n```\n\n### `emitFile`\n\nBy default a file is emitted, however this can be disabled if required (e.g. for server side packages).\n\n```js\nimport img from './file.png'\n```\n\n```js\n{\n  loader: 'file-loader',\n  options: {\n    emitFile: false\n  }  \n}\n```\n\n> ⚠️  Returns the public URL but does **not** emit a file\n\n```\n`${publicPath}/0dcbbaa701328e351f.png`\n```\n\n<h2 align=\"center\">Examples</h2>\n\n\n```js\nimport png from 'image.png'\n```\n\n**webpack.config.js**\n```js\n{\n  loader: 'file-loader',\n  options: {\n    name: 'dirname/[hash].[ext]'\n  }  \n}\n```\n\n```\ndirname/0dcbbaa701328ae351f.png\n```\n\n**webpack.config.js**\n```js\n{\n  loader: 'file-loader',\n  options: {\n    name: '[sha512:hash:base64:7].[ext]'\n  }  \n}\n```\n\n```\ngdyb21L.png\n```\n\n```js\nimport png from 'path/to/file.png'\n```\n\n**webpack.config.js**\n```js\n{\n  loader: 'file-loader',\n  options: {\n    name: '[path][name].[ext]?[hash]'\n  }  \n}\n```\n\n```\npath/to/file.png?e43b20c069c4a01867c31e98cbce33c9\n```\n\n<h2 align=\"center\">Maintainers</h2>\n\n<table>\n  <tbody>\n    <tr>\n      <td align=\"center\">\n        <a href=\"https://github.com/bebraw\">\n          <img width=\"150\" height=\"150\" src=\"https://github.com/bebraw.png?v=3&s=150\">\n          </br>\n          Juho Vepsäläinen\n        </a>\n      </td>\n      <td align=\"center\">\n        <a href=\"https://github.com/d3viant0ne\">\n          <img width=\"150\" height=\"150\" src=\"https://github.com/d3viant0ne.png?v=3&s=150\">\n          </br>\n          Joshua Wiens\n        </a>\n      </td>\n      <td align=\"center\">\n        <a href=\"https://github.com/michael-ciniawsky\">\n          <img width=\"150\" height=\"150\" src=\"https://github.com/michael-ciniawsky.png?v=3&s=150\">\n          </br>\n          Michael Ciniawsky\n        </a>\n      </td>\n      <td align=\"center\">\n        <a href=\"https://github.com/evilebottnawi\">\n          <img width=\"150\" height=\"150\" src=\"https://github.com/evilebottnawi.png?v=3&s=150\">\n          </br>\n          Alexander Krasnoyarov\n        </a>\n      </td>\n    </tr>\n  <tbody>\n</table>\n\n\n[npm]: https://img.shields.io/npm/v/file-loader.svg\n[npm-url]: https://npmjs.com/package/file-loader\n\n[node]: https://img.shields.io/node/v/file-loader.svg\n[node-url]: https://nodejs.org\n\n[deps]: https://david-dm.org/webpack-contrib/file-loader.svg\n[deps-url]: https://david-dm.org/webpack-contrib/file-loader\n\n[tests]: http://img.shields.io/travis/webpack-contrib/file-loader.svg\n[tests-url]: https://travis-ci.org/webpack-contrib/file-loader\n\n[cover]: https://img.shields.io/codecov/c/github/webpack-contrib/file-loader.svg\n[cover-url]: https://codecov.io/gh/webpack-contrib/file-loader\n\n[chat]: https://badges.gitter.im/webpack/webpack.svg\n[chat-url]: https://gitter.im/webpack/webpack\n"
  },
  {
    "path": "packages/mvvm-file-loader/dist/cjs.js",
    "content": "'use strict';\n\nvar loader = require('./index');\n\nmodule.exports = loader.default;\nmodule.exports.raw = loader.raw;"
  },
  {
    "path": "packages/mvvm-file-loader/dist/index.js",
    "content": "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.raw = undefined;\nexports.default = loader;\n\nvar _path = require('path');\n\nvar _path2 = _interopRequireDefault(_path);\n\nvar _loaderUtils = require('loader-utils');\n\nvar _loaderUtils2 = _interopRequireDefault(_loaderUtils);\n\nvar _schemaUtils = require('schema-utils');\n\nvar _schemaUtils2 = _interopRequireDefault(_schemaUtils);\n\nvar _options = require('./options.json');\n\nvar _options2 = _interopRequireDefault(_options);\n\nconst mime = require('mime');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/* eslint-disable\n  multiline-ternary,\n*/\nfunction loader(content) {\n\n  var options = _loaderUtils2.default.getOptions(this) || {};\n\n  (0, _schemaUtils2.default)(_options2.default, options, 'File Loader');\n\n  var context = options.context || this.rootContext || this.options && this.options.context;\n\n  \n\n  const file = this.resourcePath;\n  // Set limit for resource inlining (file size)\n  let limit = options.limit;\n  let limitSize = options.limitSize;\n\n  if (limit) {\n    limitSize = parseInt(limitSize, 10);\n  }\n  // Get MIME type\n  const mimetype = options.mimetype || mime.getType(file);\n\n  const hasInline = !!~this.resourceQuery.indexOf('__inline');\n  // No limit or within the specified limit\n  if (limit && content.length < limitSize || hasInline) {\n    if (typeof content === 'string') {\n      content = Buffer.from(content);\n    }\n    this._module._nodeType = 'module';\n    this._module._moduleType = 'asset';\n    this._module._cmlSource = `module.exports = ${JSON.stringify(base64)}`;\n    let base64 = `data:${mimetype || ''};base64,${content.toString('base64')}`\n    this._module._publicPath = base64;\n    return `module.exports = ${JSON.stringify(base64)}`;\n  } else {\n    var url = _loaderUtils2.default.interpolateName(this, options.name, {\n      context,\n      content,\n      regExp: options.regExp\n    });\n  \n    var outputPath = url;\n  \n    if (options.outputPath) {\n      if (typeof options.outputPath === 'function') {\n        outputPath = options.outputPath(url);\n      } else {\n        outputPath = _path2.default.posix.join(options.outputPath, url);\n      }\n    }\n  \n    let publicPath = outputPath;\n  \n    if(typeof options.publicPath === 'function') {\n      publicPath = options.publicPath(outputPath)\n    } else if(typeof options.publicPath === 'string') {\n      publicPath = options.publicPath + outputPath;\n    }\n    this._module._nodeType = 'module';\n    this._module._moduleType = 'asset';\n    this._module._cmlSource = `module.exports = \"${publicPath}\";`;\n    this._module._bufferSource = content;\n    this._module._outputPath = outputPath;\n    this._module._publicPath = publicPath;\n    return `module.exports = \"${publicPath}\";`;\n\n  }  \n}\n\nvar raw = exports.raw = true;"
  },
  {
    "path": "packages/mvvm-file-loader/dist/options.json",
    "content": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"name\": {},\n    \"regExp\": {},\n    \"context\": {\n      \"type\": \"string\"\n    },\n    \"publicPath\": {},\n    \"outputPath\": {},\n    \"useRelativePath\": {\n      \"type\": \"boolean\"\n    },\n    \"emitFile\": {\n      \"type\": \"boolean\"\n    }\n  },\n  \"additionalProperties\": true\n}\n"
  },
  {
    "path": "packages/mvvm-file-loader/package.json",
    "content": "{\n  \"name\": \"mvvm-file-loader\",\n  \"version\": \"1.0.8\",\n  \"description\": \"mvvm file loader\",\n  \"main\": \"dist/cjs.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"dependencies\": {\n    \"loader-utils\": \"^1.0.2\",\n    \"mime\": \"^2.4.2\",\n    \"schema-utils\": \"^0.4.5\"\n  },\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\"\n}"
  },
  {
    "path": "packages/mvvm-interface-parser/.eslintrc",
    "content": "{\n  // 在配置文件里配置全局变量时，使用 globals 指出你要使用的全局变量。将变量设置为 true 将允许变量被重写，或 false 将不允许被重写\n  \"globals\": {\n      \"cml\": false\n  },\n  // 环境定义了预定义的全局变量。\n  \"env\": {\n      //环境定义了预定义的全局变量。更多在官网查看\n      \"browser\": true,\n      \"node\": true,\n      \"commonjs\": true,\n      \"amd\": true,\n      \"es6\": true,\n      \"mocha\": true\n  },\n  // JavaScript 语言选项\n  \"parserOptions\": {\n      // ECMAScript 版本\n      \"ecmaVersion\": 9,\n      \"sourceType\": \"module\", //设置为 \"script\" (默认) 或 \"module\"（如果你的代码是 ECMAScript 模块)。\n      //想使用的额外的语言特性:\n      \"ecmaFeatures\": {\n          // 允许在全局作用域下使用 return 语句\n          \"globalReturn\": true,\n          // impliedStric\n          \"impliedStrict\": true,\n          // 启用 JSX\n          \"jsx\": true,\n          \"modules\": true\n      }\n  },\n  //-----让eslint支持 JSX start\n  \"plugins\": [\n\n  ],\n  \"extends\": [\n      \"eslint:recommended\"\n  ],\n  //-----让eslint支持 JSX end\n\n\n  /**\n   * \"off\" 或 0 - 关闭规则\n   * \"warn\" 或 1 - 开启规则，使用警告级别的错误：warn (不会导致程序退出),\n   * \"error\" 或 2 - 开启规则，使用错误级别的错误：error (当被触发的时候，程序会退出)\n   */\n  \"rules\": {\n\n      ////////////////\n      // 可能的错误 //\n      ////////////////\n\n      // 禁止条件表达式中出现赋值操作符\n      \"no-cond-assign\": 2,\n      // 禁用 console\n      \"no-console\": 0,\n      // 禁止在条件中使用常量表达式\n      // if (false) {\n      // doSomethingUnfinished();\n      // } //cuowu\n      \"no-constant-condition\": 2,\n      // 禁止在正则表达式中使用控制字符 ：new RegExp(\"\\x1f\")\n      \"no-control-regex\": 2,\n      // 数组和对象键值对最后一个逗号， never参数：不能带末尾的逗号, always参数：必须带末尾的逗号，\n      // always-multiline：多行模式必须带逗号，单行模式不能带逗号\n      \"comma-dangle\": [1, \"never\"],\n      // 禁用 debugger\n      \"no-debugger\": 2,\n      // 禁止 function 定义中出现重名参数\n      \"no-dupe-args\": 2,\n      // 禁止对象字面量中出现重复的 key\n      \"no-dupe-keys\": 2,\n      // 禁止重复的 case 标签\n      \"no-duplicate-case\": 2,\n      // 禁止空语句块\n      \"no-empty\": 2,\n      // 禁止在正则表达式中使用空字符集 (/^abc[]/)\n      \"no-empty-character-class\": 2,\n      // 禁止对 catch 子句的参数重新赋值\n      \"no-ex-assign\": 2,\n      // 禁止不必要的布尔转换\n      \"no-extra-boolean-cast\": 2,\n      // 禁止不必要的括号 //(a * b) + c;//报错\n      \"no-extra-parens\": 0,\n      // 禁止不必要的分号\n      \"no-extra-semi\": 2,\n      // 禁止对 function 声明重新赋值\n      \"no-func-assign\": 2,\n      // 禁止在嵌套的块中出现 function 或 var 声明\n      \"no-inner-declarations\": [2, \"functions\"],\n      // 禁止 RegExp 构造函数中无效的正则表达式字符串\n      \"no-invalid-regexp\": 2,\n      // 禁止在字符串和注释之外不规则的空白\n      \"no-irregular-whitespace\": 2,\n      // 禁止在 in 表达式中出现否定的左操作数\n      \"no-negated-in-lhs\": 2,\n      // 禁止把全局对象 (Math 和 JSON) 作为函数调用 错误：var math = Math();\n      \"no-obj-calls\": 2,\n      // 禁止直接使用 Object.prototypes 的内置属性\n      \"no-prototype-builtins\": 0,\n      // 禁止正则表达式字面量中出现多个空格\n      \"no-regex-spaces\": 2,\n      // 禁用稀疏数组\n      \"no-sparse-arrays\": 2,\n      // 禁止出现令人困惑的多行表达式\n      \"no-unexpected-multiline\": 2,\n      // 禁止在return、throw、continue 和 break语句之后出现不可达代码\n      \"no-unreachable\": 2,\n      // 要求使用 isNaN() 检查 NaN\n      \"use-isnan\": 2,\n      // 强制使用有效的 JSDoc 注释\n      \"valid-jsdoc\": 0,\n      // 强制 typeof 表达式与有效的字符串进行比较\n      // typeof foo === \"undefimed\" 错误\n      \"valid-typeof\": 2,\n\n\n      //////////////\n      // 最佳实践 //\n      //////////////\n\n      // 定义对象的set存取器属性时，强制定义get\n      \"accessor-pairs\": 2,\n      // 强制数组方法的回调函数中有 return 语句\n      \"array-callback-return\": 0,\n      // 强制把变量的使用限制在其定义的作用域范围内\n      \"block-scoped-var\": 0,\n      // 限制圈复杂度，也就是类似if else能连续接多少个\n      \"complexity\": [2, 20],\n      // 要求 return 语句要么总是指定返回的值，要么不指定\n      \"consistent-return\": 0,\n      // 强制所有控制语句使用一致的括号风格\n      \"curly\": [2, \"all\"],\n      // switch 语句强制 default 分支，也可添加 // no default 注释取消此次警告\n      \"default-case\": 2,\n      // 强制object.key 中 . 的位置，参数:\n      // property，'.'号应与属性在同一行\n      // object, '.' 号应与对象名在同一行\n      \"dot-location\": [2, \"property\"],\n      // 强制使用.号取属性\n      // 参数： allowKeywords：true 使用保留字做属性名时，只能使用.方式取属性\n      // false 使用保留字做属性名时, 只能使用[]方式取属性 e.g [2, {\"allowKeywords\": false}]\n      // allowPattern: 当属性名匹配提供的正则表达式时，允许使用[]方式取值,否则只能用.号取值 e.g [2, {\"allowPattern\": \"^[a-z]+(_[a-z]+)+$\"}]\n      \"dot-notation\": [2, {\n          \"allowKeywords\": false\n      }],\n      // 使用 === 替代 == allow-null允许null和undefined==\n      \"eqeqeq\": [0, \"allow-null\"],\n      // 要求 for-in 循环中有一个 if 语句\n      \"guard-for-in\": 2,\n      // 禁用 alert、confirm 和 prompt\n      \"no-alert\": 0,\n      // 禁用 arguments.caller 或 arguments.callee\n      \"no-caller\": 2,\n      // 不允许在 case 子句中使用词法声明\n      \"no-case-declarations\": 2,\n      // 禁止除法操作符显式的出现在正则表达式开始的位置\n      \"no-div-regex\": 2,\n      // 禁止 if 语句中有 return 之后有 else\n      \"no-else-return\": 0,\n      // 禁止出现空函数.如果一个函数包含了一条注释，它将不会被认为有问题。\n      \"no-empty-function\": 2,\n      // 禁止使用空解构模式no-empty-pattern\n      \"no-empty-pattern\": 2,\n      // 禁止在没有类型检查操作符的情况下与 null 进行比较\n      \"no-eq-null\": 1,\n      // 禁用 eval()\n      \"no-eval\": 2,\n      // 禁止扩展原生类型\n      \"no-extend-native\": 2,\n      // 禁止不必要的 .bind() 调用\n      \"no-extra-bind\": 2,\n      // 禁用不必要的标签\n      \"no-extra-label:\": 0,\n      // 禁止 case 语句落空\n      \"no-fallthrough\": 2,\n      // 禁止数字字面量中使用前导和末尾小数点\n      \"no-floating-decimal\": 2,\n      // 禁止使用短符号进行类型转换(!!fOO)\n      \"no-implicit-coercion\": 0,\n      // 禁止在全局范围内使用 var 和命名的 function 声明\n      \"no-implicit-globals\": 1,\n      // 禁止使用类似 eval() 的方法\n      \"no-implied-eval\": 2,\n      // 禁止 this 关键字出现在类和类对象之外\n      \"no-invalid-this\": 0,\n      // 禁用 __iterator__ 属性\n      \"no-iterator\": 2,\n      // 禁用标签语句\n      \"no-labels\": 2,\n      // 禁用不必要的嵌套块\n      \"no-lone-blocks\": 2,\n      // 禁止在循环中出现 function 声明和表达式\n      \"no-loop-func\": 1,\n      // 禁用魔术数字(3.14什么的用常量代替)\n      \"no-magic-numbers\": [1, {\n          \"ignore\": [0, -1, 1]\n      }],\n      // 禁止使用多个空格\n      \"no-multi-spaces\": 2,\n      // 禁止使用多行字符串，在 JavaScript 中，可以在新行之前使用斜线创建多行字符串\n      \"no-multi-str\": 2,\n      // 禁止对原生对象赋值\n      \"no-native-reassign\": 2,\n      // 禁止在非赋值或条件语句中使用 new 操作符\n      \"no-new\": 2,\n      // 禁止对 Function 对象使用 new 操作符\n      \"no-new-func\": 0,\n      // 禁止对 String，Number 和 Boolean 使用 new 操作符\n      \"no-new-wrappers\": 2,\n      // 禁用八进制字面量\n      \"no-octal\": 2,\n      // 禁止在字符串中使用八进制转义序列\n      \"no-octal-escape\": 2,\n      // 不允许对 function 的参数进行重新赋值\n      \"no-param-reassign\": 0,\n      // 禁用 __proto__ 属性\n      \"no-proto\": 2,\n      // 禁止使用 var 多次声明同一变量\n      \"no-redeclare\": 2,\n      // 禁用指定的通过 require 加载的模块\n      \"no-return-assign\": 0,\n      // 禁止使用 javascript: url\n      \"no-script-url\": 0,\n      // 禁止自我赋值\n      \"no-self-assign\": 2,\n      // 禁止自身比较\n      \"no-self-compare\": 2,\n      // 禁用逗号操作符\n      \"no-sequences\": 2,\n      // 禁止抛出非异常字面量\n      \"no-throw-literal\": 2,\n      // 禁用一成不变的循环条件\n      \"no-unmodified-loop-condition\": 2,\n      // 禁止出现未使用过的表达式\n      \"no-unused-expressions\": 0,\n      // 禁用未使用过的标签\n      \"no-unused-labels\": 2,\n      // 禁止不必要的 .call() 和 .apply()\n      \"no-useless-call\": 2,\n      // 禁止不必要的字符串字面量或模板字面量的连接\n      \"no-useless-concat\": 0,\n      // 禁用不必要的转义字符\n      \"no-useless-escape\": 0,\n      // 禁用 void 操作符\n      \"no-void\": 0,\n      // 禁止在注释中使用特定的警告术语\n      \"no-warning-comments\": 0,\n      // 禁用 with 语句\n      \"no-with\": 2,\n      // 强制在parseInt()使用基数参数\n      \"radix\": 2,\n      // 要求所有的 var 声明出现在它们所在的作用域顶部\n      \"vars-on-top\": 0,\n      // 要求 IIFE 使用括号括起来\n      \"wrap-iife\": [2, \"any\"],\n      // 要求或禁止 “Yoda” 条件\n      \"yoda\": [2, \"never\"],\n      // 要求或禁止使用严格模式指令\n      \"strict\": 0,\n\n\n      //////////////\n      // 变量声明 //\n      //////////////\n\n      // 要求或禁止 var 声明中的初始化(初值)\n      \"init-declarations\": 0,\n      // 不允许 catch 子句的参数与外层作用域中的变量同名\n      \"no-catch-shadow\": 0,\n      // 禁止删除变量\n      \"no-delete-var\": 2,\n      // 不允许标签与变量同名\n      \"no-label-var\": 2,\n      // 禁用特定的全局变量\n      \"no-restricted-globals\": 0,\n      // 禁止 var 声明 与外层作用域的变量同名\n      \"no-shadow\": 0,\n      // 禁止覆盖受限制的标识符\n      \"no-shadow-restricted-names\": 2,\n      // 禁用未声明的变量，除非它们在 /*global */ 注释中被提到\n      \"no-undef\": 2,\n      // 禁止将变量初始化为 undefined\n      \"no-undef-init\": 2,\n      // 禁止将 undefined 作为标识符\n      \"no-undefined\": 0,\n      // 禁止出现未使用过的变量\n      \"no-unused-vars\": [2, {\n          \"vars\": \"all\",\n          \"args\": \"none\"\n      }],\n      // 不允许在变量定义之前使用它们\n      \"no-use-before-define\": 0,\n\n      //////////////////////////\n      // Node.js and CommonJS //\n      //////////////////////////\n\n      // require return statements after callbacks\n      \"callback-return\": 0,\n      // 要求 require() 出现在顶层模块作用域中\n      \"global-require\": 1,\n      // 要求回调函数中有容错处理\n      \"handle-callback-err\": [2, \"^(err|error)$\"],\n      // 禁止混合常规 var 声明和 require 调用\n      \"no-mixed-requires\": 0,\n      // 禁止调用 require 时使用 new 操作符\n      \"no-new-require\": 2,\n      // 禁止对 __dirname 和 __filename进行字符串连接\n      \"no-path-concat\": 0,\n      // 禁用 process.env\n      \"no-process-env\": 0,\n      // 禁用 process.exit()\n      \"no-process-exit\": 0,\n      // 禁用同步方法\n      \"no-sync\": 0,\n\n      //////////////\n      // 风格指南 //\n      //////////////\n\n      // 指定数组的元素之间要以空格隔开(, 后面)， never参数：[ 之前和 ] 之后不能带空格，always参数：[ 之前和 ] 之后必须带空格\n      \"array-bracket-spacing\": [2, \"never\"],\n      // 禁止或强制在单行代码块中使用空格(禁用)\n      \"block-spacing\": [1, \"never\"],\n      //强制使用一致的缩进 第二个参数为 \"tab\" 时，会使用tab，\n      // if while function 后面的{必须与if在同一行，java风格。\n      \"brace-style\": [2, \"1tbs\", {\n          \"allowSingleLine\": true\n      }],\n      // 双峰驼命名格式\n      \"camelcase\": 2,\n      // 控制逗号前后的空格\n      \"comma-spacing\": [2, {\n          \"before\": false,\n          \"after\": true\n      }],\n      // 控制逗号在行尾出现还是在行首出现 (默认行尾)\n      // http://eslint.org/docs/rules/comma-style\n      \"comma-style\": [2, \"last\"],\n      //\"SwitchCase\" (默认：0) 强制 switch 语句中的 case 子句的缩进水平\n      // 以方括号取对象属性时，[ 后面和 ] 前面是否需要空格, 可选参数 never, always\n      \"computed-property-spacing\": [2, \"never\"],\n      // 用于指统一在回调函数中指向this的变量名，箭头函数中的this已经可以指向外层调用者，应该没卵用了\n      // e.g [0,\"that\"] 指定只能 var that = this. that不能指向其他任何值，this也不能赋值给that以外的其他值\n      \"consistent-this\": [1, \"that\"],\n      // 强制使用命名的 function 表达式\n      \"func-names\": 0,\n      // 文件末尾强制换行\n      \"eol-last\": 2,\n      \"indent\": [2, 2, {\n          \"SwitchCase\": 1\n      }],\n      // 强制在对象字面量的属性中键和值之间使用一致的间距\n      \"key-spacing\": [2, {\n          \"beforeColon\": false,\n          \"afterColon\": true\n      }],\n      // 强制使用一致的换行风格\n      \"linebreak-style\": [1, \"unix\"],\n      // 要求在注释周围有空行 ( 要求在块级注释之前有一空行)\n      \"lines-around-comment\": [1, {\n          \"beforeBlockComment\": true\n      }],\n      // 强制一致地使用函数声明或函数表达式，方法定义风格，参数：\n      // declaration: 强制使用方法声明的方式，function f(){} e.g [2, \"declaration\"]\n      // expression：强制使用方法表达式的方式，var f = function() {} e.g [2, \"expression\"]\n      // allowArrowFunctions: declaration风格中允许箭头函数。 e.g [2, \"declaration\", { \"allowArrowFunctions\": true }]\n      \"func-style\": 0,\n      // 强制回调函数最大嵌套深度 5层\n      \"max-nested-callbacks\": [1, 5],\n      // 禁止使用指定的标识符\n      \"id-blacklist\": 0,\n      // 强制标识符的最新和最大长度\n      \"id-length\": 0,\n      // 要求标识符匹配一个指定的正则表达式\n      \"id-match\": 0,\n      // 强制在 JSX 属性中一致地使用双引号或单引号\n      \"jsx-quotes\": 0,\n      // 强制在关键字前后使用一致的空格 (前后腰需要)\n      \"keyword-spacing\": 2,\n      // 强制一行的最大长度\n      \"max-len\": [1, 200],\n      // 强制最大行数\n      \"max-lines\": 0,\n      // 强制 function 定义中最多允许的参数数量\n      \"max-params\": [1, 7],\n      // 强制 function 块最多允许的的语句数量\n      \"max-statements\": [1, 200],\n      // 强制每一行中所允许的最大语句数量\n      \"max-statements-per-line\": 0,\n      // 要求构造函数首字母大写 （要求调用 new 操作符时有首字母大小的函数，允许调用首字母大写的函数时没有 new 操作符。）\n      \"new-cap\": [2, {\n          \"newIsCap\": true,\n          \"capIsNew\": false\n      }],\n      // 要求调用无参构造函数时有圆括号\n      \"new-parens\": 2,\n      // 要求或禁止 var 声明语句后有一行空行\n      \"newline-after-var\": 0,\n      // 禁止使用 Array 构造函数\n      \"no-array-constructor\": 2,\n      // 禁用按位运算符\n      \"no-bitwise\": 0,\n      // 要求 return 语句之前有一空行\n      \"newline-before-return\": 0,\n      // 要求方法链中每个调用都有一个换行符\n      \"newline-per-chained-call\": 1,\n      // 禁用 continue 语句\n      \"no-continue\": 0,\n      // 禁止在代码行后使用内联注释\n      \"no-inline-comments\": 0,\n      // 禁止 if 作为唯一的语句出现在 else 语句中\n      \"no-lonely-if\": 0,\n      // 禁止混合使用不同的操作符\n      \"no-mixed-operators\": 0,\n      // 不允许空格和 tab 混合缩进\n      \"no-mixed-spaces-and-tabs\": 2,\n      // 不允许多个空行\n      \"no-multiple-empty-lines\": [2, {\n          \"max\": 2\n      }],\n      // 不允许否定的表达式\n      \"no-negated-condition\": 0,\n      // 不允许使用嵌套的三元表达式\n      \"no-nested-ternary\": 0,\n      // 禁止使用 Object 的构造函数\n      \"no-new-object\": 2,\n      // 禁止使用一元操作符 ++ 和 --\n      \"no-plusplus\": 0,\n      // 禁止使用特定的语法\n      \"no-restricted-syntax\": 0,\n      // 禁止 function 标识符和括号之间出现空格\n      \"no-spaced-func\": 2,\n      // 不允许使用三元操作符\n      \"no-ternary\": 0,\n      // 禁用行尾空格\n      \"no-trailing-spaces\": 2,\n      // 禁止标识符中有悬空下划线_bar\n      \"no-underscore-dangle\": 0,\n      // 禁止可以在有更简单的可替代的表达式时使用三元操作符\n      \"no-unneeded-ternary\": 2,\n      // 禁止属性前有空白\n      \"no-whitespace-before-property\": 0,\n      // 强制花括号内换行符的一致性\n      \"object-curly-newline\": 0,\n      // 强制在花括号中使用一致的空格\n      \"object-curly-spacing\": 0,\n      // 强制将对象的属性放在不同的行上\n      \"object-property-newline\": 0,\n      // 强制函数中的变量要么一起声明要么分开声明\n      \"one-var\": [2, {\n          \"initialized\": \"never\"\n      }],\n      // 要求或禁止在 var 声明周围换行\n      \"one-var-declaration-per-line\": 0,\n      // 要求或禁止在可能的情况下要求使用简化的赋值操作符\n      \"operator-assignment\": 0,\n      // 强制操作符使用一致的换行符\n      \"operator-linebreak\": [2, \"after\", {\n          \"overrides\": {\n              \"?\": \"before\",\n              \":\": \"before\"\n          }\n      }],\n      // 要求或禁止块内填充\n      \"padded-blocks\": 0,\n      // 要求对象字面量属性名称用引号括起来\n      \"quote-props\": 0,\n      // 强制使用一致的反勾号、双引号或单引号\n      // \"quotes\": [2, \"single\", \"avoid-escape\"],\n      // 要求使用 JSDoc 注释\n      \"require-jsdoc\": 0,\n      // 要求或禁止使用分号而不是 ASI（这个才是控制行尾部分号的，）\n      \"semi\": [0, \"always\"],\n      // 强制分号之前和之后使用一致的空格\n      \"semi-spacing\": 0,\n      // 要求同一个声明块中的变量按顺序排列\n      \"sort-vars\": 0,\n      // 强制在块之前使用一致的空格\n      \"space-before-blocks\": [2, \"always\"],\n      // 强制在 function的左括号之前使用一致的空格\n      \"space-before-function-paren\": [0, \"always\"],\n      // 强制在圆括号内使用一致的空格\n      \"space-in-parens\": [2, \"never\"],\n      // 要求操作符周围有空格\n      \"space-infix-ops\": 2,\n      // 强制在一元操作符前后使用一致的空格\n      \"space-unary-ops\": [2, {\n          \"words\": true,\n          \"nonwords\": false\n      }],\n      // 强制在注释中 // 或 /* 使用一致的空格\n      \"spaced-comment\": [2, \"always\", {\n          \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n      }],\n      // 要求或禁止 Unicode BOM\n      \"unicode-bom\": 0,\n      // 要求正则表达式被括号括起来\n      \"wrap-regex\": 0,\n\n      //////////////\n      // ES6.相关 //\n      //////////////\n\n      // 要求箭头函数体使用大括号\n      \"arrow-body-style\": 2,\n      // 要求箭头函数的参数使用圆括号\n      \"arrow-parens\": 0,\n      \"arrow-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 强制在子类构造函数中用super()调用父类构造函数，TypeScrip的编译器也会提示\n      \"constructor-super\": 0,\n      // 强制 generator 函数中 * 号周围使用一致的空格\n      \"generator-star-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 禁止修改类声明的变量\n      \"no-class-assign\": 2,\n      // 不允许箭头功能，在那里他们可以混淆的比较\n      \"no-confusing-arrow\": 0,\n      // 禁止修改 const 声明的变量\n      \"no-const-assign\": 2,\n      // 禁止类成员中出现重复的名称\n      \"no-dupe-class-members\": 2,\n      // 不允许复制模块的进口\n      \"no-duplicate-imports\": 0,\n      // 禁止 Symbol 的构造函数\n      \"no-new-symbol\": 2,\n      // 允许指定模块加载时的进口\n      \"no-restricted-imports\": 0,\n      // 禁止在构造函数中，在调用 super() 之前使用 this 或 super\n      \"no-this-before-super\": 2,\n      // 禁止不必要的计算性能键对象的文字\n      \"no-useless-computed-key\": 0,\n      // 要求使用 let 或 const 而不是 var\n      \"no-var\": 0,\n      // 要求或禁止对象字面量中方法和属性使用简写语法\n      \"object-shorthand\": 0,\n      // 要求使用箭头函数作为回调\n      \"prefer-arrow-callback\": 0,\n      // 要求使用 const 声明那些声明后不再被修改的变量\n      \"prefer-const\": 0,\n      // 要求在合适的地方使用 Reflect 方法\n      \"prefer-reflect\": 0,\n      // 要求使用扩展运算符而非 .apply()\n      \"prefer-spread\": 0,\n      // 要求使用模板字面量而非字符串连接\n      \"prefer-template\": 0,\n      // Suggest using the rest parameters instead of arguments\n      \"prefer-rest-params\": 0,\n      // 要求generator 函数内有 yield\n      \"require-yield\": 0,\n      // enforce spacing between rest and spread operators and their expressions\n      \"rest-spread-spacing\": 0,\n      // 强制模块内的 import 排序\n      \"sort-imports\": 0,\n      // 要求或禁止模板字符串中的嵌入表达式周围空格的使用\n      \"template-curly-spacing\": 1,\n      // 强制在 yield* 表达式中 * 周围使用空格\n      \"yield-star-spacing\": 2\n  }\n}\n"
  },
  {
    "path": "packages/mvvm-interface-parser/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n.vscode\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\n"
  },
  {
    "path": "packages/mvvm-interface-parser/README.md",
    "content": "####  使用\nchameleon-loader和interface-loader中获取interface文件内容时使用\n"
  },
  {
    "path": "packages/mvvm-interface-parser/index.js",
    "content": "\nconst cmlUtils = require('chameleon-tool-utils');\nconst {getCode} = require('./lib/check.js');\nconst getInterfaceCode = require('./lib/getInterfaceCode.js');\nconst getMethodCode = require('./lib/getMethodCode.js');\nconst path = require('path');\n\n// resolve 用于处理interface中include文件中的引用\nmodule.exports = function({cmlType, media, source, filePath, check }) {\n  let interfaceResut = getInterfaceCode({interfacePath: filePath, content: source})\n  let methodResult = getMethodCode({interfacePath: filePath, content: source, cmlType})\n\n  let {content: interfaceContent, devDeps: interfacedevDeps} = interfaceResut;\n  let {content: methodContent, devDeps: methoddevDeps} = methodResult;\n  let devDeps = [].concat(interfacedevDeps).concat(methoddevDeps);\n  if (!interfaceContent) {\n    throw new Error(`文件: ${filePath}未定义<script cml-type=\"interface\"></script>`)\n  }\n  if (!methodContent) {\n    throw new Error(`文件: ${filePath}未定义<script cml-type=\"${cmlType}\"></script>`)\n  }\n  let result = `\n  ${interfaceContent}\n  ${methodContent}\n  `;\n\n  if (media === 'dev' && check.enable === true) {\n    try {\n      result = getCode(result, {\n        cmlType,\n        filePath,\n        enableTypes: check.enableTypes || []\n      });\n    } catch (e) {\n      // 当有语法错误 babel parse会报错，报错信息不友好\n      cmlUtils.log.error(`mvvm-interface-parser: ${filePath} syntax error！`)\n    }\n  }\n\n  // 将对象原型上的方法属性拷贝到对象上 解决...扩展运算符取不到值的问题\n  const copyProtoPath = path.join(__dirname, './runtime/copyProto.js');\n  const copyProtoProperty = `\n  var copyProtoProperty = require('${cmlUtils.handleRelativePath(filePath, copyProtoPath)}');\n  copyProtoProperty(exports.default);\n  `\n  result = `\n    ${result}\n    ${copyProtoProperty}\n  `\n  return {result, devDeps};\n}\n"
  },
  {
    "path": "packages/mvvm-interface-parser/lib/check.js",
    "content": "const parser = require('@babel/parser');\nconst traverse = require('@babel/traverse');\nconst generate = require(\"@babel/generator\");\nconst {getDefines, parsePlugins} = require('runtime-check');\nconst path = require('path');\nconst cmlUtils = require('chameleon-tool-utils');\n\n/**\n * 处理ast导出表达式\n *\n * @param  {Object} ast ast\n * @return {Object}     ast\n */\nconst handlExport = function (ast) {\n  traverse[\"default\"](ast, {\n    enter(path) {\n      if (path.node.type === 'ExportDefaultDeclaration') {\n        // 拿到export ddefault new Method(); 这一行代码\n        let exportCode = generate[\"default\"](path.node);\n        // 拿到 new Method(); 这一段代码\n        let declarationCode = generate[\"default\"](path.node.declaration);\n        // 得到 export default __OBJECT__WARPPER__(new Method());\n        let codeSeg = exportCode.code.replace(declarationCode.code, '__OBJECT__WRAPPER__(' + declarationCode.code + ', __CML_ERROR__, __enableTypes__, __CHECK__DEFINES__ )');\n        // 转成ast\n        let replacement = parser.parse(codeSeg, {\n          plugins: parsePlugins,\n          sourceType: 'module'\n        });\n        traverse[\"default\"].removeProperties(replacement);\n        // 替换\n        path.replaceWith(replacement.program.body[0]);\n        path.stop();\n      }\n    }\n  });\n\n  return ast;\n};\n\n/**\n * 获取处理后的代码\n *\n * @param  {string} code 代码片段\n * @return {string}      代码片段\n */\nconst getCode = function (code, options) {\n  let {filePath, cmlType, enableTypes} = options;\n  const defines = getDefines(code, filePath);\n  /* eslint-disable no-magic-numbers */\n  const defineStr = JSON.stringify(defines.defines, null, 2);\n  /* eslint-disable no-magic-numbers */\n  const newCode = generate[\"default\"](handlExport(defines.ast)).code;\n\n  let result = '';\n  let wrapperCode = '';\n  if (filePath) {\n    filePath = path.resolve(filePath);\n    filePath = cmlUtils.handleWinPath(filePath);\n    result += `const __INTERFACE__FILEPATH=\"${filePath}\"`;\n  }\n  /* eslint-disable no-inner-declarations */\n  if (cmlType === 'weex') {\n    function throwError(content) {\n      var modal = weex.requireModule('modal')\n      modal.alert({\n        message: `文件位置: ${__INTERFACE__FILEPATH}\n                   ${content}`\n      })\n    }\n    result += `\n      const __CML_ERROR__ = ${throwError.toString()}\n    `\n  } else {\n    function throwError(content) {\n      throw new Error(`文件位置: ${__INTERFACE__FILEPATH}\n            ${content}`)\n    }\n    result += `\n      const __CML_ERROR__ = ${throwError.toString()}\n    `\n  }\n  const wrapperPath = path.join(__dirname, '../runtime/checkWrapper.js');\n  wrapperCode = `require('${cmlUtils.handleRelativePath(filePath, wrapperPath)}')`\n\n  result += `\n  const __enableTypes__ = \"${enableTypes}\"\n  const __CHECK__DEFINES__ = ${defineStr};\n  const __OBJECT__WRAPPER__ = ${wrapperCode};\n  ${newCode}\n  `;\n  return result;\n};\n\nmodule.exports = {\n  getCode\n};\n"
  },
  {
    "path": "packages/mvvm-interface-parser/lib/getInterfaceCode.js",
    "content": "const cmlUtils = require('chameleon-tool-utils');\nconst fs = require('fs');\n/**\n * 1 先找到所有interface的定义部分\n * 2 校验是否一致 如果多个路径指向同一interface 则合并依赖\n */\nmodule.exports = function({interfacePath, content}) {\n\n  let result;\n  let devDeps = []; // 所有interface上的路径都可能影响获取\n\n  function getInterface(filePath, content) {\n    if (filePath !== interfacePath) {\n      devDeps.push(filePath);\n    }\n    if (!content) {\n      content = fs.readFileSync(filePath, {encoding: 'utf-8'});\n    }\n    let parts = cmlUtils.splitParts({content});\n    let include = [];\n    for (let i = 0;i < parts.customBlocks.length;i++) {\n      if (parts.customBlocks[i].type === 'include') {\n        include.push(parts.customBlocks[i]);\n      }\n    }\n    let interfaceScript = null;\n    for (let i = 0;i < parts.script.length;i++) {\n      if (parts.script[i].cmlType === 'interface') {\n        if (interfaceScript) {\n          throw new Error(`multi <script cml-type='interface'></script> has define in : ${filePath}`)\n        } else {\n          interfaceScript = parts.script[i];\n        }\n      }\n    }\n    if (interfaceScript) {\n      if (!result) {\n        if (interfaceScript.attrs && interfaceScript.attrs.src) {\n          let newFilePath = cmlUtils.resolveSync(filePath, interfaceScript.attrs.src);\n          if (!cmlUtils.isFile(newFilePath)) {\n            throw new Error(`not find file: ${newFilePath}`)\n          }\n          devDeps.push(newFilePath);\n          let newContent = fs.readFileSync(newFilePath, {encoding: 'utf-8'});\n          result = {\n            content: newContent,\n            contentFilePath: newFilePath\n          };\n        } else {\n          result = {\n            content: interfaceScript.content,\n            contentFilePath: filePath\n          };\n        }\n      } else {\n        if (result.contentFilePath !== filePath) {\n          throw new Error(`multi <script cml-type='interface'></script> has define in : ${filePath} and ${result.filePath}`)\n        }\n      }\n    }\n\n    include.forEach(item => {\n      if (!item.attrs.src) {\n        throw new Error(`not define include src attribute in : ${filePath}`)\n      }\n      let newFilePath = cmlUtils.resolveSync(filePath, item.attrs.src);\n      if (!cmlUtils.isFile(newFilePath)) {\n        throw new Error(`not find file: ${newFilePath}`)\n      }\n      // 递归include的文件\n      getInterface(newFilePath);\n    })\n\n  }\n\n  getInterface(interfacePath, content);\n\n  if (result) {\n    return {\n      content: result.content,\n      devDeps,\n      contentFilePath: result.contentFilePath\n    };\n  } else {\n    throw new Error(`not find <script cml-type='interface'></script> in ${interfacePath}`)\n  }\n}\n"
  },
  {
    "path": "packages/mvvm-interface-parser/lib/getInterfaceCode_old.js",
    "content": "const cmlUtils = require('chameleon-tool-utils');\nconst fs = require('fs');\n\nmodule.exports = function({interfacePath, content}) {\n\n  let devDeps = [];\n\n  function getInterface(filePath, content) {\n    if (filePath !== interfacePath) {\n      devDeps.push(filePath);\n    }\n    if (!content) {\n      content = fs.readFileSync(filePath, {encoding: 'utf-8'});\n    }\n\n    let parts = cmlUtils.splitParts({content});\n    let include = null;\n    for (let i = 0;i < parts.customBlocks.length;i++) {\n      if (parts.customBlocks[i].type === 'include') {\n        if (include) {\n          throw new Error(`file just allow has only one <include></include>: ${filePath}`)\n        }\n        include = parts.customBlocks[i];\n      }\n    }\n    let interfaceScript = null;\n    for (let i = 0;i < parts.script.length;i++) {\n      if (parts.script[i].cmlType === 'interface') {\n        interfaceScript = parts.script[i];\n      }\n    }\n\n    if (include && interfaceScript) {\n      throw new Error(`file has <include></include> not allow has <script cml-type='interface'></script>: ${filePath}`)\n    } else if (include === null && interfaceScript) {\n      return {\n        filePath: filePath,\n        part: interfaceScript\n      }\n    } else if (include && interfaceScript === null) {\n      if (!include.attrs.src) {\n        throw new Error(`not define src attribute: ${filePath}`)\n      }\n      let newFilePath = cmlUtils.resolveSync(filePath, include.attrs.src);\n      if (!cmlUtils.isFile(newFilePath)) {\n        throw new Error(`not find file: ${newFilePath}`)\n      }\n      // 递归include的文件\n      return getInterface(newFilePath);\n    }\n\n    return null;\n\n  }\n\n  let result = getInterface(interfacePath, content);\n  if (result) {\n    let {part, filePath} = result;\n    // script 有src属性的\n    if (part.attrs && part.attrs.src) {\n      let newFilePath = cmlUtils.resolveSync(filePath, part.attrs.src);\n      if (!cmlUtils.isFile(newFilePath)) {\n        throw new Error(`not find file: ${newFilePath}`)\n      }\n      devDeps.push(newFilePath);\n      let newContent = fs.readFileSync(newFilePath, {encoding: 'utf-8'});\n      return {\n        content: newContent,\n        devDeps,\n        contentFilePath: newFilePath\n      };\n    } else {\n      return {\n        content: result.part.content,\n        devDeps,\n        contentFilePath: result.filePath\n      };\n    }\n  } else {\n    throw new Error(`not find <script cml-type='interface'></script> in ${interfacePath}`)\n  }\n}\n"
  },
  {
    "path": "packages/mvvm-interface-parser/lib/getMethodCode.js",
    "content": "const cmlUtils = require('chameleon-tool-utils');\nconst fs = require('fs');\nconst {resolveRequire} = require('./resolveRequire.js');\n\n\nmodule.exports = function({interfacePath, content, cmlType}) {\n\n  let devDeps = [];\n\n  function getMethod(filePath, content) {\n    if (filePath !== interfacePath) {\n      devDeps.push(filePath);\n    }\n\n    let parts = cmlUtils.splitParts({content});\n    let include = [];\n    for (let i = 0;i < parts.customBlocks.length;i++) {\n      if (parts.customBlocks[i].type === 'include') {\n        include.push(parts.customBlocks[i]);\n      }\n    }\n    let methodScript = null;\n    for (let i = 0;i < parts.script.length;i++) {\n      if (~parts.script[i].cmlType.split(',').indexOf(cmlType)) {\n        methodScript = parts.script[i];\n      }\n    }\n\n    if (methodScript) {\n      return {\n        filePath,\n        part: methodScript\n      }\n    }\n\n    for (let i = include.length - 1; i >= 0; i--) {\n      let item = include[i];\n      if (item) {\n        if (!item.attrs.src) {\n          throw new Error(`not define include src attribute: ${filePath}`)\n        }\n        let newFilePath = cmlUtils.resolveSync(filePath, item.attrs.src);\n        if (!cmlUtils.isFile(newFilePath)) {\n          throw new Error(`not find file: ${newFilePath}`)\n        }\n        let newContent = fs.readFileSync(newFilePath, {encoding: 'utf-8'})\n        return getMethod(newFilePath, newContent);\n      }\n    }\n    return null;\n  }\n\n\n  function getRawContent() {\n    let result = getMethod(interfacePath, content);\n    if (result) {\n      let {part, filePath} = result;\n      // script 有src属性的\n      if (part.attrs && part.attrs.src) {\n        let newFilePath = cmlUtils.resolveSync(filePath, part.attrs.src);\n        if (!cmlUtils.isFile(newFilePath)) {\n          throw new Error(`not find file: ${newFilePath}`)\n        }\n        devDeps.push(newFilePath);\n        let newContent = fs.readFileSync(newFilePath, {encoding: 'utf-8'});\n        return {\n          content: newContent,\n          devDeps,\n          contentFilePath: newFilePath\n        };\n      } else {\n        return {\n          content: result.part.content,\n          devDeps,\n          contentFilePath: result.filePath\n        };\n      }\n    } else {\n      throw new Error(`not find <script cml-type='${cmlType}'></script> in ${interfacePath}`)\n    }\n  }\n\n  let {content: newContent, contentFilePath} = getRawContent();\n\n  // 需要对原有content中的所有引用路径做解析 解析为绝对路径。\n  return {\n    content: resolveRequire({content: newContent, oldFilePath: contentFilePath, newFilePath: interfacePath}),\n    devDeps,\n    contentFilePath\n  }\n}\n"
  },
  {
    "path": "packages/mvvm-interface-parser/lib/getMethodCode_old.js",
    "content": "const cmlUtils = require('chameleon-tool-utils');\nconst fs = require('fs');\nconst {resolveRequire} = require('./resolveRequire.js');\n\n\nmodule.exports = function({interfacePath, content, cmlType}) {\n\n  let devDeps = [];\n\n  function getMethod(filePath, content) {\n    if (filePath !== interfacePath) {\n      devDeps.push(filePath);\n    }\n\n    let parts = cmlUtils.splitParts({content});\n    let include = null;\n    for (let i = 0;i < parts.customBlocks.length;i++) {\n      if (parts.customBlocks[i].type === 'include') {\n        if (include) {\n          throw new Error(`file just allow has only one <include></include>: ${filePath}`)\n        }\n        include = parts.customBlocks[i];\n      }\n    }\n    let methodScript = null;\n    for (let i = 0;i < parts.script.length;i++) {\n      if (~parts.script[i].cmlType.split(',').indexOf(cmlType)) {\n        methodScript = parts.script[i];\n      }\n    }\n\n    if (methodScript) {\n      return {\n        filePath,\n        part: methodScript\n      }\n    }\n\n    if (include) {\n      if (!include.attrs.src) {\n        throw new Error(`not define src attribute: ${filePath}`)\n      }\n      let newFilePath = cmlUtils.resolveSync(filePath, include.attrs.src);\n      if (!cmlUtils.isFile(newFilePath)) {\n        throw new Error(`not find file: ${newFilePath}`)\n      }\n      let newContent = fs.readFileSync(newFilePath, {encoding: 'utf-8'})\n      return getMethod(newFilePath, newContent);\n    }\n\n    return null;\n\n\n  }\n\n\n  function getRawContent() {\n    let result = getMethod(interfacePath, content);\n    if (result) {\n      let {part, filePath} = result;\n      // script 有src属性的\n      if (part.attrs && part.attrs.src) {\n        let newFilePath = cmlUtils.resolveSync(filePath, part.attrs.src);\n        if (!cmlUtils.isFile(newFilePath)) {\n          throw new Error(`not find file: ${newFilePath}`)\n        }\n        devDeps.push(newFilePath);\n        let newContent = fs.readFileSync(newFilePath, {encoding: 'utf-8'});\n        return {\n          content: newContent,\n          devDeps,\n          contentFilePath: newFilePath\n        };\n      } else {\n        return {\n          content: result.part.content,\n          devDeps,\n          contentFilePath: result.filePath\n        };\n      }\n    } else {\n      throw new Error(`not find <script cml-type='${cmlType}'></script> in ${interfacePath}`)\n    }\n  }\n\n  let {content: newContent, contentFilePath} = getRawContent();\n\n  // 需要对原有content中的所有引用路径做解析 解析为绝对路径。\n  return {\n    content: resolveRequire({content: newContent, oldFilePath: contentFilePath, newFilePath: interfacePath}),\n    devDeps,\n    contentFilePath\n  }\n}\n"
  },
  {
    "path": "packages/mvvm-interface-parser/lib/resolveRequire.js",
    "content": "const parser = require('@babel/parser');\nconst traverse = require('@babel/traverse');\nconst t = require('@babel/types');\nconst generator = require(\"@babel/generator\");\nconst {parsePlugins} = require('runtime-check');\nconst cmlUtils = require('chameleon-tool-utils');\n\n// resolve 解析路径的方法\nexports.resolveRequire = function({content, oldFilePath, newFilePath}) {\n  let resolve = cmlUtils.resolveInterfaceRequire;\n  let ast = exports.getAST(content);\n  exports.replaceRequire({ast, oldFilePath, newFilePath, resolve});\n  return generator[\"default\"](ast).code;\n}\n\n// 获取dependencies\nexports.replaceRequire = function({ast, oldFilePath, newFilePath, resolve}) {\n  traverse[\"default\"](ast, {\n    enter: (path) => {\n      let node = path.node;\n      if (t.isImportDeclaration(node) && node.source.value) {\n        let realPath = resolve(oldFilePath, newFilePath, node.source.value);\n        node.source.value = realPath;\n        node.source.raw = `'${realPath}'`;\n      }\n      if (t.isVariableDeclaration(node)) {\n        node.declarations.forEach(item => {\n          if (item && item.init && item.init.callee && item.init.callee.name === 'require' && item.init.arguments && item.init.arguments[0] && item.init.arguments[0].value) {\n            let realPath = resolve(oldFilePath, newFilePath, item.init.arguments[0].value);\n            item.init.arguments[0].value = realPath;\n            item.init.arguments[0].raw = `'${realPath}'`;\n          }\n        })\n      }\n      if (t.isExpressionStatement(node) && node.expression && node.expression.callee && node.expression.callee.name === 'require' && node.expression.arguments && node.expression.arguments[0]) {\n        let realPath = resolve(oldFilePath, newFilePath, node.expression.arguments[0].value);\n        node.expression.arguments[0].value = realPath;\n        node.expression.arguments[0].raw = `'${realPath}'`;\n      }\n    }\n  })\n}\n\n// 获取ast\nexports.getAST = function(content) {\n  const ast = parser.parse(content, {\n    sourceType: 'module',\n    plugins: parsePlugins\n  });\n  return ast;\n}\n"
  },
  {
    "path": "packages/mvvm-interface-parser/package.json",
    "content": "{\n  \"name\": \"mvvm-interface-parser\",\n  \"version\": \"1.0.8\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"cover\": \"istanbul cover --report lcov _mocha -- -R spec --recursive\",\n    \"test\": \"mocha --recursive --reporter spec\"\n  },\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"description\": \"\",\n  \"dependencies\": {\n    \"@babel/generator\": \"^7.3.4\",\n    \"@babel/parser\": \"^7.3.4\",\n    \"@babel/traverse\": \"^7.3.4\",\n    \"@babel/types\": \"^7.3.4\",\n    \"chameleon-tool-utils\": \"1.0.8\",\n    \"runtime-check\": \"1.0.8\"\n  },\n  \"devDependencies\": {\n    \"chai\": \"^4.2.0\",\n    \"eslint\": \"^5.9.0\",\n    \"istanbul\": \"^0.4.5\",\n    \"mocha\": \"^5.2.0\"\n  }\n}"
  },
  {
    "path": "packages/mvvm-interface-parser/runtime/checkWrapper.js",
    "content": "/**\n* 对象包裹器\n*运行时的错误信息，根据端传入不同的方法，\n* @param  {Object} obj 需要处理的对象\n* @return {Object}     对象\n*/\n/* istanbul ignore next */\nmodule.exports = function (obj, __CML_ERROR__, __enableTypes__, __CHECK__DEFINES__) {\n  const className = obj.constructor.name;\n  /* eslint-disable no-undef */\n  const defines = __CHECK__DEFINES__;\n  const enableTypes = __enableTypes__.split(',') || []; // ['Object','Array','Nullable']\n  /* eslint-disable no-undef */\n  const types = defines.types;\n  const interfaceNames = defines.classes[className];\n  const methods = {};\n\n  interfaceNames && interfaceNames.forEach(interfaceName => {\n    const keys = Object.keys(defines.interfaces);\n    keys.forEach(key => {\n      Object.assign(methods, defines.interfaces[key]);\n    });\n  });\n\n  /**\n  * 获取类型\n  *\n  * @param  {*}      value 值\n  * @return {string}       类型\n  */\n  const getType = function (value) {\n    if (value instanceof Promise) {\n      return \"Promise\";\n    }\n    const type = Object.prototype.toString.call(value);\n    return type.replace(/\\[object\\s(.*)\\]/g, '$1').replace(/( |^)[a-z]/g, (L) => L.toUpperCase());\n  };\n\n  /**\n  * 校验类型  两个loader共用代码\n  *\n  * @param  {*}      value 实际传入的值\n  * @param  {string} type  静态分析时候得到的值得类型\n  * @param  {array[string]} errList 校验错误信息  类型\n  * @return {bool}         校验结果\n  */\n\n  /* eslint complexity:[2,39] */\n  const checkType = function(value, originType, errList = []) {\n    let isNullableReg = /_cml_nullable_lmc_/g;\n    let type = originType.replace('_cml_nullable_lmc_', '');\n    (type === \"Void\") && (type = \"Undefined\")\n    let currentType = getType(value);\n    let canUseNullable = enableTypes.includes(\"Nullable\");\n    let canUseObject = enableTypes.includes(\"Object\");\n    if (currentType == 'Null') {\n      if (type == \"Null\") {// 如果定义的参数的值就是 Null，那么校验通过\n        errList = [];\n      } else {\n        // 那么判断是否是可选参数的情况\n        (canUseNullable && isNullableReg.test(originType)) ? errList = [] : errList.push(`定义了${type}类型的参数，传入的却是${currentType},请确认是否开启nullable配置`)\n      }\n      return errList;\n\n    }\n    if (currentType == 'Undefined') { // 如果运行时传入的真实值是undefined,那么可能改值在接口处就是被定义为 Undefined类型或者是 ?string 这种可选参数 nullable的情况；\n      if (type == \"Undefined\") {\n        errList = [];\n      } else {\n        (canUseNullable && isNullableReg.test(originType)) ? errList = [] : errList.push(`定义了${type}类型的参数，传入的却是${currentType},请确认是否开启nullable配置或者检查所传参数是否和接口定义的一致`)\n      }\n      return errList;\n    }\n    if (currentType == 'String') {\n      if (type == 'String') {\n        errList = [];\n      } else {\n        errList.push(`定义了${type}类型的参数，传入的却是${currentType},请检查所传参数是否和接口定义的一致`)\n      }\n      return errList;\n    }\n    if (currentType == 'Boolean') {\n      if (type == 'Boolean') {\n        errList = [];\n      } else {\n        errList.push(`定义了${type}类型的参数，传入的却是${currentType},请检查所传参数是否和接口定义的一致`)\n      }\n      return errList;\n    }\n    if (currentType == 'Number') {\n      if (type == 'Number') {\n        errList = [];\n      } else {\n        errList.push(`定义了${type}类型的参数，传入的却是${currentType},请检查所传参数是否和接口定义的一致`)\n      }\n      return errList;\n    }\n    if (currentType == 'Object') {\n      if (type == 'Object') {\n        (!canUseObject) ? errList.push(`不能直接定义类型${type}，需要使用符合类型定义，请确认是否开启了可以直接定义 Object 类型参数；`) : (errList = []);\n      } else if (type == 'CMLObject') {\n        errList = [];\n      } else { // 这种情况的对象就是自定义的对象；\n        if (types[type]) {\n          const keys = Object.keys(types[type]);\n          // todo 这里是同样的问题，可能多传递\n          keys.forEach(key => {\n            let subError = checkType(value[key], types[type][key], []);\n            if (subError && subError.length) {\n              errList = errList.concat(subError)\n            }\n          });\n          if (Object.keys(value).length > keys.length) {\n            errList.push(`type [${type}] 参数个数与定义不符`)\n          }\n        } else {\n          errList.push('找不到定义的type [' + type + ']!');\n        }\n      }\n      return errList;\n    }\n    if (currentType == 'Array') {\n      if (type == 'Array') {\n        (!canUseObject) ? errList.push(`不能直接定义类型${type}，需要使用符合类型定义，请确认是否开启了可以直接定义 Array 类型参数；`) : (errList = []);\n      } else {\n        if (types[type]) {\n          // 数组元素的类型\n          let itemType = types[type][0];\n          for (let i = 0; i < value.length; i++) {\n            let subError = checkType(value[i], itemType, []);\n            if (subError && subError.length) {\n              errList = errList.concat(subError)\n            }\n          }\n        } else {\n          errList.push('找不到定义的type [' + type + ']!');\n\n        }\n      }\n\n      return errList;\n    }\n    if (currentType == 'Function') {\n      // if (type == 'Function') {\n      //   errList = [];\n      // } else {\n      //   errList.push(`定义了${type}类型的参数，传入的却是${currentType},请检查所传参数是否和接口定义的一致`)\n      // }\n      if (types[type]) {\n        if (!types[type].input && !types[type].output) {\n          errList.push(`找不到${types[type]} 函数定义的输入输出`);\n        }\n      } else {\n        errList.push('找不到定义的type [' + type + ']!');\n      }\n      return errList;\n    }\n    if (currentType == 'Promise') {\n      if (type == 'Promise') {\n        errList = [];\n      } else {\n        errList.push(`定义了${type}类型的参数，传入的却是${currentType},请检查所传参数是否和接口定义的一致`)\n      }\n      return errList;\n    }\n    if (currentType == 'Date') {\n      if (type == 'Date') {\n        errList = [];\n      } else {\n        errList.push(`定义了${type}类型的参数，传入的却是${currentType},请检查所传参数是否和接口定义的一致`)\n      }\n      return errList;\n    }\n    if (currentType == 'RegExp') {\n      if (type == 'RegExp') {\n        errList = [];\n      } else {\n        errList.push(`定义了${type}类型的参数，传入的却是${currentType},请检查所传参数是否和接口定义的一致`)\n      }\n      return errList;\n    }\n\n\n    return errList;\n  }\n\n  /**\n  * 校验参数类型\n  *\n  * @param  {string} methodName 方法名称\n  * @param  {Array}  argNames   参数名称列表\n  * @param  {Array}  argValues  参数值列表\n  * @return {bool}              校验结果\n  */\n  /**\n       * var __CHECK__DEFINES__ = {\n          \"types\": {\n            \"Callback\": {\n              \"input\": [],\n              \"output\": \"Undefined\"\n            }\n          },\n          \"interfaces\": {\n            \"MultiInterface\": {\n              \"getMsg\": {\n                \"input\": [\"String\", \"Object_cml_nullable_lmc_\", \"Callback_cml_nullable_lmc_\"],\n                \"output\": \"String\"\n              }\n            }\n          },\n          \"classes\": {\n            \"Method\": [\"MultiInterface\"]\n          }\n        };\n      */\n  const checkArgsType = function (methodName, argValues) {\n    let argList;\n    if (getType(methodName) == 'Array') { // methodName:['getMsg',2];\n      // 回调函数的校验    methodName[0] 方法的名字 methodName[1]该回调函数在方法的参数索引\n      // 如上，对于可传可不传的回调函数来说，Callback_cml_nullable_lmc_,所以需要将其去掉\n      let funcKey = methods[methodName[0]].input[methodName[1]].replace('_cml_nullable_lmc_', '');\n      argList = types[funcKey].input;\n      // 拿到这个回调函数的参数定义\n    } else {\n      argList = methods[methodName].input;\n    }\n    // todo 函数可能多传参数\n    argList.forEach((argType, index) => {\n      let errList = checkType(argValues[index], argType, []);\n      if (errList && errList.length > 0) {\n        __CML_ERROR__(`\n       校验位置: 方法${methodName}第${index + 1}个参数\n       错误信息: ${errList.join('\\n')}`)\n      }\n    });\n    if (argValues.length > argList.length) {\n      __CML_ERROR__(`[${methodName}]方法参数传递个数与定义不符`);\n    }\n  };\n\n  /**\n  * 校验返回值类型\n  *\n  * @param  {string} methodName 方法名称\n  * @param  {*}      returnData 返回值\n  * @return {bool}              校验结果\n  */\n  const checkReturnType = function (methodName, returnData) {\n    let output;\n    if (getType(methodName) == 'Array') {\n      // 回调函数的校验    methodName[0] 方法的名字 methodName[1]该回调函数在方法的参数索引\n      // 如上，对于可传可不传的回调函数来说，Callback_cml_nullable_lmc_,所以需要将其去掉\n      let funcKey = methods[methodName[0]].input[methodName[1]].replace('_cml_nullable_lmc_', '');\n      output = types[funcKey].output;\n      // output = types[methods[methodName[0]].input[methodName[1]]].output;\n    } else {\n      output = methods[methodName].output;\n    }\n    // todo output 为什么可以是数组\n    // if (output instanceof Array) {\n    //   output.forEach(type => {\n\n    //     //todo 而且是要有一个校验不符合就check失败？ 应该是有一个校验通过就可以吧\n    //     checkType(returnData, type,[])\n    //   });\n    // }\n    let errList = checkType(returnData, output, []);\n    if (errList && errList.length > 0) {\n      __CML_ERROR__(`\n     校验位置: 方法${methodName}返回值\n     错误信息: ${errList.join('\\n')}`)\n    }\n  };\n\n  /**\n  * 创建warpper\n  *\n  * @param  {string}   funcName   方法名称\n  * @param  {Function} originFunc 原有方法\n  * @return {Function}            包裹后的方法\n  */\n  const createWarpper = function (funcName, originFunc) {\n    return function () {\n      const argValues = Array.prototype.slice.call(arguments)\n        .map(function (arg, index) {\n          // 对传入的方法要做特殊的处理，这个是传入的callback，对callback函数再做包装\n          if (getType(arg) == 'Function') {\n            return createWarpper([funcName, index], arg);\n          }\n          return arg;\n        });\n\n      checkArgsType(funcName, argValues);\n\n\n      const result = originFunc.apply(this, argValues);\n\n      checkReturnType(funcName, result)\n      return result;\n    }\n  };\n\n  // 获取所有方法\n  const keys = Object.keys(methods);\n\n  // 处理包装方法\n  keys.forEach(key => {\n    const originFunc = obj[key];\n    if (!originFunc) {\n      __CML_ERROR__('method [' + key + '] not found!');\n      return;\n    }\n\n    if (obj.hasOwnProperty(key)) {\n      obj[key] = createWarpper(key, originFunc);\n    } else {\n      Object.getPrototypeOf(obj)[key] = createWarpper(key, originFunc);\n    }\n  });\n\n  return obj;\n};\n"
  },
  {
    "path": "packages/mvvm-interface-parser/runtime/copyProto.js",
    "content": "\nmodule.exports = function copyProtoProperty(obj) {\n  var EXPORT_OBJ = obj || {};\n  var EXPORT_PROTO = Object.getPrototypeOf(EXPORT_OBJ);\n  if (EXPORT_PROTO.constructor !== Object) {\n    Object.getOwnPropertyNames(EXPORT_PROTO).forEach(function(key) {\n      if (!/constructor|prototype|length/ig.test(key)) {\n        // 原型上有自身没有的属性 放到自身上\n        if (!EXPORT_OBJ.hasOwnProperty(key)) {\n          EXPORT_OBJ[key] = EXPORT_PROTO[key]\n        }\n      }\n    })\n  }\n  return EXPORT_OBJ;\n}\n"
  },
  {
    "path": "packages/mvvm-interface-parser/test/check.test.js",
    "content": "const {getCode} = require('../lib/check.js');\nconst expect = require('chai').expect;\n\nlet code = `\ninterface Interface1Interface {\n  getMsg(msg: String): String;\n}\nclass Method implements Interface1Interface {\n  getMsg(msg) {\n    return 'web:' + msg;\n  }\n}\n\nexport default new Method();\n`\n\nlet result = getCode(code,{\n  cmlType: 'wx',\n  filePath: '/user/name.cml',\n  enableTypes: []\n})\n\ndescribe('check.js wx', function() {\n  it('getCode', function() {\n    expect(!!~result.indexOf('export default __OBJECT__WRAPPER__')).to.be.equal(true);\n  })\n})\n\n\nlet result2 = getCode(code,{\n  cmlType: 'weex',\n  filePath: '/user/name.cml',\n  enableTypes: []\n})\n\ndescribe('check.js weex', function() {\n  it('getCode', function() {\n    expect(!!~result2.indexOf('export default __OBJECT__WRAPPER__')).to.be.equal(true);\n  })\n})\n"
  },
  {
    "path": "packages/mvvm-interface-parser/test/checkWrapper.test.js",
    "content": "\n\nconst _ = require('../runtime/checkWrapper.js');\nconst expect = require('chai').expect;\n\n\nvar __INTERFACE__FILEPATH = \"node_modules/chameleon-api/src/interfaces/showToast/index.interface\";\nvar __CML_ERROR__ = function throwError(content) {\n  throw new Error(\"\\u6587\\u4EF6\\u4F4D\\u7F6E: \" + __INTERFACE__FILEPATH + \"\\n            \" + content);\n};\n\nvar __enableTypes__ = \"\";\nvar __CHECK__DEFINES__ = {\n  \"types\": {\n    \"toastOpt\": {\n      \"message\": \"String\",\n      \"duration\": \"Number\",\n      \"date\": \"Null\"\n    }\n  },\n  \"interfaces\": {\n    \"uiInterface\": {\n      \"showToast\": {\n        \"input\": [\"toastOpt\"],\n        \"output\": \"Undefined\"\n      }\n    }\n  },\n  \"classes\": {\n    \"Method\": [\"uiInterface\"]\n  }\n};\n\nfunction Method() {\n}\nMethod.prototype.showToast = function({message, duration}) {\n}\n\nvar obj = _(new Method(), __CML_ERROR__, __enableTypes__, __CHECK__DEFINES__);\n\n\ndescribe('mvvm-interface-parser/checkWrapper', function() {\n  it('定义了String类型的参数，传入的却是Number', function() {\n    obj.showToast({\n      message: '22',\n      duration: 123,\n      \"date\": null\n    })\n    try {\n      obj.showToast({\n        message: 23,\n        duration: 123,\n        \"date\": null\n      })\n    } catch (e) {\n      expect(!!~e.message.indexOf('错误信息: 定义了String类型的参数，传入的却是Number')).to.equal(true)\n    }\n  })\n\n  it('定义了String类型的参数，传入的却是Null', function() {\n    try {\n      obj.showToast({\n        message: null,\n        duration: 123,\n        \"date\": null\n      })\n    } catch (e) {\n      expect(!!~e.message.indexOf('定义了String类型的参数，传入的却是Null')).to.equal(true)\n    }\n  })\n\n})\n\n"
  },
  {
    "path": "packages/mvvm-interface-parser/test/copyProto.test.js",
    "content": "\n\nconst _ = require('../runtime/copyProto.js');\nconst expect = require('chai').expect;\nclass A {\n  fun1() {\n    console.log('fun1')\n  }\n}\n\ndescribe('mvvm-interface-parser/getMethodCode', function() {\n  it('copyProto.js', function() {\n    var obj = new A();\n    _(obj);\n    expect(obj.hasOwnProperty('fun1'))\n  })\n\n})\n\n"
  },
  {
    "path": "packages/mvvm-interface-parser/test/getInterfaceCode.test.js",
    "content": "\nconst expect = require('chai').expect;\n\nconst getInterfaceCode = require('../lib/getInterfaceCode.js');\nconst path = require('path');\nconst fs = require('fs');\n\ndescribe('mvvm-interface-parser/getInterfaceCode', function() {\n  it('getInterfaceCode', function() {\n    const interfacePath = path.join(__dirname, './lib/components/second/second.interface');\n    const content = fs.readFileSync(interfacePath, {encoding: 'utf-8'})\n    let result1 = getInterfaceCode({interfacePath, content});\n    let firstInterfacePath = path.join(__dirname, './lib/components/first/first.interface')\n    expect(result1.content).to.be.equal('\\ninterface FirstInterface {\\n  getMsg(msg: String): String;\\n}\\n\\n')\n    expect(result1.contentFilePath).to.be.equal(firstInterfacePath)\n    expect(!!~result1.devDeps.indexOf(firstInterfacePath)).to.be.equal(true)\n  })\n\n  it('getInterfaceCode src', function() {\n    const interfacePath = path.join(__dirname, './lib/components/third.interface');\n    const content = fs.readFileSync(interfacePath, {encoding: 'utf-8'})\n    let result1 = getInterfaceCode({interfacePath, content});\n    let contentPath = path.join(__dirname, './lib/components/thirdinterface.js')\n    expect(result1.contentFilePath).to.be.equal(contentPath)\n    expect(!!~result1.devDeps.indexOf(contentPath)).to.be.equal(true)\n  })\n\n  it('getInterfaceCode not has interface', function() {\n    const interfacePath = path.join(__dirname, './lib/components/third/third.interface');\n    const content = fs.readFileSync(interfacePath, {encoding: 'utf-8'});\n    try {\n      getInterfaceCode({interfacePath, content});\n    } catch (e) {\n      expect(!!~e.message.indexOf('not find <script cml-type=\\'interface\\'></script>')).to.be.equal(true)\n    }\n  })\n\n  it('multi interface', function() {\n    const interfacePath = path.join(__dirname, './lib/components/third/multi.interface');\n    const content = fs.readFileSync(interfacePath, {encoding: 'utf-8'});\n    try {\n      getInterfaceCode({interfacePath, content});\n    } catch (e) {\n      expect(!!~e.message.indexOf('multi <script cml-type=\\'interface\\'></script>')).to.be.equal(true)\n    }\n  })\n\n  it('not has src interface', function() {\n    const interfacePath = path.join(__dirname, './lib/components/third/not.interface');\n    const content = fs.readFileSync(interfacePath, {encoding: 'utf-8'});\n    try {\n      getInterfaceCode({interfacePath, content});\n    } catch (e) {\n      expect(!!~e.message.indexOf('not find file: ')).to.be.equal(true)\n    }\n  })\n\n  it('mutli interface', function() {\n    const interfacePath = path.join(__dirname, './lib/components/third/double.interface');\n    const content = fs.readFileSync(interfacePath, {encoding: 'utf-8'});\n    try {\n      getInterfaceCode({interfacePath, content});\n    } catch (e) {\n      expect(!!~e.message.indexOf('multi <script cml-type=\\'interface\\'></script> has define in ')).to.be.equal(true)\n    }\n  })\n\n  it('include src error', function() {\n    const interfacePath = path.join(__dirname, './lib/components/third/includea.interface');\n    const content = fs.readFileSync(interfacePath, {encoding: 'utf-8'});\n    try {\n      getInterfaceCode({interfacePath, content});\n    } catch (e) {\n      expect(!!~e.message.indexOf('not define include src attribute in')).to.be.equal(true)\n    }\n  })\n\n  it('include src not file', function() {\n    const interfacePath = path.join(__dirname, './lib/components/third/includeb.interface');\n    const content = fs.readFileSync(interfacePath, {encoding: 'utf-8'});\n    try {\n      getInterfaceCode({interfacePath, content});\n    } catch (e) {\n      expect(!!~e.message.indexOf('not find file:')).to.be.equal(true)\n    }\n  })\n})\n"
  },
  {
    "path": "packages/mvvm-interface-parser/test/getMethodCode.test.js",
    "content": "\nconst expect = require('chai').expect;\nconst getMethodCode = require('../lib/getMethodCode.js');\nconst path = require('path');\nconst fs = require('fs');\ndescribe('mvvm-interface-parser/getMethodCode', function() {\n  it('getMethodCode', function() {\n    const interfacePath = path.join(__dirname, './lib/components/second/second.interface');\n    const content = fs.readFileSync(interfacePath, {encoding: 'utf-8'})\n    let result1 = getMethodCode({interfacePath, content, cmlType: 'web'});\n    let firstInterfacePath = path.join(__dirname, './lib/components/first/first.interface');\n    expect(result1.contentFilePath).to.be.equal(firstInterfacePath)\n    expect(!!~result1.devDeps.indexOf(firstInterfacePath)).to.be.equal(true)\n    expect(!!~result1.content.indexOf('FirstInterface')).to.be.equal(true);\n  })\n\n  it('getMethodCode src', function() {\n    const interfacePath = path.join(__dirname, './lib/components/third.interface');\n    const content = fs.readFileSync(interfacePath, {encoding: 'utf-8'})\n    let result1 = getMethodCode({interfacePath, content, cmlType: 'weex'});\n    let contentPath = path.join(__dirname, './lib/components/thirdmethod.js');\n    expect(result1.contentFilePath).to.be.equal(contentPath)\n    expect(!!~result1.devDeps.indexOf(contentPath)).to.be.equal(true)\n    expect(!!~result1.content.indexOf('thirdmethods')).to.be.equal(true);\n  })\n\n  it('getMethodCode include not src', function() {\n    const interfacePath = path.join(__dirname, './lib/components/methodinclude.interface');\n    const content = fs.readFileSync(interfacePath, {encoding: 'utf-8'});\n    try {\n      getMethodCode({interfacePath, content, cmlType: 'weex'});\n    } catch (e) {\n      expect(!!~e.message.indexOf(`not define include src attribute:`)).to.be.equal(true)\n    }\n  })\n\n  it('getMethodCode include src error', function() {\n    const interfacePath = path.join(__dirname, './lib/components/methodsrcerror.interface');\n    const content = fs.readFileSync(interfacePath, {encoding: 'utf-8'});\n    try {\n      getMethodCode({interfacePath, content, cmlType: 'weex'});\n    } catch (e) {\n      expect(!!~e.message.indexOf(`not find file:`)).to.be.equal(true)\n    }\n  })\n\n  it('getMethodCode not find', function() {\n    const interfacePath = path.join(__dirname, './lib/components/third.interface');\n    const content = fs.readFileSync(interfacePath, {encoding: 'utf-8'});\n    try {\n      getMethodCode({interfacePath, content, cmlType: 'demo'});\n    } catch (e) {\n      expect(!!~e.message.indexOf(`not find <script cml-type=`)).to.be.equal(true)\n    }\n  })\n\n  it('getMethodCode script src not find', function() {\n    const interfacePath = path.join(__dirname, './lib/components/partsrcerror.interface');\n    const content = fs.readFileSync(interfacePath, {encoding: 'utf-8'});\n    try {\n      getMethodCode({interfacePath, content, cmlType: 'weex'});\n    } catch (e) {\n      expect(!!~e.message.indexOf(`not find file`)).to.be.equal(true)\n    }\n  })\n})\n\n"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/coma/coma.alipay.cml",
    "content": "<template>\n  <view>\n    <text>alipay端自定义组件</text>\n    <text>props:{{name}}</text>\n  </view>\n</template>\n\n<script>\n\nclass Com1 implements Com1Interface {\n  props = {\n    name: {\n      type: String,\n      default: '默认值'\n    }\n  }\n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch = {\n  }\n\n  methods = {\n    \n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n    this.$cmlEmit('onshow',{\n      value: this.name\n    })\n  }\n\n  beforeDestroy() {\n  }\n  \n  destroyed() {\n  }\n}\n\nexport default new Com1();\n</script>\n\n<style >\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {}\n  }\n}\n</script>"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/coma/coma.baidu.cml",
    "content": "<template>\n  <view>\n    <text>baidu端自定义组件</text>\n    <text>props:{{name}}</text>\n  </view>\n</template>\n\n<script>\n\nclass Com1 implements Com1Interface {\n  props = {\n    name: {\n      type: String,\n      default: '默认值'\n    }\n  }\n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch = {\n  }\n\n  methods = {\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n    this.$cmlEmit('onshow',{\n      value: this.name\n    })\n  }\n\n  beforeDestroy() {\n  }\n  \n  destroyed() {\n  }\n}\n\nexport default new Com1();\n</script>\n\n<style >\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {}\n  }\n}\n</script>"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/coma/coma.interface",
    "content": "<script cml-type=\"interface\">\n/*\n定义一个inteface用于描述组件的属性和事件\n1、 如何区分组件属性和事件？\n通过类型来区分，事件为函数类型，属性为非函数类型\n2、 如何定义组件属性\n给interface添加同名的属性即可，指定类型\n3、 如何定义组件事件\n以事件名称为key值给interface定义属性，该属性是一个函数类型，返回值为void，\n定义函数的第一个参数为自定义事件传递的detail对象类型\n*/\n\n//定义事件detail对象的参数\ntype EventDetail = {\n  value: String\n}\ninterface Com1Interface {\n  name: String,\n  onshow(eventDetail: EventDetail): void;\n}\n</script>\n<script cml-type=\"web\" src=\"./com1.cml\">\n</script>\n<script cml-type=\"weex\" src=\"./com1.weex.cml\">\n</script>\n<script cml-type=\"wx\" src=\"./com1.wx.cml\">\n</script>\n<script cml-type=\"alipay\" src=\"./com1.alipay.cml\">\n</script>"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/coma/coma.web.cml",
    "content": "<template>\n  <view>\n    <text>web端自定义组件</text>\n    <text>props:{{name}}</text>\n  </view>\n</template>\n\n<script>\n\nclass Com1 implements Com1Interface {\n  props = {\n    name: {\n      type: String,\n      default: '默认值'\n    }\n  }\n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch = {\n  }\n  \n  methods = {\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n    this.$cmlEmit('onshow',{\n      value: this.name\n    })\n  }\n\n  beforeDestroy() {\n  }\n  \n  destroyed() {\n  }\n}\n\nexport default new Com1();\n</script>\n\n<style >\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {}\n  }\n}\n</script>\n\n\n\n"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/coma/coma.weex.cml",
    "content": "<template>\n  <view>\n    <text>weex端自定义组件</text>\n    <text>props:{{name}}</text>\n  </view>\n</template>\n\n<script>\n\nclass Com1 implements Com1Interface {\n  props = {\n    name: {\n      type: String,\n      default: '默认值'\n    }\n  }\n\n  mounted() {\n    this.$cmlEmit('onshow',{\n      value: this.name\n    })\n  }\n}\n\nexport default new Com1();\n</script>\n\n<style >\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {}\n  }\n}\n</script>"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/coma/coma.wx.cml",
    "content": "<template>\n  <view>\n    <text>wx端自定义组件</text>\n    <text>props:{{name}}</text>\n  </view>\n</template>\n\n<script>\n\nclass Com1 implements Com1Interface {\n  props = {\n    name: {\n      type: String,\n      default: '默认值'\n    }\n  }\n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch = {\n  }\n\n  methods = {\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n    this.$cmlEmit('onshow',{\n      value: this.name\n    })\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new Com1();\n</script>\n\n<style >\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {}\n  }\n}\n</script>"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/comb/comb.baidu.cml",
    "content": "<template>\n  <view>\n    <text>baidu端自定义组件</text>\n    <text>props:{{name}}</text>\n  </view>\n</template>\n\n<script>\n\nclass Com2 implements Com2Interface {\n  props = {\n    name: {\n      type: String,\n      default: '默认值'\n    }\n  }\n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch = {\n  }\n\n  methods = {\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n    this.$cmlEmit('onshow',{\n      value: this.name\n    })\n  }\n\n  beforeDestroy() {\n  }\n  \n  destroyed() {\n  }\n}\n\nexport default new Com2();\n</script>\n\n<style >\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {}\n  }\n}\n</script>"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/comb/comb.interface",
    "content": "<include src=\"../coma/coma.interface\"></include>\n<script cml-type=\"baidu\" src=\"./coma.alipay.cml\">\n</script>"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/demo-com/demo-com.cml",
    "content": "<template>\n  <view class=\"demo-com\">\n    <text class=\"title\">{{title}}</text>\n    <image src=\"{{imageSrc}}\" class=\"logo\"></image>  \n  </view>\n</template>\n\n<script>\n\nclass DemoCom {\n  props = {\n    title: {\n      type: String,\n      default: ''\n    },\n    imageSrc: {\n      type: String,\n      default: ''\n    },\n  }\n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new DemoCom();\n</script>\n<style>\n.demo-com {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n.title {\n  align-self: center;\n  color: #61c7fc;\n  font-size: 72cpx;\n  margin-top: 160cpx;\n  margin-bottom: 20cpx;\n}\n.logo {\n  width: 150cpx;\n  height: 150cpx;\n  margin-top: 100cpx;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {}\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/first/first.interface",
    "content": "<script cml-type=\"interface\">\ninterface FirstInterface {\n  getMsg(msg: String): String;\n}\n\n</script>\n\n<script cml-type=\"web\">\nimport test from './test.js';\nconst requireModule = require('./test.js');\nimport cml from 'chameleon-api';\n\nclass Method implements FirstInterface {\n  getMsg(msg) {\n    return 'first web:' + msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"weex\">\n\nclass Method implements FirstInterface {\n  getMsg(msg) {\n    return 'first weex:' + msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/first/test.js",
    "content": "\nmodule.exports = {\n\n}\n"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/methodinclude.interface",
    "content": "<include></include>\n"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/methodsrcerror.interface",
    "content": "<include src=\"../../sdf.interfaces\"></include>"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/partsrcerror.interface",
    "content": "<script cml-type=\"weex\" src=\"../../sdf.js\"></script>"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/ph-com/ph-com.alipay.cml",
    "content": "<template>\n  <view>\n    <text>alipay端自定义组件</text>\n    <text>props:{{name}}</text>\n  </view>\n</template>\n\n<script>\n\nclass PhCom implements PhComInterface {\n  props = {\n    name: {\n      type: String,\n      default: '默认值'\n    }\n  }\n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch = {\n  }\n\n  methods = {\n    \n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n    this.$cmlEmit('onshow',{\n      value: this.name\n    })\n  }\n\n  beforeDestroy() {\n  }\n  \n  destroyed() {\n  }\n}\n\nexport default new PhCom();\n</script>\n\n<style >\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {}\n  }\n}\n</script>"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/ph-com/ph-com.baidu.cml",
    "content": "<template>\n  <view>\n    <text>baidu端自定义组件</text>\n    <text>props:{{name}}</text>\n  </view>\n</template>\n\n<script>\n\nclass PhCom implements PhComInterface {\n  props = {\n    name: {\n      type: String,\n      default: '默认值'\n    }\n  }\n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch = {\n  }\n\n  methods = {\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n    this.$cmlEmit('onshow',{\n      value: this.name\n    })\n  }\n\n  beforeDestroy() {\n  }\n  \n  destroyed() {\n  }\n}\n\nexport default new PhCom();\n</script>\n\n<style >\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {}\n  }\n}\n</script>"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/ph-com/ph-com.interface",
    "content": "<script cml-type=\"interface\">\n/*\n定义一个inteface用于描述组件的属性和事件\n1、 如何区分组件属性和事件？\n通过类型来区分，事件为函数类型，属性为非函数类型\n2、 如何定义组件属性\n给interface添加同名的属性即可，指定类型\n3、 如何定义组件事件\n以事件名称为key值给interface定义属性，该属性是一个函数类型，返回值为void，\n定义函数的第一个参数为自定义事件传递的detail对象类型\n*/\n\n//定义事件detail对象的参数\ntype EventDetail = {\n  value: String\n}\ninterface PhComInterface {\n  name: String,\n  onshow(eventDetail: EventDetail): void;\n}\n</script>\n"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/ph-com/ph-com.web.cml",
    "content": "<template>\n  <view>\n    <text>web端自定义组件</text>\n    <text>props:{{name}}</text>\n  </view>\n</template>\n\n<script>\n\nclass PhCom implements PhComInterface {\n  props = {\n    name: {\n      type: String,\n      default: '默认值'\n    }\n  }\n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch = {\n  }\n  \n  methods = {\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n    this.$cmlEmit('onshow',{\n      value: this.name\n    })\n  }\n\n  beforeDestroy() {\n  }\n  \n  destroyed() {\n  }\n}\n\nexport default new PhCom();\n</script>\n\n<style >\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {}\n  }\n}\n</script>\n\n\n\n"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/ph-com/ph-com.weex.cml",
    "content": "<template>\n  <view>\n    <text>weex端自定义组件</text>\n    <text>props:{{name}}</text>\n  </view>\n</template>\n\n<script>\n\nclass PhCom implements PhComInterface {\n  props = {\n    name: {\n      type: String,\n      default: '默认值'\n    }\n  }\n\n  mounted() {\n    this.$cmlEmit('onshow',{\n      value: this.name\n    })\n  }\n}\n\nexport default new PhCom();\n</script>\n\n<style >\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {}\n  }\n}\n</script>"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/ph-com/ph-com.wx.cml",
    "content": "<template>\n  <view>\n    <text>wx端自定义组件</text>\n    <text>props:{{name}}</text>\n  </view>\n</template>\n\n<script>\n\nclass PhCom implements PhComInterface {\n  props = {\n    name: {\n      type: String,\n      default: '默认值'\n    }\n  }\n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch = {\n  }\n\n  methods = {\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n    this.$cmlEmit('onshow',{\n      value: this.name\n    })\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new PhCom();\n</script>\n\n<style >\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {}\n  }\n}\n</script>"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/second/second.interface",
    "content": "\n<include src=\"../first/first.interface\"></include>\n\n<script cml-type=\"weex\">\n\nclass Method implements SecondInterface {\n  getMsg(msg) {\n    return 'second weex:' + msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"wx\">\n\nclass Method implements SecondInterface {\n  getMsg(msg) {\n    return 'second wx:' + msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/third/double.interface",
    "content": "<include src=\"../third.interface\"></include>\n<script cml-type=\"interface\"></script>"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/third/includea.interface",
    "content": "<include>\n</include>"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/third/includeb.interface",
    "content": "<include src=\"../../sdf.interface\">\n</include>"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/third/multi.interface",
    "content": "<script cml-type=\"interface\"></script>\n<script cml-type=\"interface\"></script>"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/third/not.interface",
    "content": "<script cml-type=\"interface\" src=\"../thild.interface\"></script>\n"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/third/third.interface",
    "content": ""
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/third.interface",
    "content": "\n<script cml-type=\"interface\" src=\"./thirdinterface.js\"></script>\n<script cml-type=\"web\">\nimport test from './test.js';\nconst requireModule = require('./test.js');\nimport cml from 'chameleon-api';\n\nclass Method implements FirstInterface {\n  getMsg(msg) {\n    return 'first web:' + msg;\n  }\n}\n\nexport default new Method();\n</script>\n\n<script cml-type=\"weex\" src=\"./thirdmethod.js\">\n\n</script>\n\n"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/thirdinterface.js",
    "content": "`interface FirstInterface {\n  getMsg(msg: String): String;\n}`\n"
  },
  {
    "path": "packages/mvvm-interface-parser/test/lib/components/thirdmethod.js",
    "content": "`thirdmethods`"
  },
  {
    "path": "packages/mvvm-miniapp-loader/.eslintrc",
    "content": "{\n    // 在配置文件里配置全局变量时，使用 globals 指出你要使用的全局变量。将变量设置为 true 将允许变量被重写，或 false 将不允许被重写\n    \"globals\": {\n        \"cml\": false\n    },\n  // 环境定义了预定义的全局变量。\n  \"env\": {\n      //环境定义了预定义的全局变量。更多在官网查看\n      \"browser\": true,\n      \"node\": true,\n      \"commonjs\": true,\n      \"amd\": true,\n      \"es6\": true,\n      \"mocha\": true\n  },\n  // JavaScript 语言选项\n  \"parserOptions\": {\n      // ECMAScript 版本\n      \"ecmaVersion\": 9,\n      \"sourceType\": \"module\", //设置为 \"script\" (默认) 或 \"module\"（如果你的代码是 ECMAScript 模块)。\n      //想使用的额外的语言特性:\n      \"ecmaFeatures\": {\n          // 允许在全局作用域下使用 return 语句\n          \"globalReturn\": true,\n          // impliedStric\n          \"impliedStrict\": true,\n          // 启用 JSX\n          \"jsx\": true,\n          \"modules\": true\n      }\n  },\n  //-----让eslint支持 JSX start\n  \"plugins\": [\n\n  ],\n  \"extends\": [\n      \"eslint:recommended\"\n  ],\n  //-----让eslint支持 JSX end\n\n\n  /**\n   * \"off\" 或 0 - 关闭规则\n   * \"warn\" 或 1 - 开启规则，使用警告级别的错误：warn (不会导致程序退出),\n   * \"error\" 或 2 - 开启规则，使用错误级别的错误：error (当被触发的时候，程序会退出)\n   */\n  \"rules\": {\n\n      ////////////////\n      // 可能的错误 //\n      ////////////////\n\n      // 禁止条件表达式中出现赋值操作符\n      \"no-cond-assign\": 2,\n      // 禁用 console\n      \"no-console\": 0,\n      // 禁止在条件中使用常量表达式\n      // if (false) {\n      // doSomethingUnfinished();\n      // } //cuowu\n      \"no-constant-condition\": 2,\n      // 禁止在正则表达式中使用控制字符 ：new RegExp(\"\\x1f\")\n      \"no-control-regex\": 2,\n      // 数组和对象键值对最后一个逗号， never参数：不能带末尾的逗号, always参数：必须带末尾的逗号，\n      // always-multiline：多行模式必须带逗号，单行模式不能带逗号\n      \"comma-dangle\": [1, \"never\"],\n      // 禁用 debugger\n      \"no-debugger\": 2,\n      // 禁止 function 定义中出现重名参数\n      \"no-dupe-args\": 2,\n      // 禁止对象字面量中出现重复的 key\n      \"no-dupe-keys\": 2,\n      // 禁止重复的 case 标签\n      \"no-duplicate-case\": 2,\n      // 禁止空语句块\n      \"no-empty\": 2,\n      // 禁止在正则表达式中使用空字符集 (/^abc[]/)\n      \"no-empty-character-class\": 2,\n      // 禁止对 catch 子句的参数重新赋值\n      \"no-ex-assign\": 2,\n      // 禁止不必要的布尔转换\n      \"no-extra-boolean-cast\": 2,\n      // 禁止不必要的括号 //(a * b) + c;//报错\n      \"no-extra-parens\": 0,\n      // 禁止不必要的分号\n      \"no-extra-semi\": 2,\n      // 禁止对 function 声明重新赋值\n      \"no-func-assign\": 2,\n      // 禁止在嵌套的块中出现 function 或 var 声明\n      \"no-inner-declarations\": [2, \"functions\"],\n      // 禁止 RegExp 构造函数中无效的正则表达式字符串\n      \"no-invalid-regexp\": 2,\n      // 禁止在字符串和注释之外不规则的空白\n      \"no-irregular-whitespace\": 2,\n      // 禁止在 in 表达式中出现否定的左操作数\n      \"no-negated-in-lhs\": 2,\n      // 禁止把全局对象 (Math 和 JSON) 作为函数调用 错误：var math = Math();\n      \"no-obj-calls\": 2,\n      // 禁止直接使用 Object.prototypes 的内置属性\n      \"no-prototype-builtins\": 0,\n      // 禁止正则表达式字面量中出现多个空格\n      \"no-regex-spaces\": 2,\n      // 禁用稀疏数组\n      \"no-sparse-arrays\": 2,\n      // 禁止出现令人困惑的多行表达式\n      \"no-unexpected-multiline\": 2,\n      // 禁止在return、throw、continue 和 break语句之后出现不可达代码\n      \"no-unreachable\": 2,\n      // 要求使用 isNaN() 检查 NaN\n      \"use-isnan\": 2,\n      // 强制使用有效的 JSDoc 注释\n      \"valid-jsdoc\": 0,\n      // 强制 typeof 表达式与有效的字符串进行比较\n      // typeof foo === \"undefimed\" 错误\n      \"valid-typeof\": 2,\n\n\n      //////////////\n      // 最佳实践 //\n      //////////////\n\n      // 定义对象的set存取器属性时，强制定义get\n      \"accessor-pairs\": 2,\n      // 强制数组方法的回调函数中有 return 语句\n      \"array-callback-return\": 0,\n      // 强制把变量的使用限制在其定义的作用域范围内\n      \"block-scoped-var\": 0,\n      // 限制圈复杂度，也就是类似if else能连续接多少个\n      \"complexity\": [2, 40],\n      // 要求 return 语句要么总是指定返回的值，要么不指定\n      \"consistent-return\": 0,\n      // 强制所有控制语句使用一致的括号风格\n      \"curly\": [2, \"all\"],\n      // switch 语句强制 default 分支，也可添加 // no default 注释取消此次警告\n      \"default-case\": 2,\n      // 强制object.key 中 . 的位置，参数:\n      // property，'.'号应与属性在同一行\n      // object, '.' 号应与对象名在同一行\n      \"dot-location\": [2, \"property\"],\n      // 强制使用.号取属性\n      // 参数： allowKeywords：true 使用保留字做属性名时，只能使用.方式取属性\n      // false 使用保留字做属性名时, 只能使用[]方式取属性 e.g [2, {\"allowKeywords\": false}]\n      // allowPattern: 当属性名匹配提供的正则表达式时，允许使用[]方式取值,否则只能用.号取值 e.g [2, {\"allowPattern\": \"^[a-z]+(_[a-z]+)+$\"}]\n      \"dot-notation\": [2, {\n          \"allowKeywords\": false\n      }],\n      // 使用 === 替代 == allow-null允许null和undefined==\n      \"eqeqeq\": [0, \"allow-null\"],\n      // 要求 for-in 循环中有一个 if 语句\n      \"guard-for-in\": 2,\n      // 禁用 alert、confirm 和 prompt\n      \"no-alert\": 0,\n      // 禁用 arguments.caller 或 arguments.callee\n      \"no-caller\": 2,\n      // 不允许在 case 子句中使用词法声明\n      \"no-case-declarations\": 2,\n      // 禁止除法操作符显式的出现在正则表达式开始的位置\n      \"no-div-regex\": 2,\n      // 禁止 if 语句中有 return 之后有 else\n      \"no-else-return\": 0,\n      // 禁止出现空函数.如果一个函数包含了一条注释，它将不会被认为有问题。\n      \"no-empty-function\": 2,\n      // 禁止使用空解构模式no-empty-pattern\n      \"no-empty-pattern\": 2,\n      // 禁止在没有类型检查操作符的情况下与 null 进行比较\n      \"no-eq-null\": 1,\n      // 禁用 eval()\n      \"no-eval\": 2,\n      // 禁止扩展原生类型\n      \"no-extend-native\": 2,\n      // 禁止不必要的 .bind() 调用\n      \"no-extra-bind\": 2,\n      // 禁用不必要的标签\n      \"no-extra-label:\": 0,\n      // 禁止 case 语句落空\n      \"no-fallthrough\": 2,\n      // 禁止数字字面量中使用前导和末尾小数点\n      \"no-floating-decimal\": 2,\n      // 禁止使用短符号进行类型转换(!!fOO)\n      \"no-implicit-coercion\": 0,\n      // 禁止在全局范围内使用 var 和命名的 function 声明\n      \"no-implicit-globals\": 1,\n      // 禁止使用类似 eval() 的方法\n      \"no-implied-eval\": 2,\n      // 禁止 this 关键字出现在类和类对象之外\n      \"no-invalid-this\": 0,\n      // 禁用 __iterator__ 属性\n      \"no-iterator\": 2,\n      // 禁用标签语句\n      \"no-labels\": 2,\n      // 禁用不必要的嵌套块\n      \"no-lone-blocks\": 2,\n      // 禁止在循环中出现 function 声明和表达式\n      \"no-loop-func\": 1,\n      // 禁用魔术数字(3.14什么的用常量代替)\n      \"no-magic-numbers\": [1, {\n          \"ignore\": [0, -1, 1]\n      }],\n      // 禁止使用多个空格\n      \"no-multi-spaces\": 2,\n      // 禁止使用多行字符串，在 JavaScript 中，可以在新行之前使用斜线创建多行字符串\n      \"no-multi-str\": 2,\n      // 禁止对原生对象赋值\n      \"no-native-reassign\": 2,\n      // 禁止在非赋值或条件语句中使用 new 操作符\n      \"no-new\": 2,\n      // 禁止对 Function 对象使用 new 操作符\n      \"no-new-func\": 0,\n      // 禁止对 String，Number 和 Boolean 使用 new 操作符\n      \"no-new-wrappers\": 2,\n      // 禁用八进制字面量\n      \"no-octal\": 2,\n      // 禁止在字符串中使用八进制转义序列\n      \"no-octal-escape\": 2,\n      // 不允许对 function 的参数进行重新赋值\n      \"no-param-reassign\": 0,\n      // 禁用 __proto__ 属性\n      \"no-proto\": 2,\n      // 禁止使用 var 多次声明同一变量\n      \"no-redeclare\": 2,\n      // 禁用指定的通过 require 加载的模块\n      \"no-return-assign\": 0,\n      // 禁止使用 javascript: url\n      \"no-script-url\": 0,\n      // 禁止自我赋值\n      \"no-self-assign\": 2,\n      // 禁止自身比较\n      \"no-self-compare\": 2,\n      // 禁用逗号操作符\n      \"no-sequences\": 2,\n      // 禁止抛出非异常字面量\n      \"no-throw-literal\": 2,\n      // 禁用一成不变的循环条件\n      \"no-unmodified-loop-condition\": 2,\n      // 禁止出现未使用过的表达式\n      \"no-unused-expressions\": 0,\n      // 禁用未使用过的标签\n      \"no-unused-labels\": 2,\n      // 禁止不必要的 .call() 和 .apply()\n      \"no-useless-call\": 2,\n      // 禁止不必要的字符串字面量或模板字面量的连接\n      \"no-useless-concat\": 0,\n      // 禁用不必要的转义字符\n      \"no-useless-escape\": 0,\n      // 禁用 void 操作符\n      \"no-void\": 0,\n      // 禁止在注释中使用特定的警告术语\n      \"no-warning-comments\": 0,\n      // 禁用 with 语句\n      \"no-with\": 2,\n      // 强制在parseInt()使用基数参数\n      \"radix\": 2,\n      // 要求所有的 var 声明出现在它们所在的作用域顶部\n      \"vars-on-top\": 0,\n      // 要求 IIFE 使用括号括起来\n      \"wrap-iife\": [2, \"any\"],\n      // 要求或禁止 “Yoda” 条件\n      \"yoda\": [2, \"never\"],\n      // 要求或禁止使用严格模式指令\n      \"strict\": 0,\n\n\n      //////////////\n      // 变量声明 //\n      //////////////\n\n      // 要求或禁止 var 声明中的初始化(初值)\n      \"init-declarations\": 0,\n      // 不允许 catch 子句的参数与外层作用域中的变量同名\n      \"no-catch-shadow\": 0,\n      // 禁止删除变量\n      \"no-delete-var\": 2,\n      // 不允许标签与变量同名\n      \"no-label-var\": 2,\n      // 禁用特定的全局变量\n      \"no-restricted-globals\": 0,\n      // 禁止 var 声明 与外层作用域的变量同名\n      \"no-shadow\": 0,\n      // 禁止覆盖受限制的标识符\n      \"no-shadow-restricted-names\": 2,\n      // 禁用未声明的变量，除非它们在 /*global */ 注释中被提到\n      \"no-undef\": 2,\n      // 禁止将变量初始化为 undefined\n      \"no-undef-init\": 2,\n      // 禁止将 undefined 作为标识符\n      \"no-undefined\": 0,\n      // 禁止出现未使用过的变量\n      \"no-unused-vars\": [2, {\n          \"vars\": \"all\",\n          \"args\": \"none\"\n      }],\n      // 不允许在变量定义之前使用它们\n      \"no-use-before-define\": 0,\n\n      //////////////////////////\n      // Node.js and CommonJS //\n      //////////////////////////\n\n      // require return statements after callbacks\n      \"callback-return\": 0,\n      // 要求 require() 出现在顶层模块作用域中\n      \"global-require\": 1,\n      // 要求回调函数中有容错处理\n      \"handle-callback-err\": [2, \"^(err|error)$\"],\n      // 禁止混合常规 var 声明和 require 调用\n      \"no-mixed-requires\": 0,\n      // 禁止调用 require 时使用 new 操作符\n      \"no-new-require\": 2,\n      // 禁止对 __dirname 和 __filename进行字符串连接\n      \"no-path-concat\": 0,\n      // 禁用 process.env\n      \"no-process-env\": 0,\n      // 禁用 process.exit()\n      \"no-process-exit\": 0,\n      // 禁用同步方法\n      \"no-sync\": 0,\n\n      //////////////\n      // 风格指南 //\n      //////////////\n\n      // 指定数组的元素之间要以空格隔开(, 后面)， never参数：[ 之前和 ] 之后不能带空格，always参数：[ 之前和 ] 之后必须带空格\n      \"array-bracket-spacing\": [2, \"never\"],\n      // 禁止或强制在单行代码块中使用空格(禁用)\n      \"block-spacing\": [1, \"never\"],\n      //强制使用一致的缩进 第二个参数为 \"tab\" 时，会使用tab，\n      // if while function 后面的{必须与if在同一行，java风格。\n      \"brace-style\": [2, \"1tbs\", {\n          \"allowSingleLine\": true\n      }],\n      // 双峰驼命名格式\n      \"camelcase\": 2,\n      // 控制逗号前后的空格\n      \"comma-spacing\": [2, {\n          \"before\": false,\n          \"after\": true\n      }],\n      // 控制逗号在行尾出现还是在行首出现 (默认行尾)\n      // http://eslint.org/docs/rules/comma-style\n      \"comma-style\": [2, \"last\"],\n      //\"SwitchCase\" (默认：0) 强制 switch 语句中的 case 子句的缩进水平\n      // 以方括号取对象属性时，[ 后面和 ] 前面是否需要空格, 可选参数 never, always\n      \"computed-property-spacing\": [2, \"never\"],\n      // 用于指统一在回调函数中指向this的变量名，箭头函数中的this已经可以指向外层调用者，应该没卵用了\n      // e.g [0,\"that\"] 指定只能 var that = this. that不能指向其他任何值，this也不能赋值给that以外的其他值\n      \"consistent-this\": [1, \"that\"],\n      // 强制使用命名的 function 表达式\n      \"func-names\": 0,\n      // 文件末尾强制换行\n      \"eol-last\": 2,\n      \"indent\": [2, 2, {\n          \"SwitchCase\": 1\n      }],\n      // 强制在对象字面量的属性中键和值之间使用一致的间距\n      \"key-spacing\": [2, {\n          \"beforeColon\": false,\n          \"afterColon\": true\n      }],\n      // 强制使用一致的换行风格\n      \"linebreak-style\": [1, \"unix\"],\n      // 要求在注释周围有空行 ( 要求在块级注释之前有一空行)\n      \"lines-around-comment\": [1, {\n          \"beforeBlockComment\": true\n      }],\n      // 强制一致地使用函数声明或函数表达式，方法定义风格，参数：\n      // declaration: 强制使用方法声明的方式，function f(){} e.g [2, \"declaration\"]\n      // expression：强制使用方法表达式的方式，var f = function() {} e.g [2, \"expression\"]\n      // allowArrowFunctions: declaration风格中允许箭头函数。 e.g [2, \"declaration\", { \"allowArrowFunctions\": true }]\n      \"func-style\": 0,\n      // 强制回调函数最大嵌套深度 5层\n      \"max-nested-callbacks\": [1, 5],\n      // 禁止使用指定的标识符\n      \"id-blacklist\": 0,\n      // 强制标识符的最新和最大长度\n      \"id-length\": 0,\n      // 要求标识符匹配一个指定的正则表达式\n      \"id-match\": 0,\n      // 强制在 JSX 属性中一致地使用双引号或单引号\n      \"jsx-quotes\": 0,\n      // 强制在关键字前后使用一致的空格 (前后腰需要)\n      \"keyword-spacing\": 2,\n      // 强制一行的最大长度\n      \"max-len\": [1, 200],\n      // 强制最大行数\n      \"max-lines\": 0,\n      // 强制 function 定义中最多允许的参数数量\n      \"max-params\": [1, 7],\n      // 强制 function 块最多允许的的语句数量\n      \"max-statements\": [1, 200],\n      // 强制每一行中所允许的最大语句数量\n      \"max-statements-per-line\": 0,\n      // 要求构造函数首字母大写 （要求调用 new 操作符时有首字母大小的函数，允许调用首字母大写的函数时没有 new 操作符。）\n      \"new-cap\": [2, {\n          \"newIsCap\": true,\n          \"capIsNew\": false\n      }],\n      // 要求调用无参构造函数时有圆括号\n      \"new-parens\": 2,\n      // 要求或禁止 var 声明语句后有一行空行\n      \"newline-after-var\": 0,\n      // 禁止使用 Array 构造函数\n      \"no-array-constructor\": 2,\n      // 禁用按位运算符\n      \"no-bitwise\": 0,\n      // 要求 return 语句之前有一空行\n      \"newline-before-return\": 0,\n      // 要求方法链中每个调用都有一个换行符\n      \"newline-per-chained-call\": 1,\n      // 禁用 continue 语句\n      \"no-continue\": 0,\n      // 禁止在代码行后使用内联注释\n      \"no-inline-comments\": 0,\n      // 禁止 if 作为唯一的语句出现在 else 语句中\n      \"no-lonely-if\": 0,\n      // 禁止混合使用不同的操作符\n      \"no-mixed-operators\": 0,\n      // 不允许空格和 tab 混合缩进\n      \"no-mixed-spaces-and-tabs\": 2,\n      // 不允许多个空行\n      \"no-multiple-empty-lines\": [2, {\n          \"max\": 2\n      }],\n      // 不允许否定的表达式\n      \"no-negated-condition\": 0,\n      // 不允许使用嵌套的三元表达式\n      \"no-nested-ternary\": 0,\n      // 禁止使用 Object 的构造函数\n      \"no-new-object\": 2,\n      // 禁止使用一元操作符 ++ 和 --\n      \"no-plusplus\": 0,\n      // 禁止使用特定的语法\n      \"no-restricted-syntax\": 0,\n      // 禁止 function 标识符和括号之间出现空格\n      \"no-spaced-func\": 2,\n      // 不允许使用三元操作符\n      \"no-ternary\": 0,\n      // 禁用行尾空格\n      \"no-trailing-spaces\": 2,\n      // 禁止标识符中有悬空下划线_bar\n      \"no-underscore-dangle\": 0,\n      // 禁止可以在有更简单的可替代的表达式时使用三元操作符\n      \"no-unneeded-ternary\": 2,\n      // 禁止属性前有空白\n      \"no-whitespace-before-property\": 0,\n      // 强制花括号内换行符的一致性\n      \"object-curly-newline\": 0,\n      // 强制在花括号中使用一致的空格\n      \"object-curly-spacing\": 0,\n      // 强制将对象的属性放在不同的行上\n      \"object-property-newline\": 0,\n      // 强制函数中的变量要么一起声明要么分开声明\n      \"one-var\": [2, {\n          \"initialized\": \"never\"\n      }],\n      // 要求或禁止在 var 声明周围换行\n      \"one-var-declaration-per-line\": 0,\n      // 要求或禁止在可能的情况下要求使用简化的赋值操作符\n      \"operator-assignment\": 0,\n      // 强制操作符使用一致的换行符\n      \"operator-linebreak\": [2, \"after\", {\n          \"overrides\": {\n              \"?\": \"before\",\n              \":\": \"before\"\n          }\n      }],\n      // 要求或禁止块内填充\n      \"padded-blocks\": 0,\n      // 要求对象字面量属性名称用引号括起来\n      \"quote-props\": 0,\n      // 强制使用一致的反勾号、双引号或单引号\n    //   \"quotes\": [2, \"single\",\"double\", \"avoid-escape\"],\n      // 要求使用 JSDoc 注释\n      \"require-jsdoc\": 0,\n      // 要求或禁止使用分号而不是 ASI（这个才是控制行尾部分号的，）\n      \"semi\": [0, \"always\"],\n      // 强制分号之前和之后使用一致的空格\n      \"semi-spacing\": 0,\n      // 要求同一个声明块中的变量按顺序排列\n      \"sort-vars\": 0,\n      // 强制在块之前使用一致的空格\n      \"space-before-blocks\": [2, \"always\"],\n      // 强制在 function的左括号之前使用一致的空格\n      \"space-before-function-paren\": [0, \"always\"],\n      // 强制在圆括号内使用一致的空格\n      \"space-in-parens\": [2, \"never\"],\n      // 要求操作符周围有空格\n      \"space-infix-ops\": 2,\n      // 强制在一元操作符前后使用一致的空格\n      \"space-unary-ops\": [2, {\n          \"words\": true,\n          \"nonwords\": false\n      }],\n      // 强制在注释中 // 或 /* 使用一致的空格\n      \"spaced-comment\": [2, \"always\", {\n          \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n      }],\n      // 要求或禁止 Unicode BOM\n      \"unicode-bom\": 0,\n      // 要求正则表达式被括号括起来\n      \"wrap-regex\": 0,\n\n      //////////////\n      // ES6.相关 //\n      //////////////\n\n      // 要求箭头函数体使用大括号\n      \"arrow-body-style\": 2,\n      // 要求箭头函数的参数使用圆括号\n      \"arrow-parens\": 0,\n      \"arrow-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 强制在子类构造函数中用super()调用父类构造函数，TypeScrip的编译器也会提示\n      \"constructor-super\": 0,\n      // 强制 generator 函数中 * 号周围使用一致的空格\n      \"generator-star-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 禁止修改类声明的变量\n      \"no-class-assign\": 2,\n      // 不允许箭头功能，在那里他们可以混淆的比较\n      \"no-confusing-arrow\": 0,\n      // 禁止修改 const 声明的变量\n      \"no-const-assign\": 2,\n      // 禁止类成员中出现重复的名称\n      \"no-dupe-class-members\": 2,\n      // 不允许复制模块的进口\n      \"no-duplicate-imports\": 0,\n      // 禁止 Symbol 的构造函数\n      \"no-new-symbol\": 2,\n      // 允许指定模块加载时的进口\n      \"no-restricted-imports\": 0,\n      // 禁止在构造函数中，在调用 super() 之前使用 this 或 super\n      \"no-this-before-super\": 2,\n      // 禁止不必要的计算性能键对象的文字\n      \"no-useless-computed-key\": 0,\n      // 要求使用 let 或 const 而不是 var\n      \"no-var\": 0,\n      // 要求或禁止对象字面量中方法和属性使用简写语法\n      \"object-shorthand\": 0,\n      // 要求使用箭头函数作为回调\n      \"prefer-arrow-callback\": 0,\n      // 要求使用 const 声明那些声明后不再被修改的变量\n      \"prefer-const\": 0,\n      // 要求在合适的地方使用 Reflect 方法\n      \"prefer-reflect\": 0,\n      // 要求使用扩展运算符而非 .apply()\n      \"prefer-spread\": 0,\n      // 要求使用模板字面量而非字符串连接\n      \"prefer-template\": 0,\n      // Suggest using the rest parameters instead of arguments\n      \"prefer-rest-params\": 0,\n      // 要求generator 函数内有 yield\n      \"require-yield\": 0,\n      // enforce spacing between rest and spread operators and their expressions\n      \"rest-spread-spacing\": 0,\n      // 强制模块内的 import 排序\n      \"sort-imports\": 0,\n      // 要求或禁止模板字符串中的嵌入表达式周围空格的使用\n      \"template-curly-spacing\": 1,\n      // 强制在 yield* 表达式中 * 周围使用空格\n      \"yield-star-spacing\": 2\n  }\n}\n"
  },
  {
    "path": "packages/mvvm-miniapp-loader/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\ndist/\n# ///////////////////////////\n\n"
  },
  {
    "path": "packages/mvvm-miniapp-loader/helper.js",
    "content": "const path = require('path');\nconst loaderUtils = require('loader-utils');\nexports.stringifyLoaders = function (loaders) {\n  return loaders\n    .map(\n      obj =>\n        obj && typeof obj === 'object' && typeof obj.loader === 'string'\n          ? obj.loader +\n            (obj.options ? '?' + JSON.stringify(obj.options) : '')\n          : obj\n    )\n    .join('!')\n}\n\nexports.getSelector = function() {\n  return path.resolve(__dirname, './selector.js')\n}\n\nexports.getPartLoaders = function({loaderContext, selectorOptions, partType, lang, loaders, resourcePath}) {\n  selectorOptions.partType = partType;\n\n  let resultLoaders = [\n    {\n      loader: exports.getSelector(),\n      options: selectorOptions\n    }\n  ]\n  switch (partType) {\n    case 'style':\n      var styleLoader = loaders[lang];\n      if (!(styleLoader instanceof Array)) {\n        styleLoader = [styleLoader];\n      }\n      resultLoaders = styleLoader.concat(resultLoaders);\n      break;\n    case 'script':\n      var jsLoader = loaders.js;\n      if (!(jsLoader instanceof Array)) {\n        jsLoader = [jsLoader];\n      }\n      resultLoaders = jsLoader.concat(resultLoaders);\n      break;\n    default:\n      break;\n  }\n  let stringLoaders = exports.stringifyLoaders(resultLoaders);\n  let loaderString = '!!' + stringLoaders + '!' + resourcePath;\n  return loaderUtils.stringifyRequest(\n    loaderContext,\n    loaderString\n  )\n}\n\nexports.toUpperCase = function (content) {\n  return content.replace(/-(\\w)/ig, function (m, s1) {\n    return s1.toUpperCase()\n  })\n}"
  },
  {
    "path": "packages/mvvm-miniapp-loader/index.js",
    "content": "/**\n * 针对小程序的loader 将小程序文件结构变成cml文件结构\n */\nconst loaderUtils = require('loader-utils');\nconst helper = require('./helper.js');\n\nmodule.exports = function(content) {\n  let output = \"\";\n  this._module._nodeType = \"component\";\n  let self = this;\n  const rawOptions = loaderUtils.getOptions(this) || {};\n  let {loaders, cmlType, media, mapping} = rawOptions;\n  const resourcePath = this.resourcePath;\n  let selectorOptions = {\n    cmlType,\n    media,\n    mapping\n  }\n  output += `var template = require(${helper.getPartLoaders({loaderContext: self, selectorOptions, partType: 'template', loaders, resourcePath})});\\n`\n  output += `var style = require(${helper.getPartLoaders({loaderContext: self, selectorOptions, partType: 'style', lang: 'css', loaders, resourcePath})});\\n`\n  output += `var json = require(${helper.getPartLoaders({loaderContext: self, selectorOptions, partType: 'json', loaders, resourcePath})});\\n`\n  output += `var script = require(${helper.getPartLoaders({loaderContext: self, selectorOptions, partType: 'script', loaders, resourcePath})});\\n`\n\n  return output;\n}"
  },
  {
    "path": "packages/mvvm-miniapp-loader/package.json",
    "content": "{\n  \"name\": \"mvvm-miniapp-loader\",\n  \"version\": \"1.0.8\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" && exit 1\"\n  },\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"dependencies\": {\n    \"loader-utils\": \"^1.2.3\"\n  }\n}"
  },
  {
    "path": "packages/mvvm-miniapp-loader/selector.js",
    "content": "\n\nconst loaderUtils = require('loader-utils');\nconst path = require('path');\nconst fs = require('fs');\nmodule.exports = function() {\n  const self = this;\n  let output = '';\n  const rawOptions = loaderUtils.getOptions(this) || {};\n  const resourcePath = this.resourcePath;\n  let {mapping, partType} = rawOptions;\n  this._module._nodeType = 'module';\n  this._module._moduleType = partType;\n  this._module._parentNodeType = 'components';\n  let partFilePath = resourcePath.replace(path.extname(resourcePath), mapping[partType]);\n  self.addDependency(partFilePath);\n\n  switch (partType) {\n    case 'json':\n      this._module._cmlSource = JSON.stringify(JSON.parse(fs.readFileSync(partFilePath, {encoding: 'utf8'})) || {}, '', 4);\n      output = `module.exports = ${this._module._cmlSource}`;\n      break;\n    case 'template':\n      this._module._cmlSource = fs.readFileSync(partFilePath, {encoding: 'utf8'});\n      output = `module.exports = ${JSON.stringify(this._module._cmlSource)}`;\n      break;\n    case 'script':\n    case 'style':\n      output = fs.readFileSync(partFilePath, {encoding: 'utf8'});\n      break;\n    default:\n      break;\n  }\n\n  return output;\n\n}\n"
  },
  {
    "path": "packages/mvvm-pack/.eslintrc",
    "content": "{\n  // 在配置文件里配置全局变量时，使用 globals 指出你要使用的全局变量。将变量设置为 true 将允许变量被重写，或 false 将不允许被重写\n  \"globals\": {\n      \"cml\": false\n  },\n  // 环境定义了预定义的全局变量。\n  \"env\": {\n      //环境定义了预定义的全局变量。更多在官网查看\n      \"browser\": true,\n      \"node\": true,\n      \"commonjs\": true,\n      \"amd\": true,\n      \"es6\": true,\n      \"mocha\": true\n  },\n  // JavaScript 语言选项\n  \"parserOptions\": {\n      // ECMAScript 版本\n      \"ecmaVersion\": 9,\n      \"sourceType\": \"module\", //设置为 \"script\" (默认) 或 \"module\"（如果你的代码是 ECMAScript 模块)。\n      //想使用的额外的语言特性:\n      \"ecmaFeatures\": {\n          // 允许在全局作用域下使用 return 语句\n          \"globalReturn\": true,\n          // impliedStric\n          \"impliedStrict\": true,\n          // 启用 JSX\n          \"jsx\": true,\n          \"modules\": true\n      }\n  },\n  //-----让eslint支持 JSX start\n  \"plugins\": [\n\n  ],\n  \"extends\": [\n      \"eslint:recommended\"\n  ],\n  //-----让eslint支持 JSX end\n\n\n  /**\n   * \"off\" 或 0 - 关闭规则\n   * \"warn\" 或 1 - 开启规则，使用警告级别的错误：warn (不会导致程序退出),\n   * \"error\" 或 2 - 开启规则，使用错误级别的错误：error (当被触发的时候，程序会退出)\n   */\n  \"rules\": {\n\n      ////////////////\n      // 可能的错误 //\n      ////////////////\n\n      // 禁止条件表达式中出现赋值操作符\n      \"no-cond-assign\": 2,\n      // 禁用 console\n      \"no-console\": 0,\n      // 禁止在条件中使用常量表达式\n      // if (false) {\n      // doSomethingUnfinished();\n      // } //cuowu\n      \"no-constant-condition\": 2,\n      // 禁止在正则表达式中使用控制字符 ：new RegExp(\"\\x1f\")\n      \"no-control-regex\": 2,\n      // 数组和对象键值对最后一个逗号， never参数：不能带末尾的逗号, always参数：必须带末尾的逗号，\n      // always-multiline：多行模式必须带逗号，单行模式不能带逗号\n      \"comma-dangle\": [1, \"never\"],\n      // 禁用 debugger\n      \"no-debugger\": 2,\n      // 禁止 function 定义中出现重名参数\n      \"no-dupe-args\": 2,\n      // 禁止对象字面量中出现重复的 key\n      \"no-dupe-keys\": 2,\n      // 禁止重复的 case 标签\n      \"no-duplicate-case\": 2,\n      // 禁止空语句块\n      \"no-empty\": 2,\n      // 禁止在正则表达式中使用空字符集 (/^abc[]/)\n      \"no-empty-character-class\": 2,\n      // 禁止对 catch 子句的参数重新赋值\n      \"no-ex-assign\": 2,\n      // 禁止不必要的布尔转换\n      \"no-extra-boolean-cast\": 2,\n      // 禁止不必要的括号 //(a * b) + c;//报错\n      \"no-extra-parens\": 0,\n      // 禁止不必要的分号\n      \"no-extra-semi\": 2,\n      // 禁止对 function 声明重新赋值\n      \"no-func-assign\": 2,\n      // 禁止在嵌套的块中出现 function 或 var 声明\n      \"no-inner-declarations\": [2, \"functions\"],\n      // 禁止 RegExp 构造函数中无效的正则表达式字符串\n      \"no-invalid-regexp\": 2,\n      // 禁止在字符串和注释之外不规则的空白\n      \"no-irregular-whitespace\": 2,\n      // 禁止在 in 表达式中出现否定的左操作数\n      \"no-negated-in-lhs\": 2,\n      // 禁止把全局对象 (Math 和 JSON) 作为函数调用 错误：var math = Math();\n      \"no-obj-calls\": 2,\n      // 禁止直接使用 Object.prototypes 的内置属性\n      \"no-prototype-builtins\": 0,\n      // 禁止正则表达式字面量中出现多个空格\n      \"no-regex-spaces\": 2,\n      // 禁用稀疏数组\n      \"no-sparse-arrays\": 2,\n      // 禁止出现令人困惑的多行表达式\n      \"no-unexpected-multiline\": 2,\n      // 禁止在return、throw、continue 和 break语句之后出现不可达代码\n      \"no-unreachable\": 2,\n      // 要求使用 isNaN() 检查 NaN\n      \"use-isnan\": 2,\n      // 强制使用有效的 JSDoc 注释\n      \"valid-jsdoc\": 0,\n      // 强制 typeof 表达式与有效的字符串进行比较\n      // typeof foo === \"undefimed\" 错误\n      \"valid-typeof\": 2,\n\n\n      //////////////\n      // 最佳实践 //\n      //////////////\n\n      // 定义对象的set存取器属性时，强制定义get\n      \"accessor-pairs\": 2,\n      // 强制数组方法的回调函数中有 return 语句\n      \"array-callback-return\": 0,\n      // 强制把变量的使用限制在其定义的作用域范围内\n      \"block-scoped-var\": 0,\n      // 限制圈复杂度，也就是类似if else能连续接多少个\n      \"complexity\": [2, 40],\n      // 要求 return 语句要么总是指定返回的值，要么不指定\n      \"consistent-return\": 0,\n      // 强制所有控制语句使用一致的括号风格\n      \"curly\": [2, \"all\"],\n      // switch 语句强制 default 分支，也可添加 // no default 注释取消此次警告\n      \"default-case\": 2,\n      // 强制object.key 中 . 的位置，参数:\n      // property，'.'号应与属性在同一行\n      // object, '.' 号应与对象名在同一行\n      \"dot-location\": [2, \"property\"],\n      // 强制使用.号取属性\n      // 参数： allowKeywords：true 使用保留字做属性名时，只能使用.方式取属性\n      // false 使用保留字做属性名时, 只能使用[]方式取属性 e.g [2, {\"allowKeywords\": false}]\n      // allowPattern: 当属性名匹配提供的正则表达式时，允许使用[]方式取值,否则只能用.号取值 e.g [2, {\"allowPattern\": \"^[a-z]+(_[a-z]+)+$\"}]\n      \"dot-notation\": [2, {\n          \"allowKeywords\": false\n      }],\n      // 使用 === 替代 == allow-null允许null和undefined==\n      \"eqeqeq\": [0, \"allow-null\"],\n      // 要求 for-in 循环中有一个 if 语句\n      \"guard-for-in\": 2,\n      // 禁用 alert、confirm 和 prompt\n      \"no-alert\": 0,\n      // 禁用 arguments.caller 或 arguments.callee\n      \"no-caller\": 2,\n      // 不允许在 case 子句中使用词法声明\n      \"no-case-declarations\": 2,\n      // 禁止除法操作符显式的出现在正则表达式开始的位置\n      \"no-div-regex\": 2,\n      // 禁止 if 语句中有 return 之后有 else\n      \"no-else-return\": 0,\n      // 禁止出现空函数.如果一个函数包含了一条注释，它将不会被认为有问题。\n      \"no-empty-function\": 2,\n      // 禁止使用空解构模式no-empty-pattern\n      \"no-empty-pattern\": 2,\n      // 禁止在没有类型检查操作符的情况下与 null 进行比较\n      \"no-eq-null\": 1,\n      // 禁用 eval()\n      \"no-eval\": 2,\n      // 禁止扩展原生类型\n      \"no-extend-native\": 2,\n      // 禁止不必要的 .bind() 调用\n      \"no-extra-bind\": 2,\n      // 禁用不必要的标签\n      \"no-extra-label:\": 0,\n      // 禁止 case 语句落空\n      \"no-fallthrough\": 2,\n      // 禁止数字字面量中使用前导和末尾小数点\n      \"no-floating-decimal\": 2,\n      // 禁止使用短符号进行类型转换(!!fOO)\n      \"no-implicit-coercion\": 0,\n      // 禁止在全局范围内使用 var 和命名的 function 声明\n      \"no-implicit-globals\": 1,\n      // 禁止使用类似 eval() 的方法\n      \"no-implied-eval\": 2,\n      // 禁止 this 关键字出现在类和类对象之外\n      \"no-invalid-this\": 0,\n      // 禁用 __iterator__ 属性\n      \"no-iterator\": 2,\n      // 禁用标签语句\n      \"no-labels\": 2,\n      // 禁用不必要的嵌套块\n      \"no-lone-blocks\": 2,\n      // 禁止在循环中出现 function 声明和表达式\n      \"no-loop-func\": 1,\n      // 禁用魔术数字(3.14什么的用常量代替)\n      \"no-magic-numbers\": [1, {\n          \"ignore\": [0, -1, 1]\n      }],\n      // 禁止使用多个空格\n      \"no-multi-spaces\": 2,\n      // 禁止使用多行字符串，在 JavaScript 中，可以在新行之前使用斜线创建多行字符串\n      \"no-multi-str\": 2,\n      // 禁止对原生对象赋值\n      \"no-native-reassign\": 2,\n      // 禁止在非赋值或条件语句中使用 new 操作符\n      \"no-new\": 2,\n      // 禁止对 Function 对象使用 new 操作符\n      \"no-new-func\": 0,\n      // 禁止对 String，Number 和 Boolean 使用 new 操作符\n      \"no-new-wrappers\": 2,\n      // 禁用八进制字面量\n      \"no-octal\": 2,\n      // 禁止在字符串中使用八进制转义序列\n      \"no-octal-escape\": 2,\n      // 不允许对 function 的参数进行重新赋值\n      \"no-param-reassign\": 0,\n      // 禁用 __proto__ 属性\n      \"no-proto\": 2,\n      // 禁止使用 var 多次声明同一变量\n      \"no-redeclare\": 2,\n      // 禁用指定的通过 require 加载的模块\n      \"no-return-assign\": 0,\n      // 禁止使用 javascript: url\n      \"no-script-url\": 0,\n      // 禁止自我赋值\n      \"no-self-assign\": 2,\n      // 禁止自身比较\n      \"no-self-compare\": 2,\n      // 禁用逗号操作符\n      \"no-sequences\": 2,\n      // 禁止抛出非异常字面量\n      \"no-throw-literal\": 2,\n      // 禁用一成不变的循环条件\n      \"no-unmodified-loop-condition\": 2,\n      // 禁止出现未使用过的表达式\n      \"no-unused-expressions\": 0,\n      // 禁用未使用过的标签\n      \"no-unused-labels\": 2,\n      // 禁止不必要的 .call() 和 .apply()\n      \"no-useless-call\": 2,\n      // 禁止不必要的字符串字面量或模板字面量的连接\n      \"no-useless-concat\": 0,\n      // 禁用不必要的转义字符\n      \"no-useless-escape\": 0,\n      // 禁用 void 操作符\n      \"no-void\": 0,\n      // 禁止在注释中使用特定的警告术语\n      \"no-warning-comments\": 0,\n      // 禁用 with 语句\n      \"no-with\": 2,\n      // 强制在parseInt()使用基数参数\n      \"radix\": 2,\n      // 要求所有的 var 声明出现在它们所在的作用域顶部\n      \"vars-on-top\": 0,\n      // 要求 IIFE 使用括号括起来\n      \"wrap-iife\": [2, \"any\"],\n      // 要求或禁止 “Yoda” 条件\n      \"yoda\": [2, \"never\"],\n      // 要求或禁止使用严格模式指令\n      \"strict\": 0,\n\n\n      //////////////\n      // 变量声明 //\n      //////////////\n\n      // 要求或禁止 var 声明中的初始化(初值)\n      \"init-declarations\": 0,\n      // 不允许 catch 子句的参数与外层作用域中的变量同名\n      \"no-catch-shadow\": 0,\n      // 禁止删除变量\n      \"no-delete-var\": 2,\n      // 不允许标签与变量同名\n      \"no-label-var\": 2,\n      // 禁用特定的全局变量\n      \"no-restricted-globals\": 0,\n      // 禁止 var 声明 与外层作用域的变量同名\n      \"no-shadow\": 0,\n      // 禁止覆盖受限制的标识符\n      \"no-shadow-restricted-names\": 2,\n      // 禁用未声明的变量，除非它们在 /*global */ 注释中被提到\n      \"no-undef\": 2,\n      // 禁止将变量初始化为 undefined\n      \"no-undef-init\": 2,\n      // 禁止将 undefined 作为标识符\n      \"no-undefined\": 0,\n      // 禁止出现未使用过的变量\n      \"no-unused-vars\": [2, {\n          \"vars\": \"all\",\n          \"args\": \"none\"\n      }],\n      // 不允许在变量定义之前使用它们\n      \"no-use-before-define\": 0,\n\n      //////////////////////////\n      // Node.js and CommonJS //\n      //////////////////////////\n\n      // require return statements after callbacks\n      \"callback-return\": 0,\n      // 要求 require() 出现在顶层模块作用域中\n      \"global-require\": 1,\n      // 要求回调函数中有容错处理\n      \"handle-callback-err\": [2, \"^(err|error)$\"],\n      // 禁止混合常规 var 声明和 require 调用\n      \"no-mixed-requires\": 0,\n      // 禁止调用 require 时使用 new 操作符\n      \"no-new-require\": 2,\n      // 禁止对 __dirname 和 __filename进行字符串连接\n      \"no-path-concat\": 0,\n      // 禁用 process.env\n      \"no-process-env\": 0,\n      // 禁用 process.exit()\n      \"no-process-exit\": 0,\n      // 禁用同步方法\n      \"no-sync\": 0,\n\n      //////////////\n      // 风格指南 //\n      //////////////\n\n      // 指定数组的元素之间要以空格隔开(, 后面)， never参数：[ 之前和 ] 之后不能带空格，always参数：[ 之前和 ] 之后必须带空格\n      \"array-bracket-spacing\": [2, \"never\"],\n      // 禁止或强制在单行代码块中使用空格(禁用)\n      \"block-spacing\": [1, \"never\"],\n      //强制使用一致的缩进 第二个参数为 \"tab\" 时，会使用tab，\n      // if while function 后面的{必须与if在同一行，java风格。\n      \"brace-style\": [2, \"1tbs\", {\n          \"allowSingleLine\": true\n      }],\n      // 双峰驼命名格式\n      \"camelcase\": 2,\n      // 控制逗号前后的空格\n      \"comma-spacing\": [2, {\n          \"before\": false,\n          \"after\": true\n      }],\n      // 控制逗号在行尾出现还是在行首出现 (默认行尾)\n      // http://eslint.org/docs/rules/comma-style\n      \"comma-style\": [2, \"last\"],\n      //\"SwitchCase\" (默认：0) 强制 switch 语句中的 case 子句的缩进水平\n      // 以方括号取对象属性时，[ 后面和 ] 前面是否需要空格, 可选参数 never, always\n      \"computed-property-spacing\": [2, \"never\"],\n      // 用于指统一在回调函数中指向this的变量名，箭头函数中的this已经可以指向外层调用者，应该没卵用了\n      // e.g [0,\"that\"] 指定只能 var that = this. that不能指向其他任何值，this也不能赋值给that以外的其他值\n      \"consistent-this\": [1, \"that\"],\n      // 强制使用命名的 function 表达式\n      \"func-names\": 0,\n      // 文件末尾强制换行\n      \"eol-last\": 2,\n      \"indent\": [2, 2, {\n          \"SwitchCase\": 1\n      }],\n      // 强制在对象字面量的属性中键和值之间使用一致的间距\n      \"key-spacing\": [2, {\n          \"beforeColon\": false,\n          \"afterColon\": true\n      }],\n      // 强制使用一致的换行风格\n      \"linebreak-style\": [1, \"unix\"],\n      // 要求在注释周围有空行 ( 要求在块级注释之前有一空行)\n      \"lines-around-comment\": [1, {\n          \"beforeBlockComment\": true\n      }],\n      // 强制一致地使用函数声明或函数表达式，方法定义风格，参数：\n      // declaration: 强制使用方法声明的方式，function f(){} e.g [2, \"declaration\"]\n      // expression：强制使用方法表达式的方式，var f = function() {} e.g [2, \"expression\"]\n      // allowArrowFunctions: declaration风格中允许箭头函数。 e.g [2, \"declaration\", { \"allowArrowFunctions\": true }]\n      \"func-style\": 0,\n      // 强制回调函数最大嵌套深度 5层\n      \"max-nested-callbacks\": [1, 5],\n      // 禁止使用指定的标识符\n      \"id-blacklist\": 0,\n      // 强制标识符的最新和最大长度\n      \"id-length\": 0,\n      // 要求标识符匹配一个指定的正则表达式\n      \"id-match\": 0,\n      // 强制在 JSX 属性中一致地使用双引号或单引号\n      \"jsx-quotes\": 0,\n      // 强制在关键字前后使用一致的空格 (前后腰需要)\n      \"keyword-spacing\": 2,\n      // 强制一行的最大长度\n      \"max-len\": [1, 200],\n      // 强制最大行数\n      \"max-lines\": 0,\n      // 强制 function 定义中最多允许的参数数量\n      \"max-params\": [1, 7],\n      // 强制 function 块最多允许的的语句数量\n      \"max-statements\": [1, 200],\n      // 强制每一行中所允许的最大语句数量\n      \"max-statements-per-line\": 0,\n      // 要求构造函数首字母大写 （要求调用 new 操作符时有首字母大小的函数，允许调用首字母大写的函数时没有 new 操作符。）\n      \"new-cap\": [2, {\n          \"newIsCap\": true,\n          \"capIsNew\": false\n      }],\n      // 要求调用无参构造函数时有圆括号\n      \"new-parens\": 2,\n      // 要求或禁止 var 声明语句后有一行空行\n      \"newline-after-var\": 0,\n      // 禁止使用 Array 构造函数\n      \"no-array-constructor\": 2,\n      // 禁用按位运算符\n      \"no-bitwise\": 0,\n      // 要求 return 语句之前有一空行\n      \"newline-before-return\": 0,\n      // 要求方法链中每个调用都有一个换行符\n      \"newline-per-chained-call\": 1,\n      // 禁用 continue 语句\n      \"no-continue\": 0,\n      // 禁止在代码行后使用内联注释\n      \"no-inline-comments\": 0,\n      // 禁止 if 作为唯一的语句出现在 else 语句中\n      \"no-lonely-if\": 0,\n      // 禁止混合使用不同的操作符\n      \"no-mixed-operators\": 0,\n      // 不允许空格和 tab 混合缩进\n      \"no-mixed-spaces-and-tabs\": 2,\n      // 不允许多个空行\n      \"no-multiple-empty-lines\": [2, {\n          \"max\": 2\n      }],\n      // 不允许否定的表达式\n      \"no-negated-condition\": 0,\n      // 不允许使用嵌套的三元表达式\n      \"no-nested-ternary\": 0,\n      // 禁止使用 Object 的构造函数\n      \"no-new-object\": 2,\n      // 禁止使用一元操作符 ++ 和 --\n      \"no-plusplus\": 0,\n      // 禁止使用特定的语法\n      \"no-restricted-syntax\": 0,\n      // 禁止 function 标识符和括号之间出现空格\n      \"no-spaced-func\": 2,\n      // 不允许使用三元操作符\n      \"no-ternary\": 0,\n      // 禁用行尾空格\n      \"no-trailing-spaces\": 2,\n      // 禁止标识符中有悬空下划线_bar\n      \"no-underscore-dangle\": 0,\n      // 禁止可以在有更简单的可替代的表达式时使用三元操作符\n      \"no-unneeded-ternary\": 2,\n      // 禁止属性前有空白\n      \"no-whitespace-before-property\": 0,\n      // 强制花括号内换行符的一致性\n      \"object-curly-newline\": 0,\n      // 强制在花括号中使用一致的空格\n      \"object-curly-spacing\": 0,\n      // 强制将对象的属性放在不同的行上\n      \"object-property-newline\": 0,\n      // 强制函数中的变量要么一起声明要么分开声明\n      \"one-var\": [2, {\n          \"initialized\": \"never\"\n      }],\n      // 要求或禁止在 var 声明周围换行\n      \"one-var-declaration-per-line\": 0,\n      // 要求或禁止在可能的情况下要求使用简化的赋值操作符\n      \"operator-assignment\": 0,\n      // 强制操作符使用一致的换行符\n      \"operator-linebreak\": [2, \"after\", {\n          \"overrides\": {\n              \"?\": \"before\",\n              \":\": \"before\"\n          }\n      }],\n      // 要求或禁止块内填充\n      \"padded-blocks\": 0,\n      // 要求对象字面量属性名称用引号括起来\n      \"quote-props\": 0,\n      // 强制使用一致的反勾号、双引号或单引号\n      // \"quotes\": [2, \"single\", \"avoid-escape\"],\n      // 要求使用 JSDoc 注释\n      \"require-jsdoc\": 0,\n      // 要求或禁止使用分号而不是 ASI（这个才是控制行尾部分号的，）\n      \"semi\": [0, \"always\"],\n      // 强制分号之前和之后使用一致的空格\n      \"semi-spacing\": 0,\n      // 要求同一个声明块中的变量按顺序排列\n      \"sort-vars\": 0,\n      // 强制在块之前使用一致的空格\n      \"space-before-blocks\": [2, \"always\"],\n      // 强制在 function的左括号之前使用一致的空格\n      \"space-before-function-paren\": [0, \"always\"],\n      // 强制在圆括号内使用一致的空格\n      \"space-in-parens\": [2, \"never\"],\n      // 要求操作符周围有空格\n      \"space-infix-ops\": 2,\n      // 强制在一元操作符前后使用一致的空格\n      \"space-unary-ops\": [2, {\n          \"words\": true,\n          \"nonwords\": false\n      }],\n      // 强制在注释中 // 或 /* 使用一致的空格\n      \"spaced-comment\": [2, \"always\", {\n          \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n      }],\n      // 要求或禁止 Unicode BOM\n      \"unicode-bom\": 0,\n      // 要求正则表达式被括号括起来\n      \"wrap-regex\": 0,\n\n      //////////////\n      // ES6.相关 //\n      //////////////\n\n      // 要求箭头函数体使用大括号\n      \"arrow-body-style\": 2,\n      // 要求箭头函数的参数使用圆括号\n      \"arrow-parens\": 0,\n      \"arrow-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 强制在子类构造函数中用super()调用父类构造函数，TypeScrip的编译器也会提示\n      \"constructor-super\": 0,\n      // 强制 generator 函数中 * 号周围使用一致的空格\n      \"generator-star-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 禁止修改类声明的变量\n      \"no-class-assign\": 2,\n      // 不允许箭头功能，在那里他们可以混淆的比较\n      \"no-confusing-arrow\": 0,\n      // 禁止修改 const 声明的变量\n      \"no-const-assign\": 2,\n      // 禁止类成员中出现重复的名称\n      \"no-dupe-class-members\": 2,\n      // 不允许复制模块的进口\n      \"no-duplicate-imports\": 0,\n      // 禁止 Symbol 的构造函数\n      \"no-new-symbol\": 2,\n      // 允许指定模块加载时的进口\n      \"no-restricted-imports\": 0,\n      // 禁止在构造函数中，在调用 super() 之前使用 this 或 super\n      \"no-this-before-super\": 2,\n      // 禁止不必要的计算性能键对象的文字\n      \"no-useless-computed-key\": 0,\n      // 要求使用 let 或 const 而不是 var\n      \"no-var\": 0,\n      // 要求或禁止对象字面量中方法和属性使用简写语法\n      \"object-shorthand\": 0,\n      // 要求使用箭头函数作为回调\n      \"prefer-arrow-callback\": 0,\n      // 要求使用 const 声明那些声明后不再被修改的变量\n      \"prefer-const\": 0,\n      // 要求在合适的地方使用 Reflect 方法\n      \"prefer-reflect\": 0,\n      // 要求使用扩展运算符而非 .apply()\n      \"prefer-spread\": 0,\n      // 要求使用模板字面量而非字符串连接\n      \"prefer-template\": 0,\n      // Suggest using the rest parameters instead of arguments\n      \"prefer-rest-params\": 0,\n      // 要求generator 函数内有 yield\n      \"require-yield\": 0,\n      // enforce spacing between rest and spread operators and their expressions\n      \"rest-spread-spacing\": 0,\n      // 强制模块内的 import 排序\n      \"sort-imports\": 0,\n      // 要求或禁止模板字符串中的嵌入表达式周围空格的使用\n      \"template-curly-spacing\": 1,\n      // 强制在 yield* 表达式中 * 周围使用空格\n      \"yield-star-spacing\": 2\n  }\n}\n"
  },
  {
    "path": "packages/mvvm-pack/cmlNode.js",
    "content": "class CMLNode {\n  constructor(options = {}) {\n    this.ext;\n    this.realPath; // 文件物理地址\n    this.nodeType; // app/page/component/module // 节点类型     app/page/component  其他的为module  cml文件中的每一个部分也是一个Node节点\n    this.moduleType; // template/style/script/json/asset\n    this.dependencies = []; // 该节点的直接依赖       app.cml依赖pages.cml pages.cml依赖components.cml js依赖js\n    this.childrens = []; // 子模块 cml文件才有子模块\n    this.parent; // 父模块 cml文件中的子模块才有\n    this.originSource; // 模块源代码 script节点\n    this.source; // 模块标准编译后代码\n    this.convert; // 源代码的格式化形式\n    this.output; // 模块输出  各种过程操作该字段\n    this.identifier; // 节点唯一标识\n    this.modId; // 模块化的id requirejs\n    this.extra; // 节点的额外信息\n    Object.keys(options).forEach(key => {\n      this[key] = options[key];\n    })\n  }\n}\n\nmodule.exports = CMLNode;\n"
  },
  {
    "path": "packages/mvvm-pack/compiler.js",
    "content": "const CMLNode = require('./cmlNode.js');\nconst path = require('path');\nconst Log = require('./log.js');\nconst EventEmitter = require('events');\nconst cmlUtils = require('chameleon-tool-utils');\nconst {cmlparse} = require('mvvm-template-parser');\nconst amd = require('./lib/amd.js');\nconst {handleScript, chameleonIdHandle} = require('./lib/handleScript.js');\nconst UglifyJs = require('./minimize/uglifyjs.js');\nconst UglifyCSS = require('./minimize/uglifycss.js');\nclass Compiler {\n  constructor(webpackCompiler, plugin, options) {\n    this.moduleRules = [ // 文件后缀对应module信息\n      { \n        test: /\\.css|\\.less|\\.stylus|\\.styls$/,\n        moduleType: 'style'\n      },\n      {\n        test: /\\.js|\\.interface$/,\n        moduleType: 'script'\n      },\n      {\n        test: /\\.json$/,\n        moduleType: 'json'\n      },\n      {\n        test: /\\.(png|jpe?g|gif|svg|mp4|webm|ogg|mp3|wav|flac|aac|woff|woff2?|eot|ttf|otf)(\\?.*)?$/,\n        moduleType: 'asset'\n      }\n    ]\n    this.outputFiles = []; // 输出文件 filePath为文件路径 conent为输出文件内容 addHash 是否添加hash\n    this.projectGraph = null;\n    this.log = new Log({\n      level: plugin.logLevel || 2\n    });\n    this.event = new EventEmitter();\n    this.webpackCompiler = webpackCompiler;\n\n    // 用户扩展文件类型\n    if (plugin.moduleRules && plugin.moduleRules instanceof Array) {\n      this.moduleRules = this.moduleRules.concat(plugin.moduleRules);\n    }\n\n    this.amd = amd; // amd的工具方法\n    this.hasCompiledNode = []; // 记录已经编译的模块 避免重复编译\n    this.cmlType = options.cmlType;\n    this.media = options.media;\n    this.userPlugin = plugin;\n    this.outputPath = this.webpackCompiler.options.output.path;\n    this.definitions = {}; //\n    this.getDefinePlugins();\n  }\n\n  run(modules) {\n    this.projectGraph = null;\n    this.outputFiles = [];\n    this.hasCompiledNode = [];\n    this.module2Node(modules);\n    this.customCompile();\n    this.emit('pack', this.projectGraph);\n\n    this.emitFiles();\n  }\n\n  emit(eventName, ...params) {\n    this.log.debug('emit log:' + eventName + 'params:' + params)\n    this.event.emit(eventName, ...params);\n  }\n\n  hook(eventName, cb) {\n    this.event.on(eventName, cb);\n  }\n\n  getDefinePlugins() {\n    let plugins = this.webpackCompiler.options.plugins || [];\n    plugins = plugins.filter(item => {\n      return 'definitions' in item\n    });\n    let definitions = {};\n    plugins.forEach(item => {\n      definitions = {\n        ...definitions,\n        ...item.definitions\n      }\n    })\n    this.definitions = definitions;\n  }\n\n  // 处理webpack modules\n  module2Node(modules) {\n    let appModule;\n    let styleModule = [];\n    // 资源的publicPath map对象\n    let assetPublicMap = {};\n\n    for (let i = 0; i < modules.length; i++) {\n      let item = modules[i];\n      if (item._nodeType === 'app') {\n        appModule = item;\n      }\n      // 静态资源的写入\n      if (item._nodeType === 'module' && item._moduleType === 'asset') {\n        // 写入资源文件\n        if (item._bufferSource && item._outputPath) {\n          // 用户插件中执行静态资源位置，而不影响publicPath\n          let outputPath = item._outputPath;\n          if (this.userPlugin.assetsPrePath) {\n            outputPath = this.userPlugin.assetsPrePath + outputPath;\n          }\n          this.writeFile(outputPath, item._bufferSource, false);\n        }\n        assetPublicMap[item.resource] = item._publicPath;\n      }\n\n      if (item._nodeType === 'module' && item._moduleType === 'style') {\n        styleModule.push(item);\n      }\n    }\n\n    // style模块中静态资源路径的处理\n    styleModule.forEach(item => {\n      if (item._cmlSource) {\n        item._cmlSource = item._cmlSource.replace(/__cml(.*?)__lmc/g, function(all, $1) {\n          if (assetPublicMap[$1]) {\n            return `url(\"${assetPublicMap[$1]}\")`\n          } else {\n            cml.log.error(`not find asset module ${$1}`);\n          }\n        })\n      }\n    })\n\n\n    if (!appModule) {\n      throw new Error('not find app.cml node!')\n    }\n\n    // 记录已经创建的节点\n    let moduleNodeMap = new Map();\n    this.projectGraph = this.createGraph(appModule, null, moduleNodeMap);\n\n  }\n\n  // 创建依赖图\n  createGraph(targetModule, currentNode, moduleNodeMap) {\n    // 第一个app节点\n    if (!currentNode) {\n      currentNode = this.createNode(targetModule);\n      moduleNodeMap.set(targetModule, currentNode);\n    }\n    targetModule.dependencies.forEach(item => {\n      if (item.module) {\n        // 如果已经创建了节点\n        if (moduleNodeMap.has(item.module)) {\n          let subNode = moduleNodeMap.get(item.module);\n          // 如果 子节点的文件路径和父节点相同 ze是CML文件 放入childrens\n          if (subNode.realPath === currentNode.realPath) {\n            subNode.parent = currentNode;\n            currentNode.childrens.push(subNode);\n          } else {\n            currentNode.dependencies.push(subNode);\n          }\n\n        } else {\n          // 创建节点\n          let subNode = this.createNode(item.module);\n          moduleNodeMap.set(item.module, subNode);\n          if (subNode.realPath === currentNode.realPath) {\n            subNode.parent = currentNode;\n            currentNode.childrens.push(subNode);\n          } else {\n            currentNode.dependencies.push(subNode);\n          }\n          // 递归创建\n          this.createGraph(item.module, subNode, moduleNodeMap)\n        }\n      }\n    })\n    return currentNode;\n  }\n\n  // 创建单个节点\n  createNode(module) {\n    let options = {};\n    options.realPath = module.resource; // 会带参数  资源绝对路径\n    options.ext = path.extname(module.resource);\n    options.nodeType = module._nodeType || 'module';\n    // 新的modId\n    let modId = chameleonIdHandle(module.id + '');\n    options.identifier = modId;\n    options.modId = modId; // 模块化的id todo优化hash\n    if (options.nodeType === 'module') {\n      // loader中设置\n      if (module._moduleType) {\n        options.moduleType = module._moduleType;\n      } else {\n        // 根据后缀\n        this.moduleRules.forEach(rule => {\n          if (rule.test.test(module.resource)) {\n            options.moduleType = rule.moduleType;\n          }\n        })\n        options.moduleType = options.moduleType || 'other';\n      }\n    }\n\n    // 可能出现module._cmlSource为空字符串的情况\n    if (module._cmlSource !== undefined) {\n      options.source = module._cmlSource;\n    } else {\n      options.source = module._source && module._source._value;\n    }\n\n    if (module._cmlOriginSource !== undefined) {\n      options.originSource = module._cmlOriginSource;\n    }\n\n    if (options.moduleType === 'template') {\n      options.convert = cmlparse(options.source);\n    }\n\n    if (options.moduleType === 'json') {\n      // cml文件中的json部分\n      if (options.ext === '.cml' || (this.userPlugin.miniappExt && this.userPlugin.miniappExt.rule.test(options.realPath))) {\n        options.convert = JSON.parse(options.source);\n      } else {\n        // 其他json文件当成script模块\n        options.moduleType === 'script';\n        options.source = `module.exports = ${options.source}`\n      }\n    }\n\n    if (options.moduleType === 'script') {\n      // 要做js中require模块的处理 替换modId\n      options.source = handleScript(options.source, module, this.definitions);\n    }\n    options.extra = module._cmlExtra || undefined;\n    return new CMLNode(options)\n  }\n\n\n  // 开启用户自定义编译\n  customCompile() {\n    // 队列串行编译\n    //  递归编译\n\n    this.customCompileNode(this.projectGraph);\n  }\n\n  customCompileNode(currentNode) {\n    if (~this.hasCompiledNode.indexOf(currentNode)) {\n      return;\n    }\n    this.hasCompiledNode.push(currentNode);\n    if (~['app', 'page', 'component'].indexOf(currentNode.nodeType)) {\n      this.emit(`compile-preCML`, currentNode, currentNode.nodeType);\n    } else {\n      // template script style json\n      let parent = currentNode.parent || {};\n      this.emit(`compile-${currentNode.moduleType}`, currentNode, parent.nodeType);\n    }\n    currentNode.childrens.forEach(item => {\n      this.customCompileNode(item);\n    })\n\n    currentNode.dependencies.forEach(item => {\n      this.customCompileNode(item);\n    })\n\n    if (~['app', 'page', 'component'].indexOf(currentNode.nodeType)) {\n      this.emit(`compile-postCML`, currentNode, currentNode.nodeType);\n    }\n  }\n\n  /**\n   * \n   * @param {*} filePath \n   * @param {*} content \n   * @param {*} addHash 当配置文件中hash为true时 是否给该文件添加hash \n   */\n  writeFile(filePath, content, addHash = true) {\n    this.outputFiles.push({\n      filePath,\n      content,\n      addHash\n    })\n  }\n\n  emitFiles() {\n    let self = this;\n    let config = (cml.config.get()[self.cmlType] && cml.config.get()[self.cmlType][self.media]) || {};\n    let {hash, minimize} = config;\n    let minimizeExt = this.userPlugin.minimizeExt;\n    let minimizeExtMap = {};\n    if (minimizeExt) {\n      Object.keys(minimizeExt).forEach(key => {\n        minimizeExt[key].forEach(ext => {\n          minimizeExtMap[ext] = key;\n        })\n      })\n    }\n\n    let outputPath = this.webpackCompiler.options.output.path;\n    this.outputFiles.forEach(item => {\n      let outFilePath = path.join(outputPath, item.filePath);\n      if (minimize === true && minimizeExt) {\n        let ext = path.extname(outFilePath);\n        let miniType = minimizeExtMap[ext]; // js or css\n        if (miniType === 'js') {\n          let result = UglifyJs(item.content, outFilePath);\n          if (result === undefined) {\n            throw new Error(`uglifyjs error from ${outFilePath}`);\n          } else {\n            item.content = result;\n          }\n        }\n\n        if (miniType === 'css') {\n          let result = UglifyCSS(item.content, outFilePath);\n          if (result === undefined) {\n            throw new Error(`uglifycss error from ${outFilePath}`);\n          } else {\n            item.content = result;\n          }\n        }\n      }\n      if (hash === true && item.addHash === true) {\n        outFilePath = cmlUtils.addHashName(outFilePath, cmlUtils.createMd5(item.content))\n      }\n      if (typeof item.content === 'string') {\n        cmlUtils.fse.outputFileSync(outFilePath, item.content)\n      } else {\n        cmlUtils.fse.outputFileSync(outFilePath, item.content, {\n          encoding: 'binary'\n        })\n      }\n    })\n  }\n\n  getRouterConfig() {\n    let {routerConfig} = cmlUtils.getRouterConfig();\n    let subProjectRouter = cmlUtils.getSubProjectRouter();\n    return {\n      projectRouter: routerConfig,\n      subProjectRouter: subProjectRouter\n    }\n  }\n}\n\nmodule.exports = Compiler;\n"
  },
  {
    "path": "packages/mvvm-pack/index.js",
    "content": "const MvvmGraphPlugin = require('./mvvmGraphPlugin.js');\nconst MvvMCompiler = require('./compiler.js');\n\nmodule.exports = {\n  MvvmGraphPlugin,\n  MvvMCompiler\n}"
  },
  {
    "path": "packages/mvvm-pack/lib/amd.js",
    "content": "const amdWrapModule = require('./amdwrapper.js');\nconst path = require('path');\nconst fs = require('fs');\nconst globalBootstrap = fs.readFileSync(path.join(__dirname, 'amdbootstrap.global.js'), {encoding: 'utf8'})\nconst moduleBootstrap = fs.readFileSync(path.join(__dirname, 'amdbootstrap.module.js'), {encoding: 'utf8'})\n\nfunction getGlobalBootstrap(globalName) {\n  return globalBootstrap.replace('$GLOBAL', globalName);\n}\n\nfunction getModuleBootstrap() {\n  return moduleBootstrap;\n}\n\nmodule.exports = {\n  amdWrapModule,\n  getGlobalBootstrap,\n  getModuleBootstrap\n}\n"
  },
  {
    "path": "packages/mvvm-pack/lib/amdbootstrap.global.js",
    "content": "\n/**\n * 全局型\n */\n\n(function(cmlglobal) {\n  cmlglobal = cmlglobal || {};\n  cmlglobal.cmlrequire;\n\n  var factoryMap = {};\n\n  var modulesMap = {};\n  cmlglobal.cmldefine = function(id, factory) {\n    factoryMap[id] = factory;\n  };\n\n  cmlglobal.cmlrequire = function(id) {\n    var mod = modulesMap[id];\n    if (mod) {\n      return mod.exports;\n    }\n\n    var factory = factoryMap[id];\n    if (!factory) {\n      throw new Error('[ModJS] Cannot find module \"' + id + '\"');\n    }\n\n    mod = modulesMap[id] = {\n      exports: {}\n    };\n\n    var ret = (typeof factory == 'function')\n      ? factory.apply(mod, [cmlglobal.cmlrequire, mod.exports, mod])\n      : factory;\n\n    if (ret) {\n      mod.exports = ret;\n    }\n    return mod.exports;\n  };\n\n})($GLOBAL); // 全局变量\n"
  },
  {
    "path": "packages/mvvm-pack/lib/amdbootstrap.module.js",
    "content": "\n/**\n * 模块型\n */\n(function() {\n\n  var factoryMap = {};\n\n  var modulesMap = {};\n  var cmldefine = function(id, factory) {\n    if (!factoryMap[id]) {\n      factoryMap[id] = factory;\n    }\n  };\n\n  var cmlrequire = function(id) {\n    var mod = modulesMap[id];\n    if (mod) {\n      return mod.exports;\n    }\n\n    var factory = factoryMap[id];\n    if (!factory) {\n      throw new Error('[ModJS] Cannot find module \"' + id + '\"');\n    }\n\n    mod = modulesMap[id] = {\n      exports: {}\n    };\n\n    var ret = (typeof factory == 'function')\n      ? factory.apply(mod, [cmlrequire, mod.exports, mod])\n      : factory;\n    if (ret) {\n      mod.exports = ret;\n    }\n    return mod.exports;\n  };\n\n  module.exports = {\n    cmldefine: cmldefine,\n    cmlrequire: cmlrequire\n  }\n})();\n\n\n"
  },
  {
    "path": "packages/mvvm-pack/lib/amdwrapper.js",
    "content": "\nmodule.exports = function({content, modId}) {\n  if (!/^\\s*cmldefine\\s*\\(/.test(content)) {\n    content = `\\ncmldefine('${modId}', function(require, exports, module) {\n  ${content}\n})`;\n  }\n  return content;\n}"
  },
  {
    "path": "packages/mvvm-pack/lib/handleScript.js",
    "content": "const parser = require('@babel/parser');\nconst traverse = require('@babel/traverse');\nconst t = require('@babel/types');\nconst {parsePlugins} = require('runtime-check');\nconst {chameleonHandle} = require('chameleon-webpack-plugin/lib/utils');\nconst generator = require(\"@babel/generator\");\n\nexports.handleScript = function(source, cmlmodule, definitions) {\n  const ast = parser.parse(source, {\n    sourceType: 'module',\n    plugins: parsePlugins\n  });\n\n  traverse[\"default\"](ast, {\n    enter: (path) => {\n      exports.replaceJsModId(source, cmlmodule, path);\n      exports.replaceDefines(source, cmlmodule, path, definitions);\n    }\n  })\n\n  return generator[\"default\"](ast).code;\n}\n\nexports.replaceJsModId = function(source, cmlmodule, path) {\n  let node = path.node;\n  if (t.isImportDeclaration(node) && node.source.value) {\n    let modId = getJSModId(node.source.value);\n    node.source.value = modId;\n    node.source.raw = `'${modId}'`;\n\n  } else if (t.isCallExpression(node) && node.callee && t.isIdentifier(node.callee) && node.callee.name === 'require') {\n    if (node.arguments && node.arguments.length === 1 && node.arguments[0] && t.isLiteral(node.arguments[0])) {\n      let modId = getJSModId(node.arguments[0].value);\n      node.arguments[0].value = modId;\n      node.arguments[0].raw = `'${modId}'`;\n    } else if (node.arguments && node.arguments.length === 1 && node.arguments[0] && t.isStringLiteral(node.arguments[0])) {\n      let modId = getJSModId(node.arguments[0].value);\n      node.arguments[0].value = modId;\n    }\n  }\n\n  function getJSModId(rawRequest) {\n    let deps = cmlmodule.dependencies;\n    for (let i = 0; i < deps.length; i++) {\n      let dep = deps[i];\n      if (rawRequest === dep.request) {\n        if (dep.module && dep.module.request) {\n          return exports.chameleonIdHandle(dep.module.id + '')\n        }\n      }\n    }\n    cml.log.error('not find modId for' + rawRequest);\n  }\n} \n\n\nexports.getDefines = function(definitions, prefix, result) {\n\n  return getInnerDefines(definitions, prefix, result);\n\n  function getInnerDefines (definitions, prefix, result) {\n    Object.keys(definitions).forEach((key) => {\n      const code = definitions[key];\n      let newPrefix = prefix ? prefix + '.' + key : key;\n      if (code && typeof code === 'object') {\n        getInnerDefines(code, newPrefix, result);\n      } else {\n        result.push({\n          key: newPrefix,\n          value: code\n        })\n      }\n    })\n    return result;\n  }\n}\n\nexports.replaceDefines = function(source, cmlmodule, path, definitions) {\n  let defineResult = [];\n  exports.getDefines(definitions, '', defineResult);\n  let node = path.node;\n\n  function handleMember(memberList, node) {\n    if (t.isMemberExpression(node.object)) {\n      handleMember(memberList, node.object);\n    } else if (t.isIdentifier(node.object)) {\n      memberList.push(node.object.name);\n    }\n    if (t.isIdentifier(node.property)) {\n      memberList.push(node.property.name);\n    }\n  }\n\n  if (t.isIdentifier(node)) {\n    if (!t.isMemberExpression(path.parent)) {\n      // 只有一层变量\n      defineResult.forEach(item => {\n        if (item.key.length === 1 && item.key[0] === node.name) {\n          node.name = item.value;\n        }\n      })\n    }\n  }\n  // 多级变量，找到最上层的变量起点 process.env.media\n  else if (t.isMemberExpression(node) && !t.isMemberExpression(path.parent)) {\n    let memberList = [];\n    handleMember(memberList, node);\n    let tokenKey = memberList.join('.');\n    defineResult.forEach(item => {\n      if (item.key === tokenKey) {\n        path.replaceWith(\n          t.identifier(item.value)\n        );\n      }\n    })\n  }\n}\n\nexports.chameleonIdHandle = function(id) {\n  let result = chameleonHandle(id, 'chameleon-tool');\n  return result\n}"
  },
  {
    "path": "packages/mvvm-pack/log.js",
    "content": "const chalk = require('chalk');\n\nclass Log {\n  constructor(options = {}) {\n    this.level = options.level || 2;\n  }\n\n  debug (msg) {\n    if (this.level >= 3) {\n      process.stdout.write('\\n' + chalk.gray('[DEBUG]') + ' ' + msg + '\\n');\n    }\n  }\n\n  notice (msg) {\n    if (this.level >= 2) {\n      process.stdout.write('\\n' + chalk.cyan('[INFO]') + ' ' + msg + '\\n');\n    }\n  }\n\n  warn (msg) {\n    if (this.level >= 1) {\n      process.stdout.write('\\n' + chalk.yellow('[WARNI]') + ' ' + msg + '\\n');\n    }\n  }\n\n  error(msg) {\n    if (this.level >= 0) {\n      process.stdout.write('\\n' + chalk.red('[ERROR]') + ' ' + msg + '\\n');\n    }\n  }\n\n}\n\nmodule.exports = Log;\n\n\n"
  },
  {
    "path": "packages/mvvm-pack/minimize/uglifycss.js",
    "content": "let csso = require('csso');\n\nmodule.exports = function(content, filePath) {\n  let result = csso.minify(content, {});\n  return result.css;\n}"
  },
  {
    "path": "packages/mvvm-pack/minimize/uglifyjs.js",
    "content": "let UglifyJS = require(\"uglify-js\");\nlet cmlUtils = require('chameleon-tool-utils');\n\nmodule.exports = function(code, filename, options = {}) {\n  let result = UglifyJS.minify(code, Object.assign(options, {\n    warnings: true\n  }));\n  if (result.error) {\n    let errorMessage = `file uglify error： ${filename}\\n`;\n    Object.keys(result.error).forEach(key => {\n      errorMessage += `${key}: ${result.error[key]}\\n`\n    })\n    throw new Error(errorMessage);\n  }\n\n  if (result.warnings) {\n    let errorMessage = `file uglify warning: ${filename}\\n`;\n    result.warnings.forEach(item => {\n      errorMessage += `${item}\\n`\n    })\n    cmlUtils.log.warn(errorMessage);\n  }\n  return result.code;\n}\n"
  },
  {
    "path": "packages/mvvm-pack/mvvmGraphPlugin.js",
    "content": "\nconst MvvmCompiler = require('./compiler.js');\nclass mvvmGraphPlugin {\n  constructor(options = {}, platformPlugin) {\n    this.options = options;\n    this.platformPlugin = platformPlugin;\n  }\n  apply(compiler) {\n    let self = this;\n    let mvvmCompiler = new MvvmCompiler(compiler, self.platformPlugin, self.options);\n    compiler._mvvmCompiler = mvvmCompiler;\n    compiler._platformPlugin = self.platformPlugin;\n    // 监听cml中查找组件\n    cml.event.on('find-component', function(result) {\n      let {cmlType, filePath} = result;\n      // 如果是当前端 则进行原生组件查找\n      if (cmlType === self.options.cmlType) {\n        let extList = self.platformPlugin.originComponentExtList;\n        for (let i = 0; i < extList.length; i++) {\n          let extFilePath = filePath + extList[i];\n          if (cml.utils.isFile(extFilePath)) {\n            result.extPath = extFilePath;\n            break;\n          }\n        }\n      }\n    })\n    self.platformPlugin.register(mvvmCompiler);\n    compiler.plugin('should-emit', function(compilation) {   \n      try {\n        mvvmCompiler.run(compilation.modules);\n      } catch (e) {\n        cml.log.error(e);\n      }\n      // 返回false 不进入emit阶段\n      return false; \n    })\n\n    // 修改config.json的钩子\n    cml.event.on('config-json', function(jsonObj) {\n      mvvmCompiler.emit('config-json', jsonObj);\n    })\n\n\n    // 捕获错误\n    process.on('uncaughtException', function (err) {\n      cml.log.error(err);\n    });\n  }\n}\n\nmodule.exports = mvvmGraphPlugin;"
  },
  {
    "path": "packages/mvvm-pack/package.json",
    "content": "{\n  \"name\": \"mvvm-pack\",\n  \"version\": \"1.0.8\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"cover\": \"istanbul cover --report lcov  node_modules/mocha/bin/_mocha -- -R spec --recursive test/*.test.js test/**/*.test.js\",\n    \"test\": \"mocha --recursive --reporter spec test/*.test.js test/**/*.test.js\",\n    \"test-brk\": \"node --inspect-brk node_modules/mocha/bin/mocha --recursive --reporter spec test/*.test.js test/**/*.test.js\"\n  },\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"dependencies\": {\n    \"@babel/core\": \"^7.3.4\",\n    \"@babel/generator\": \"^7.4.0\",\n    \"@babel/parser\": \"^7.3.4\",\n    \"@babel/traverse\": \"^7.3.4\",\n    \"@babel/types\": \"^7.3.4\",\n    \"chameleon-tool-utils\": \"1.0.8\",\n    \"chameleon-webpack-plugin\": \"1.0.8\",\n    \"csso\": \"^3.5.1\",\n    \"mvvm-babel-parser\": \"1.0.8\",\n    \"mvvm-template-parser\": \"1.0.8\",\n    \"runtime-check\": \"1.0.8\",\n    \"uglify-js\": \"^3.5.10\",\n    \"webpack-merge\": \"^4.2.1\"\n  },\n  \"devDependencies\": {\n    \"chai\": \"^4.2.0\",\n    \"eslint\": \"^5.9.0\",\n    \"istanbul\": \"^0.4.5\",\n    \"mocha\": \"^5.2.0\"\n  }\n}"
  },
  {
    "path": "packages/mvvm-pack/test/cmlNode.test.js",
    "content": "\nvar CMLNode = require('../cmlNode.js')\n\nconst expect = require('chai').expect;\n\ndescribe('cmlNode', function() {\n  it('constructor', function() {\n    var cmlNode = new CMLNode({\n      ext: '.cml',\n      realPath : 'realPath', // 文件物理地址\n      nodeType : 'nodeType', // app/page/component/module // 节点类型     app/page/component  其他的为module  cml文件中的每一个部分也是一个Node节点\n      moduleType: 'moduleType',// template/style/script/json/asset\n      dependencies: ['dependencies'], // 该节点的直接依赖       app.cml依赖pages.cml pages.cml依赖components.cml js依赖js\n      childrens : ['dependencies'], // 子模块 cml文件才有子模块\n      parent: 'parent', // 父模块 cml文件中的子模块才有\n      source: 'source', // 模块源代码\n      convert: 'convert', // 源代码的格式化形式\n      output: 'output', // 模块输出  各种过程操作该字段\n      identifier: 'identifier', // 节点唯一标识\n      modId: 'modId', // 模块化的id requirejs\n      extra: 'extra' // 节点的额外信息\n    })\n    expect(cmlNode.ext).to.be.equal('.cml')\n    expect(cmlNode.realPath).to.be.equal('realPath')\n  })\n \n})\n"
  },
  {
    "path": "packages/mvvm-pack/test/demo-project/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n.vscode\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\n# dist\ndist/\noutput/\n.temp\n"
  },
  {
    "path": "packages/mvvm-pack/test/demo-project/chameleon.config.js",
    "content": "\n// 设置静态资源的线上路径\nconst publicPath = '//www.static.chameleon.com/cml';\n// 设置api请求前缀\nconst apiPrefix = 'https://api.chameleon.com'; \n// cml.config.merge({\n//   templateLang: 'cml',\n//   templateType: 'html',\n//   subProject: ['cml-subproject'],\n//   platforms: ['web', 'weex', 'wx', 'baidu', 'alipay'],\n//   buildInfo: {\n//     wxAppId: '123456'\n//   },\n//   wx: {\n//     dev: {\n//     },\n//     build: {\n//       apiPrefix\n//     }\n//   },\n//   web: {\n//     dev: {\n//       analysis: false,\n//       console: false\n//     },\n//     build: {\n//       analysis: false,\n//       publicPath: `${publicPath}/web/`,\n//       apiPrefix\n//     }\n//   },\n//   weex: {\n//     dev: {\n//     },\n//     build: {\n//       publicPath: `${publicPath}/weex/`,\n//       apiPrefix\n//     },\n//     custom: {\n//       publicPath: `${publicPath}/wx/`,\n//       apiPrefix\n//     }\n//   }\n// })\n\n"
  },
  {
    "path": "packages/mvvm-pack/test/demo-project/coma/coma.interface",
    "content": ""
  },
  {
    "path": "packages/mvvm-pack/test/demo-project/comb/comb.cml",
    "content": ""
  },
  {
    "path": "packages/mvvm-pack/test/demo-project/index.cml",
    "content": ""
  },
  {
    "path": "packages/mvvm-pack/test/demo-project/package.json",
    "content": "{\n  \"name\": \"fse\",\n  \"version\": \"1.0.0\",\n  \"description\": \"A chameleon project\",\n  \"author\": \"\",\n  \"private\": true,\n  \"scripts\": {},\n  \"license\": \"MIT\",\n  \"dependencies\": {\n    \"chameleon-runtime\": \"~1.1.0\",\n    \"chameleon-store\": \"~1.0.0\",\n    \"cml-ui\": \"~1.0.0\",\n    \"chameleon-ui-builtin\": \"~1.0.0\",\n    \"chameleon-api\": \"~0.1.0\",\n    \"chameleon-bridge\": \"~0.1.1\"\n  }\n}\n"
  },
  {
    "path": "packages/mvvm-pack/test/demo-project/src/app/app.cml",
    "content": "<template>\n  <app store=\"{{store}}\" router-config=\"{{routerConfig}}\"></app>\n</template>\n\n<script>\nimport store from '../store/index.js'\nimport routerConfig from '../router.config.json';\n\nclass App {\n  data = {\n    store,\n    routerConfig\n  }\n  created(res) {\n\n    \n    \n\n\n\n\n  }\n}\n\n\n\nexport default new App();\n</script>\n\n<style>\n\n</style>\n\n<script cml-type=\"json\">\n{\n  \"wx\": {\n    \"window\": {\n      \"backgroundTextStyle\":\"light\",\n      \"navigationBarBackgroundColor\": \"#fff\",\n      \"navigationBarTitleText\": \"Chameleon\",\n      \"navigationBarTextStyle\":\"black\"\n    }\n  },\n  \"baidu\": {\n    \"window\": {\n      \"backgroundTextStyle\": \"light\",\n      \"navigationBarBackgroundColor\": \"#ffffff\",\n      \"navigationBarTitleText\": \"Chameleon\",\n      \"navigationBarTextStyle\": \"black\"\n    }\n  },\n  \"alipay\": {\n      \"window\": {\n        \"defaultTitle\": \"Chameleon\"\n      }\n  }\n}\n</script>"
  },
  {
    "path": "packages/mvvm-pack/test/demo-project/src/components/coma/coma.cml",
    "content": "<template>\n  <view class=\"demo-com\">\n    <text class=\"title\">{{title}}</text>\n    <image src=\"{{imageSrc}}\" class=\"logo\"></image>  \n  </view>\n</template>\n\n<script>\nimport cml from '@didi/chameleon-api'\n\nclass DemoCom {\n  props = {\n    title: {\n      type: String,\n      default: ''\n    },\n    imageSrc: {\n      type: String,\n      default: ''\n    },\n  }\n  \n\n  data = {\n  }\n\n  computed = {\n  }\n\n  watch  = {\n  }\n\n  methods = {\n  }\n\n  beforeCreate() {\n  }\n\n  created() {\n  }\n\n  beforeMount() {\n  }\n\n  mounted() {\n  }\n\n  beforeDestroy() {\n  }\n\n  destroyed() {\n  }\n}\n\nexport default new DemoCom();\n</script>\n<style>\n.demo-com {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n.title {\n  align-self: center;\n  color: #61c7fc;\n  font-size: 72cpx;\n  margin-top: 160cpx;\n  margin-bottom: 20cpx;\n}\n.logo {\n  width: 150cpx;\n  height: 150cpx;\n  margin-top: 100cpx;\n}\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {}\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/mvvm-pack/test/demo-project/src/components/comb/comb.interface",
    "content": "<script cml-type=\"web\" src=\"./comb.web.cml\"></script>\n<script cml-type=\"wx\" src=\"./comb.wx.cml\"></script>"
  },
  {
    "path": "packages/mvvm-pack/test/demo-project/src/components/comb/comb.web.cml",
    "content": ""
  },
  {
    "path": "packages/mvvm-pack/test/demo-project/src/components/comb/comb.wx.cml",
    "content": ""
  },
  {
    "path": "packages/mvvm-pack/test/demo-project/src/components/comc/comc.interface",
    "content": ""
  },
  {
    "path": "packages/mvvm-pack/test/demo-project/src/pages/pagea/pagea.cml",
    "content": "<template>\n  <page title=\"chameleon\">\n      <scroller height=\"{{-1}}\">\n        <view class=\"scroller-wrap\">\n          <demo-com title=\"{{title}}\" image-src=\"{{chameleonSrc}}\"></demo-com>\n        </view>\n      </scroller>\n  </page>\n</template>\n\n<script>\nimport cml from '@didi/chameleon-api'\nclass Index  {\n  data = {\n    title: \"chameleon\",\n    chameleonSrc: require('../../assets/images/chameleon.png')\n  }\n}\n\nexport default new Index();\n\n</script>\n<style>\n\n.scroller-wrap {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n\n\n\n\n\n\n\n</style>\n<script cml-type=\"json\">\n{\n  \"base\": {\n    \"usingComponents\": {\n      \"demo-com\": \"/components/coma/coma\"\n    }\n  },\n  \"wx\": {\n    \"navigationBarTitleText\": \"index\",\n    \"backgroundTextStyle\": \"dark\",\n    \"backgroundColor\": \"#E2E2E2\"\n  },\n  \"alipay\": {\n    \"defaultTitle\": \"index\",\n    \"pullRefresh\": false,\n    \"allowsBounceVertical\": \"YES\",\n    \"titleBarColor\": \"#ffffff\"\n  },\n  \"baidu\": {\n    \"navigationBarBackgroundColor\": \"#ffffff\",\n    \"navigationBarTextStyle\": \"white\",\n    \"navigationBarTitleText\": \"index\",\n    \"backgroundColor\": \"#ffffff\",\n    \"backgroundTextStyle\": \"dark\",\n    \"enablePullDownRefresh\": false,\n    \"onReachBottomDistance\": 50\n  }\n}\n</script>\n"
  },
  {
    "path": "packages/mvvm-pack/test/demo-project/src/pages/pageb/pageb.cml",
    "content": ""
  },
  {
    "path": "packages/mvvm-pack/test/demo-project/src/router.config.json",
    "content": "{\n  \"mode\": \"history\",\n  \"domain\": \"https://www.chameleon.com\",\n  \"routes\":[\n    {\n      \"url\": \"/cml/h5/index\",\n      \"path\": \"/pages/pagea/pagea\",\n      \"name\": \"首页\",\n      \"mock\": \"index.php\"\n    }\n  ]\n}"
  },
  {
    "path": "packages/mvvm-pack/test/demoPlugin.js",
    "content": "\nconst path = require('path');\nmodule.exports = class DemoPlugin {\n  constructor(options) {\n    let { cmlType, media} = options;\n    this.webpackRules = []; // webpack的rules设置  用于当前端特殊文件处理\n    this.moduleRules = []; // 文件后缀对应的节点moduleType\n    this.logLevel = 3;\n    this.originComponentExtList = ['.wxml']; // 用于扩展原生组件的文件后缀查找\n    this.runtimeNpmName = 'cml-demo-runtime'; // 指定当前端的运行时库\n    this.builtinUINpmName = 'cml-demo-ui-builtin'; // 指定当前端的内置组件库\n    this.cmlType = cmlType;\n    this.media = media;\n    this.miniappExt = { // 小程序原生组件处理\n      rule: /\\.wxml$/,\n      mapping: {\n        'template': '.wxml',\n        'style': '.wxss',\n        'script': '.js',\n        'json': '.json'\n      }\n    }\n    // 需要压缩文件的后缀\n    this.minimizeExt = {\n      js: ['.js'],\n      css: ['.css', '.wxss']\n    }\n\n  }\n\n  /**\n   * @description 注册插件\n   * @param {compiler} 编译对象\n   * */\n  register(compiler) {\n    let self = this;\n\n    /**\n       * cml节点编译前\n       * currentNode 当前节点\n       * nodeType 节点的nodeType\n       */\n    compiler.hook('compile-preCML', function(currentNode, nodeType) {\n\n    })\n\n    /**\n       * cml节点编译后\n       * currentNode 当前节点\n       * nodeType 节点的nodeType\n       */\n    compiler.hook('compile-postCML', function(currentNode, nodeType) {\n\n    })\n\n    /**\n       * 编译script节点，比如做模块化\n       * currentNode 当前节点\n       * parentNodeType 父节点的nodeType\n       */\n    compiler.hook('compile-script', function(currentNode, parentNodeType) {\n    })\n\n    /**\n       * 编译script节点，比如做模块化\n       * currentNode 当前节点\n       * parentNodeType 父节点的nodeType\n       */\n    compiler.hook('compile-asset', function(currentNode, parentNodeType) {\n    })\n\n    /**\n       * 编译template节点 语法转义\n       * currentNode 当前节点\n       * parentNodeType 父节点的nodeType\n       */\n    compiler.hook('compile-template', function(currentNode, parentNodeType) {\n    })\n\n    /**\n       * 编译style节点  比如尺寸单位转义\n       * currentNode 当前节点\n       * parentNodeType 父节点的nodeType\n       */\n    compiler.hook('compile-style', function(currentNode, parentNodeType) {\n    })\n\n    /**\n       * 编译json节点\n       * currentNode 当前节点\n       * parentNodeType 父节点的nodeType\n       */\n    compiler.hook('compile-json', function(currentNode, parentNodeType) {\n    })\n\n    /**\n       * 编译other类型节点\n       * currentNode 当前节点\n       */\n    compiler.hook('compile-other', function(currentNode) {\n\n    })\n\n    /**\n    * 编译other类型节点\n    * currentNode 当前节点\n    */\n    compiler.hook('config-json', function(jsonObj) {\n      jsonObj.name = 'chameleon';\n    })\n\n    /**\n       * 编译结束进入打包阶段\n       */\n    compiler.hook('pack', function(projectGraph) {\n      compiler.writeFile('static/test.js', 'dd')\n      compiler.writeFile('static/css.css', '.class1 {color: red;}')\n    })\n\n    cml.projectRoot = path.join(__dirname, 'demo-project');\n    cml.config = {\n      get() {\n        return {\n          subProject: ['cml-subproject'],\n          wx: {\n            dev: {\n              minimize: true,\n              hash: true\n            }\n          }\n        }\n      }\n    }\n    let result = compiler.getRouterConfig();\n    console.log(JSON.stringify(result));\n  }\n}\n"
  },
  {
    "path": "packages/mvvm-pack/test/lib/amd.test.js",
    "content": "\nlet _ = require('../../lib/amd.js');\nconst fs = require('fs');\nconst path = require('path');\nconst expect = require('chai').expect;\n\ndescribe('amd', function() {\n  it('amdWrapModule not has cmldefine', function() {\n    let code = 'sdfsdfsdfsdfd'\n    let result = _.amdWrapModule({content: code, modId: '123'})\n    expect(result).to.be.equal('\\ncmldefine(\\'123\\', function(require, exports, module) {\\n  sdfsdfsdfsdfd\\n})')\n  })\n  it('amdWrapModule has cmldefine', function() {\n    let code = '\\ncmldefine(\\'123\\', function(require, exports, module) {\\n  sdfsdfsdfsdfd\\n})';\n    let result = _.amdWrapModule({content: code, modId: '123'})\n    expect(result).to.be.equal(code)\n  })\n\n\n  it('getModuleBootstrap', function() {\n    let amdCode = fs.readFileSync(path.join(__dirname, '../../lib/amdbootstrap.module.js'), {encoding: 'utf8'})\n\n    let result = _.getModuleBootstrap()\n    expect(result).to.be.equal(amdCode)\n  })\n\n  it('getGlobalBootstrap', function() {\n    let result = _.getGlobalBootstrap('global')\n    expect(!!~result.indexOf('(global)')).to.be.equal(true)\n  })\n})\n\n"
  },
  {
    "path": "packages/mvvm-pack/test/lib/amdbootstrap.global.test.js",
    "content": "let fs = require('fs');\nlet path = require('path');\nlet code = fs.readFileSync(path.join(__dirname, '../../lib/amdbootstrap.global.js'), {encoding: 'utf8'})\nconst expect = require('chai').expect;\n\ndescribe('amdbootstrap.global.js', function() {\n  it('global cmldefine', function() {\n    code = `\n    ${code.replace('$GLOBAL', 'global')}\n    `\n    eval(code)\n    global.cmldefine('name', function(require, exports, module) {\n      global.unittest = '123';\n    })\n    global.cmlrequire('name');\n\n    expect(global.unittest).to.be.equal('123');\n\n  })\n})\n\n"
  },
  {
    "path": "packages/mvvm-pack/test/lib/amdbootstrap.module.test.js",
    "content": "\nlet amd = require('../../lib/amdbootstrap.module.js')\nconst expect = require('chai').expect;\n\ndescribe('amdbootstrap.moudle.js', function() {\n  it('module cmldefine', function() {\n\n    amd.cmldefine('name', function(require, exports, module) {\n      global.unittest = '123';\n    })\n    amd.cmlrequire('name');\n    amd.cmlrequire('name');\n\n    expect(global.unittest).to.be.equal('123');\n\n  })\n\n  it('module not find', function() {\n\n    amd.cmldefine('name', function(require, exports, module) {\n      global.unittest = '123';\n    })\n    try {\n      amd.cmlrequire('name2');\n    } catch (e) {\n      expect(!!~e.message.indexOf('[ModJS] Cannot find module')).to.be.equal(true);\n    }\n  })\n\n  it('module has return', function() {\n\n    amd.cmldefine('name3', function(require, exports, module) {\n      return 'has return';\n    })\n    var value = amd.cmlrequire('name3');\n    expect(!!~value.indexOf('has return')).to.be.equal(true);\n  })\n})\n\n"
  },
  {
    "path": "packages/mvvm-pack/test/lib/amdwrapper.test.js",
    "content": "let wrapper = require('../../lib/amdwrapper');\nconst expect = require('chai').expect;\n\ndescribe('amdwrapper', function() {\n  it('not has cmldefine', function() {\n    let code = 'sdfsdfsdfsdfd'\n    let result = wrapper({content: code, modId: '123'})\n    expect(result).to.be.equal('\\ncmldefine(\\'123\\', function(require, exports, module) {\\n  sdfsdfsdfsdfd\\n})')\n  })\n  it('has cmldefine', function() {\n    let code = '\\ncmldefine(\\'123\\', function(require, exports, module) {\\n  sdfsdfsdfsdfd\\n})';\n    let result = wrapper({content: code, modId: '123'})\n    expect(result).to.be.equal(code)\n  })\n})\n\n"
  },
  {
    "path": "packages/mvvm-pack/test/lib/handleScript.node.js",
    "content": "\nlet _ = require('../../lib/handleScript.js');\nconst cmlUtils = require('chameleon-tool-utils');\nglobal.cml = {\n  log: cmlUtils.log\n}\nlet code = `\n  var b = require('../b.js');\n`\nvar target = {\n  dependencies: [\n    {\n      request: '../a.js',\n      module: {\n        request: '../a.js',\n        id: 'a'\n      }\n    },\n    {\n      request: '../b.js',\n      module: {\n        request: '../b.js',\n        id: 'b'\n      }\n    },\n    {\n      request: '../c.js',\n      module: {\n        request: '../c.js',\n        id: 'c'\n      }\n    },\n    {\n      request: '../d.js',\n      module: {\n        request: '../d.js',\n        id: 'd'\n      }\n    },\n    {\n      request: './src/interfaces/alert/index.js',\n      module: {\n        request: '../d.js',\n        id: 'index'\n      }\n    }\n  ]\n}\nlet result = _.handleScript(code, target, {});\nconsole.log(result)"
  },
  {
    "path": "packages/mvvm-pack/test/lib/handleScript.test.js",
    "content": "\nlet _ = require('../../lib/handleScript.js');\nconst expect = require('chai').expect;\n\ndescribe('handleScript.js', function() {\n  it('handleScript', function() {\n    let code = `\n      import a from '../a.js';\n      var b = require('../b.js');\n      require('../c.js');\n      module.exports = require('../d.js');\n    `\n    var target = {\n      dependencies: [\n        {\n          request: '../a.js',\n          module: {\n            request: '../a.js',\n            id: 'a'\n          }\n        },\n        {\n          request: '../b.js',\n          module: {\n            request: '../b.js',\n            id: 'b'\n          }\n        },\n        {\n          request: '../c.js',\n          module: {\n            request: '../c.js',\n            id: 'c'\n          }\n        },\n        {\n          request: '../d.js',\n          module: {\n            request: '../d.js',\n            id: 'd'\n          }\n        }\n      ]\n    }\n    let result = _.handleScript(code, target, {});\n    console.log(result)\n    expect(!!~result.indexOf('var b = require(\"b\")')).to.be.equal(true);\n    expect(!!~result.indexOf('import a from \"a\";')).to.be.equal(true);\n    expect(!!~result.indexOf('require(\"c\");')).to.be.equal(true);\n    expect(!!~result.indexOf('require(\"d\");')).to.be.equal(true);\n  })\n\n  it('no modId', function() {\n    let code = `\n      import a from '../a.js';\n      var b = require('../b.js');\n      require('../c.js');\n    `\n    var target = {\n      dependencies: [\n        {\n          request: '../a.js',\n          module: {\n            request: '../a.js',\n            id: 'a'\n          }\n        },\n        {\n          request: '../b.js',\n          module: {\n            request: '../b.js',\n            id: 'b'\n          }\n        }\n      ]\n    }\n    try {\n      _.handleScript(code, target);\n    }\n    catch (e) {\n    }\n  })\n\n  it('getDefines', function() {\n    \n    var defines = {\n      'process.env.media': JSON.stringify('dev'),\n      domain: {\n        domain1: '\"domain1\"'\n      },\n      a: 'avalue',\n    }\n\n    var result = [];\n\n    _.getDefines(defines, '', result);\n    var expectresult = [ { key: 'process.env.media', value: '\"dev\"' },\n    { key: 'domain.domain1', value: '\"domain1\"' },\n    { key: 'a', value: 'avalue' } ]\n    expect(result).to.deep.equal(expectresult);\n  })\n\n  it('replaceDefines', function() { \n\n    let definitions = {\n      CML: 'chameleon',\n      'process.env.media': 'dev'\n    }\n\n    let code = `\n    if(CML) {\n\n    }\n    if(process.env.media == 'dev') {\n\n    }\n    let a = 'a';\n    console.log(b.c);\n    `\n    let result = _.handleScript(code, {}, definitions);\n    console.log(result)\n    // expect(result).to.deep.equal(expectresult);\n  })\n})\n\n"
  },
  {
    "path": "packages/mvvm-pack/test/log.test.js",
    "content": "\nvar Log = require('../log.js')\n\ndescribe('log', function() {\n  it('log.js', function() {\n    let log = new Log();\n    log.debug('debug')\n    log.notice('notice')\n    log.warn('warn')\n    log.error('error')\n  })\n})\n"
  },
  {
    "path": "packages/mvvm-pack/test/mvvmGraphPlugin.test.js",
    "content": "\nvar mvvmGraphPlugin = require('../mvvmGraphPlugin.js')\nvar demoPlugin = require('./demoPlugin.js');\nconst expect = require('chai').expect;\nconst EventEmitter = require('events');\nconst path = require('path');\nconst cmlUtils = require('chameleon-tool-utils');\ndescribe('mvvmGraphPlugin.js', function() {\n  it('1', function() {\n    var oldCml;\n    if (global.cml) {\n      oldCml = global.cml;\n    }\n\n    global.cml = {\n      event: new EventEmitter(),\n      config: {\n        get() {\n          return {\n            wx: {}\n          }\n        }\n      }\n    };\n\n    let options = {\n      cmlType: 'wx',\n      media: 'dev'\n    }\n    let demoPluginInstance = new demoPlugin(options);\n\n    let pluginInstance = new mvvmGraphPlugin(options, demoPluginInstance);\n\n\n    let runcb;\n    let webpackCompiler = {\n      options: {\n        output: {\n          path: ''\n        }\n      },\n      plugin: function(key, func) {\n        runcb = func\n      },\n      run: function() {\n        let compilation = {\n          modules: [{\n            _nodeType: 'app',\n            _cmlSource: '',\n            dependencies: [],\n            request: 'request',\n            resource: 'resource',\n            rawRequest: 'rawRequest',\n            id: 'id'\n\n          }]\n        }\n        runcb(compilation)\n      }\n    }\n\n    pluginInstance.apply(webpackCompiler);\n\n    // 执行\n    webpackCompiler.run();\n    let result = {\n      cmlType: 'wx',\n      filePath: path.join(__dirname, 'test')\n    };\n    cml.utils = cmlUtils;\n    cml.event.emit('find-component', result);\n    var configJson = {};\n    cml.event.emit('config-json', configJson);\n    expect(result.extPath).to.be.equal(path.join(__dirname, 'test.wxml'));\n    expect(configJson.name).to.be.equal('chameleon');\n    global.cml = oldCml;\n\n  })\n\n  it('2', function() {\n    var oldCml;\n    if (global.cml) {\n      oldCml = global.cml;\n    }\n\n    global.cml = {\n      event: new EventEmitter(),\n      config: {\n        get() {\n          return {\n            wx: {\n\n            }\n          }\n        }\n      },\n      log: cmlUtils.log\n    };\n\n    let options = {\n      cmlType: 'wx',\n      media: 'dev'\n    }\n    let demoPluginInstance = new demoPlugin(options);\n\n    let pluginInstance = new mvvmGraphPlugin(options, demoPluginInstance);\n\n\n    let runcb;\n    let webpackCompiler = {\n      options: {\n        output: {\n          path: ''\n        }\n      },\n      plugin: function(key, func) {\n        runcb = func\n      },\n      run: function() {\n        let compilation = {\n          modules: []\n        }\n        runcb(compilation)\n      }\n    }\n\n    pluginInstance.apply(webpackCompiler);\n    try {\n      // 执行\n      webpackCompiler.run();\n    } catch (e) {\n      expect(!!~e.message.indexOf('not find app.cml node')).to.be.equal(true)\n    }\n\n    global.cml = oldCml;\n\n  })\n\n  it('compiler.js', function() {\n    var oldCml;\n    if (global.cml) {\n      oldCml = global.cml;\n    }\n\n    global.cml = {\n      event: new EventEmitter(),\n      config: {\n        get() {\n          return {\n            wx: {\n              dev: {\n                minimize: true,\n                hash: true\n              }\n            }\n          }\n        }\n      }\n    };\n    global.cml.log = cmlUtils.log;\n    let options = {\n      cmlType: 'wx',\n      media: 'dev'\n    }\n    let demoPluginInstance = new demoPlugin(options);\n\n    let pluginInstance = new mvvmGraphPlugin(options, demoPluginInstance);\n\n\n    let runcb;\n    let webpackCompiler = {\n      options: {\n        output: {\n          path: ''\n        }\n      },\n      plugin: function(key, func) {\n        runcb = func\n      },\n      run: function() {\n\n        let page1module = {\n          _nodeType: 'page',\n          _bufferSource: '123',\n          _outputPath: 'static/img.png',\n          _cmlSource: '',\n          dependencies: [],\n          _publicPath: 'static.chameleon.com',\n          request: 'request',\n          resource: '/pages/pagea.cml',\n          rawRequest: 'rawRequest',\n          id: 'id'\n        }\n        let page2module = {\n          _nodeType: 'page',\n          _bufferSource: '123',\n          _outputPath: 'static/img.png',\n          _cmlSource: '',\n          dependencies: [],\n          _publicPath: 'static.chameleon.com',\n          request: 'request',\n          resource: '/pages/pageb.cml',\n          rawRequest: 'rawRequest',\n          id: 'id'\n        }\n\n        let assetModule = {\n          _nodeType: 'module',\n          _moduleType: 'asset',\n          _bufferSource: '123',\n          _outputPath: 'static/img.png',\n          _cmlSource: '',\n          dependencies: [],\n          _publicPath: 'static.chameleon.com',\n          request: 'request',\n          resource: '/assets/chameleon.png',\n          rawRequest: 'rawRequest',\n          id: 'id'\n        }\n\n        let styleModule = {\n          _nodeType: 'module',\n          _moduleType: 'style',\n          _cmlSource: '__cml/assets/chameleon.png__lmc;',\n          dependencies: [],\n          request: 'request',\n          resource: 'resource',\n          rawRequest: 'rawRequest',\n          id: 'id'\n        }\n\n        let style2Module = {\n          _source: {\n            _value: '__cml/assets/chameleon.png__lmc;'\n          },\n          _cmlOriginSource: 'originsource',\n          dependencies: [],\n          request: 'request',\n          resource: 'resource.css',\n          rawRequest: 'rawRequest',\n          id: 'id'\n        }\n\n        let templateModule = {\n          _source: {\n            _value: '<view></view>'\n          },\n          _moduleType: 'template',\n          dependencies: [],\n          request: 'request',\n          resource: 'resource.cml',\n          rawRequest: 'rawRequest',\n          id: 'id'\n        }\n\n        let json1Module = {\n          _source: {\n            _value: '{\"a\":\"a\"}'\n          },\n          _moduleType: 'json',\n          dependencies: [],\n          request: 'request',\n          resource: 'resource.cml',\n          rawRequest: 'rawRequest',\n          id: 'id'\n        }\n        let json2Module = {\n          _source: {\n            _value: 'module.exports = {a:\\'a\\'}'\n          },\n          _moduleType: 'json',\n          dependencies: [],\n          request: 'request',\n          resource: 'resource.cml',\n          rawRequest: 'rawRequest',\n          id: 'id'\n        }\n\n        let scriptModule = {\n          _source: {\n            _value: 'module.exports = {}'\n          },\n          _moduleType: 'script',\n          dependencies: [],\n          request: 'request',\n          resource: 'resource.js',\n          rawRequest: 'rawRequest',\n          id: 'id'\n        }\n\n        let compilation = {\n          modules: [{\n            _nodeType: 'app',\n            _cmlSource: '',\n            dependencies: [{\n              module: page1module\n            }, {\n              module: page2module\n            }, {\n              module: assetModule\n            }, {\n              module: styleModule\n            }, {\n              module: templateModule\n            }, {\n              module: json1Module\n            }, {\n              module: scriptModule\n            }],\n            request: 'request',\n            resource: '/pages/pagea.cml',\n            rawRequest: 'rawRequest',\n            id: 'id'\n\n          },\n          assetModule,\n          styleModule,\n          style2Module]\n        }\n        runcb(compilation)\n      }\n    }\n\n    pluginInstance.apply(webpackCompiler);\n    cml.utils = cmlUtils;\n\n    // 执行\n    webpackCompiler.run();\n    cmlUtils.fse.removeSync(path.join(webpackCompiler.options.output.path, 'static'))\n    global.cml = oldCml;\n\n  })\n})\n"
  },
  {
    "path": "packages/mvvm-pack/test/test.wxml",
    "content": ""
  },
  {
    "path": "packages/mvvm-pack/test/uglifycss.test.js",
    "content": "let _ = require('../minimize/uglifycss');\nconst expect = require('chai').expect;\n\ndescribe('uglifycss', function() {\n  it('normal css', function() {\n    let code = `\n      .class1 {\n        font-size: 24px;\n      }\n      .class2 {\n        color: red;\n        -webkit-box-orient: block-axis;\n      }\n    `\n    let result = _(code)\n    expect(result).to.be.equal('.class1{font-size:24px}.class2{color:red;-webkit-box-orient:block-axis}')\n  })\n\n})\n\n"
  },
  {
    "path": "packages/mvvm-pack/test/uglifyjs.test.js",
    "content": "\nconst _ = require('../minimize/uglifyjs.js');\nconst expect = require('chai').expect;\n\ndescribe('uglifyjs', function() {\n  it('normal', function() {\n    let code = `\n    function f(){ console.log('a') }\n    `;\n    let result = _(code, '1.js');\n    expect(result).to.be.equal('function f(){console.log(\"a\")}')\n  })\n  it('warnings', function() {\n    let code = `\n    function f(){ var u; return 2 + 3; }\n    `;\n    let result = _(code, '1.js');\n    expect(result).to.be.equal('function f(){return 5}')\n  })\n  it('error', function() {\n    let code = `\n    function (){ var u; return 2 + 3; }\n    `;\n    try {\n      _(code, '1.js');\n    } catch (e) {\n      expect(!!~e.message.indexOf('message: Unexpected token: punc «(», expected: name')).to.be.equal(true)\n    }\n  })\n\n  it('not has ;', function() {\n    let commonjsContent = `var manifest = require('./manifest.js')\\n`;\n    commonjsContent += `var cmldefine = manifest.cmldefine;\\n`;\n    let result = _(commonjsContent, '2.js');\n    expect(result).to.be.equal('var manifest=require(\"./manifest.js\"),cmldefine=manifest.cmldefine;')\n\n\n  })\n})\n\n"
  },
  {
    "path": "packages/mvvm-style-loader/index.js",
    "content": "\nconst {assets} = require('./lib.js');\n\n/** \n * 1.为style模块包装 防止webpack build moudle error\n * 2.处理css中的静态资源 css中改成绝对路径 loader过后进行替换publicPath\n */\nmodule.exports = function(content) {\n  this._module._nodeType = 'module';\n  this._module._moduleType = 'style';\n  let {source, deps} = assets({source: content,loaderContext: this});\n  this._module._cmlSource = source;\n  let output = '';\n  deps.forEach(item=>{\n    output += `require(\"${item}\")`\n  })\n  return `\n  ${output}\n  module.exports = {}`\n}\n\n\n\n"
  },
  {
    "path": "packages/mvvm-style-loader/lib.js",
    "content": "\nconst postcss = require('postcss');\nconst cmlUtils = require('chameleon-tool-utils');\n\nexports.assets = function({source, loaderContext}) {\n  let resourcePath = loaderContext.resourcePath;\n  let deps = [];\n  const assetsPlugin = postcss.plugin('postcss-assets-plugin', function(options) {\n    return (root, result) => {\n      root.walkDecls((decl, i) => {\n        if (~decl.value.indexOf('url')) {\n          decl.value = decl.value.replace(/url\\s*\\(\\s*[\\'\\\"]?(.+?)[\\'\\\"]?\\s*\\)/g, function(all, $1) {\n            let splitUrl = $1.split('?');\n            let realDependPath = cmlUtils.resolveSync(resourcePath, splitUrl[0]);\n            if(realDependPath && cmlUtils.isFile(realDependPath)) {\n              if(splitUrl[1]) {\n                realDependPath = realDependPath + '?' + splitUrl[1];\n              }\n              deps.push($1);\n              return `__cml${realDependPath}__lmc`;\n            } else {\n              return `url(\"${$1}\")`;\n            }\n          })\n        }\n      })\n    }\n  })\n\n  return {\n    source: postcss([assetsPlugin]).process(source).css,\n    deps\n  }\n}"
  },
  {
    "path": "packages/mvvm-style-loader/package.json",
    "content": "{\n  \"name\": \"mvvm-style-loader\",\n  \"version\": \"1.0.8\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"cover\": \"istanbul cover --report lcov _mocha -- -R spec --recursive\",\n    \"test\": \"mocha --recursive --reporter spec\"\n  },\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"dependencies\": {\n    \"postcss\": \"7.0.14\",\n    \"chameleon-tool-utils\": \"1.0.8\"\n  },\n  \"devDependencies\": {\n    \"chai\": \"^4.2.0\",\n    \"eslint\": \"^5.9.0\",\n    \"istanbul\": \"^0.4.5\",\n    \"mocha\": \"^5.2.0\"\n  }\n}"
  },
  {
    "path": "packages/mvvm-style-loader/test/index.test.js",
    "content": "\nconst _ = require('../index.js');\nconst path = require('path');\nvar expect = require('chai').expect;\n\ndescribe('mvvm-style-loader', function() {\n  it('assets image url', function() {\n    let loaderContext = {\n      _module: {},\n      resourcePath: path.join(__dirname,'index.js')\n    }\n\n    let content = `\n      .class1 {\n        color: red;\n        background: url('./1.png');\n      }\n    `\n    let output = _.call(loaderContext, content);\n    expect(!!~output.indexOf('1.png')).to.be.equal(true);\n    expect(loaderContext._module._nodeType).to.be.equal('module');\n    expect(loaderContext._module._moduleType).to.be.equal('style');\n    expect(!!~loaderContext._module._cmlSource.indexOf(`__cml${path.join(__dirname,'1.png')}__lmc`)).to.be.equal(true);\n\n  })\n\n\n  it('assets inline image url', function() {\n    let loaderContext = {\n      _module: {},\n      resourcePath: path.join(__dirname,'index.js')\n    }\n\n    let content = `\n      .class1 {\n        color: red;\n        background: url('./1.png?__inline');\n      }\n    `\n    let output = _.call(loaderContext, content);\n    console.log(output)\n    console.log(loaderContext._module)\n    expect(!!~output.indexOf('1.png')).to.be.equal(true);\n    expect(loaderContext._module._nodeType).to.be.equal('module');\n    expect(loaderContext._module._moduleType).to.be.equal('style');\n    expect(!!~loaderContext._module._cmlSource.indexOf(`__cml${path.join(__dirname,'1.png?__inline')}__lmc`)).to.be.equal(true);\n\n  })\n\n  it('assets not file image url', function() {\n    let loaderContext = {\n      _module: {},\n      resourcePath: path.join(__dirname,'index.js')\n    }\n\n    let content = `\n      .class1 {\n        color: red;\n        background: url('./2.png');\n      }\n    `\n    let output = _.call(loaderContext, content);\n    console.log(output)\n    console.log(loaderContext._module)\n    expect(loaderContext._module._nodeType).to.be.equal('module');\n    expect(loaderContext._module._moduleType).to.be.equal('style');\n    expect(!!~loaderContext._module._cmlSource.indexOf(`background: url(\"./2.png\")`)).to.be.equal(true);\n\n  })\n})"
  },
  {
    "path": "packages/mvvm-template-parser/.eslintrc",
    "content": "{\n  // 在配置文件里配置全局变量时，使用 globals 指出你要使用的全局变量。将变量设置为 true 将允许变量被重写，或 false 将不允许被重写\n  \"globals\": {\n      \"cml\": false\n  },\n  // 环境定义了预定义的全局变量。\n  \"env\": {\n      //环境定义了预定义的全局变量。更多在官网查看\n      \"browser\": true,\n      \"node\": true,\n      \"commonjs\": true,\n      \"amd\": true,\n      \"es6\": true,\n      \"mocha\": true\n  },\n  // JavaScript 语言选项\n  \"parserOptions\": {\n      // ECMAScript 版本\n      \"ecmaVersion\": 9,\n      \"sourceType\": \"module\", //设置为 \"script\" (默认) 或 \"module\"（如果你的代码是 ECMAScript 模块)。\n      //想使用的额外的语言特性:\n      \"ecmaFeatures\": {\n          // 允许在全局作用域下使用 return 语句\n          \"globalReturn\": true,\n          // impliedStric\n          \"impliedStrict\": true,\n          // 启用 JSX\n          \"jsx\": true,\n          \"modules\": true\n      }\n  },\n  //-----让eslint支持 JSX start\n  \"plugins\": [\n\n  ],\n  \"extends\": [\n      \"eslint:recommended\"\n  ],\n  //-----让eslint支持 JSX end\n\n\n  /**\n   * \"off\" 或 0 - 关闭规则\n   * \"warn\" 或 1 - 开启规则，使用警告级别的错误：warn (不会导致程序退出),\n   * \"error\" 或 2 - 开启规则，使用错误级别的错误：error (当被触发的时候，程序会退出)\n   */\n  \"rules\": {\n\n      ////////////////\n      // 可能的错误 //\n      ////////////////\n\n      // 禁止条件表达式中出现赋值操作符\n      \"no-cond-assign\": 2,\n      // 禁用 console\n      \"no-console\": 0,\n      // 禁止在条件中使用常量表达式\n      // if (false) {\n      // doSomethingUnfinished();\n      // } //cuowu\n      \"no-constant-condition\": 2,\n      // 禁止在正则表达式中使用控制字符 ：new RegExp(\"\\x1f\")\n      \"no-control-regex\": 2,\n      // 数组和对象键值对最后一个逗号， never参数：不能带末尾的逗号, always参数：必须带末尾的逗号，\n      // always-multiline：多行模式必须带逗号，单行模式不能带逗号\n      \"comma-dangle\": [1, \"never\"],\n      // 禁用 debugger\n      \"no-debugger\": 2,\n      // 禁止 function 定义中出现重名参数\n      \"no-dupe-args\": 2,\n      // 禁止对象字面量中出现重复的 key\n      \"no-dupe-keys\": 2,\n      // 禁止重复的 case 标签\n      \"no-duplicate-case\": 2,\n      // 禁止空语句块\n      \"no-empty\": 2,\n      // 禁止在正则表达式中使用空字符集 (/^abc[]/)\n      \"no-empty-character-class\": 2,\n      // 禁止对 catch 子句的参数重新赋值\n      \"no-ex-assign\": 2,\n      // 禁止不必要的布尔转换\n      \"no-extra-boolean-cast\": 2,\n      // 禁止不必要的括号 //(a * b) + c;//报错\n      \"no-extra-parens\": 0,\n      // 禁止不必要的分号\n      \"no-extra-semi\": 2,\n      // 禁止对 function 声明重新赋值\n      \"no-func-assign\": 2,\n      // 禁止在嵌套的块中出现 function 或 var 声明\n      \"no-inner-declarations\": [2, \"functions\"],\n      // 禁止 RegExp 构造函数中无效的正则表达式字符串\n      \"no-invalid-regexp\": 2,\n      // 禁止在字符串和注释之外不规则的空白\n      \"no-irregular-whitespace\": 2,\n      // 禁止在 in 表达式中出现否定的左操作数\n      \"no-negated-in-lhs\": 2,\n      // 禁止把全局对象 (Math 和 JSON) 作为函数调用 错误：var math = Math();\n      \"no-obj-calls\": 2,\n      // 禁止直接使用 Object.prototypes 的内置属性\n      \"no-prototype-builtins\": 0,\n      // 禁止正则表达式字面量中出现多个空格\n      \"no-regex-spaces\": 2,\n      // 禁用稀疏数组\n      \"no-sparse-arrays\": 2,\n      // 禁止出现令人困惑的多行表达式\n      \"no-unexpected-multiline\": 2,\n      // 禁止在return、throw、continue 和 break语句之后出现不可达代码\n      \"no-unreachable\": 2,\n      // 要求使用 isNaN() 检查 NaN\n      \"use-isnan\": 2,\n      // 强制使用有效的 JSDoc 注释\n      \"valid-jsdoc\": 0,\n      // 强制 typeof 表达式与有效的字符串进行比较\n      // typeof foo === \"undefimed\" 错误\n      \"valid-typeof\": 2,\n\n\n      //////////////\n      // 最佳实践 //\n      //////////////\n\n      // 定义对象的set存取器属性时，强制定义get\n      \"accessor-pairs\": 2,\n      // 强制数组方法的回调函数中有 return 语句\n      \"array-callback-return\": 0,\n      // 强制把变量的使用限制在其定义的作用域范围内\n      \"block-scoped-var\": 0,\n      // 限制圈复杂度，也就是类似if else能连续接多少个\n      \"complexity\": [2, 20],\n      // 要求 return 语句要么总是指定返回的值，要么不指定\n      \"consistent-return\": 0,\n      // 强制所有控制语句使用一致的括号风格\n      \"curly\": [2, \"all\"],\n      // switch 语句强制 default 分支，也可添加 // no default 注释取消此次警告\n      \"default-case\": 2,\n      // 强制object.key 中 . 的位置，参数:\n      // property，'.'号应与属性在同一行\n      // object, '.' 号应与对象名在同一行\n      \"dot-location\": [2, \"property\"],\n      // 强制使用.号取属性\n      // 参数： allowKeywords：true 使用保留字做属性名时，只能使用.方式取属性\n      // false 使用保留字做属性名时, 只能使用[]方式取属性 e.g [2, {\"allowKeywords\": false}]\n      // allowPattern: 当属性名匹配提供的正则表达式时，允许使用[]方式取值,否则只能用.号取值 e.g [2, {\"allowPattern\": \"^[a-z]+(_[a-z]+)+$\"}]\n      \"dot-notation\": [2, {\n          \"allowKeywords\": false\n      }],\n      // 使用 === 替代 == allow-null允许null和undefined==\n      \"eqeqeq\": [0, \"allow-null\"],\n      // 要求 for-in 循环中有一个 if 语句\n      \"guard-for-in\": 2,\n      // 禁用 alert、confirm 和 prompt\n      \"no-alert\": 0,\n      // 禁用 arguments.caller 或 arguments.callee\n      \"no-caller\": 2,\n      // 不允许在 case 子句中使用词法声明\n      \"no-case-declarations\": 2,\n      // 禁止除法操作符显式的出现在正则表达式开始的位置\n      \"no-div-regex\": 2,\n      // 禁止 if 语句中有 return 之后有 else\n      \"no-else-return\": 0,\n      // 禁止出现空函数.如果一个函数包含了一条注释，它将不会被认为有问题。\n      \"no-empty-function\": 2,\n      // 禁止使用空解构模式no-empty-pattern\n      \"no-empty-pattern\": 2,\n      // 禁止在没有类型检查操作符的情况下与 null 进行比较\n      \"no-eq-null\": 1,\n      // 禁用 eval()\n      \"no-eval\": 2,\n      // 禁止扩展原生类型\n      \"no-extend-native\": 2,\n      // 禁止不必要的 .bind() 调用\n      \"no-extra-bind\": 2,\n      // 禁用不必要的标签\n      \"no-extra-label:\": 0,\n      // 禁止 case 语句落空\n      \"no-fallthrough\": 2,\n      // 禁止数字字面量中使用前导和末尾小数点\n      \"no-floating-decimal\": 2,\n      // 禁止使用短符号进行类型转换(!!fOO)\n      \"no-implicit-coercion\": 0,\n      // 禁止在全局范围内使用 var 和命名的 function 声明\n      \"no-implicit-globals\": 1,\n      // 禁止使用类似 eval() 的方法\n      \"no-implied-eval\": 2,\n      // 禁止 this 关键字出现在类和类对象之外\n      \"no-invalid-this\": 0,\n      // 禁用 __iterator__ 属性\n      \"no-iterator\": 2,\n      // 禁用标签语句\n      \"no-labels\": 2,\n      // 禁用不必要的嵌套块\n      \"no-lone-blocks\": 2,\n      // 禁止在循环中出现 function 声明和表达式\n      \"no-loop-func\": 1,\n      // 禁用魔术数字(3.14什么的用常量代替)\n      \"no-magic-numbers\": [1, {\n          \"ignore\": [0, -1, 1]\n      }],\n      // 禁止使用多个空格\n      \"no-multi-spaces\": 2,\n      // 禁止使用多行字符串，在 JavaScript 中，可以在新行之前使用斜线创建多行字符串\n      \"no-multi-str\": 2,\n      // 禁止对原生对象赋值\n      \"no-native-reassign\": 2,\n      // 禁止在非赋值或条件语句中使用 new 操作符\n      \"no-new\": 2,\n      // 禁止对 Function 对象使用 new 操作符\n      \"no-new-func\": 0,\n      // 禁止对 String，Number 和 Boolean 使用 new 操作符\n      \"no-new-wrappers\": 2,\n      // 禁用八进制字面量\n      \"no-octal\": 2,\n      // 禁止在字符串中使用八进制转义序列\n      \"no-octal-escape\": 2,\n      // 不允许对 function 的参数进行重新赋值\n      \"no-param-reassign\": 0,\n      // 禁用 __proto__ 属性\n      \"no-proto\": 2,\n      // 禁止使用 var 多次声明同一变量\n      \"no-redeclare\": 2,\n      // 禁用指定的通过 require 加载的模块\n      \"no-return-assign\": 0,\n      // 禁止使用 javascript: url\n      \"no-script-url\": 0,\n      // 禁止自我赋值\n      \"no-self-assign\": 2,\n      // 禁止自身比较\n      \"no-self-compare\": 2,\n      // 禁用逗号操作符\n      \"no-sequences\": 2,\n      // 禁止抛出非异常字面量\n      \"no-throw-literal\": 2,\n      // 禁用一成不变的循环条件\n      \"no-unmodified-loop-condition\": 2,\n      // 禁止出现未使用过的表达式\n      \"no-unused-expressions\": 0,\n      // 禁用未使用过的标签\n      \"no-unused-labels\": 2,\n      // 禁止不必要的 .call() 和 .apply()\n      \"no-useless-call\": 2,\n      // 禁止不必要的字符串字面量或模板字面量的连接\n      \"no-useless-concat\": 0,\n      // 禁用不必要的转义字符\n      \"no-useless-escape\": 0,\n      // 禁用 void 操作符\n      \"no-void\": 0,\n      // 禁止在注释中使用特定的警告术语\n      \"no-warning-comments\": 0,\n      // 禁用 with 语句\n      \"no-with\": 2,\n      // 强制在parseInt()使用基数参数\n      \"radix\": 2,\n      // 要求所有的 var 声明出现在它们所在的作用域顶部\n      \"vars-on-top\": 0,\n      // 要求 IIFE 使用括号括起来\n      \"wrap-iife\": [2, \"any\"],\n      // 要求或禁止 “Yoda” 条件\n      \"yoda\": [2, \"never\"],\n      // 要求或禁止使用严格模式指令\n      \"strict\": 0,\n\n\n      //////////////\n      // 变量声明 //\n      //////////////\n\n      // 要求或禁止 var 声明中的初始化(初值)\n      \"init-declarations\": 0,\n      // 不允许 catch 子句的参数与外层作用域中的变量同名\n      \"no-catch-shadow\": 0,\n      // 禁止删除变量\n      \"no-delete-var\": 2,\n      // 不允许标签与变量同名\n      \"no-label-var\": 2,\n      // 禁用特定的全局变量\n      \"no-restricted-globals\": 0,\n      // 禁止 var 声明 与外层作用域的变量同名\n      \"no-shadow\": 0,\n      // 禁止覆盖受限制的标识符\n      \"no-shadow-restricted-names\": 2,\n      // 禁用未声明的变量，除非它们在 /*global */ 注释中被提到\n      \"no-undef\": 2,\n      // 禁止将变量初始化为 undefined\n      \"no-undef-init\": 2,\n      // 禁止将 undefined 作为标识符\n      \"no-undefined\": 0,\n      // 禁止出现未使用过的变量\n      \"no-unused-vars\": [2, {\n          \"vars\": \"all\",\n          \"args\": \"none\"\n      }],\n      // 不允许在变量定义之前使用它们\n      \"no-use-before-define\": 0,\n\n      //////////////////////////\n      // Node.js and CommonJS //\n      //////////////////////////\n\n      // require return statements after callbacks\n      \"callback-return\": 0,\n      // 要求 require() 出现在顶层模块作用域中\n      \"global-require\": 1,\n      // 要求回调函数中有容错处理\n      \"handle-callback-err\": [2, \"^(err|error)$\"],\n      // 禁止混合常规 var 声明和 require 调用\n      \"no-mixed-requires\": 0,\n      // 禁止调用 require 时使用 new 操作符\n      \"no-new-require\": 2,\n      // 禁止对 __dirname 和 __filename进行字符串连接\n      \"no-path-concat\": 0,\n      // 禁用 process.env\n      \"no-process-env\": 0,\n      // 禁用 process.exit()\n      \"no-process-exit\": 0,\n      // 禁用同步方法\n      \"no-sync\": 0,\n\n      //////////////\n      // 风格指南 //\n      //////////////\n\n      // 指定数组的元素之间要以空格隔开(, 后面)， never参数：[ 之前和 ] 之后不能带空格，always参数：[ 之前和 ] 之后必须带空格\n      \"array-bracket-spacing\": [2, \"never\"],\n      // 禁止或强制在单行代码块中使用空格(禁用)\n      \"block-spacing\": [1, \"never\"],\n      //强制使用一致的缩进 第二个参数为 \"tab\" 时，会使用tab，\n      // if while function 后面的{必须与if在同一行，java风格。\n      \"brace-style\": [2, \"1tbs\", {\n          \"allowSingleLine\": true\n      }],\n      // 双峰驼命名格式\n      \"camelcase\": 2,\n      // 控制逗号前后的空格\n      \"comma-spacing\": [2, {\n          \"before\": false,\n          \"after\": true\n      }],\n      // 控制逗号在行尾出现还是在行首出现 (默认行尾)\n      // http://eslint.org/docs/rules/comma-style\n      \"comma-style\": [2, \"last\"],\n      //\"SwitchCase\" (默认：0) 强制 switch 语句中的 case 子句的缩进水平\n      // 以方括号取对象属性时，[ 后面和 ] 前面是否需要空格, 可选参数 never, always\n      \"computed-property-spacing\": [2, \"never\"],\n      // 用于指统一在回调函数中指向this的变量名，箭头函数中的this已经可以指向外层调用者，应该没卵用了\n      // e.g [0,\"that\"] 指定只能 var that = this. that不能指向其他任何值，this也不能赋值给that以外的其他值\n      \"consistent-this\": [1, \"that\"],\n      // 强制使用命名的 function 表达式\n      \"func-names\": 0,\n      // 文件末尾强制换行\n      \"eol-last\": 2,\n      \"indent\": [2, 2, {\n          \"SwitchCase\": 1\n      }],\n      // 强制在对象字面量的属性中键和值之间使用一致的间距\n      \"key-spacing\": [2, {\n          \"beforeColon\": false,\n          \"afterColon\": true\n      }],\n      // 强制使用一致的换行风格\n      \"linebreak-style\": [1, \"unix\"],\n      // 要求在注释周围有空行 ( 要求在块级注释之前有一空行)\n      \"lines-around-comment\": [1, {\n          \"beforeBlockComment\": true\n      }],\n      // 强制一致地使用函数声明或函数表达式，方法定义风格，参数：\n      // declaration: 强制使用方法声明的方式，function f(){} e.g [2, \"declaration\"]\n      // expression：强制使用方法表达式的方式，var f = function() {} e.g [2, \"expression\"]\n      // allowArrowFunctions: declaration风格中允许箭头函数。 e.g [2, \"declaration\", { \"allowArrowFunctions\": true }]\n      \"func-style\": 0,\n      // 强制回调函数最大嵌套深度 5层\n      \"max-nested-callbacks\": [1, 5],\n      // 禁止使用指定的标识符\n      \"id-blacklist\": 0,\n      // 强制标识符的最新和最大长度\n      \"id-length\": 0,\n      // 要求标识符匹配一个指定的正则表达式\n      \"id-match\": 0,\n      // 强制在 JSX 属性中一致地使用双引号或单引号\n      \"jsx-quotes\": 0,\n      // 强制在关键字前后使用一致的空格 (前后腰需要)\n      \"keyword-spacing\": 2,\n      // 强制一行的最大长度\n      \"max-len\": [1, 200],\n      // 强制最大行数\n      \"max-lines\": 0,\n      // 强制 function 定义中最多允许的参数数量\n      \"max-params\": [1, 7],\n      // 强制 function 块最多允许的的语句数量\n      \"max-statements\": [1, 200],\n      // 强制每一行中所允许的最大语句数量\n      \"max-statements-per-line\": 0,\n      // 要求构造函数首字母大写 （要求调用 new 操作符时有首字母大小的函数，允许调用首字母大写的函数时没有 new 操作符。）\n      \"new-cap\": [2, {\n          \"newIsCap\": true,\n          \"capIsNew\": false\n      }],\n      // 要求调用无参构造函数时有圆括号\n      \"new-parens\": 2,\n      // 要求或禁止 var 声明语句后有一行空行\n      \"newline-after-var\": 0,\n      // 禁止使用 Array 构造函数\n      \"no-array-constructor\": 2,\n      // 禁用按位运算符\n      \"no-bitwise\": 0,\n      // 要求 return 语句之前有一空行\n      \"newline-before-return\": 0,\n      // 要求方法链中每个调用都有一个换行符\n      \"newline-per-chained-call\": 1,\n      // 禁用 continue 语句\n      \"no-continue\": 0,\n      // 禁止在代码行后使用内联注释\n      \"no-inline-comments\": 0,\n      // 禁止 if 作为唯一的语句出现在 else 语句中\n      \"no-lonely-if\": 0,\n      // 禁止混合使用不同的操作符\n      \"no-mixed-operators\": 0,\n      // 不允许空格和 tab 混合缩进\n      \"no-mixed-spaces-and-tabs\": 2,\n      // 不允许多个空行\n      \"no-multiple-empty-lines\": [2, {\n          \"max\": 2\n      }],\n      // 不允许否定的表达式\n      \"no-negated-condition\": 0,\n      // 不允许使用嵌套的三元表达式\n      \"no-nested-ternary\": 0,\n      // 禁止使用 Object 的构造函数\n      \"no-new-object\": 2,\n      // 禁止使用一元操作符 ++ 和 --\n      \"no-plusplus\": 0,\n      // 禁止使用特定的语法\n      \"no-restricted-syntax\": 0,\n      // 禁止 function 标识符和括号之间出现空格\n      \"no-spaced-func\": 2,\n      // 不允许使用三元操作符\n      \"no-ternary\": 0,\n      // 禁用行尾空格\n      \"no-trailing-spaces\": 2,\n      // 禁止标识符中有悬空下划线_bar\n      \"no-underscore-dangle\": 0,\n      // 禁止可以在有更简单的可替代的表达式时使用三元操作符\n      \"no-unneeded-ternary\": 2,\n      // 禁止属性前有空白\n      \"no-whitespace-before-property\": 0,\n      // 强制花括号内换行符的一致性\n      \"object-curly-newline\": 0,\n      // 强制在花括号中使用一致的空格\n      \"object-curly-spacing\": 0,\n      // 强制将对象的属性放在不同的行上\n      \"object-property-newline\": 0,\n      // 强制函数中的变量要么一起声明要么分开声明\n      \"one-var\": [2, {\n          \"initialized\": \"never\"\n      }],\n      // 要求或禁止在 var 声明周围换行\n      \"one-var-declaration-per-line\": 0,\n      // 要求或禁止在可能的情况下要求使用简化的赋值操作符\n      \"operator-assignment\": 0,\n      // 强制操作符使用一致的换行符\n      \"operator-linebreak\": [2, \"after\", {\n          \"overrides\": {\n              \"?\": \"before\",\n              \":\": \"before\"\n          }\n      }],\n      // 要求或禁止块内填充\n      \"padded-blocks\": 0,\n      // 要求对象字面量属性名称用引号括起来\n      \"quote-props\": 0,\n      // 强制使用一致的反勾号、双引号或单引号\n      // \"quotes\": [2, \"single\", \"avoid-escape\"],\n      // 要求使用 JSDoc 注释\n      \"require-jsdoc\": 0,\n      // 要求或禁止使用分号而不是 ASI（这个才是控制行尾部分号的，）\n      \"semi\": [0, \"always\"],\n      // 强制分号之前和之后使用一致的空格\n      \"semi-spacing\": 0,\n      // 要求同一个声明块中的变量按顺序排列\n      \"sort-vars\": 0,\n      // 强制在块之前使用一致的空格\n      \"space-before-blocks\": [2, \"always\"],\n      // 强制在 function的左括号之前使用一致的空格\n      \"space-before-function-paren\": [0, \"always\"],\n      // 强制在圆括号内使用一致的空格\n      \"space-in-parens\": [2, \"never\"],\n      // 要求操作符周围有空格\n      \"space-infix-ops\": 2,\n      // 强制在一元操作符前后使用一致的空格\n      \"space-unary-ops\": [2, {\n          \"words\": true,\n          \"nonwords\": false\n      }],\n      // 强制在注释中 // 或 /* 使用一致的空格\n      \"spaced-comment\": [2, \"always\", {\n          \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n      }],\n      // 要求或禁止 Unicode BOM\n      \"unicode-bom\": 0,\n      // 要求正则表达式被括号括起来\n      \"wrap-regex\": 0,\n\n      //////////////\n      // ES6.相关 //\n      //////////////\n\n      // 要求箭头函数体使用大括号\n      \"arrow-body-style\": 2,\n      // 要求箭头函数的参数使用圆括号\n      \"arrow-parens\": 0,\n      \"arrow-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 强制在子类构造函数中用super()调用父类构造函数，TypeScrip的编译器也会提示\n      \"constructor-super\": 0,\n      // 强制 generator 函数中 * 号周围使用一致的空格\n      \"generator-star-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 禁止修改类声明的变量\n      \"no-class-assign\": 2,\n      // 不允许箭头功能，在那里他们可以混淆的比较\n      \"no-confusing-arrow\": 0,\n      // 禁止修改 const 声明的变量\n      \"no-const-assign\": 2,\n      // 禁止类成员中出现重复的名称\n      \"no-dupe-class-members\": 2,\n      // 不允许复制模块的进口\n      \"no-duplicate-imports\": 0,\n      // 禁止 Symbol 的构造函数\n      \"no-new-symbol\": 2,\n      // 允许指定模块加载时的进口\n      \"no-restricted-imports\": 0,\n      // 禁止在构造函数中，在调用 super() 之前使用 this 或 super\n      \"no-this-before-super\": 2,\n      // 禁止不必要的计算性能键对象的文字\n      \"no-useless-computed-key\": 0,\n      // 要求使用 let 或 const 而不是 var\n      \"no-var\": 0,\n      // 要求或禁止对象字面量中方法和属性使用简写语法\n      \"object-shorthand\": 0,\n      // 要求使用箭头函数作为回调\n      \"prefer-arrow-callback\": 0,\n      // 要求使用 const 声明那些声明后不再被修改的变量\n      \"prefer-const\": 0,\n      // 要求在合适的地方使用 Reflect 方法\n      \"prefer-reflect\": 0,\n      // 要求使用扩展运算符而非 .apply()\n      \"prefer-spread\": 0,\n      // 要求使用模板字面量而非字符串连接\n      \"prefer-template\": 0,\n      // Suggest using the rest parameters instead of arguments\n      \"prefer-rest-params\": 0,\n      // 要求generator 函数内有 yield\n      \"require-yield\": 0,\n      // enforce spacing between rest and spread operators and their expressions\n      \"rest-spread-spacing\": 0,\n      // 强制模块内的 import 排序\n      \"sort-imports\": 0,\n      // 要求或禁止模板字符串中的嵌入表达式周围空格的使用\n      \"template-curly-spacing\": 1,\n      // 强制在 yield* 表达式中 * 周围使用空格\n      \"yield-star-spacing\": 2\n  }\n}\n"
  },
  {
    "path": "packages/mvvm-template-parser/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n.vscode\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\n"
  },
  {
    "path": "packages/mvvm-template-parser/README.md",
    "content": "####  mvvm协议标准中处理cml文件template部分"
  },
  {
    "path": "packages/mvvm-template-parser/index.js",
    "content": "const {vueToCml, preDisappearAnnotation} = require('./lib/process-template.js');\nconst parser = require('mvvm-babel-parser');\nconst generator = require('mvvm-babel-generator/lib')\nconst types = require('@babel/types');\nconst traverse = require('@babel/traverse');\nexports.parser = parser;\nexports.generator = function(...args) {\n  let result =  generator[\"default\"].apply(this, args);\n  result.code = exports.postParseUnicode(result.code);\n  if (/;$/.test(result.code)) { // 这里有个坑，jsx解析语法的时候，默认解析的是js语法，所以会在最后多了一个 ; 字符串；但是在 html中 ; 是无法解析的；\n    result.code = result.code.slice(0, -1);\n  }\n  return result;\n};\nexports.types = types;\nexports.traverse = traverse[\"default\"];\nexports.vueToCml = vueToCml;\n\nexports.cmlparse = function(content) {\n  content = preDisappearAnnotation(content);\n  return parser.parse(content, {\n    plugins: ['jsx']\n  })\n}\n\n// 后置处理：用于处理 \\u ，便于解析unicode 中文\nexports.postParseUnicode = function(content) {\n  let reg = /\\\\u/g;\n  return unescape(content.replace(reg, '%u'));\n}\n"
  },
  {
    "path": "packages/mvvm-template-parser/lib/process-template.js",
    "content": "const parser = require('mvvm-babel-parser');\nconst t = require('@babel/types');\nconst traverse = require('@babel/traverse')[\"default\"];\nconst generate = require('mvvm-babel-generator/lib')[\"default\"];\nconst _ = module.exports = {};\n\n/* 将vue语法的模板转化为cml语法\n主要是将\n1 :id=\"value\"  => v-bind:id=\"value\"\n2 @click=\"handleClick\" => c-bind:click=\"handleClick\" 或者c-catch\n*/\n_.trim = function (value) {\n  return value.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n};\n\n_.vueToCml = function(source, options = {}) {\n  // 去掉模板中的注释\n  source = _.preDisappearAnnotation(source);\n  source = _.preParseTemplate(source);\n  source = _.compileTemplate(source, options);\n  // 后置处理：用于处理 \\u ，便于解析unicode 中文\n  source = _.postParseUnicode(source);\n\n  if (/;$/.test(source)) { // 这里有个坑，jsx解析语法的时候，默认解析的是js语法，所以会在最后多了一个 ; 字符串；但是在 html中 ; 是无法解析的；\n    source = source.slice(0, -1);\n  }\n\n  return {\n    source,\n    usedBuildInTagMap: options.usedBuildInTagMap || {}\n  }\n\n}\n// 去掉html模板中的注释\n_.preDisappearAnnotation = function (content) {\n  let annotionReg = /<!--[\\s\\S]*?-->/g;\n  return content.replace(annotionReg, function (match) {\n    return '';\n  })\n}\n// 解析属性上的  :  以及 @  v-on这样的语法；\n_.preParseTemplate = function(source) {\n  let callbacks = {startCallback: _.startCallback};\n  let htmlArr = _.preParseHTMLtoArray(source, callbacks);\n  let newHtmlArr = [];\n  htmlArr.forEach((item) => {\n    if (item.type === 'tagContent') { // 标签内置直接push内容\n      newHtmlArr.push(item.content);\n    }\n    if (item.type === 'tagEnd') {\n      newHtmlArr.push(item.content);\n    }\n    if (item.type === 'tagStart') {\n      newHtmlArr.push(item.content)\n    }\n  });\n  return newHtmlArr.join('')\n}\n_.preParseHTMLtoArray = function(html, callbacks) {\n  let {startCallback} = callbacks;\n  // 需要考虑问题 单标签和双标签\n  let stack = [];\n  // id=\"value\" id='value'  class=red    disabled\n  const attribute = /^\\s*([^\\s\"'<>\\/=]+)(?:\\s*(=)\\s*(?:\"([^\"]*)\"+|'([^']*)'+|([^\\s\"'=<>`]+)))?/\n  const ncname = '[a-zA-Z_][\\\\w\\\\-\\\\.]*'\n  const qnameCapture = `((?:${ncname}\\\\:)?${ncname})`\n  // 标签的匹配，这些正则都不是g这种全局匹配，所以仅仅会匹配第一个遇到的标签；\n  // const startTag = new RegExp(`^<${qnameCapture}([\\\\s\\\\S])*(\\\\/?)>`);\n  // const startTag = /^<([a-zA-Z-:.]*)[^>]*?>/;\n  const startTagOpen = new RegExp(`^<${qnameCapture}`) // 匹配开始open\n  const startTagClose = /^\\s*(\\/?)>/ // 匹配开始关闭；单标签的关闭有两种情况，第一就是 > 第二个就是 />,可以通过捕获分组 / 来判断是单闭合标签还是双开标签的开始标签的闭合\n  const endTag = new RegExp(`^<\\\\/${qnameCapture}[^>]*>`)\n  let index = 0;\n  while (html) {\n    let textEnd = html.indexOf('<')\n    // 解析标签内容，包括开始标签以及结束标签\n    if (textEnd === 0) { // 以 < 开头的html\n      const startTagMatch = parseStartTag();\n      if (startTagMatch) {\n        stack.push(startTagMatch);\n        continue;\n      }\n      const endTagMatch = parseEndTag();\n      if (endTagMatch) {\n        stack.push(endTagMatch);\n        continue;\n      }\n    }\n    // 解析标签中间的内容\n    let text, rest, next\n    if (textEnd >= 0) {\n      rest = html.slice(textEnd)\n      while (\n        !endTag.test(rest) &&\n          !startTagOpen.test(rest)\n      ) {\n        // < in plain text, be forgiving and treat it as text\n        next = rest.indexOf('<', 1)\n        if (next < 0) {break}\n        textEnd += next\n        rest = html.slice(textEnd)\n      }\n      let matchText = {\n        type: \"tagContent\"\n      };\n      text = html.substring(0, textEnd)\n      matchText.content = text;\n      matchText.isText = true;\n      stack.push(matchText);\n      advance(textEnd);\n      continue;\n    }\n    if (textEnd < 0) {\n      text = html;\n      html = '';\n      const matchText2 = {\n        type: 'tagContent',\n        content: text\n      }\n      stack.push(matchText2)\n      continue;\n\n    }\n  }\n  return stack;\n  function advance (n) {\n    index += n\n    html = html.substring(n)\n  }\n  function parseStartTag () {\n    // 开始标签也可能是一元标签 通过 isunary 字段进行区分\n    const start = html.match(startTagOpen)\n    if (start) {\n      const matchStart = {\n        type: 'tagStart',\n        tagName: start[1],\n        attrs: []\n      }\n      advance(start[0].length);\n\n      let end, attr\n      // 这里处理标签的属性值；\n      while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) {\n        advance(attr[0].length)\n        matchStart.attrs.push(attr)\n      }\n      if (end) {\n        matchStart.isunary = !!_.trim(end[1] || '');// 标记是否是一元标签\n        advance(end[0].length)\n        let attrString = startCallback(matchStart) || '';\n        let content ;\n        if (matchStart.isunary) {\n          content = `<${matchStart.tagName} ${attrString} />`\n        } else {\n          content = `<${matchStart.tagName} ${attrString} >`\n        }\n        matchStart.content = content;// 每个数组中这个值用于拼接；\n        return matchStart\n      }\n    }\n  }\n  function parseEndTag() {\n    const end = html.match(endTag);\n    if (end) {\n      const matchEnd = {\n        type: 'tagEnd',\n        tagName: end[1],\n        content: end[0]\n      }\n      advance(end[0].length)\n      return matchEnd;\n    }\n  }\n\n}\n_.startCallback = function(matchStart) {\n  let leftAttrsOnComponent = matchStart.attrs;// 遗留在组件上的属性,默认值是所有属性，\n  let attrString = (leftAttrsOnComponent || []).reduce((result, item) => {\n    if (item[1].indexOf(':') === 0) {\n      item[0] = _.preParseBindAttr(item[0]);// :id=\"value\" ==> v-bind:id=\"value\"\n    }\n    if (item[1].indexOf('@') === 0 || item[1].indexOf('v-on') === 0) {\n      item[0] = _.preParseVueEvent(item[0]);// @click=\"handleClick\"  v-on:click=\"handleClick\" ==> c-bind:click=\"handleClick\"\n    }\n    result = result + (item[0] || '');\n    return result;\n  }, '')\n  return attrString;\n}\n// 模板前置处理器\n// 预处理:属性  :name=\"sth\" ==> v-bind:name=\"sth\",因为jsx识别不了 :name=\"sth\"\n_.preParseBindAttr = function (content) {\n  content = content.replace(/(\\s+):([a-zA-Z_\\-0-9]+?\\s*=\\s*[\"'][^\"']*?[\"'])/ig, (m, $1, $2) => `${$1}v-bind:${$2}`);\n  return content;\n}\n\n/**\n * 处理vue的事件\n * <a v-on:click=\"doSomething\"> ... </a>\n * <a @click=\"doSomething\"> ... </a>\n *\n * <a bindclick=\"doSomething\"> ... </a>\n * @param {*} content\n */\n_.preParseVueEvent = function (content) {\n  //         v-on | @--> <--  属性名  --><--=-->\n  let reg = /(?:v\\-on:|@)([^\\s\"'<>\\/=]+?)\\s*=\\s*/g\n  content = content.replace(reg, (m, $1) => {\n    if (typeof $1 === \"string\" && $1.endsWith('.stop')) {\n      $1 = $1.replace('.stop', '');\n      $1 = $1 === 'click' ? 'tap' : $1;\n      return `c-catch:${$1}=`;\n    } else {\n      $1 = $1 === 'click' ? 'tap' : $1;\n      return `c-bind:${$1}=`\n    }\n  });\n  return content;\n}\n_.compileTemplate = function(source, options) {\n  const ast = parser.parse(source, {\n    plugins: ['jsx']\n  });\n  traverse(ast, {\n    enter(path) {\n      // 所有的入口都以JSXElement为入口解析；\n      _.parseAllAttributes(path, options);\n      _.parseBuildTag(path, options);\n    }\n  });\n  return generate(ast).code;\n\n}\n_.isOriginTagOrNativeComp = function(tagName, options) {\n  let usedComponentInfo = (options.usingComponents || []).find((item) => item.tagName === tagName)\n  let isNative = usedComponentInfo && usedComponentInfo.isNative;\n  let isOrigin = (tagName && typeof tagName === 'string' && tagName.indexOf('origin-') === 0);\n  if (isOrigin || isNative) {\n    return true\n  }\n  return false;\n}\n\n/*\n以标签为基础，解析attruibutes即可\n   1 v-bind:id=\"value\" ==> id=\"{{value}}\"\n   2 v-model=\"value\" v-if=\"value\"  ==> c-if=\"{{value}}\"\n   3 v-for需要特殊处理\n   4 :class  class 需要特殊处理\n\n*/\n\n_.parseAllAttributes = function(path, options) {\n  let node = path.node;\n  if (t.isJSXElement(node)) {\n    let tagName = node.openingElement.name.name\n    if (_.isOriginTagOrNativeComp(tagName, options)) {\n      return // 原生标签和原生组件直接不解析\n    }\n    let attributes = node.openingElement.attributes;\n    let directives = ['v-if', 'v-else-if', 'v-else', 'v-model', 'v-show', 'v-text', 'v-for'];\n    let specialJSXNameSapce = ['c-bind', 'c-catch'];\n    let specialJSXName = ['class', 'key']\n    let newAttributes = [];\n    let bindKeyAttr = attributes.find((attr) => (t.isJSXNamespacedName(attr.name) && attr.name.name.name === 'key'));\n    let staticClassAttr = attributes.find((attr) => (t.isJSXIdentifier(attr.name) && attr.name.name === 'class'))\n    let dynamicClassAttr = attributes.find((attr) => (t.isJSXNamespacedName(attr.name) && attr.name.name.name === 'class'));\n    // 将class  :class节点进行融合\n    if (staticClassAttr || dynamicClassAttr) {\n      let classNodeValue = '';\n      if (staticClassAttr) {\n        classNodeValue = `${classNodeValue} ${staticClassAttr.value.value}`\n      }\n      if (dynamicClassAttr) {\n        classNodeValue = `${classNodeValue} {{${dynamicClassAttr.value.value}}}`\n      }\n      if (classNodeValue) {\n        let classAttr = t.jsxAttribute(t.jsxIdentifier('class'), t.stringLiteral(classNodeValue));\n        newAttributes.push(classAttr);\n      }\n    }\n    attributes.forEach((attr) => {\n      // 处理简单的属性  id=\"value\" ==> id=\"value\" 不要处理class,因为cml语法仅支持单class需要特殊处理\n      if (t.isJSXIdentifier(attr.name) && attr.name.name !== 'class') {\n        if (!directives.includes(attr.name.name)) {\n          newAttributes.push(attr)\n        } else if (directives.includes(attr.name.name) && attr.name.name !== 'v-for') {\n          attr.value && (attr.value.value = `{{${attr.value.value}}}`);\n          attr.name.name = attr.name.name.replace('v-', 'c-')\n          newAttributes.push(attr);\n        } else if (attr.name.name === 'v-for') {\n          let value = attr.value && attr.value.value;\n          let {item, list, index} = _.analysisFor(value);\n          let cForAttr = t.jsxAttribute(t.jsxIdentifier('c-for'), t.stringLiteral(`{{${list}}}`));\n          newAttributes.push(cForAttr);\n          let cForItem = t.jsxAttribute(t.jsxIdentifier('c-for-item'), t.stringLiteral(`${item}`));\n          newAttributes.push(cForItem);\n          let cForIndex = t.jsxAttribute(t.jsxIdentifier('c-for-index'), t.stringLiteral(`${index}`));\n          newAttributes.push(cForIndex);\n          let bindKeyValue = bindKeyAttr && bindKeyAttr.value && bindKeyAttr.value.value;\n          if (bindKeyValue && typeof bindKeyValue === 'string') {\n            if (bindKeyValue === item) {\n              bindKeyValue = \"*this\";\n            } else {\n              let reg = new RegExp(`${item}\\\\.`, 'g');\n              bindKeyValue = bindKeyValue.replace(reg, '');\n            }\n            let keyAttr = t.jsxAttribute(t.jsxIdentifier('c-key'), t.stringLiteral(`${bindKeyValue}`));\n            newAttributes.push(keyAttr);\n          }\n        }\n      }\n      // 处理vue语法中的 v-bind:id=\"value\" ==> id=\"{{value}}\"  不包括 :class :key\n      if (t.isJSXNamespacedName(attr.name) && (attr.name.namespace.name === 'v-bind') && !specialJSXName.includes(attr.name.name.name)) {\n        let name = attr.name.name.name;\n        let value = attr.value.value;\n        let newAttr = t.jsxAttribute(t.jsxIdentifier(name), t.stringLiteral(`{{${value}}}`));\n        newAttributes.push(newAttr)\n      }\n      // 将c-bind  c-catch加入\n      if (t.isJSXNamespacedName(attr.name) && specialJSXNameSapce.includes(attr.name.namespace.name)) {\n        newAttributes.push(attr);\n      }\n    });\n    node.openingElement.attributes = newAttributes;\n  }\n}\n_.analysisFor = function (nodeValue) {\n  // v-for=\"item in items\"\n  let reg1 = /\\s*(.+?)\\s+(?:in|of)\\s+(.+)\\s*/;\n\n  // v-for=\"(item, index) in items\"\n  let reg2 = /\\s*\\(([^\\,\\s]+?)\\s*\\,\\s*([^\\,\\s]+?)\\s*\\)\\s*(?:in|of)\\s+(.+)\\s*/\n  let item, index, list;\n  let matches1 = nodeValue.match(reg1);\n  let matches2 = nodeValue.match(reg2);\n  if (matches2) {\n    item = matches2[1];\n    index = matches2[2];\n    list = matches2[3];\n\n  } else if (matches1) {\n    item = matches1[1];\n    index = 'index';\n    list = matches1[2];\n  }\n  return {\n    item,\n    index,\n    list\n  }\n}\n_.parseBuildTag = function (path, options) {\n  let node = path.node;\n  let buildInTagMap = options && options.buildInComponents;// {button:\"cml-buildin-button\"}\n  if (t.isJSXElement(node) && buildInTagMap) {\n    let currentTag = node.openingElement.name.name;\n    let targetTag = buildInTagMap[currentTag];\n    // 收集用了哪些内置组件 usedBuildInTagMap:{button:'cml-buildin-button',radio:'cml-buildin-radio'}\n    let usingComponents = (options.usingComponents || []).map(item => item.tagName)\n    // 兼容用户自己写了组件和内置组件重名\n    let isUserComponent = usingComponents.includes(currentTag);\n    if (isUserComponent) { // 如果是用户的内置组件，这里不做任何处理，直接返回\n      return;\n    } else {\n      if (targetTag && currentTag !== targetTag) {\n        node.openingElement.name.name = targetTag;\n        node.closingElement && (node.closingElement.name.name = targetTag);\n        (!options.usedBuildInTagMap) && (options.usedBuildInTagMap = {});\n        options.usedBuildInTagMap[currentTag] = targetTag;\n      }\n    }\n  }\n}\n\n// 后置处理：用于处理 \\u ，便于解析unicode 中文\n_.postParseUnicode = function(content) {\n  let reg = /\\\\u/g;\n  return unescape(content.replace(reg, '%u'));\n}\n"
  },
  {
    "path": "packages/mvvm-template-parser/package.json",
    "content": "{\n  \"name\": \"mvvm-template-parser\",\n  \"version\": \"1.0.8\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"eslint\": \"eslint ./lib\",\n    \"lint\": \"eslint --ext .js  lib --fix\",\n    \"test\": \"mocha --recursive --reporter spec\",\n    \"cover\": \"istanbul cover --report lcov node_modules/mocha/bin/_mocha -- -R spec --recursive\"\n  },\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"dependencies\": {\n    \"@babel/traverse\": \"^7.3.4\",\n    \"@babel/types\": \"^7.3.4\",\n    \"mvvm-babel-generator\": \"1.0.8\",\n    \"mvvm-babel-parser\": \"1.0.8\"\n  },\n  \"devDependencies\": {\n    \"chai\": \"^4.2.0\",\n    \"coveralls\": \"^2.11.9\",\n    \"eslint\": \"^5.9.0\",\n    \"istanbul\": \"^0.4.5\",\n    \"mocha\": \"^5.2.0\"\n  },\n  \"gitHead\": \"e697386b2323bf287b18774ff482b2c7970f40d8\"\n}"
  },
  {
    "path": "packages/mvvm-template-parser/test/index.test.js",
    "content": "var _ = require('../index.js');\nvar expect = require('chai').expect;\n\ndescribe('mvvm-template-parser', function() {\n  it('cmlparse', function() {\n    let content = `\n    <view c-if=\"show\">\n      <view c-bind:click=\"click\"></view>\n      <view name=\"{{name}}\"></view>\n      <view c-for=\"list\"></view>\n    </view>\n    `\n    let result = _.cmlparse(content);\n    expect(typeof result).to.be.equal('object')\n  });\n\n  it('postParseUnicode', function() {\n    let content = `\\u4f60\\u597d`;\n    let result = _.postParseUnicode(content);\n    expect(result).to.be.equal('你好')\n  });\n\n  it('generator', function() {\n\n    let content = `\n    <view c-if=\"show\">\n      <view c-bind:click=\"click\"></view>\n      <view name=\"{{name}}\"></view>\n      <view c-for=\"list\"></view>\n    </view>\n    `\n    let result = _.cmlparse(content);\n    let code = _.generator(result).code;\n    console.log(code)\n    expect(code).to.be.equal('<view c-if=\"show\">\\n      <view c-bind:click=\"click\"></view>\\n      <view name=\"{{name}}\"></view>\\n      <view c-for=\"list\"></view>\\n    </view>')\n  });\n})"
  },
  {
    "path": "packages/mvvm-template-parser/test/process-template.test.js",
    "content": "const expect = require('chai').expect;\nconst processTemplate = require('../lib/process-template.js');\nlet options = {\n  lang: 'cml',\n  buildInComponents: {button: \"cml-buildin-button\"},\n  usingComponents: [{\n    tagName: 'third-comp1',\n    refUrl: '/path/to/ref1',\n    filePath: 'path/to/real1',\n    isNative: true\n  }, {\n    tagName: 'thirdComp2',\n    refUrl: '/path/to/ref2',\n    filePath: 'path/to/real2',\n    isNative: false\n  }]\n};\ndescribe('process-template', function() {\n  describe('trim', function() {\n    it('test-trim', function() {\n      expect(processTemplate.trim('   value   ')).to.equal('value');\n    });\n  });\n  describe('vueToCml', function() {\n    it('test-vueToCml-event', function() {\n      let source = `<view><!-- 事件 --><view :id=\"value\" name=\"nameStr\" @click=\"handleClick\"></view><view @click.stop=\"handleClick(1,2,item)\"></view><view v-on:click.stop=\"handleClick(1,2,item)\"></view></view>`\n      expect(processTemplate.vueToCml(source).source).to.equal('<view><view id=\"{{value}}\" name=\"nameStr\" c-bind:tap=\"handleClick\"></view><view c-catch:tap=\"handleClick(1,2,item)\"></view><view c-catch:tap=\"handleClick(1,2,item)\"></view></view>');\n    });\n  });\n  describe('vueToCml', function() {\n    it('test-vueToCml-directive', function() {\n      let source = `<view><!-- 指令 v-if v-else-if v-else v-model v-show v-text--><view v-if=\"1 > 0.5\">A</view><view v-else-if=\"show\">B</view><view v-else>c</view><view v-show=\"!show\"></view><view v-model=\"modelValue\"></view><view v-text=\"text\"></view></view>`\n      expect(processTemplate.vueToCml(source).source).to.equal('<view><view c-if=\"{{1 > 0.5}}\">A</view><view c-else-if=\"{{show}}\">B</view><view c-else>c</view><view c-show=\"{{!show}}\"></view><view c-model=\"{{modelValue}}\"></view><view c-text=\"{{text}}\"></view></view>');\n    });\n  });\n  describe('vueToCml', function() {\n    it('test-vueToCml-interation-haskey', function() {\n      let source = `<view><!-- 循环 --><view v-for=\"item in array\" :key=\"item.id\"><view>{{item.id}}{{item[11]}}</view></view></view>`\n      expect(processTemplate.vueToCml(source).source).to.equal('<view><view c-for=\"{{array}}\" c-for-item=\"item\" c-for-index=\"index\" c-key=\"id\"><view>{{item.id}}{{item[11]}}</view></view></view>');\n    });\n  });\n  describe('vueToCml', function() {\n    it('test-vueToCml-interation-key *this*', function() {\n      let source = `<view><!-- 循环 --><view v-for=\"item in array\" :key=\"item\"><view>{{item.id}}{{item[11]}}</view></view></view>`\n      expect(processTemplate.vueToCml(source).source).to.equal('<view><view c-for=\"{{array}}\" c-for-item=\"item\" c-for-index=\"index\" c-key=\"*this\"><view>{{item.id}}{{item[11]}}</view></view></view>');\n    });\n  });\n  describe('vueToCml', function() {\n    it('test-vueToCml-interation-nokey', function() {\n      let source = `<view><!-- 循环 --><view v-for=\"item in array\" ><view>{{item.id}}{{item[11]}}</view></view></view>`\n      expect(processTemplate.vueToCml(source).source).to.equal('<view><view c-for=\"{{array}}\" c-for-item=\"item\" c-for-index=\"index\"><view>{{item.id}}{{item[11]}}</view></view></view>');\n    });\n  });\n  describe('vueToCml', function() {\n    it('test-vueToCml-class', function() {\n      let source = `<view><view class=\"cls1 cls2\" :class=\"true ?'cls3':'cls4'\"></view><view  class=\"cls1 cls2\"></view><view  :class=\"true ? 'cls4' : 'cls5'\"></view></view>`\n      expect(processTemplate.vueToCml(source).source).to.equal(`<view><view class=\" cls1 cls2 {{true ?'cls3':'cls4'}}\"></view><view class=\" cls1 cls2\"></view><view class=\" {{true ? 'cls4' : 'cls5'}}\"></view></view>`);\n    });\n  });\n  describe('vueToCml', function() {\n    it('test-vueToCml-style', function() {\n      let source = `<view><view style=\"background-color:red\"></view><view :style=\"computedStyle\"></view></view>`\n      expect(processTemplate.vueToCml(source).source).to.equal(`<view><view style=\"background-color:red\"></view><view style=\"{{computedStyle}}\"></view></view>`);\n    });\n  });\n  // 原生组件和 origin-tag标签\n  describe('vueToCml', function() {\n    it('test-vueToCml-origin-tag', function() {\n      let source = `<view><button></button><third-comp1 v-on:click=\"click1\" :class=\"true ? 'cls1':'cls2'\"></third-comp1><third-comp2 v-on:click=\"click1\" :class=\"true ? 'cls1':'cls2'\"></third-comp2><origin-checkbox v-on:click=\"click1\" :name=\"13\"  :class=\"clas2\" class=\"cls1\"></origin-checkbox></view>`\n      expect(processTemplate.vueToCml(source, options).source).to.equal(`<view><cml-buildin-button></cml-buildin-button><third-comp1 c-bind:tap=\"click1\" v-bind:class=\"true ? 'cls1':'cls2'\"></third-comp1><third-comp2 class=\" {{true ? 'cls1':'cls2'}}\" c-bind:tap=\"click1\"></third-comp2><origin-checkbox c-bind:tap=\"click1\" v-bind:name=\"13\" v-bind:class=\"clas2\" class=\"cls1\"></origin-checkbox></view>`);\n    });\n  });\n  // 一元标签\n  describe('vueToCml', function() {\n    it('test-vueToCml-isunary', function() {\n      let source = `<view><input :id=\"value\" v-bind:id=\"value\" @click=\"handleClick\" v-on:click=\"handleClick\" /><input style=\"width:100px\" class=\"cls1\" :class=\"true ? 'cls2':'cls3'\" /></view>`\n      expect(processTemplate.vueToCml(source).source).to.equal(`<view><input id=\"{{value}}\" id=\"{{value}}\" c-bind:tap=\"handleClick\" c-bind:tap=\"handleClick\" /><input class=\" cls1 {{true ? 'cls2':'cls3'}}\" style=\"width:100px\" /></view>`);\n    });\n  });\n  // 单属性\n  describe('vueToCml', function() {\n    it('test-vueToCml-singleAttr', function() {\n      let source = `<div disabled><input disabled :id=\"value\" v-bind:id=\"value\" @click=\"handleClick\" v-on:click=\"handleClick\" /><input style=\"width:100px\" class=\"cls1\" :class=\"true ? 'cls2':'cls3'\" /></div>`\n      expect(processTemplate.vueToCml(source).source).to.equal(`<div disabled><input disabled id=\"{{value}}\" id=\"{{value}}\" c-bind:tap=\"handleClick\" c-bind:tap=\"handleClick\" /><input class=\" cls1 {{true ? 'cls2':'cls3'}}\" style=\"width:100px\" /></div>`);\n    });\n  });\n  // 汉字\n  describe('vueToCml', function() {\n    it('test-vueToCml-isunary', function() {\n      let source = `<div disabled><p title=\"滴滴\">{{出行}}</p></div>`\n      expect(processTemplate.vueToCml(source).source).to.equal(`<div disabled><p title=\"滴滴\">{{出行}}</p></div>`);\n    });\n  });\n  describe('preDisappearAnnotation', function() {\n    it('test-preDisappearAnnotation', function() {\n      let source = `<div class=\"hello\"><!-- <div @click=\"handleClick\">{{numStr}}</div> --></div>`\n      expect(processTemplate.preDisappearAnnotation(source)).to.equal(`<div class=\"hello\"></div>`);\n    });\n  });\n  describe('preParseHTMLtoArray', function() {\n    it('test-preParseHTMLtoArray', function() {\n      let source = `<div class=\"hello\"><div :id=\"value\" v-bind:id=\"value\"></div><div @click=\"value\" v-bind:id=\"value\"></div><input class=\" cls1 {{true ? 'cls2':'cls3'}}\" style=\"width:100px\" /></div>`\n      let callbacks = {startCallback: processTemplate.startCallback};\n      expect(processTemplate.preParseHTMLtoArray(source, callbacks)).to.be.an('array');\n    });\n  });\n  describe('startCallback', function() {\n    it('test-startCallback', function() {\n      let matchStart = {\n        attrs: [\n          [' :id=\"value\"', ':id'],\n          [' @click=\"handleClick\"', \"@click\"],\n          [' v-on:click=\"handleClick\"', \"v-on:click\"]\n        ]\n      }\n      expect(processTemplate.startCallback(matchStart)).to.be.equal(` v-bind:id=\"value\" c-bind:tap=\"handleClick\" c-bind:tap=\"handleClick\"`);\n    });\n  });\n  describe('preParseBindAttr', function() {\n    it('test-preParseBindAttr', function() {\n      let source = ` :id=\"value\"`\n      expect(processTemplate.preParseBindAttr(source)).to.be.equal(` v-bind:id=\"value\"`);\n    });\n  });\n  describe('preParseVueEvent', function() {\n    it('test-preParseVueEvent-@', function() {\n      let source = `@click=\"handleClick\"`\n      expect(processTemplate.preParseVueEvent(source)).to.be.equal(`c-bind:tap=\"handleClick\"`);\n    });\n  });\n  describe('preParseVueEvent', function() {\n    it('test-preParseVueEvent-v-on', function() {\n      let source = `v-on:click=\"handleClick\"`\n      expect(processTemplate.preParseVueEvent(source)).to.be.equal(`c-bind:tap=\"handleClick\"`);\n    });\n  });\n  describe('isOriginTagOrNativeComp', function() {\n    it('test-isOriginTagOrNativeComp-isNative', function() {\n      expect(processTemplate.isOriginTagOrNativeComp('third-comp1', options)).to.be.ok;\n    });\n  });\n  describe('isOriginTagOrNativeComp', function() {\n    it('test-isOriginTagOrNativeComp-isOriginTag', function() {\n      expect(processTemplate.isOriginTagOrNativeComp('origin-input', options)).to.be.ok;\n    });\n  });\n  describe('isOriginTagOrNativeComp', function() {\n    it('test-isOriginTagOrNativeComp-is-not-originTag or native', function() {\n      expect(processTemplate.isOriginTagOrNativeComp('span', options)).to.be.not.ok;\n    });\n  });\n  describe('analysisFor', function() {\n    it('transform  analysisFor ', function() {\n      expect(processTemplate.analysisFor(`(item,index) in items`)).to.includes.keys(`item`)\n      expect(processTemplate.analysisFor(`(item,index) in items`)).to.includes.keys(`index`)\n      expect(processTemplate.analysisFor(`(item,index) in items`)).to.includes.keys(`list`)\n    })\n  });\n  describe('analysisFor', function() {\n    it('transform  analysisFor ', function() {\n      expect(processTemplate.analysisFor(`item in items`)).to.includes.keys(`item`)\n      expect(processTemplate.analysisFor(`item in items`)).to.includes.keys(`index`)\n      expect(processTemplate.analysisFor(`item in items`)).to.includes.keys(`list`)\n    })\n  });\n})\n"
  },
  {
    "path": "packages/runtime-check/.eslintrc",
    "content": "/* eslint-enable */\n{\n  \"globals\": {\n      \"cml\": false\n  },\n  \"env\": {\n      \"browser\": true,\n      \"node\": true,\n      \"commonjs\": true,\n      \"amd\": true,\n      \"es6\": true,\n      \"mocha\": true\n  },\n  \"parserOptions\": {\n      \"ecmaVersion\": 6,\n      \"sourceType\": \"module\", \n      \"ecmaFeatures\": {\n          \"globalReturn\": true,\n          \"impliedStrict\": true,\n          \"jsx\": true,\n          \"modules\": true\n      }\n  },\n  \"plugins\": [\n\n  ],\n  \"extends\": [\n      \"eslint:recommended\"\n  ],\n\n\n  \"rules\": {\n\n     \n      \"no-cond-assign\": 2,\n      \"no-console\": 0,\n      \n      \"no-constant-condition\": 2,\n      \"no-control-regex\": 2,\n      \"comma-dangle\": [1, \"never\"],\n      \"no-debugger\": 2,\n      \"no-dupe-args\": 2,\n      \"no-dupe-keys\": 2,\n      \"no-duplicate-case\": 2,\n      \"no-empty\": 2,\n      \"no-empty-character-class\": 2,\n      \"no-ex-assign\": 2,\n      \"no-extra-boolean-cast\": 2,\n      \"no-extra-parens\": 0,\n      \"no-extra-semi\": 2,\n      \"no-func-assign\": 2,\n      \"no-inner-declarations\": [2, \"functions\"],\n      \"no-invalid-regexp\": 2,\n      \"no-irregular-whitespace\": 2,\n      \"no-negated-in-lhs\": 2,\n      \"no-obj-calls\": 2,\n      \"no-prototype-builtins\": 0,\n      \"no-regex-spaces\": 2,\n      \"no-sparse-arrays\": 2,\n      \"no-unexpected-multiline\": 2,\n      \"no-unreachable\": 2,\n      \"use-isnan\": 2,\n      \"valid-jsdoc\": 0,\n      \"valid-typeof\": 2,\n\n\n      \"accessor-pairs\": 2,\n      \"array-callback-return\": 0,\n      \"block-scoped-var\": 0,\n      \"complexity\": [2, 30],\n      \"consistent-return\": 0,\n      \"curly\": [2, \"all\"],\n      \"default-case\": 2,\n      \"dot-location\": [2, \"property\"],\n      \"dot-notation\": [2, {\n          \"allowKeywords\": false\n      }],\n      \"eqeqeq\": [0, \"allow-null\"],\n      \"guard-for-in\": 2,\n      \"no-alert\": 0,\n      \"no-caller\": 2,\n      \"no-case-declarations\": 2,\n      \"no-div-regex\": 2,\n      \"no-else-return\": 0,\n      \"no-empty-function\": 2,\n      \"no-empty-pattern\": 2,\n      \"no-eq-null\": 1,\n      \"no-eval\": 2,\n      \"no-extend-native\": 2,\n      \"no-extra-bind\": 2,\n      \"no-extra-label:\": 0,\n      \"no-fallthrough\": 2,\n      \"no-floating-decimal\": 2,\n      \"no-implicit-coercion\": 0,\n      \"no-implicit-globals\": 1,\n      \"no-implied-eval\": 2,\n      \"no-invalid-this\": 0,\n      \"no-iterator\": 2,\n      \"no-labels\": 2,\n      \"no-lone-blocks\": 2,\n      \"no-loop-func\": 1,\n      \"no-magic-numbers\": [1, {\n          \"ignore\": [0, -1, 1]\n      }],\n      \"no-multi-spaces\": 2,\n      \"no-multi-str\": 2,\n      \"no-native-reassign\": 2,\n      \"no-new\": 2,\n      // 禁止对 Function 对象使用 new 操作符\n      \"no-new-func\": 0,\n      // 禁止对 String，Number 和 Boolean 使用 new 操作符\n      \"no-new-wrappers\": 2,\n      // 禁用八进制字面量\n      \"no-octal\": 2,\n      // 禁止在字符串中使用八进制转义序列\n      \"no-octal-escape\": 2,\n      // 不允许对 function 的参数进行重新赋值\n      \"no-param-reassign\": 0,\n      // 禁用 __proto__ 属性\n      \"no-proto\": 2,\n      // 禁止使用 var 多次声明同一变量\n      \"no-redeclare\": 2,\n      // 禁用指定的通过 require 加载的模块\n      \"no-return-assign\": 0,\n      // 禁止使用 javascript: url\n      \"no-script-url\": 0,\n      // 禁止自我赋值\n      \"no-self-assign\": 2,\n      // 禁止自身比较\n      \"no-self-compare\": 2,\n      // 禁用逗号操作符\n      \"no-sequences\": 2,\n      // 禁止抛出非异常字面量\n      \"no-throw-literal\": 2,\n      // 禁用一成不变的循环条件\n      \"no-unmodified-loop-condition\": 2,\n      // 禁止出现未使用过的表达式\n      \"no-unused-expressions\": 0,\n      // 禁用未使用过的标签\n      \"no-unused-labels\": 2,\n      // 禁止不必要的 .call() 和 .apply()\n      \"no-useless-call\": 2,\n      // 禁止不必要的字符串字面量或模板字面量的连接\n      \"no-useless-concat\": 0,\n      // 禁用不必要的转义字符\n      \"no-useless-escape\": 0,\n      // 禁用 void 操作符\n      \"no-void\": 0,\n      // 禁止在注释中使用特定的警告术语\n      \"no-warning-comments\": 0,\n      // 禁用 with 语句\n      \"no-with\": 2,\n      // 强制在parseInt()使用基数参数\n      \"radix\": 2,\n      // 要求所有的 var 声明出现在它们所在的作用域顶部\n      \"vars-on-top\": 0,\n      // 要求 IIFE 使用括号括起来\n      \"wrap-iife\": [2, \"any\"],\n      // 要求或禁止 “Yoda” 条件\n      \"yoda\": [2, \"never\"],\n      // 要求或禁止使用严格模式指令\n      \"strict\": 0,\n\n\n      //////////////\n      // 变量声明 //\n      //////////////\n\n      // 要求或禁止 var 声明中的初始化(初值)\n      \"init-declarations\": 0,\n      // 不允许 catch 子句的参数与外层作用域中的变量同名\n      \"no-catch-shadow\": 0,\n      // 禁止删除变量\n      \"no-delete-var\": 2,\n      // 不允许标签与变量同名\n      \"no-label-var\": 2,\n      // 禁用特定的全局变量\n      \"no-restricted-globals\": 0,\n      // 禁止 var 声明 与外层作用域的变量同名\n      \"no-shadow\": 0,\n      // 禁止覆盖受限制的标识符\n      \"no-shadow-restricted-names\": 2,\n      // 禁用未声明的变量，除非它们在 /*global */ 注释中被提到\n      \"no-undef\": 2,\n      // 禁止将变量初始化为 undefined\n      \"no-undef-init\": 2,\n      // 禁止将 undefined 作为标识符\n      \"no-undefined\": 0,\n      // 禁止出现未使用过的变量\n      \"no-unused-vars\": [2, {\n          \"vars\": \"all\",\n          \"args\": \"none\"\n      }],\n      // 不允许在变量定义之前使用它们\n      \"no-use-before-define\": 0,\n\n      //////////////////////////\n      // Node.js and CommonJS //\n      //////////////////////////\n\n      // require return statements after callbacks\n      \"callback-return\": 0,\n      // 要求 require() 出现在顶层模块作用域中\n      \"global-require\": 1,\n      // 要求回调函数中有容错处理\n      \"handle-callback-err\": [2, \"^(err|error)$\"],\n      // 禁止混合常规 var 声明和 require 调用\n      \"no-mixed-requires\": 0,\n      // 禁止调用 require 时使用 new 操作符\n      \"no-new-require\": 2,\n      // 禁止对 __dirname 和 __filename进行字符串连接\n      \"no-path-concat\": 0,\n      // 禁用 process.env\n      \"no-process-env\": 0,\n      // 禁用 process.exit()\n      \"no-process-exit\": 0,\n      // 禁用同步方法\n      \"no-sync\": 0,\n\n      //////////////\n      // 风格指南 //\n      //////////////\n\n      // 指定数组的元素之间要以空格隔开(, 后面)， never参数：[ 之前和 ] 之后不能带空格，always参数：[ 之前和 ] 之后必须带空格\n      \"array-bracket-spacing\": [2, \"never\"],\n      // 禁止或强制在单行代码块中使用空格(禁用)\n      \"block-spacing\": [1, \"never\"],\n      //强制使用一致的缩进 第二个参数为 \"tab\" 时，会使用tab，\n      // if while function 后面的{必须与if在同一行，java风格。\n      \"brace-style\": [2, \"1tbs\", {\n          \"allowSingleLine\": true\n      }],\n      // 双峰驼命名格式\n      \"camelcase\": 2,\n      // 控制逗号前后的空格\n      \"comma-spacing\": [2, {\n          \"before\": false,\n          \"after\": true\n      }],\n      // 控制逗号在行尾出现还是在行首出现 (默认行尾)\n      // http://eslint.org/docs/rules/comma-style\n      \"comma-style\": [2, \"last\"],\n      //\"SwitchCase\" (默认：0) 强制 switch 语句中的 case 子句的缩进水平\n      // 以方括号取对象属性时，[ 后面和 ] 前面是否需要空格, 可选参数 never, always\n      \"computed-property-spacing\": [2, \"never\"],\n      // 用于指统一在回调函数中指向this的变量名，箭头函数中的this已经可以指向外层调用者，应该没卵用了\n      // e.g [0,\"that\"] 指定只能 var that = this. that不能指向其他任何值，this也不能赋值给that以外的其他值\n      \"consistent-this\": [1, \"that\"],\n      // 强制使用命名的 function 表达式\n      \"func-names\": 0,\n      // 文件末尾强制换行\n      \"eol-last\": 2,\n      \"indent\": [2, 2, {\n          \"SwitchCase\": 1\n      }],\n      // 强制在对象字面量的属性中键和值之间使用一致的间距\n      \"key-spacing\": [2, {\n          \"beforeColon\": false,\n          \"afterColon\": true\n      }],\n      // 强制使用一致的换行风格\n      \"linebreak-style\": [1, \"unix\"],\n      // 要求在注释周围有空行 ( 要求在块级注释之前有一空行)\n      \"lines-around-comment\": [1, {\n          \"beforeBlockComment\": true\n      }],\n      // 强制一致地使用函数声明或函数表达式，方法定义风格，参数：\n      // declaration: 强制使用方法声明的方式，function f(){} e.g [2, \"declaration\"]\n      // expression：强制使用方法表达式的方式，var f = function() {} e.g [2, \"expression\"]\n      // allowArrowFunctions: declaration风格中允许箭头函数。 e.g [2, \"declaration\", { \"allowArrowFunctions\": true }]\n      \"func-style\": 0,\n      // 强制回调函数最大嵌套深度 5层\n      \"max-nested-callbacks\": [1, 5],\n      // 禁止使用指定的标识符\n      \"id-blacklist\": 0,\n      // 强制标识符的最新和最大长度\n      \"id-length\": 0,\n      // 要求标识符匹配一个指定的正则表达式\n      \"id-match\": 0,\n      // 强制在 JSX 属性中一致地使用双引号或单引号\n      \"jsx-quotes\": 0,\n      // 强制在关键字前后使用一致的空格 (前后腰需要)\n      \"keyword-spacing\": 2,\n      // 强制一行的最大长度\n      \"max-len\": [1, 200],\n      // 强制最大行数\n      \"max-lines\": 0,\n      // 强制 function 定义中最多允许的参数数量\n      \"max-params\": [1, 7],\n      // 强制 function 块最多允许的的语句数量\n      \"max-statements\": [1, 200],\n      // 强制每一行中所允许的最大语句数量\n      \"max-statements-per-line\": 0,\n      // 要求构造函数首字母大写 （要求调用 new 操作符时有首字母大小的函数，允许调用首字母大写的函数时没有 new 操作符。）\n      \"new-cap\": [2, {\n          \"newIsCap\": true,\n          \"capIsNew\": false\n      }],\n      // 要求调用无参构造函数时有圆括号\n      \"new-parens\": 2,\n      // 要求或禁止 var 声明语句后有一行空行\n      \"newline-after-var\": 0,\n      // 禁止使用 Array 构造函数\n      \"no-array-constructor\": 2,\n      // 禁用按位运算符\n      \"no-bitwise\": 0,\n      // 要求 return 语句之前有一空行\n      \"newline-before-return\": 0,\n      // 要求方法链中每个调用都有一个换行符\n      \"newline-per-chained-call\": 1,\n      // 禁用 continue 语句\n      \"no-continue\": 0,\n      // 禁止在代码行后使用内联注释\n      \"no-inline-comments\": 0,\n      // 禁止 if 作为唯一的语句出现在 else 语句中\n      \"no-lonely-if\": 0,\n      // 禁止混合使用不同的操作符\n      \"no-mixed-operators\": 0,\n      // 不允许空格和 tab 混合缩进\n      \"no-mixed-spaces-and-tabs\": 2,\n      // 不允许多个空行\n      \"no-multiple-empty-lines\": [2, {\n          \"max\": 2\n      }],\n      // 不允许否定的表达式\n      \"no-negated-condition\": 0,\n      // 不允许使用嵌套的三元表达式\n      \"no-nested-ternary\": 0,\n      // 禁止使用 Object 的构造函数\n      \"no-new-object\": 2,\n      // 禁止使用一元操作符 ++ 和 --\n      \"no-plusplus\": 0,\n      // 禁止使用特定的语法\n      \"no-restricted-syntax\": 0,\n      // 禁止 function 标识符和括号之间出现空格\n      \"no-spaced-func\": 2,\n      // 不允许使用三元操作符\n      \"no-ternary\": 0,\n      // 禁用行尾空格\n      \"no-trailing-spaces\": 2,\n      // 禁止标识符中有悬空下划线_bar\n      \"no-underscore-dangle\": 0,\n      // 禁止可以在有更简单的可替代的表达式时使用三元操作符\n      \"no-unneeded-ternary\": 2,\n      // 禁止属性前有空白\n      \"no-whitespace-before-property\": 0,\n      // 强制花括号内换行符的一致性\n      \"object-curly-newline\": 0,\n      // 强制在花括号中使用一致的空格\n      \"object-curly-spacing\": 0,\n      // 强制将对象的属性放在不同的行上\n      \"object-property-newline\": 0,\n      // 强制函数中的变量要么一起声明要么分开声明\n      \"one-var\": [2, {\n          \"initialized\": \"never\"\n      }],\n      // 要求或禁止在 var 声明周围换行\n      \"one-var-declaration-per-line\": 0,\n      // 要求或禁止在可能的情况下要求使用简化的赋值操作符\n      \"operator-assignment\": 0,\n      // 强制操作符使用一致的换行符\n      \"operator-linebreak\": [2, \"after\", {\n          \"overrides\": {\n              \"?\": \"before\",\n              \":\": \"before\"\n          }\n      }],\n      // 要求或禁止块内填充\n      \"padded-blocks\": 0,\n      // 要求对象字面量属性名称用引号括起来\n      \"quote-props\": 0,\n      // 强制使用一致的反勾号、双引号或单引号\n      // \"quotes\": [2, \"single\", \"avoid-escape\"],\n      // 要求使用 JSDoc 注释\n      \"require-jsdoc\": 0,\n      // 要求或禁止使用分号而不是 ASI（这个才是控制行尾部分号的，）\n      \"semi\": [0, \"always\"],\n      // 强制分号之前和之后使用一致的空格\n      \"semi-spacing\": 0,\n      // 要求同一个声明块中的变量按顺序排列\n      \"sort-vars\": 0,\n      // 强制在块之前使用一致的空格\n      \"space-before-blocks\": [2, \"always\"],\n      // 强制在 function的左括号之前使用一致的空格\n      \"space-before-function-paren\": [0, \"always\"],\n      // 强制在圆括号内使用一致的空格\n      \"space-in-parens\": [2, \"never\"],\n      // 要求操作符周围有空格\n      \"space-infix-ops\": 2,\n      // 强制在一元操作符前后使用一致的空格\n      \"space-unary-ops\": [2, {\n          \"words\": true,\n          \"nonwords\": false\n      }],\n      // 强制在注释中 // 或 /* 使用一致的空格\n      \"spaced-comment\": [2, \"always\", {\n          \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n      }],\n      // 要求或禁止 Unicode BOM\n      \"unicode-bom\": 0,\n      // 要求正则表达式被括号括起来\n      \"wrap-regex\": 0,\n\n      //////////////\n      // ES6.相关 //\n      //////////////\n\n      // 要求箭头函数体使用大括号\n      \"arrow-body-style\": 2,\n      // 要求箭头函数的参数使用圆括号\n      \"arrow-parens\": 0,\n      \"arrow-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 强制在子类构造函数中用super()调用父类构造函数，TypeScrip的编译器也会提示\n      \"constructor-super\": 0,\n      // 强制 generator 函数中 * 号周围使用一致的空格\n      \"generator-star-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 禁止修改类声明的变量\n      \"no-class-assign\": 2,\n      // 不允许箭头功能，在那里他们可以混淆的比较\n      \"no-confusing-arrow\": 0,\n      // 禁止修改 const 声明的变量\n      \"no-const-assign\": 2,\n      // 禁止类成员中出现重复的名称\n      \"no-dupe-class-members\": 2,\n      // 不允许复制模块的进口\n      \"no-duplicate-imports\": 0,\n      // 禁止 Symbol 的构造函数\n      \"no-new-symbol\": 2,\n      // 允许指定模块加载时的进口\n      \"no-restricted-imports\": 0,\n      // 禁止在构造函数中，在调用 super() 之前使用 this 或 super\n      \"no-this-before-super\": 2,\n      // 禁止不必要的计算性能键对象的文字\n      \"no-useless-computed-key\": 0,\n      // 要求使用 let 或 const 而不是 var\n      \"no-var\": 0,\n      // 要求或禁止对象字面量中方法和属性使用简写语法\n      \"object-shorthand\": 0,\n      // 要求使用箭头函数作为回调\n      \"prefer-arrow-callback\": 0,\n      // 要求使用 const 声明那些声明后不再被修改的变量\n      \"prefer-const\": 0,\n      // 要求在合适的地方使用 Reflect 方法\n      \"prefer-reflect\": 0,\n      // 要求使用扩展运算符而非 .apply()\n      \"prefer-spread\": 0,\n      // 要求使用模板字面量而非字符串连接\n      \"prefer-template\": 0,\n      // Suggest using the rest parameters instead of arguments\n      \"prefer-rest-params\": 0,\n      // 要求generator 函数内有 yield\n      \"require-yield\": 0,\n      // enforce spacing between rest and spread operators and their expressions\n      \"rest-spread-spacing\": 0,\n      // 强制模块内的 import 排序\n      \"sort-imports\": 0,\n      // 要求或禁止模板字符串中的嵌入表达式周围空格的使用\n      \"template-curly-spacing\": 1,\n      // 强制在 yield* 表达式中 * 周围使用空格\n      \"yield-star-spacing\": 2\n  }\n}\n/* eslint-enable */"
  },
  {
    "path": "packages/runtime-check/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\n"
  },
  {
    "path": "packages/runtime-check/getDefines.js",
    "content": "\nconst parser = require('@babel/parser');\nconst traverse = require('babel-traverse');\nconst parsePlugins = require('./parsePlugins.js');\n\n/**\n * 获取定义 两个loader共用代码\n * 构建时的错误信息 直接throw Error\n *\n * @param  {string} code 代码片段\n * @return {Object}      接口及类型定义\n */\nconst getDefines = (code, filePath) => {\n  const showErrorMessage = function(content) {\n    throw new Error(`\n    文件位置：${filePath}\n    错误信息: ${content}`)\n  }\n\n  const ast = parser.parse(code, {\n    plugins: parsePlugins,\n    sourceType: 'module'\n  });\n\n  // 接口\n  const interfaces = {};\n\n  // 类型\n  const types = {};\n\n  // 类\n  const classes = {};\n\n  /**\n   * 获取函数input类型\n   *\n   * @param  {Array} params 输入参数\n   * @return {Array}       输入参数类型\n   */\n  const getInput = params => {\n    let input = [];\n    params.map(param => {\n      if (param.typeAnnotation.type == 'GenericTypeAnnotation') {\n        input.push(param.typeAnnotation.id.name);\n      } else if (param.typeAnnotation.type == 'NullableTypeAnnotation') {\n        // let nullableType = param.typeAnnotation.typeAnnotation.type.replace('TypeAnnotation','');\n        let nullableType = getNodeType(param.typeAnnotation.typeAnnotation);\n        input.push(`${nullableType}_cml_nullable_lmc_`)\n      } else if (param.typeAnnotation.type == 'NullLiteralTypeAnnotation') {\n        input.push('Null')\n      } else {\n        let dataType = param.typeAnnotation.type.replace('TypeAnnotation', '');\n        dataType === 'Void' && (dataType = 'Undefined');\n        input.push(dataType);\n      }\n    });\n\n    return input;\n  };\n\n  /**\n   * 获取节点type\n   *\n   * @param  {Object} typeNode 节点\n   * @return {string}          类型\n   */\n  const getNodeType = typeNode => {\n    if (typeNode.type == 'GenericTypeAnnotation') {\n      return typeNode.id.name;\n    } else if (typeNode.type == 'NullableTypeAnnotation') {\n      // let nullableType = typeNode.typeAnnotation.type.replace('TypeAnnotation','');\n      let nullableType = getNodeType(typeNode.typeAnnotation);\n\n      return `${nullableType}_cml_nullable_lmc_`;\n    } else if (typeNode.type == 'NullLiteralTypeAnnotation') {\n      return \"Null\";\n    } else {\n      let typeName = typeNode.type.replace('TypeAnnotation', '');\n      typeName === \"Void\" && (typeName = \"Undefined\")\n      // 没有测试到什么时候是Union类型\n      if (typeName == 'Union') {\n        return typeNode.types.map(node => {\n          const typeName = node.type.replace('TypeAnnotation', '');\n          if (typeName == 'Generic') {\n            return node.id.name;\n          }\n          return typeName;\n        });\n      }\n      return typeName;\n    }\n  };\n\n  /**\n   * 递归产生type\n   * @param {*} typeName\n   * @param {*} node\n   */\n  function getTypeDefine(typeName, node) {\n    let result;\n    if (node.type === 'FunctionTypeAnnotation') {\n      result = {\n        input: getInput(node.params),\n        output: getNodeType(node.returnType)\n      };\n      types[typeName] = result;\n    } else if (node.type === 'ObjectTypeAnnotation') {\n      result = {};\n      node.properties.forEach(item => {\n        result[item.key.name] = getTypeDefine(`${typeName}__${item.key.name}`, item.value);\n      })\n      types[typeName] = result;\n    } else if (node.type === 'TupleTypeAnnotation') {\n      result = [];\n      // 数组只取第一个元素\n      let length = node.types.length;\n      if (length > 1) {\n        showErrorMessage(`type ${typeName}定义的数组类型元素类型只能为一种`)\n      } else if (length === 0) {\n        showErrorMessage(`type ${typeName}未定义数组元素类型`)\n      }\n      result.push(getTypeDefine(`${typeName}__item`, node.types[0]));\n      types[typeName] = result;\n\n    } else {\n      // 基本类型 获取type\n      typeName = getNodeType(node);\n    }\n    return typeName;\n\n  }\n\n  traverse[\"default\"](ast, {\n    enter(path) {\n      if (path.node.type == 'TypeAlias') {\n        let tNode = path.node;\n        let tName = tNode.id.name;\n        getTypeDefine(tName, tNode.right);\n      } else if (path.node.type === 'InterfaceDeclaration') {\n        let iNode = path.node;\n        let iName = iNode.id.name;\n        let defines = {};\n\n        interfaces[iName] = defines;\n        if (iNode.body.type == 'ObjectTypeAnnotation') {\n          iNode.body.properties.forEach(item => {\n            if (item.method) {\n              defines[item.key.name] = {\n                input: getInput(item.value.params),\n                output: getNodeType(item.value.returnType)\n              };\n            } else {\n              defines[item.key.name] = getNodeType(item.value)\n            }\n          });\n        }\n      } else if (path.node.type === 'ClassDeclaration') {\n        classes[path.node.id.name] = path.node[\"implements\"].map(item => item.id.name);\n      }\n    }\n  });\n\n  return {\n    ast: ast,\n    defines: {\n      types,\n      interfaces,\n      classes\n    }\n  };\n};\n\n\nmodule.exports = getDefines;\n"
  },
  {
    "path": "packages/runtime-check/index.js",
    "content": "const parsePlugins = require('./parsePlugins.js');\nconst getDefines = require('./getDefines.js');\n\nmodule.exports = {\n  parsePlugins,\n  getDefines\n}\n\n"
  },
  {
    "path": "packages/runtime-check/package.json",
    "content": "{\n  \"name\": \"runtime-check\",\n  \"version\": \"1.0.8\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"mocha --recursive --reporter spec\",\n    \"cover\": \"istanbul cover --report lcov node_modules/mocha/bin/_mocha -- -R spec --recursive\",\n    \"eslint:fix\": \"eslint index.js parsePlugins.js getDefines.js --fix\",\n    \"eslint\": \"eslint index.js parsePlugins.js getDefines.js\"\n  },\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"dependencies\": {\n    \"@babel/parser\": \"7.1.0\",\n    \"babel-generator\": \"6.26.1\",\n    \"babel-traverse\": \"6.26.0\"\n  },\n  \"devDependencies\": {\n    \"chai\": \"^4.2.0\",\n    \"coveralls\": \"^2.11.9\",\n    \"eslint\": \"^5.9.0\",\n    \"gulp\": \"^3.9.1\",\n    \"gulp-uglify-es\": \"^1.0.4\",\n    \"istanbul\": \"^0.4.5\",\n    \"mocha\": \"^5.2.0\"\n  },\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"gitHead\": \"5ddcde4330774710f7646559446e008f7785ce00\"\n}"
  },
  {
    "path": "packages/runtime-check/parsePlugins.js",
    "content": "\n/**\n * parse 代码时的ES语法扩展需要的插件\n */\nmodule.exports = [\n  'flow',\n  'asyncGenerators',\n  'bigInt',\n  'classProperties',\n  'classPrivateProperties',\n  'classPrivateMethods',\n  'doExpressions',\n  'dynamicImport',\n  'exportDefaultFrom',\n  'exportNamespaceFrom',\n  'functionBind',\n  'functionSent',\n  'importMeta',\n  'logicalAssignment',\n  'nullishCoalescingOperator',\n  'numericSeparator',\n  'objectRestSpread',\n  'optionalCatchBinding',\n  'optionalChaining',\n  'throwExpressions'\n]\n"
  },
  {
    "path": "packages/runtime-check/test/index.test.js",
    "content": "const {expect} = require('chai');\nconst {getDefines} = require('../index.js');\nconst fs = require('fs');\nconst path = require('path');\n\nlet code = fs.readFileSync(path.resolve(__dirname,'./interface.test'),'utf-8');\nlet defines = getDefines(code,'path/to/errorfile');\nlet result = {\n  \"types\": {\n    \"Scheme\": {\n      \"a\": \"String\",\n      \"b\": \"Boolean\",\n      \"c\": \"Number\"\n    }\n  },\n  \"interfaces\": {\n    \"EntryInterface\": {\n      \"retValueUndefind\": {\n        \"input\": [],\n        \"output\": \"Undefined\"\n      },\n      \"retValueNumber\": {\n        \"input\": [],\n        \"output\": \"Number\"\n      },\n      \"retValueString\": {\n        \"input\": [],\n        \"output\": \"String\"\n      },\n      \"retValueBoolean\": {\n        \"input\": [],\n        \"output\": \"Boolean\"\n      },\n      \"retValueObject\": {\n        \"input\": [],\n        \"output\": \"Object\"\n      },\n      \"retValueArray\": {\n        \"input\": [],\n        \"output\": \"Array\"\n      },\n      \"retValueRegExp\": {\n        \"input\": [],\n        \"output\": \"RegExp\"\n      },\n      \"retValueDate\": {\n        \"input\": [],\n        \"output\": \"Date\"\n      },\n      \"retValuePromise\": {\n        \"input\": [],\n        \"output\": \"Promise\"\n      },\n      \"retValueAsync\": {\n        \"input\": [],\n        \"output\": \"Promise\"\n      },\n      \"retValueFunction\": {\n        \"input\": [],\n        \"output\": \"Function\"\n      },\n      \"argsUndefined\": {\n        \"input\": [\n          \"Undefined\"\n        ],\n        \"output\": \"Undefined\"\n      },\n      \"argsNumber\": {\n        \"input\": [\n          \"Number\"\n        ],\n        \"output\": \"Undefined\"\n      },\n      \"argsString\": {\n        \"input\": [\n          \"String\"\n        ],\n        \"output\": \"Undefined\"\n      },\n      \"argsBoolean\": {\n        \"input\": [\n          \"Boolean\"\n        ],\n        \"output\": \"Undefined\"\n      },\n      \"argsObject\": {\n        \"input\": [\n          \"Object\"\n        ],\n        \"output\": \"Undefined\"\n      },\n      \"argsArray\": {\n        \"input\": [\n          \"Array\"\n        ],\n        \"output\": \"Undefined\"\n      },\n      \"argsRegexp\": {\n        \"input\": [\n          \"RegExp\"\n        ],\n        \"output\": \"Undefined\"\n      },\n      \"argsDate\": {\n        \"input\": [\n          \"Date\"\n        ],\n        \"output\": \"Undefined\"\n      },\n      \"argsPromsie\": {\n        \"input\": [\n          \"Promise\"\n        ],\n        \"output\": \"Undefined\"\n      },\n      \"argsAsync\": {\n        \"input\": [\n          \"Promise\"\n        ],\n        \"output\": \"Undefined\"\n      },\n      \"argsNullable\": {\n        \"input\": [\n          \"Number_cml_nullable_lmc_\"\n        ],\n        \"output\": \"Undefined\"\n      },\n      \"argsMixins\": {\n        \"input\": [\n          \"Number\",\n          \"Object_cml_nullable_lmc_\",\n          \"String\"\n        ],\n        \"output\": \"Undefined\"\n      }\n    }\n  },\n  \"classes\": {\n    \"Method\": [\n      \"EntryInterface\"\n    ]\n  }\n}\n\ndescribe('test runtime check',function(){\n  it('test the type of args and return value ',function(){\n    expect(defines.defines).to.be.deep.equal(result)\n  })\n})\n"
  },
  {
    "path": "packages/runtime-check/test/interface.test",
    "content": "type Scheme = {\n    a: string,\n    b: bool,\n    c: number\n} \ninterface EntryInterface {\n  retValueUndefind():Undefined;\n  retValueNumber():Number;\n  retValueString():String;\n  retValueBoolean():Boolean;\n  retValueObject():Object;\n  retValueArray():Array;\n  retValueRegExp():RegExp;\n  retValueDate():Date;\n  retValuePromise():Promise;\n  retValueAsync():Promise;\n  retValueFunction():Function;\n\n  argsUndefined(arg:Undefined):Undefined;\n  argsNumber(arg:Number):Undefined;\n  argsString(arg:String):Undefined;\n  argsBoolean(arg:Boolean):Undefined;\n  argsObject(arg:Object):Undefined;\n  argsArray(arg:Array):Undefined;\n  argsRegexp(arg:RegExp):Undefined;\n  argsDate(arg:Date):Undefined;\n  argsPromsie(arg:Promise):Undefined;\n  argsAsync(arg:Promise):Undefined;\n  argsNullable(arg:?Number):Undefined;\n  argsMixins(arg1:Number,arg2:?Object,arg3:String):Undefined;\n\n}\n\n\nclass Method implements EntryInterface {\n  retValueUndefind(){\n    return undefined;\n  };\n  retValueNumber(){\n    return 8;\n  };\n  retValueString(){\n    return 'this is string'\n  };\n  retValueBoolean(){\n    return true;\n  };\n  retValueObject(){\n    return {};\n  };\n  retValueArray(){\n    return [1,2,3];\n  };\n  retValueRegExp(){\n    return /reg/g;\n  };\n  retValueDate(){\n    return new Date();\n  };\n  retValuePromise(){\n    return new Promise(() => {});\n  };\n  async retValueAsync(){\n  };\n  retValueFunction(){\n    return function(){}\n  };\n\n  argsUndefined(arg){};\n  argsNumber(arg){};\n  argsString(arg){};\n  argsBoolean(arg){};\n  argsObject(arg){};\n  argsArray(arg){};\n  argsRegexp(arg){};\n  argsDate(arg){};\n  argsPromsie(arg){};\n  argsAsync(arg){};\n  argsNullable(arg){};\n\n  argsMixins(arg1,arg2,arg3){};\n\n  \n}\n\nexport default new Method();"
  },
  {
    "path": "packages/url-loader/.babelrc",
    "content": "{\n  \"presets\": [\n    [\n      \"env\",\n      {\n        \"useBuiltIns\": true,\n        \"targets\": {\n          \"node\": \"6.9.0\"\n        },\n        \"exclude\": [\n          \"transform-async-to-generator\",\n          \"transform-regenerator\"\n        ]\n      }\n    ]\n  ],\n  \"plugins\": [\n    [\n      \"transform-object-rest-spread\",\n      {\n        \"useBuiltIns\": true\n      }\n    ]\n  ],\n  \"env\": {\n    \"test\": {\n      \"presets\": [\n        \"env\"\n      ],\n      \"plugins\": [\n        \"transform-object-rest-spread\"\n      ]\n    }\n  }\n}\n"
  },
  {
    "path": "packages/url-loader/.circleci/config.yml",
    "content": "unit_tests: &unit_tests\n  steps:\n    - checkout\n    - restore_cache:\n        key: dependency-cache-{{ checksum \"package-lock.json\" }}\n    - run:\n        name: NPM Rebuild\n        command: npm install\n    - run:\n        name: Run unit tests.\n        command: npm run ci:test\ncanary_tests: &canary_tests\n  steps:\n    - checkout\n    - restore_cache:\n        key: dependency-cache-{{ checksum \"package-lock.json\" }}\n    - run:\n        name: NPM Rebuild\n        command: npm install\n    - run:\n        name: Install Webpack Canary\n        command: npm i --no-save webpack@next\n    - run:\n        name: Run unit tests.\n        command: if [[ $(compver --name webpack --gte next --lt latest) < 1 ]] ; then printf \"Next is older than Latest - Skipping Canary Suite\"; else npm run ci:test ; fi\n\nversion: 2\njobs:\n  dependency_cache:\n    docker:\n      - image: webpackcontrib/circleci-node-base:latest\n    steps:\n      - checkout\n      - restore_cache:\n          key: dependency-cache-{{ checksum \"package-lock.json\" }}\n      - run:\n          name: Install Dependencies\n          command: npm install\n      - save_cache:\n          key: dependency-cache-{{ checksum \"package-lock.json\" }}\n          paths:\n            - ./node_modules\n\n  node8-latest:\n    docker:\n      - image: webpackcontrib/circleci-node8:latest\n    steps:\n      - checkout\n      - restore_cache:\n          key: dependency-cache-{{ checksum \"package-lock.json\" }}\n      - run:\n          name: NPM Rebuild\n          command: npm install\n      - run:\n          name: Run unit tests.\n          command: npm run ci:coverage\n      - run:\n          name: Submit coverage data to codecov.\n          command: bash <(curl -s https://codecov.io/bash)\n          when: on_success\n  node6-latest:\n    docker:\n      - image: webpackcontrib/circleci-node6:latest\n    <<: *unit_tests\n  node10-latest:\n    docker:\n      - image: webpackcontrib/circleci-node10:latest\n    <<: *unit_tests\n  node8-canary:\n    docker:\n      - image: webpackcontrib/circleci-node8:latest\n    <<: *canary_tests\n  analysis:\n    docker:\n      - image: webpackcontrib/circleci-node-base:latest\n    steps:\n      - checkout\n      - restore_cache:\n          key: dependency-cache-{{ checksum \"package-lock.json\" }}\n      - run:\n          name: NPM Rebuild\n          command: npm install\n      - run:\n          name: Run linting.\n          command: npm run lint\n      - run:\n          name: Run NSP Security Check.\n          command: npm run security\n      - run:\n          name: Validate Commit Messages\n          command: npm run ci:lint:commits\n  publish:\n    docker:\n      - image: webpackcontrib/circleci-node-base:latest\n    steps:\n      - checkout\n      - restore_cache:\n          key: dependency-cache-{{ checksum \"package-lock.json\" }}\n      - run:\n          name: NPM Rebuild\n          command: npm install\n      # - run:\n      #     name: Validate Commit Messages\n      #     command: npm run release:validate\n      - run:\n          name: Publish to NPM\n          command: printf \"noop running conventional-github-releaser\"\n\nversion: 2.0\nworkflows:\n  version: 2\n  validate-publish:\n    jobs:\n      - dependency_cache\n      - node6-latest:\n          requires:\n            - dependency_cache\n          filters:\n            tags:\n              only: /.*/\n      - analysis:\n          requires:\n            - dependency_cache\n          filters:\n            tags:\n              only: /.*/\n      - node8-latest:\n          requires:\n            - analysis\n            - node6-latest\n          filters:\n            tags:\n              only: /.*/\n      - node10-latest:\n          requires:\n            - analysis\n            - node6-latest\n          filters:\n            tags:\n              only: /.*/\n      - node8-canary:\n          requires:\n            - analysis\n            - node6-latest\n          filters:\n            tags:\n              only: /.*/\n      - publish:\n          requires:\n            - node8-latest\n            - node8-canary\n            - node10-latest\n          filters:\n            branches:\n              only:\n                - master"
  },
  {
    "path": "packages/url-loader/.eslintignore",
    "content": "/node_modules\n/dist\n\n"
  },
  {
    "path": "packages/url-loader/.eslintrc",
    "content": "{\n    // 在配置文件里配置全局变量时，使用 globals 指出你要使用的全局变量。将变量设置为 true 将允许变量被重写，或 false 将不允许被重写\n    \"globals\": {\n        \"cml\": false\n    },\n  // 环境定义了预定义的全局变量。\n  \"env\": {\n      //环境定义了预定义的全局变量。更多在官网查看\n      \"browser\": true,\n      \"node\": true,\n      \"commonjs\": true,\n      \"amd\": true,\n      \"es6\": true,\n      \"mocha\": true\n  },\n  // JavaScript 语言选项\n  \"parserOptions\": {\n      // ECMAScript 版本\n      \"ecmaVersion\": 9,\n      \"sourceType\": \"module\", //设置为 \"script\" (默认) 或 \"module\"（如果你的代码是 ECMAScript 模块)。\n      //想使用的额外的语言特性:\n      \"ecmaFeatures\": {\n          // 允许在全局作用域下使用 return 语句\n          \"globalReturn\": true,\n          // impliedStric\n          \"impliedStrict\": true,\n          // 启用 JSX\n          \"jsx\": true,\n          \"modules\": true\n      }\n  },\n  //-----让eslint支持 JSX start\n  \"plugins\": [\n\n  ],\n  \"extends\": [\n      \"eslint:recommended\"\n  ],\n  //-----让eslint支持 JSX end\n\n\n  /**\n   * \"off\" 或 0 - 关闭规则\n   * \"warn\" 或 1 - 开启规则，使用警告级别的错误：warn (不会导致程序退出),\n   * \"error\" 或 2 - 开启规则，使用错误级别的错误：error (当被触发的时候，程序会退出)\n   */\n  \"rules\": {\n\n      ////////////////\n      // 可能的错误 //\n      ////////////////\n\n      // 禁止条件表达式中出现赋值操作符\n      \"no-cond-assign\": 2,\n      // 禁用 console\n      \"no-console\": 0,\n      // 禁止在条件中使用常量表达式\n      // if (false) {\n      // doSomethingUnfinished();\n      // } //cuowu\n      \"no-constant-condition\": 2,\n      // 禁止在正则表达式中使用控制字符 ：new RegExp(\"\\x1f\")\n      \"no-control-regex\": 2,\n      // 数组和对象键值对最后一个逗号， never参数：不能带末尾的逗号, always参数：必须带末尾的逗号，\n      // always-multiline：多行模式必须带逗号，单行模式不能带逗号\n      \"comma-dangle\": [1, \"never\"],\n      // 禁用 debugger\n      \"no-debugger\": 2,\n      // 禁止 function 定义中出现重名参数\n      \"no-dupe-args\": 2,\n      // 禁止对象字面量中出现重复的 key\n      \"no-dupe-keys\": 2,\n      // 禁止重复的 case 标签\n      \"no-duplicate-case\": 2,\n      // 禁止空语句块\n      \"no-empty\": 2,\n      // 禁止在正则表达式中使用空字符集 (/^abc[]/)\n      \"no-empty-character-class\": 2,\n      // 禁止对 catch 子句的参数重新赋值\n      \"no-ex-assign\": 2,\n      // 禁止不必要的布尔转换\n      \"no-extra-boolean-cast\": 2,\n      // 禁止不必要的括号 //(a * b) + c;//报错\n      \"no-extra-parens\": 0,\n      // 禁止不必要的分号\n      \"no-extra-semi\": 2,\n      // 禁止对 function 声明重新赋值\n      \"no-func-assign\": 2,\n      // 禁止在嵌套的块中出现 function 或 var 声明\n      \"no-inner-declarations\": [2, \"functions\"],\n      // 禁止 RegExp 构造函数中无效的正则表达式字符串\n      \"no-invalid-regexp\": 2,\n      // 禁止在字符串和注释之外不规则的空白\n      \"no-irregular-whitespace\": 2,\n      // 禁止在 in 表达式中出现否定的左操作数\n      \"no-negated-in-lhs\": 2,\n      // 禁止把全局对象 (Math 和 JSON) 作为函数调用 错误：var math = Math();\n      \"no-obj-calls\": 2,\n      // 禁止直接使用 Object.prototypes 的内置属性\n      \"no-prototype-builtins\": 0,\n      // 禁止正则表达式字面量中出现多个空格\n      \"no-regex-spaces\": 2,\n      // 禁用稀疏数组\n      \"no-sparse-arrays\": 2,\n      // 禁止出现令人困惑的多行表达式\n      \"no-unexpected-multiline\": 2,\n      // 禁止在return、throw、continue 和 break语句之后出现不可达代码\n      \"no-unreachable\": 2,\n      // 要求使用 isNaN() 检查 NaN\n      \"use-isnan\": 2,\n      // 强制使用有效的 JSDoc 注释\n      \"valid-jsdoc\": 0,\n      // 强制 typeof 表达式与有效的字符串进行比较\n      // typeof foo === \"undefimed\" 错误\n      \"valid-typeof\": 2,\n\n\n      //////////////\n      // 最佳实践 //\n      //////////////\n\n      // 定义对象的set存取器属性时，强制定义get\n      \"accessor-pairs\": 2,\n      // 强制数组方法的回调函数中有 return 语句\n      \"array-callback-return\": 0,\n      // 强制把变量的使用限制在其定义的作用域范围内\n      \"block-scoped-var\": 0,\n      // 限制圈复杂度，也就是类似if else能连续接多少个\n      \"complexity\": [2, 9],\n      // 要求 return 语句要么总是指定返回的值，要么不指定\n      \"consistent-return\": 0,\n      // 强制所有控制语句使用一致的括号风格\n      \"curly\": [2, \"all\"],\n      // switch 语句强制 default 分支，也可添加 // no default 注释取消此次警告\n      \"default-case\": 2,\n      // 强制object.key 中 . 的位置，参数:\n      // property，'.'号应与属性在同一行\n      // object, '.' 号应与对象名在同一行\n      \"dot-location\": [2, \"property\"],\n      // 强制使用.号取属性\n      // 参数： allowKeywords：true 使用保留字做属性名时，只能使用.方式取属性\n      // false 使用保留字做属性名时, 只能使用[]方式取属性 e.g [2, {\"allowKeywords\": false}]\n      // allowPattern: 当属性名匹配提供的正则表达式时，允许使用[]方式取值,否则只能用.号取值 e.g [2, {\"allowPattern\": \"^[a-z]+(_[a-z]+)+$\"}]\n      \"dot-notation\": [2, {\n          \"allowKeywords\": false\n      }],\n      // 使用 === 替代 == allow-null允许null和undefined==\n      \"eqeqeq\": [0, \"allow-null\"],\n      // 要求 for-in 循环中有一个 if 语句\n      \"guard-for-in\": 2,\n      // 禁用 alert、confirm 和 prompt\n      \"no-alert\": 0,\n      // 禁用 arguments.caller 或 arguments.callee\n      \"no-caller\": 2,\n      // 不允许在 case 子句中使用词法声明\n      \"no-case-declarations\": 2,\n      // 禁止除法操作符显式的出现在正则表达式开始的位置\n      \"no-div-regex\": 2,\n      // 禁止 if 语句中有 return 之后有 else\n      \"no-else-return\": 0,\n      // 禁止出现空函数.如果一个函数包含了一条注释，它将不会被认为有问题。\n      \"no-empty-function\": 2,\n      // 禁止使用空解构模式no-empty-pattern\n      \"no-empty-pattern\": 2,\n      // 禁止在没有类型检查操作符的情况下与 null 进行比较\n      \"no-eq-null\": 1,\n      // 禁用 eval()\n      \"no-eval\": 2,\n      // 禁止扩展原生类型\n      \"no-extend-native\": 2,\n      // 禁止不必要的 .bind() 调用\n      \"no-extra-bind\": 2,\n      // 禁用不必要的标签\n      \"no-extra-label:\": 0,\n      // 禁止 case 语句落空\n      \"no-fallthrough\": 2,\n      // 禁止数字字面量中使用前导和末尾小数点\n      \"no-floating-decimal\": 2,\n      // 禁止使用短符号进行类型转换(!!fOO)\n      \"no-implicit-coercion\": 0,\n      // 禁止在全局范围内使用 var 和命名的 function 声明\n      \"no-implicit-globals\": 1,\n      // 禁止使用类似 eval() 的方法\n      \"no-implied-eval\": 2,\n      // 禁止 this 关键字出现在类和类对象之外\n      \"no-invalid-this\": 0,\n      // 禁用 __iterator__ 属性\n      \"no-iterator\": 2,\n      // 禁用标签语句\n      \"no-labels\": 2,\n      // 禁用不必要的嵌套块\n      \"no-lone-blocks\": 2,\n      // 禁止在循环中出现 function 声明和表达式\n      \"no-loop-func\": 1,\n      // 禁用魔术数字(3.14什么的用常量代替)\n      \"no-magic-numbers\": [1, {\n          \"ignore\": [0, -1, 1]\n      }],\n      // 禁止使用多个空格\n      \"no-multi-spaces\": 2,\n      // 禁止使用多行字符串，在 JavaScript 中，可以在新行之前使用斜线创建多行字符串\n      \"no-multi-str\": 2,\n      // 禁止对原生对象赋值\n      \"no-native-reassign\": 2,\n      // 禁止在非赋值或条件语句中使用 new 操作符\n      \"no-new\": 2,\n      // 禁止对 Function 对象使用 new 操作符\n      \"no-new-func\": 0,\n      // 禁止对 String，Number 和 Boolean 使用 new 操作符\n      \"no-new-wrappers\": 2,\n      // 禁用八进制字面量\n      \"no-octal\": 2,\n      // 禁止在字符串中使用八进制转义序列\n      \"no-octal-escape\": 2,\n      // 不允许对 function 的参数进行重新赋值\n      \"no-param-reassign\": 0,\n      // 禁用 __proto__ 属性\n      \"no-proto\": 2,\n      // 禁止使用 var 多次声明同一变量\n      \"no-redeclare\": 2,\n      // 禁用指定的通过 require 加载的模块\n      \"no-return-assign\": 0,\n      // 禁止使用 javascript: url\n      \"no-script-url\": 0,\n      // 禁止自我赋值\n      \"no-self-assign\": 2,\n      // 禁止自身比较\n      \"no-self-compare\": 2,\n      // 禁用逗号操作符\n      \"no-sequences\": 2,\n      // 禁止抛出非异常字面量\n      \"no-throw-literal\": 2,\n      // 禁用一成不变的循环条件\n      \"no-unmodified-loop-condition\": 2,\n      // 禁止出现未使用过的表达式\n      \"no-unused-expressions\": 0,\n      // 禁用未使用过的标签\n      \"no-unused-labels\": 2,\n      // 禁止不必要的 .call() 和 .apply()\n      \"no-useless-call\": 2,\n      // 禁止不必要的字符串字面量或模板字面量的连接\n      \"no-useless-concat\": 0,\n      // 禁用不必要的转义字符\n      \"no-useless-escape\": 0,\n      // 禁用 void 操作符\n      \"no-void\": 0,\n      // 禁止在注释中使用特定的警告术语\n      \"no-warning-comments\": 0,\n      // 禁用 with 语句\n      \"no-with\": 2,\n      // 强制在parseInt()使用基数参数\n      \"radix\": 2,\n      // 要求所有的 var 声明出现在它们所在的作用域顶部\n      \"vars-on-top\": 0,\n      // 要求 IIFE 使用括号括起来\n      \"wrap-iife\": [2, \"any\"],\n      // 要求或禁止 “Yoda” 条件\n      \"yoda\": [2, \"never\"],\n      // 要求或禁止使用严格模式指令\n      \"strict\": 0,\n\n\n      //////////////\n      // 变量声明 //\n      //////////////\n\n      // 要求或禁止 var 声明中的初始化(初值)\n      \"init-declarations\": 0,\n      // 不允许 catch 子句的参数与外层作用域中的变量同名\n      \"no-catch-shadow\": 0,\n      // 禁止删除变量\n      \"no-delete-var\": 2,\n      // 不允许标签与变量同名\n      \"no-label-var\": 2,\n      // 禁用特定的全局变量\n      \"no-restricted-globals\": 0,\n      // 禁止 var 声明 与外层作用域的变量同名\n      \"no-shadow\": 0,\n      // 禁止覆盖受限制的标识符\n      \"no-shadow-restricted-names\": 2,\n      // 禁用未声明的变量，除非它们在 /*global */ 注释中被提到\n      \"no-undef\": 2,\n      // 禁止将变量初始化为 undefined\n      \"no-undef-init\": 2,\n      // 禁止将 undefined 作为标识符\n      \"no-undefined\": 0,\n      // 禁止出现未使用过的变量\n      \"no-unused-vars\": [2, {\n          \"vars\": \"all\",\n          \"args\": \"none\"\n      }],\n      // 不允许在变量定义之前使用它们\n      \"no-use-before-define\": 0,\n\n      //////////////////////////\n      // Node.js and CommonJS //\n      //////////////////////////\n\n      // require return statements after callbacks\n      \"callback-return\": 0,\n      // 要求 require() 出现在顶层模块作用域中\n      \"global-require\": 1,\n      // 要求回调函数中有容错处理\n      \"handle-callback-err\": [2, \"^(err|error)$\"],\n      // 禁止混合常规 var 声明和 require 调用\n      \"no-mixed-requires\": 0,\n      // 禁止调用 require 时使用 new 操作符\n      \"no-new-require\": 2,\n      // 禁止对 __dirname 和 __filename进行字符串连接\n      \"no-path-concat\": 0,\n      // 禁用 process.env\n      \"no-process-env\": 0,\n      // 禁用 process.exit()\n      \"no-process-exit\": 0,\n      // 禁用同步方法\n      \"no-sync\": 0,\n\n      //////////////\n      // 风格指南 //\n      //////////////\n\n      // 指定数组的元素之间要以空格隔开(, 后面)， never参数：[ 之前和 ] 之后不能带空格，always参数：[ 之前和 ] 之后必须带空格\n      \"array-bracket-spacing\": [2, \"never\"],\n      // 禁止或强制在单行代码块中使用空格(禁用)\n      \"block-spacing\": [1, \"never\"],\n      //强制使用一致的缩进 第二个参数为 \"tab\" 时，会使用tab，\n      // if while function 后面的{必须与if在同一行，java风格。\n      \"brace-style\": [2, \"1tbs\", {\n          \"allowSingleLine\": true\n      }],\n      // 双峰驼命名格式\n      \"camelcase\": 2,\n      // 控制逗号前后的空格\n      \"comma-spacing\": [2, {\n          \"before\": false,\n          \"after\": true\n      }],\n      // 控制逗号在行尾出现还是在行首出现 (默认行尾)\n      // http://eslint.org/docs/rules/comma-style\n      \"comma-style\": [2, \"last\"],\n      //\"SwitchCase\" (默认：0) 强制 switch 语句中的 case 子句的缩进水平\n      // 以方括号取对象属性时，[ 后面和 ] 前面是否需要空格, 可选参数 never, always\n      \"computed-property-spacing\": [2, \"never\"],\n      // 用于指统一在回调函数中指向this的变量名，箭头函数中的this已经可以指向外层调用者，应该没卵用了\n      // e.g [0,\"that\"] 指定只能 var that = this. that不能指向其他任何值，this也不能赋值给that以外的其他值\n      \"consistent-this\": [1, \"that\"],\n      // 强制使用命名的 function 表达式\n      \"func-names\": 0,\n      // 文件末尾强制换行\n      \"eol-last\": 2,\n      \"indent\": [2, 2, {\n          \"SwitchCase\": 1\n      }],\n      // 强制在对象字面量的属性中键和值之间使用一致的间距\n      \"key-spacing\": [2, {\n          \"beforeColon\": false,\n          \"afterColon\": true\n      }],\n      // 强制使用一致的换行风格\n      \"linebreak-style\": [1, \"unix\"],\n      // 要求在注释周围有空行 ( 要求在块级注释之前有一空行)\n      \"lines-around-comment\": [1, {\n          \"beforeBlockComment\": true\n      }],\n      // 强制一致地使用函数声明或函数表达式，方法定义风格，参数：\n      // declaration: 强制使用方法声明的方式，function f(){} e.g [2, \"declaration\"]\n      // expression：强制使用方法表达式的方式，var f = function() {} e.g [2, \"expression\"]\n      // allowArrowFunctions: declaration风格中允许箭头函数。 e.g [2, \"declaration\", { \"allowArrowFunctions\": true }]\n      \"func-style\": 0,\n      // 强制回调函数最大嵌套深度 5层\n      \"max-nested-callbacks\": [1, 5],\n      // 禁止使用指定的标识符\n      \"id-blacklist\": 0,\n      // 强制标识符的最新和最大长度\n      \"id-length\": 0,\n      // 要求标识符匹配一个指定的正则表达式\n      \"id-match\": 0,\n      // 强制在 JSX 属性中一致地使用双引号或单引号\n      \"jsx-quotes\": 0,\n      // 强制在关键字前后使用一致的空格 (前后腰需要)\n      \"keyword-spacing\": 2,\n      // 强制一行的最大长度\n      \"max-len\": [1, 200],\n      // 强制最大行数\n      \"max-lines\": 0,\n      // 强制 function 定义中最多允许的参数数量\n      \"max-params\": [1, 7],\n      // 强制 function 块最多允许的的语句数量\n      \"max-statements\": [1, 200],\n      // 强制每一行中所允许的最大语句数量\n      \"max-statements-per-line\": 0,\n      // 要求构造函数首字母大写 （要求调用 new 操作符时有首字母大小的函数，允许调用首字母大写的函数时没有 new 操作符。）\n      \"new-cap\": [2, {\n          \"newIsCap\": true,\n          \"capIsNew\": false\n      }],\n      // 要求调用无参构造函数时有圆括号\n      \"new-parens\": 2,\n      // 要求或禁止 var 声明语句后有一行空行\n      \"newline-after-var\": 0,\n      // 禁止使用 Array 构造函数\n      \"no-array-constructor\": 2,\n      // 禁用按位运算符\n      \"no-bitwise\": 0,\n      // 要求 return 语句之前有一空行\n      \"newline-before-return\": 0,\n      // 要求方法链中每个调用都有一个换行符\n      \"newline-per-chained-call\": 1,\n      // 禁用 continue 语句\n      \"no-continue\": 0,\n      // 禁止在代码行后使用内联注释\n      \"no-inline-comments\": 0,\n      // 禁止 if 作为唯一的语句出现在 else 语句中\n      \"no-lonely-if\": 0,\n      // 禁止混合使用不同的操作符\n      \"no-mixed-operators\": 0,\n      // 不允许空格和 tab 混合缩进\n      \"no-mixed-spaces-and-tabs\": 2,\n      // 不允许多个空行\n      \"no-multiple-empty-lines\": [2, {\n          \"max\": 2\n      }],\n      // 不允许否定的表达式\n      \"no-negated-condition\": 0,\n      // 不允许使用嵌套的三元表达式\n      \"no-nested-ternary\": 0,\n      // 禁止使用 Object 的构造函数\n      \"no-new-object\": 2,\n      // 禁止使用一元操作符 ++ 和 --\n      \"no-plusplus\": 0,\n      // 禁止使用特定的语法\n      \"no-restricted-syntax\": 0,\n      // 禁止 function 标识符和括号之间出现空格\n      \"no-spaced-func\": 2,\n      // 不允许使用三元操作符\n      \"no-ternary\": 0,\n      // 禁用行尾空格\n      \"no-trailing-spaces\": 2,\n      // 禁止标识符中有悬空下划线_bar\n      \"no-underscore-dangle\": 0,\n      // 禁止可以在有更简单的可替代的表达式时使用三元操作符\n      \"no-unneeded-ternary\": 2,\n      // 禁止属性前有空白\n      \"no-whitespace-before-property\": 0,\n      // 强制花括号内换行符的一致性\n      \"object-curly-newline\": 0,\n      // 强制在花括号中使用一致的空格\n      \"object-curly-spacing\": 0,\n      // 强制将对象的属性放在不同的行上\n      \"object-property-newline\": 0,\n      // 强制函数中的变量要么一起声明要么分开声明\n      \"one-var\": [2, {\n          \"initialized\": \"never\"\n      }],\n      // 要求或禁止在 var 声明周围换行\n      \"one-var-declaration-per-line\": 0,\n      // 要求或禁止在可能的情况下要求使用简化的赋值操作符\n      \"operator-assignment\": 0,\n      // 强制操作符使用一致的换行符\n      \"operator-linebreak\": [2, \"after\", {\n          \"overrides\": {\n              \"?\": \"before\",\n              \":\": \"before\"\n          }\n      }],\n      // 要求或禁止块内填充\n      \"padded-blocks\": 0,\n      // 要求对象字面量属性名称用引号括起来\n      \"quote-props\": 0,\n      // 强制使用一致的反勾号、双引号或单引号\n    //   \"quotes\": [2, \"single\",\"double\", \"avoid-escape\"],\n      // 要求使用 JSDoc 注释\n      \"require-jsdoc\": 0,\n      // 要求或禁止使用分号而不是 ASI（这个才是控制行尾部分号的，）\n      \"semi\": [0, \"always\"],\n      // 强制分号之前和之后使用一致的空格\n      \"semi-spacing\": 0,\n      // 要求同一个声明块中的变量按顺序排列\n      \"sort-vars\": 0,\n      // 强制在块之前使用一致的空格\n      \"space-before-blocks\": [2, \"always\"],\n      // 强制在 function的左括号之前使用一致的空格\n      \"space-before-function-paren\": [0, \"always\"],\n      // 强制在圆括号内使用一致的空格\n      \"space-in-parens\": [2, \"never\"],\n      // 要求操作符周围有空格\n      \"space-infix-ops\": 2,\n      // 强制在一元操作符前后使用一致的空格\n      \"space-unary-ops\": [2, {\n          \"words\": true,\n          \"nonwords\": false\n      }],\n      // 强制在注释中 // 或 /* 使用一致的空格\n      \"spaced-comment\": [2, \"always\", {\n          \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n      }],\n      // 要求或禁止 Unicode BOM\n      \"unicode-bom\": 0,\n      // 要求正则表达式被括号括起来\n      \"wrap-regex\": 0,\n\n      //////////////\n      // ES6.相关 //\n      //////////////\n\n      // 要求箭头函数体使用大括号\n      \"arrow-body-style\": 2,\n      // 要求箭头函数的参数使用圆括号\n      \"arrow-parens\": 0,\n      \"arrow-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 强制在子类构造函数中用super()调用父类构造函数，TypeScrip的编译器也会提示\n      \"constructor-super\": 0,\n      // 强制 generator 函数中 * 号周围使用一致的空格\n      \"generator-star-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 禁止修改类声明的变量\n      \"no-class-assign\": 2,\n      // 不允许箭头功能，在那里他们可以混淆的比较\n      \"no-confusing-arrow\": 0,\n      // 禁止修改 const 声明的变量\n      \"no-const-assign\": 2,\n      // 禁止类成员中出现重复的名称\n      \"no-dupe-class-members\": 2,\n      // 不允许复制模块的进口\n      \"no-duplicate-imports\": 0,\n      // 禁止 Symbol 的构造函数\n      \"no-new-symbol\": 2,\n      // 允许指定模块加载时的进口\n      \"no-restricted-imports\": 0,\n      // 禁止在构造函数中，在调用 super() 之前使用 this 或 super\n      \"no-this-before-super\": 2,\n      // 禁止不必要的计算性能键对象的文字\n      \"no-useless-computed-key\": 0,\n      // 要求使用 let 或 const 而不是 var\n      \"no-var\": 0,\n      // 要求或禁止对象字面量中方法和属性使用简写语法\n      \"object-shorthand\": 0,\n      // 要求使用箭头函数作为回调\n      \"prefer-arrow-callback\": 0,\n      // 要求使用 const 声明那些声明后不再被修改的变量\n      \"prefer-const\": 0,\n      // 要求在合适的地方使用 Reflect 方法\n      \"prefer-reflect\": 0,\n      // 要求使用扩展运算符而非 .apply()\n      \"prefer-spread\": 0,\n      // 要求使用模板字面量而非字符串连接\n      \"prefer-template\": 0,\n      // Suggest using the rest parameters instead of arguments\n      \"prefer-rest-params\": 0,\n      // 要求generator 函数内有 yield\n      \"require-yield\": 0,\n      // enforce spacing between rest and spread operators and their expressions\n      \"rest-spread-spacing\": 0,\n      // 强制模块内的 import 排序\n      \"sort-imports\": 0,\n      // 要求或禁止模板字符串中的嵌入表达式周围空格的使用\n      \"template-curly-spacing\": 1,\n      // 强制在 yield* 表达式中 * 周围使用空格\n      \"yield-star-spacing\": 2\n  }\n}\n"
  },
  {
    "path": "packages/url-loader/.gitattributes",
    "content": "package-lock.json -diff\n* text=auto\nbin/* eol=lf\n"
  },
  {
    "path": "packages/url-loader/.github/CODEOWNERS",
    "content": "# These are the default owners for everything in\n# webpack-contrib\n@webpack-contrib/org-maintainers\n\n# Add repository specific users / groups\n# below here for libs that are not maintained by the org.\n"
  },
  {
    "path": "packages/url-loader/.github/CONTRIBUTING.md",
    "content": "## Contributing in @webpack-contrib\n\nWe'd always love contributions to further improve the webpack / webpack-contrib ecosystem! \nHere are the guidelines we'd like you to follow:\n\n* [Questions and Problems](#question)\n* [Issues and Bugs](#issue)\n* [Feature Requests](#feature)\n* [Pull Request Submission Guidelines](#submit-pr)\n* [Commit Message Conventions](#commit)\n\n### <a name=\"question\"></a> Got a Question or Problem?\n\nPlease submit support requests and questions to StackOverflow using the tag [[webpack]](http://stackoverflow.com/tags/webpack). \nStackOverflow is better suited for this kind of support though you may also inquire in [Webpack Gitter](https://gitter.im/webpack/webpack). \nThe issue tracker is for bug reports and feature discussions.\n\n### <a name=\"issue\"></a> Found an Issue or Bug?\n\nBefore you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion might inform you of workarounds readily available.\n\nWe want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs, we ask that you to provide a minimal reproduction scenario (github repo or failing test case). Having a live, reproducible scenario gives us a wealth of important information without going back & forth to you with additional questions like:\n\n- version of Webpack used\n- version of the loader / plugin you are creating a bug report for\n- the use-case that fails\n\nA minimal reproduce scenario allows us to quickly confirm a bug (or point out config problems) as well as confirm that we are fixing the right problem.\n\nWe will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more bugs. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it.\n\nUnfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced.\n\n### <a name=\"feature\"></a> Feature Requests?\n\nYou can *request* a new feature by creating an issue on Github. \n\nIf you would like to *implement* a new feature, please submit an issue with a proposal for your work `first`, to be sure that particular makes sense for the project.\n\n### <a name=\"submit-pr\"></a> Pull Request Submission Guidelines\n\nBefore you submit your Pull Request (PR) consider the following guidelines:\n\n- Search Github for an open or closed PR that relates to your submission. You don't want to duplicate effort.\n- Commit your changes using a descriptive commit message that follows our [commit message conventions](#commit). Adherence to these conventions is necessary because release notes are automatically generated from these messages.\n- Fill out our `Pull Request Template`. Your pull request will not be considered if it is ignored.\n- Please sign the `Contributor License Agreement (CLA)` when a pull request is opened. We cannot accept your pull request without this. Make sure you sign with the primary email address associated with your local / github account.\n\n### <a name=\"commit\"></a> Webpack Contrib Commit Conventions\n\nEach commit message consists of a **header**, a **body** and a **footer**.  The header has a special\nformat that includes a **type**, a **scope** and a **subject**:\n\n```\n<type>(<scope>): <subject>\n<BLANK LINE>\n<body>\n<BLANK LINE>\n<footer>\n```\n\nThe **header** is mandatory and the **scope** of the header is optional.\n\nAny line of the commit message cannot be longer 100 characters! This allows the message to be easier\nto read on GitHub as well as in various git tools.\n\nThe footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.\n\nExamples: \n```\ndocs(readme): update install instructions\n```\n```\nfix: refer to the `entrypoint` instead of the first `module`\n```\n\n#### Revert\nIf the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. \nIn the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.\n\n#### Type\nMust be one of the following:\n\n* **build**: Changes that affect the build system or external dependencies (example scopes: babel, npm)\n* **chore**: Changes that fall outside of build / docs that do not effect source code (example scopes: package, defaults)\n* **ci**: Changes to our CI configuration files and scripts (example scopes: circleci, travis)\n* **docs**: Documentation only changes (example scopes: readme, changelog)\n* **feat**: A new feature\n* **fix**: A bug fix\n* **perf**: A code change that improves performance\n* **refactor**: A code change that neither fixes a bug nor adds a feature\n* **revert**: Used when reverting a committed change\n* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons)\n* **test**: Addition of or updates to Jest tests\n\n#### Scope\nThe scope is subjective & depends on the `type` see above. A good example would be a change to a particular class / module.\n\n#### Subject\nThe subject contains a succinct description of the change:\n\n* use the imperative, present tense: \"change\" not \"changed\" nor \"changes\"\n* don't capitalize the first letter\n* no dot (.) at the end\n\n#### Body\nJust as in the **subject**, use the imperative, present tense: \"change\" not \"changed\" nor \"changes\".\nThe body should include the motivation for the change and contrast this with previous behavior.\n\n#### Footer\nThe footer should contain any information about **Breaking Changes** and is also the place to\nreference GitHub issues that this commit **Closes**.\n\n**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.\n\nExample\n\n```\nBREAKING CHANGE: Updates to `Chunk.mapModules`. \n\nThis release is not backwards compatible with `Webpack 2.x` due to breaking changes in webpack/webpack#4764\nMigration: see webpack/webpack#5225\n\n```"
  },
  {
    "path": "packages/url-loader/.github/ISSUE_TEMPLATE.md",
    "content": "<!--\n1. Check the version of package you are using. If it's not the newest version, update and try again (see changelog while updating!).\n2. If the issue is still there, write a minimal project showing the problem and expected output.\n3. Link to the project and mention Node version and OS in your report.\n\n**IMPORTANT! You should use [Stack Overflow](https://stackoverflow.com/) for support related questions.**\n-->\n"
  },
  {
    "path": "packages/url-loader/.github/PULL_REQUEST_TEMPLATE.md",
    "content": "<!--\n  HOLY CRAP a Pull Request. We ❤️ those!\n\n  If you remove or skip this template, you'll make the 🐼 sad and the mighty god\n  of Github will appear and pile-drive the close button from a great height\n  while making animal noises.\n\n  Please place an x (no spaces!) in all [ ] that apply\n-->\n\nThis PR contains a:\n\n- [ ] **bugfix**\n- [ ] new **feature**\n- [ ] **code refactor**\n- [ ] **test update** <!-- if bug or feature is checked, this should be too -->\n- [ ] **typo fix**\n- [ ] **metadata update**\n\n### Motivation / Use-Case\n\n<!--\n  Please explain the motivation or use-case for your change.\n  What existing problem does the PR solve?\n  If this PR addresses an issue, please link to the issue.\n-->\n\n### Breaking Changes\n\n<!--\n  If this PR introduces a breaking change, please describe the impact and a\n  migration path for existing applications.\n-->\n\n### Additional Info"
  },
  {
    "path": "packages/url-loader/.gitignore",
    "content": "node_modules\nlogs\n*.log\nnpm-debug.log*\n.eslintcache\n/coverage\n/dist\n/local\n/reports\n.DS_Store\nThumbs.db\n.idea\n.vscode\n*.sublime-project\n*.sublime-workspace"
  },
  {
    "path": "packages/url-loader/.prettierrc",
    "content": "{\n  \"singleQuote\": true,\n  \"trailingComma\": \"es5\",\n  \"arrowParens\": \"always\"\n}\n"
  },
  {
    "path": "packages/url-loader/CHANGELOG.md",
    "content": "# Change Log\n\nAll notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.\n\n<a name=\"1.0.6\"></a>\n## 1.0.6 (2018-12-06)\n\n\n\n<a name=\"1.0.1\"></a>\n## [1.0.1](https://github.com/webpack-contrib/url-loader/compare/v1.0.0...v1.0.1) (2018-03-03)\n\n\n### Bug Fixes\n\n* **index:** revert to CJS exports (`module.exports`) ([#116](https://github.com/webpack-contrib/url-loader/issues/116)) ([7b60cc2](https://github.com/webpack-contrib/url-loader/commit/7b60cc2))\n\n\n\n<a name=\"1.0.0\"></a>\n# [1.0.0](https://github.com/webpack-contrib/url-loader/compare/v1.0.0-beta.0...v1.0.0) (2018-03-03)\n\n\n### Bug Fixes\n\n* **index:** use `Buffer.from` instead of deprecated `new Buffer` ([#113](https://github.com/webpack-contrib/url-loader/issues/113)) ([457618b](https://github.com/webpack-contrib/url-loader/commit/457618b))\n\n\n\n<a name=\"1.0.0-beta.0\"></a>\n# [1.0.0-beta.0](https://github.com/webpack-contrib/url-loader/compare/v0.6.2...v1.0.0-beta.0) (2017-12-17)\n\n\n### Code Refactoring\n\n* apply `webpack-defaults` ([#102](https://github.com/webpack-contrib/url-loader/issues/102)) ([073b588](https://github.com/webpack-contrib/url-loader/commit/073b588))\n\n\n### BREAKING CHANGES\n\n* Sets `engines` to `\"node\": \">= 6.9.0 || >= 8.9.0\"`\n* Drops support for `webpack =< v2.0.0`\n\n\n\n<a name=\"0.6.2\"></a>\n## [0.6.2](https://github.com/webpack-contrib/url-loader/compare/v0.6.1...v0.6.2) (2017-10-04)\n\n\n### Bug Fixes\n\n* allow use `limit` as string ([#96](https://github.com/webpack-contrib/url-loader/issues/96)) ([b31684d](https://github.com/webpack-contrib/url-loader/commit/b31684d))\n\n\n\n<a name=\"0.6.1\"></a>\n## [0.6.1](https://github.com/webpack-contrib/url-loader/compare/v0.6.0...v0.6.1) (2017-10-04)\n\n\n### Bug Fixes\n\n* **schema:** allow `additionalProperties` ([#94](https://github.com/webpack-contrib/url-loader/issues/94)) ([2b01ea2](https://github.com/webpack-contrib/url-loader/commit/2b01ea2))\n\n\n\n<a name=\"0.6.0\"></a>\n# [0.6.0](https://github.com/webpack-contrib/url-loader/compare/v0.5.9...v0.6.0) (2017-10-03)\n\n\n### Features\n\n* **index:** add options validation (`schema-utils`) ([#78](https://github.com/webpack-contrib/url-loader/issues/78)) ([ced5990](https://github.com/webpack-contrib/url-loader/commit/ced5990))\n* add `fallback` option ([#88](https://github.com/webpack-contrib/url-loader/issues/88)) ([636ebed](https://github.com/webpack-contrib/url-loader/commit/636ebed))\n\n### Security\n\n* Updates Mime pacakge due to Regex DOS security vulnerability ([#87](https://github.com/webpack-contrib/url-loader/issues/87)) ([d19ee2d](https://github.com/webpack-contrib/url-loader/commit/d19ee2d))\n\n - Reference issue https://nodesecurity.io/advisories/535\n\n\n<a name=\"0.5.9\"></a>\n## [0.5.9](https://github.com/webpack/url-loader/compare/v0.5.8...v0.5.9) (2017-06-12)\n\n\n### Bug Fixes\n\n* `String` not being `base64` encoded ([#67](https://github.com/webpack/url-loader/issues/67)) ([e9496b9](https://github.com/webpack/url-loader/commit/e9496b9))\n* don't default to `0` (`options.limit`) ([#74](https://github.com/webpack/url-loader/issues/74)) ([020c2a8](https://github.com/webpack/url-loader/commit/020c2a8))\n\n\n\n# Change Log\n\nAll notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.\n"
  },
  {
    "path": "packages/url-loader/LICENSE",
    "content": "Copyright JS Foundation and other contributors\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "packages/url-loader/codecov.yml",
    "content": "codecov:\n  branch: master\ncoverage:\n  precision: 2\n  round: down\n  range: 70...100\n  status:\n    project: 'no'\n    patch: 'yes'\ncomment: 'off'\n"
  },
  {
    "path": "packages/url-loader/commitlint.config.js",
    "content": "/* eslint-disable */\nconst Configuration = {\n  extends: ['@commitlint/config-conventional'],\n\n  rules: {\n    'body-leading-blank': [1, 'always'],\n    'footer-leading-blank': [1, 'always'],\n    'header-max-length': [2, 'always', 72],\n    'scope-case': [2, 'always', 'lower-case'],\n    'subject-case': [2, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']],\n    'subject-empty': [2, 'never'],\n    'subject-full-stop': [2, 'never', '.'],\n    'type-case': [2, 'always', 'lower-case'],\n    'type-empty': [2, 'never'],\n    'type-enum': [2, 'always', [\n        'build',\n        'chore',\n        'ci',\n        'docs',\n        'feat',\n        'fix',\n        'perf',\n        'refactor',\n        'revert',\n        'style',\n        'test',\n      ],\n    ],\n  },\n};\n\nmodule.exports = Configuration;"
  },
  {
    "path": "packages/url-loader/package.json",
    "content": "{\n  \"name\": \"chameleon-url-loader\",\n  \"version\": \"1.0.8\",\n  \"description\": \"A loader for webpack which transforms files into base64 URIs\",\n  \"license\": \"Apache\",\n  \"main\": \"dist/cjs.js\",\n  \"engines\": {\n    \"node\": \">= 6.9.0 < 7.0.0 || >= 8.9.0\"\n  },\n  \"scripts\": {\n    \"start\": \"npm run build -- -w\",\n    \"build\": \"cross-env NODE_ENV=production babel src -d dist --ignore 'src/**/*.test.js' --copy-files\",\n    \"clean\": \"del-cli dist\",\n    \"prebuild\": \"npm run clean\",\n    \"release\": \"standard-version\",\n    \"release:ci\": \"conventional-github-releaser -p angular\",\n    \"release:validate\": \"commitlint --from=$(git describe --tags --abbrev=0) --to=$(git rev-parse HEAD)\",\n    \"security\": \"nsp check\",\n    \"test\": \"echo \\\"Error: no test specified\\\"\",\n    \"test:watch\": \"jest --watch\",\n    \"test:coverage\": \"jest --collectCoverageFrom='src/**/*.js' --coverage\",\n    \"defaults\": \"webpack-defaults\"\n  },\n  \"files\": [\n    \"dist\"\n  ],\n  \"dependencies\": {\n    \"@webpack-contrib/schema-utils\": \"^1.0.0-beta.0\",\n    \"loader-utils\": \"^1.1.0\",\n    \"mime\": \"^2.0.3\"\n  },\n  \"devDependencies\": {\n    \"@commitlint/cli\": \"^5.2.5\",\n    \"@commitlint/config-angular\": \"^5.1.1\",\n    \"@commitlint/config-conventional\": \"^7.0.1\",\n    \"@webpack-contrib/defaults\": \"^2.4.0\",\n    \"@webpack-contrib/eslint-config-webpack\": \"^2.0.2\",\n    \"@webpack-contrib/test-utils\": \"^0.1.2\",\n    \"babel-cli\": \"^6.26.0\",\n    \"babel-jest\": \"^22.0.3\",\n    \"babel-plugin-transform-object-rest-spread\": \"^6.26.0\",\n    \"babel-polyfill\": \"^6.26.0\",\n    \"babel-preset-env\": \"^1.6.1\",\n    \"conventional-github-releaser\": \"^2.0.0\",\n    \"cross-env\": \"^5.1.1\",\n    \"del\": \"^3.0.0\",\n    \"del-cli\": \"^1.1.0\",\n    \"eslint\": \"^4.13.1\",\n    \"eslint-plugin-import\": \"^2.8.0\",\n    \"eslint-plugin-prettier\": \"^2.4.0\",\n    \"file-loader\": \"^1.1.6\",\n    \"husky\": \"^0.14.3\",\n    \"jest\": \"^22.0.3\",\n    \"jest-serializer-path\": \"^0.1.15\",\n    \"lint-staged\": \"^6.0.0\",\n    \"memory-fs\": \"^0.4.1\",\n    \"nsp\": \"^3.1.0\",\n    \"pre-commit\": \"^1.2.2\",\n    \"prettier\": \"^1.9.2\",\n    \"standard-version\": \"^4.2.0\",\n    \"webpack\": \"^4.0.0\"\n  },\n  \"keywords\": [\n    \"webpack\"\n  ],\n  \"jest\": {\n    \"snapshotSerializers\": [\n      \"jest-serializer-path\"\n    ],\n    \"testEnvironment\": \"node\"\n  },\n  \"lint-staged\": {\n    \"*.js\": [\n      \"eslint --fix\",\n      \"git add\"\n    ]\n  },\n  \"author\": \"Chameleon-Team\",\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"gitHead\": \"5ddcde4330774710f7646559446e008f7785ce00\"\n}"
  },
  {
    "path": "packages/url-loader/src/cjs.js",
    "content": "const loader = require('./index');\n\nmodule.exports = loader[\"default\"];\nmodule.exports.raw = loader.raw;\n"
  },
  {
    "path": "packages/url-loader/src/index.js",
    "content": "/* eslint-disable\n  global-require,\n  no-param-reassign,\n  prefer-destructuring,\n  import/no-dynamic-require,\n*/\n\nimport { getOptions } from 'loader-utils';\nimport validateOptions from '@webpack-contrib/schema-utils';\nimport mime from 'mime';\n\nimport schema from './options.json';\n\n// Loader Mode\nexport const raw = true;\n/* eslint complexity:[2,10] */\nexport default function loader(src) {\n  // Loader Options\n  const options = getOptions(this) || {};\n\n  validateOptions({ name: 'URL Loader', schema, target: options });\n\n  const file = this.resourcePath;\n  // Set limit for resource inlining (file size)\n  let limit = options.limit;\n  let limitSize = options.limitSize;\n\n  if (limit) {\n    limitSize = parseInt(limitSize, 10);\n  }\n  // Get MIME type\n  const mimetype = options.mimetype || mime.getType(file);\n\n  const hasInline = ~this.resourceQuery.indexOf('__inline');\n  // No limit or within the specified limit\n  if ((limit && src.length < limitSize) || hasInline) {\n    if (typeof src === 'string') {\n      src = Buffer.from(src);\n    }\n\n    return `module.exports = ${JSON.stringify(\n      `data:${mimetype || ''};base64,${src.toString('base64')}`\n    )}`;\n  }\n\n  const fallback = require(options.fallback ? options.fallback : 'file-loader');\n\n\n  return fallback.call(this, src);\n}\n"
  },
  {
    "path": "packages/url-loader/src/options.json",
    "content": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"limit\": {\n      \"type\": [\"boolean\"]\n    },\n    \"limitSize\": {\n      \"type\": [\"number\"]\n    },\n    \"mimetype\": {\n      \"type\": \"string\"\n    },\n    \"fallback\": {\n      \"anyOf\": [\n        {\n          \"type\": \"string\"\n        },\n        {\n          \"additionalProperties\": false,\n          \"properties\": {\n            \"loader\": {\n              \"description\": \"Fallback loader name\",\n              \"type\": \"string\"\n            },\n            \"options\": {\n              \"description\": \"Fallback loader options\",\n              \"anyOf\": [\n                {\n                  \"type\": \"object\"\n                },\n                {\n                  \"type\": \"string\"\n                }\n              ]\n            }\n          },\n          \"type\": \"object\"\n        }\n      ]\n    }\n  },\n  \"additionalProperties\": true\n}\n"
  },
  {
    "path": "packages/url-loader/src/utils/normalizeFallback.js",
    "content": "function normalizeFallbackString(fallbackString, originalOptions) {\n  const index = fallbackString.indexOf('?');\n  if (index >= 0) {\n    return {\n      loader: fallbackString.substr(0, index),\n      query: fallbackString.substr(index)\n    };\n  }\n\n  // To remain consistent with version 1.0.1, pass the options which were provided to url-loader to the fallback loader.\n  // Perhaps it would make sense to strip out ‒ or \"consume\" ‒ the options we know were meant for url-loader: limit and\n  // mimetype.\n  return {\n    loader: fallbackString,\n    query: originalOptions\n  };\n}\n\nfunction normalizeFallbackObject(fallbackObject) {\n  return {\n    loader: fallbackObject.loader,\n    query: fallbackObject.options\n  };\n}\n\n/**\n * Converts the fallback option, which can be a string or an object, to an object with a loader and a query. The result\n * has this form:\n *   {\n *     loader: 'file-loader',\n *     query: '?name=[name].[ext]'\n *   }\n * Note that the returned query can be either a string or an object.\n */\nexport default function normalizeFallback(fallback, originalOptions) {\n  // If no fallback was provided, use file-loader.\n  if (!fallback) {\n    return {\n      loader: 'file-loader'\n    };\n  }\n\n  if (typeof fallback === 'string') {\n    return normalizeFallbackString(fallback, originalOptions);\n  }\n\n  return normalizeFallbackObject(fallback);\n}\n"
  },
  {
    "path": "packages/webpack-check-plugin/.eslintrc",
    "content": "/* eslint-enable */\n{\n  \"globals\": {\n      \"cml\": false\n  },\n  \"env\": {\n      \"browser\": true,\n      \"node\": true,\n      \"commonjs\": true,\n      \"amd\": true,\n      \"es6\": true,\n      \"mocha\": true\n  },\n  \"parserOptions\": {\n      \"ecmaVersion\": 6,\n      \"sourceType\": \"module\", \n      \"ecmaFeatures\": {\n          \"globalReturn\": true,\n          \"impliedStrict\": true,\n          \"jsx\": true,\n          \"modules\": true\n      }\n  },\n  \"plugins\": [\n\n  ],\n  \"extends\": [\n      \"eslint:recommended\"\n  ],\n\n\n  \"rules\": {\n\n     \n      \"no-cond-assign\": 2,\n      \"no-console\": 0,\n      \n      \"no-constant-condition\": 2,\n      \"no-control-regex\": 2,\n      \"comma-dangle\": [1, \"never\"],\n      \"no-debugger\": 2,\n      \"no-dupe-args\": 2,\n      \"no-dupe-keys\": 2,\n      \"no-duplicate-case\": 2,\n      \"no-empty\": 2,\n      \"no-empty-character-class\": 2,\n      \"no-ex-assign\": 2,\n      \"no-extra-boolean-cast\": 2,\n      \"no-extra-parens\": 0,\n      \"no-extra-semi\": 2,\n      \"no-func-assign\": 2,\n      \"no-inner-declarations\": [2, \"functions\"],\n      \"no-invalid-regexp\": 2,\n      \"no-irregular-whitespace\": 2,\n      \"no-negated-in-lhs\": 2,\n      \"no-obj-calls\": 2,\n      \"no-prototype-builtins\": 0,\n      \"no-regex-spaces\": 2,\n      \"no-sparse-arrays\": 2,\n      \"no-unexpected-multiline\": 2,\n      \"no-unreachable\": 2,\n      \"use-isnan\": 2,\n      \"valid-jsdoc\": 0,\n      \"valid-typeof\": 2,\n\n\n      \"accessor-pairs\": 2,\n      \"array-callback-return\": 0,\n      \"block-scoped-var\": 0,\n      \"complexity\": [2, 30],\n      \"consistent-return\": 0,\n      \"curly\": [2, \"all\"],\n      \"default-case\": 2,\n      \"dot-location\": [2, \"property\"],\n      \"dot-notation\": [2, {\n          \"allowKeywords\": false\n      }],\n      \"eqeqeq\": [0, \"allow-null\"],\n      \"guard-for-in\": 2,\n      \"no-alert\": 0,\n      \"no-caller\": 2,\n      \"no-case-declarations\": 2,\n      \"no-div-regex\": 2,\n      \"no-else-return\": 0,\n      \"no-empty-function\": 2,\n      \"no-empty-pattern\": 2,\n      \"no-eq-null\": 1,\n      \"no-eval\": 2,\n      \"no-extend-native\": 2,\n      \"no-extra-bind\": 2,\n      \"no-extra-label:\": 0,\n      \"no-fallthrough\": 2,\n      \"no-floating-decimal\": 2,\n      \"no-implicit-coercion\": 0,\n      \"no-implicit-globals\": 1,\n      \"no-implied-eval\": 2,\n      \"no-invalid-this\": 0,\n      \"no-iterator\": 2,\n      \"no-labels\": 2,\n      \"no-lone-blocks\": 2,\n      \"no-loop-func\": 1,\n      \"no-magic-numbers\": [1, {\n          \"ignore\": [0, -1, 1]\n      }],\n      \"no-multi-spaces\": 2,\n      \"no-multi-str\": 2,\n      \"no-native-reassign\": 2,\n      \"no-new\": 2,\n      // 禁止对 Function 对象使用 new 操作符\n      \"no-new-func\": 0,\n      // 禁止对 String，Number 和 Boolean 使用 new 操作符\n      \"no-new-wrappers\": 2,\n      // 禁用八进制字面量\n      \"no-octal\": 2,\n      // 禁止在字符串中使用八进制转义序列\n      \"no-octal-escape\": 2,\n      // 不允许对 function 的参数进行重新赋值\n      \"no-param-reassign\": 0,\n      // 禁用 __proto__ 属性\n      \"no-proto\": 2,\n      // 禁止使用 var 多次声明同一变量\n      \"no-redeclare\": 2,\n      // 禁用指定的通过 require 加载的模块\n      \"no-return-assign\": 0,\n      // 禁止使用 javascript: url\n      \"no-script-url\": 0,\n      // 禁止自我赋值\n      \"no-self-assign\": 2,\n      // 禁止自身比较\n      \"no-self-compare\": 2,\n      // 禁用逗号操作符\n      \"no-sequences\": 2,\n      // 禁止抛出非异常字面量\n      \"no-throw-literal\": 2,\n      // 禁用一成不变的循环条件\n      \"no-unmodified-loop-condition\": 2,\n      // 禁止出现未使用过的表达式\n      \"no-unused-expressions\": 0,\n      // 禁用未使用过的标签\n      \"no-unused-labels\": 2,\n      // 禁止不必要的 .call() 和 .apply()\n      \"no-useless-call\": 2,\n      // 禁止不必要的字符串字面量或模板字面量的连接\n      \"no-useless-concat\": 0,\n      // 禁用不必要的转义字符\n      \"no-useless-escape\": 0,\n      // 禁用 void 操作符\n      \"no-void\": 0,\n      // 禁止在注释中使用特定的警告术语\n      \"no-warning-comments\": 0,\n      // 禁用 with 语句\n      \"no-with\": 2,\n      // 强制在parseInt()使用基数参数\n      \"radix\": 2,\n      // 要求所有的 var 声明出现在它们所在的作用域顶部\n      \"vars-on-top\": 0,\n      // 要求 IIFE 使用括号括起来\n      \"wrap-iife\": [2, \"any\"],\n      // 要求或禁止 “Yoda” 条件\n      \"yoda\": [2, \"never\"],\n      // 要求或禁止使用严格模式指令\n      \"strict\": 0,\n\n\n      //////////////\n      // 变量声明 //\n      //////////////\n\n      // 要求或禁止 var 声明中的初始化(初值)\n      \"init-declarations\": 0,\n      // 不允许 catch 子句的参数与外层作用域中的变量同名\n      \"no-catch-shadow\": 0,\n      // 禁止删除变量\n      \"no-delete-var\": 2,\n      // 不允许标签与变量同名\n      \"no-label-var\": 2,\n      // 禁用特定的全局变量\n      \"no-restricted-globals\": 0,\n      // 禁止 var 声明 与外层作用域的变量同名\n      \"no-shadow\": 0,\n      // 禁止覆盖受限制的标识符\n      \"no-shadow-restricted-names\": 2,\n      // 禁用未声明的变量，除非它们在 /*global */ 注释中被提到\n      \"no-undef\": 2,\n      // 禁止将变量初始化为 undefined\n      \"no-undef-init\": 2,\n      // 禁止将 undefined 作为标识符\n      \"no-undefined\": 0,\n      // 禁止出现未使用过的变量\n      \"no-unused-vars\": [2, {\n          \"vars\": \"all\",\n          \"args\": \"none\"\n      }],\n      // 不允许在变量定义之前使用它们\n      \"no-use-before-define\": 0,\n\n      //////////////////////////\n      // Node.js and CommonJS //\n      //////////////////////////\n\n      // require return statements after callbacks\n      \"callback-return\": 0,\n      // 要求 require() 出现在顶层模块作用域中\n      \"global-require\": 1,\n      // 要求回调函数中有容错处理\n      \"handle-callback-err\": [2, \"^(err|error)$\"],\n      // 禁止混合常规 var 声明和 require 调用\n      \"no-mixed-requires\": 0,\n      // 禁止调用 require 时使用 new 操作符\n      \"no-new-require\": 2,\n      // 禁止对 __dirname 和 __filename进行字符串连接\n      \"no-path-concat\": 0,\n      // 禁用 process.env\n      \"no-process-env\": 0,\n      // 禁用 process.exit()\n      \"no-process-exit\": 0,\n      // 禁用同步方法\n      \"no-sync\": 0,\n\n      //////////////\n      // 风格指南 //\n      //////////////\n\n      // 指定数组的元素之间要以空格隔开(, 后面)， never参数：[ 之前和 ] 之后不能带空格，always参数：[ 之前和 ] 之后必须带空格\n      \"array-bracket-spacing\": [2, \"never\"],\n      // 禁止或强制在单行代码块中使用空格(禁用)\n      \"block-spacing\": [1, \"never\"],\n      //强制使用一致的缩进 第二个参数为 \"tab\" 时，会使用tab，\n      // if while function 后面的{必须与if在同一行，java风格。\n      \"brace-style\": [2, \"1tbs\", {\n          \"allowSingleLine\": true\n      }],\n      // 双峰驼命名格式\n      \"camelcase\": 2,\n      // 控制逗号前后的空格\n      \"comma-spacing\": [2, {\n          \"before\": false,\n          \"after\": true\n      }],\n      // 控制逗号在行尾出现还是在行首出现 (默认行尾)\n      // http://eslint.org/docs/rules/comma-style\n      \"comma-style\": [2, \"last\"],\n      //\"SwitchCase\" (默认：0) 强制 switch 语句中的 case 子句的缩进水平\n      // 以方括号取对象属性时，[ 后面和 ] 前面是否需要空格, 可选参数 never, always\n      \"computed-property-spacing\": [2, \"never\"],\n      // 用于指统一在回调函数中指向this的变量名，箭头函数中的this已经可以指向外层调用者，应该没卵用了\n      // e.g [0,\"that\"] 指定只能 var that = this. that不能指向其他任何值，this也不能赋值给that以外的其他值\n      \"consistent-this\": [1, \"that\"],\n      // 强制使用命名的 function 表达式\n      \"func-names\": 0,\n      // 文件末尾强制换行\n      \"eol-last\": 2,\n      \"indent\": [2, 2, {\n          \"SwitchCase\": 1\n      }],\n      // 强制在对象字面量的属性中键和值之间使用一致的间距\n      \"key-spacing\": [2, {\n          \"beforeColon\": false,\n          \"afterColon\": true\n      }],\n      // 强制使用一致的换行风格\n      \"linebreak-style\": [1, \"unix\"],\n      // 要求在注释周围有空行 ( 要求在块级注释之前有一空行)\n      \"lines-around-comment\": [1, {\n          \"beforeBlockComment\": true\n      }],\n      // 强制一致地使用函数声明或函数表达式，方法定义风格，参数：\n      // declaration: 强制使用方法声明的方式，function f(){} e.g [2, \"declaration\"]\n      // expression：强制使用方法表达式的方式，var f = function() {} e.g [2, \"expression\"]\n      // allowArrowFunctions: declaration风格中允许箭头函数。 e.g [2, \"declaration\", { \"allowArrowFunctions\": true }]\n      \"func-style\": 0,\n      // 强制回调函数最大嵌套深度 5层\n      \"max-nested-callbacks\": [1, 5],\n      // 禁止使用指定的标识符\n      \"id-blacklist\": 0,\n      // 强制标识符的最新和最大长度\n      \"id-length\": 0,\n      // 要求标识符匹配一个指定的正则表达式\n      \"id-match\": 0,\n      // 强制在 JSX 属性中一致地使用双引号或单引号\n      \"jsx-quotes\": 0,\n      // 强制在关键字前后使用一致的空格 (前后腰需要)\n      \"keyword-spacing\": 2,\n      // 强制一行的最大长度\n      \"max-len\": [1, 200],\n      // 强制最大行数\n      \"max-lines\": 0,\n      // 强制 function 定义中最多允许的参数数量\n      \"max-params\": [1, 7],\n      // 强制 function 块最多允许的的语句数量\n      \"max-statements\": [1, 200],\n      // 强制每一行中所允许的最大语句数量\n      \"max-statements-per-line\": 0,\n      // 要求构造函数首字母大写 （要求调用 new 操作符时有首字母大小的函数，允许调用首字母大写的函数时没有 new 操作符。）\n      \"new-cap\": [2, {\n          \"newIsCap\": true,\n          \"capIsNew\": false\n      }],\n      // 要求调用无参构造函数时有圆括号\n      \"new-parens\": 2,\n      // 要求或禁止 var 声明语句后有一行空行\n      \"newline-after-var\": 0,\n      // 禁止使用 Array 构造函数\n      \"no-array-constructor\": 2,\n      // 禁用按位运算符\n      \"no-bitwise\": 0,\n      // 要求 return 语句之前有一空行\n      \"newline-before-return\": 0,\n      // 要求方法链中每个调用都有一个换行符\n      \"newline-per-chained-call\": 1,\n      // 禁用 continue 语句\n      \"no-continue\": 0,\n      // 禁止在代码行后使用内联注释\n      \"no-inline-comments\": 0,\n      // 禁止 if 作为唯一的语句出现在 else 语句中\n      \"no-lonely-if\": 0,\n      // 禁止混合使用不同的操作符\n      \"no-mixed-operators\": 0,\n      // 不允许空格和 tab 混合缩进\n      \"no-mixed-spaces-and-tabs\": 2,\n      // 不允许多个空行\n      \"no-multiple-empty-lines\": [2, {\n          \"max\": 2\n      }],\n      // 不允许否定的表达式\n      \"no-negated-condition\": 0,\n      // 不允许使用嵌套的三元表达式\n      \"no-nested-ternary\": 0,\n      // 禁止使用 Object 的构造函数\n      \"no-new-object\": 2,\n      // 禁止使用一元操作符 ++ 和 --\n      \"no-plusplus\": 0,\n      // 禁止使用特定的语法\n      \"no-restricted-syntax\": 0,\n      // 禁止 function 标识符和括号之间出现空格\n      \"no-spaced-func\": 2,\n      // 不允许使用三元操作符\n      \"no-ternary\": 0,\n      // 禁用行尾空格\n      \"no-trailing-spaces\": 2,\n      // 禁止标识符中有悬空下划线_bar\n      \"no-underscore-dangle\": 0,\n      // 禁止可以在有更简单的可替代的表达式时使用三元操作符\n      \"no-unneeded-ternary\": 2,\n      // 禁止属性前有空白\n      \"no-whitespace-before-property\": 0,\n      // 强制花括号内换行符的一致性\n      \"object-curly-newline\": 0,\n      // 强制在花括号中使用一致的空格\n      \"object-curly-spacing\": 0,\n      // 强制将对象的属性放在不同的行上\n      \"object-property-newline\": 0,\n      // 强制函数中的变量要么一起声明要么分开声明\n      \"one-var\": [2, {\n          \"initialized\": \"never\"\n      }],\n      // 要求或禁止在 var 声明周围换行\n      \"one-var-declaration-per-line\": 0,\n      // 要求或禁止在可能的情况下要求使用简化的赋值操作符\n      \"operator-assignment\": 0,\n      // 强制操作符使用一致的换行符\n      \"operator-linebreak\": [2, \"after\", {\n          \"overrides\": {\n              \"?\": \"before\",\n              \":\": \"before\"\n          }\n      }],\n      // 要求或禁止块内填充\n      \"padded-blocks\": 0,\n      // 要求对象字面量属性名称用引号括起来\n      \"quote-props\": 0,\n      // 强制使用一致的反勾号、双引号或单引号\n      // \"quotes\": [2, \"single\", \"avoid-escape\"],\n      // 要求使用 JSDoc 注释\n      \"require-jsdoc\": 0,\n      // 要求或禁止使用分号而不是 ASI（这个才是控制行尾部分号的，）\n      \"semi\": [0, \"always\"],\n      // 强制分号之前和之后使用一致的空格\n      \"semi-spacing\": 0,\n      // 要求同一个声明块中的变量按顺序排列\n      \"sort-vars\": 0,\n      // 强制在块之前使用一致的空格\n      \"space-before-blocks\": [2, \"always\"],\n      // 强制在 function的左括号之前使用一致的空格\n      \"space-before-function-paren\": [0, \"always\"],\n      // 强制在圆括号内使用一致的空格\n      \"space-in-parens\": [2, \"never\"],\n      // 要求操作符周围有空格\n      \"space-infix-ops\": 2,\n      // 强制在一元操作符前后使用一致的空格\n      \"space-unary-ops\": [2, {\n          \"words\": true,\n          \"nonwords\": false\n      }],\n      // 强制在注释中 // 或 /* 使用一致的空格\n      \"spaced-comment\": [2, \"always\", {\n          \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n      }],\n      // 要求或禁止 Unicode BOM\n      \"unicode-bom\": 0,\n      // 要求正则表达式被括号括起来\n      \"wrap-regex\": 0,\n\n      //////////////\n      // ES6.相关 //\n      //////////////\n\n      // 要求箭头函数体使用大括号\n      \"arrow-body-style\": 2,\n      // 要求箭头函数的参数使用圆括号\n      \"arrow-parens\": 0,\n      \"arrow-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 强制在子类构造函数中用super()调用父类构造函数，TypeScrip的编译器也会提示\n      \"constructor-super\": 0,\n      // 强制 generator 函数中 * 号周围使用一致的空格\n      \"generator-star-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 禁止修改类声明的变量\n      \"no-class-assign\": 2,\n      // 不允许箭头功能，在那里他们可以混淆的比较\n      \"no-confusing-arrow\": 0,\n      // 禁止修改 const 声明的变量\n      \"no-const-assign\": 2,\n      // 禁止类成员中出现重复的名称\n      \"no-dupe-class-members\": 2,\n      // 不允许复制模块的进口\n      \"no-duplicate-imports\": 0,\n      // 禁止 Symbol 的构造函数\n      \"no-new-symbol\": 2,\n      // 允许指定模块加载时的进口\n      \"no-restricted-imports\": 0,\n      // 禁止在构造函数中，在调用 super() 之前使用 this 或 super\n      \"no-this-before-super\": 2,\n      // 禁止不必要的计算性能键对象的文字\n      \"no-useless-computed-key\": 0,\n      // 要求使用 let 或 const 而不是 var\n      \"no-var\": 0,\n      // 要求或禁止对象字面量中方法和属性使用简写语法\n      \"object-shorthand\": 0,\n      // 要求使用箭头函数作为回调\n      \"prefer-arrow-callback\": 0,\n      // 要求使用 const 声明那些声明后不再被修改的变量\n      \"prefer-const\": 0,\n      // 要求在合适的地方使用 Reflect 方法\n      \"prefer-reflect\": 0,\n      // 要求使用扩展运算符而非 .apply()\n      \"prefer-spread\": 0,\n      // 要求使用模板字面量而非字符串连接\n      \"prefer-template\": 0,\n      // Suggest using the rest parameters instead of arguments\n      \"prefer-rest-params\": 0,\n      // 要求generator 函数内有 yield\n      \"require-yield\": 0,\n      // enforce spacing between rest and spread operators and their expressions\n      \"rest-spread-spacing\": 0,\n      // 强制模块内的 import 排序\n      \"sort-imports\": 0,\n      // 要求或禁止模板字符串中的嵌入表达式周围空格的使用\n      \"template-curly-spacing\": 1,\n      // 强制在 yield* 表达式中 * 周围使用空格\n      \"yield-star-spacing\": 2\n  }\n}\n/* eslint-enable */"
  },
  {
    "path": "packages/webpack-check-plugin/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\n"
  },
  {
    "path": "packages/webpack-check-plugin/index.js",
    "content": "const check = require('./lib/check.js');\nconst chalk = require('chalk');\nconst IS_WIN = process.platform.indexOf('win') === 0\nclass WebpackCheckPlugin {\n  constructor(options) {\n    this.options = Object.assign({\n      cmlType: '',\n      tokensMap: undefined,\n      whiteListFile: []\n    }, options);\n  }\n\n  apply(compiler) {\n\n    const options = this.options;\n    if (compiler.hooks) {\n      compiler.hooks.emit.tap('chameleon-plugin', checkModule);\n    } else {\n      compiler.plugin('emit', checkModule);\n    }\n\n    // check babel之后的每一个module\n    function checkModule(compilation, callback) {\n\n      var type = options.cmlType;\n      compilation.modules.forEach(module => {\n        // 项目内的文件做校验 并且 对于路径包括chameleon-tool的不进行校验，因为cli可能会被安装在项目内部\n        let cliName = 'chameleon-tool';// 内网的会被替换成 @didi/chameleon-cli 注意windows下的兼容\n        if (IS_WIN) {\n          cliName = cliName.replace(/\\//g, '\\\\')\n        }\n        let inChameleonTool = module.resource && module.resource.includes(cliName)\n        if (module.resource && module.resource.indexOf(cml.projectRoot) === 0 && !inChameleonTool) {\n          // 白名单内的文件不做校验\n\n          let whiteListFileLength = options.whiteListFile.length;\n          let inWhiteList = false;\n          for (let i = 0; i < whiteListFileLength; i++) {\n            let item = options.whiteListFile[i];\n\n            if (Object.prototype.toString.call(item) === '[object RegExp]') { // 配置的是正则\n              if (item.test(module.resource)) {\n                inWhiteList = true;\n                break\n              }\n            }\n            if (Object.prototype.toString.call(item) === '[object String]') { // 配置的是绝对路径\n              if (module.resource.endsWith(item)) {\n                inWhiteList = true;\n                break;\n              }\n            }\n          }\n\n          if (!inWhiteList) {\n\n            var source = module._source && module._source._value;\n            let sourceLine = source.split('\\n');\n            try {\n              var tokens = check(source, options);\n              if (tokens && tokens.length) {\n                tokens.forEach(token => {\n\n                  throw new Error(chalk.red(`\n                  不能在${type} 项目中使用全局变量【${token.name}】 \n                  文件位置: ${module.resource}\n                  具体代码: ${sourceLine[token.loc.line - 1]}\n                  `))\n                })\n              }\n            } catch (e) {\n              console.log(e)\n              // babel parse入会有报错的情况\n            }\n          }\n\n        }\n\n      })\n      return callback()\n    }\n\n\n  }\n}\nmodule.exports = WebpackCheckPlugin;\n\n\n"
  },
  {
    "path": "packages/webpack-check-plugin/lib/check.js",
    "content": "const parser = require('@babel/parser');\nconst traverse = require('babel-traverse');\nconst uniq = require('lodash.uniq');\nlet DEFAULT_TOKENS_MAP = require('./tokensMap.js');\n\n// 这个path是否有需要校验的token\nconst needCheck = function (path, tokenList) {\n  let flag = false;\n  for (let i = 0;i < tokenList.length;i++) {\n    let token = tokenList[i];\n    // 判断一个token是否是一个变量\n    if (checkToken(path, token)) {\n      // 如果是对象中的key是需要忽略的\n      flag = token;\n      break;\n    }\n  }\n\n  return flag;\n};\n\n// 是变量，并且不是对象的key值\nfunction checkToken(path, token) {\n  // if( path.node.id.type === \"Identifier\" && path.node.id.name === token ) {\n  if (path.isIdentifier({ name: token })) {\n\n    // 是对象的key值\n    //   const api = {\n    //     name: weex,\n    //     };\n    let isObjectKey = path.parent.type === 'ObjectProperty' && path.parentKey === 'key'\n    // 对象成员\n    /**\n     * var a = {\n     *  weex: 'a'\n     * }\n     * console.log(weex.a);\n     */\n    let isObjectMember = path.parent.type === 'MemberExpression' && path.parentKey === 'property'\n\n    return !(isObjectKey || isObjectMember)\n  } else {\n    return false;\n  }\n\n}\n\nconst check = function (code, options) {\n  let {\n    cmlType: type,\n    tokensMap = DEFAULT_TOKENS_MAP } = options;\n  const TOKENS_MAP = tokensMap;\n  // const TOKENS_ALL = uniq(TOKENS_MAP.WEB.concat(TOKENS_MAP.WEEX).concat(TOKENS_MAP.WX));\n  // TOKENS_MAP.ALL = TOKENS_ALL;\n  type = type.toUpperCase();\n  const ast = parser.parse(code, {\n    plugins: ['flow', 'dynamicImport'],\n    sourceType: 'module'\n  });\n  let tokenList = [];\n\n  if (type === 'ALL') {\n    // 都要校验\n    tokenList = TOKENS_MAP[type]\n  } else {\n    Object.keys(TOKENS_MAP).forEach(key => {\n      // 把自身的和All的去掉，其他端的token放进去\n      if (key !== type && key !== 'ALL') {\n        tokenList = tokenList.concat(TOKENS_MAP[key]);\n      }\n    })\n    // 然后要把自身的全局变量去掉\n    for (let i = 0;i < tokenList.length;) {\n      if (~TOKENS_MAP[type].indexOf(tokenList[i])) {\n        tokenList.splice(i, 1);\n      } else {\n        i++;\n      }\n    }\n  }\n  tokenList = uniq(tokenList);\n\n  const tokens = [];\n  traverse['default'](ast, {\n    enter: (path) => {\n      // path是一个上下文\n      // 需要校验的变量值\n      let token = needCheck(path, tokenList);\n      // 如果存在该token\n      if (token) {\n        let globalVariable = true;\n        // 当前作用域\n        let next = path.scope;\n\n        do {\n          // 如果当前作用域存在该变量 就不是全局变量\n          if (next.hasOwnBinding(token)) {\n            globalVariable = false;\n            break;\n          }\n        }\n        // eslint-disable-next-line\n        while (next = next.parent);\n\n        if (globalVariable) {\n          tokens.push({\n            loc: path.node.loc.start,\n            name: token\n          });\n        }\n      }\n    }\n  });\n  return tokens;\n}\n\n\nmodule.exports = check;\n"
  },
  {
    "path": "packages/webpack-check-plugin/lib/tokensMap.js",
    "content": "\n/* eslint-disable */\nmodule.exports = {\n  ALIPAY: ['my'],\n  BAIDU: ['swan'],\n  WEEX: ['weex'],\n  WX: ['wx'],\n  QQ: ['qq'],\n  TT:['tt'],\n  WEB: [\"postMessage\", \"blur\", \"focus\", \"close\", \"frames\", \"self\", \"window\", \"parent\", \"opener\", \"top\", \"length\", \"closed\", \"location\", \"document\", \"origin\", \"name\", \"history\", \"locationbar\", \"menubar\", \"personalbar\", \"scrollbars\", \"statusbar\", \"toolbar\", \"status\", \"frameElement\", \"navigator\", \"customElements\", \"external\", \"screen\", \"innerWidth\", \"innerHeight\", \"scrollX\", \"pageXOffset\", \"scrollY\", \"pageYOffset\", \"screenX\", \"screenY\", \"outerWidth\", \"outerHeight\", \"devicePixelRatio\", \"clientInformation\", \"screenLeft\", \"screenTop\", \"defaultStatus\", \"defaultstatus\", \"styleMedia\", \"onanimationend\", \"onanimationiteration\", \"onanimationstart\", \"onsearch\", \"ontransitionend\", \"onwebkitanimationend\", \"onwebkitanimationiteration\", \"onwebkitanimationstart\", \"onwebkittransitionend\", \"isSecureContext\", \"onabort\", \"onblur\", \"oncancel\", \"oncanplay\", \"oncanplaythrough\", \"onchange\", \"onclick\", \"onclose\", \"oncontextmenu\", \"oncuechange\", \"ondblclick\", \"ondrag\", \"ondragend\", \"ondragenter\", \"ondragleave\", \"ondragover\", \"ondragstart\", \"ondrop\", \"ondurationchange\", \"onemptied\", \"onended\", \"onerror\", \"onfocus\", \"oninput\", \"oninvalid\", \"onkeydown\", \"onkeypress\", \"onkeyup\", \"onload\", \"onloadeddata\", \"onloadedmetadata\", \"onloadstart\", \"onmousedown\", \"onmouseenter\", \"onmouseleave\", \"onmousemove\", \"onmouseout\", \"onmouseover\", \"onmouseup\", \"onmousewheel\", \"onpause\", \"onplay\", \"onplaying\", \"onprogress\", \"onratechange\", \"onreset\", \"onresize\", \"onscroll\", \"onseeked\", \"onseeking\", \"onselect\", \"onstalled\", \"onsubmit\", \"onsuspend\", \"ontimeupdate\", \"ontoggle\", \"onvolumechange\", \"onwaiting\", \"onwheel\", \"onauxclick\", \"ongotpointercapture\", \"onlostpointercapture\", \"onpointerdown\", \"onpointermove\", \"onpointerup\", \"onpointercancel\", \"onpointerover\", \"onpointerout\", \"onpointerenter\", \"onpointerleave\", \"onafterprint\", \"onbeforeprint\", \"onbeforeunload\", \"onhashchange\", \"onlanguagechange\", \"onmessage\", \"onmessageerror\", \"onoffline\", \"ononline\", \"onpagehide\", \"onpageshow\", \"onpopstate\", \"onrejectionhandled\", \"onstorage\", \"onunhandledrejection\", \"onunload\", \"performance\", \"stop\", \"open\", \"alert\", \"confirm\", \"prompt\", \"print\", \"requestAnimationFrame\", \"cancelAnimationFrame\", \"requestIdleCallback\", \"cancelIdleCallback\", \"captureEvents\", \"releaseEvents\", \"getComputedStyle\", \"matchMedia\", \"moveTo\", \"moveBy\", \"resizeTo\", \"resizeBy\", \"getSelection\", \"find\", \"webkitRequestAnimationFrame\", \"webkitCancelAnimationFrame\", \"fetch\", \"btoa\", \"atob\", \"createImageBitmap\", \"scroll\", \"scrollTo\", \"scrollBy\", \"onappinstalled\", \"onbeforeinstallprompt\", \"crypto\", \"ondevicemotion\", \"ondeviceorientation\", \"ondeviceorientationabsolute\", \"indexedDB\", \"webkitStorageInfo\", \"sessionStorage\", \"localStorage\", \"chrome\", \"visualViewport\", \"speechSynthesis\", \"webkitRequestFileSystem\", \"webkitResolveLocalFileSystemURL\", \"openDatabase\", \"applicationCache\", \"caches\", \"whichAnimationEvent\", \"animationendEvent\", \"infinity\", \"SETTING\", \"AppView\", \"ExtensionOptions\", \"ExtensionView\", \"WebView\", \"iconPath\", \"_app\", \"_ZOOM_\", \"Feed\", \"md5\", \"$\", \"jQuery\", \"Search\", \"windmill\", \"Lethargy\", \"alertTimeOut\", \"supportApps\", \"lethargyX\", \"lethargyY\", \"iView\", \"onModuleResLoaded\", \"iEditDelete\", \"infinityDrag\", \"i\", \"array\", \"TEMPORARY\", \"PERSISTENT\", \"addEventListener\", \"removeEventListener\", \"dispatchEvent\"]\n}\n\n/**\n * 获取web端可枚举全局变量  228个\n * (function(){\n\nvar array = []\nvar num =0;\nfor(var i in  window) {\n    num ++\n    array.push(i)\n}\nconsole.log(num)\nconsole.log(JSON.stringify(array))\n\n保留的全局方法\nsetTimeout\nsetInterval\nclearTimeout\nclearinterval\n\n})()\n */\n"
  },
  {
    "path": "packages/webpack-check-plugin/package.json",
    "content": "{\n  \"name\": \"webpack-check-plugin\",\n  \"version\": \"1.0.8\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"test\": \"mocha --recursive --reporter spec\",\n    \"cover\": \"istanbul cover --report lcov node_modules/mocha/bin/_mocha -- -R spec --recursive\",\n    \"eslint:fix\": \"eslint --ext .js  lib --fix\",\n    \"eslint\": \"eslint ./lib\"\n  },\n  \"dependencies\": {\n    \"@babel/parser\": \"7.1.0\",\n    \"babel-generator\": \"6.26.1\",\n    \"babel-traverse\": \"6.26.0\",\n    \"chalk\": \"^2.4.2\",\n    \"lodash.uniq\": \"4.5.0\"\n  },\n  \"devDependencies\": {\n    \"chai\": \"^4.2.0\",\n    \"coveralls\": \"^2.11.9\",\n    \"eslint\": \"^5.9.0\",\n    \"gulp\": \"^3.9.1\",\n    \"gulp-uglify-es\": \"^1.0.4\",\n    \"istanbul\": \"^0.4.5\",\n    \"mocha\": \"^5.2.0\"\n  },\n  \"author\": \"Chameleon-Team\",\n  \"license\": \"Apache\",\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"gitHead\": \"5ddcde4330774710f7646559446e008f7785ce00\"\n}"
  },
  {
    "path": "packages/webpack-check-plugin/test/check.test.js",
    "content": "const check = require('../lib/check');\nconst { expect } = require('chai');\n\nconst reportErrorFun = function(source,type){\n  const tokens = check(source, { cmlType: type });\n  const sourceLine = source.split('\\n');\n  let errorInfo = '';\n  if (tokens && tokens.length) {\n    tokens.forEach(token => {\n      errorInfo += `不能在${type} 项目中使用全局变量【${token.name}】具体代码: ${sourceLine[token.loc.line - 1]}`\n    })\n  };\n  return {tokens,errorInfo}\n}\n//以lib/tokensMap中的文件为基础；\ndescribe('check global variable', function () {\n  //检测web中不允许出现weex和wx端的全局变量：['weex','wx','global]\n  describe('test lib/check.js for web', function () {\n    it('test web global variable that can be used in web ', function () {\n      const type = \"Web\";\n      const source = `window.onload=function(){\n        window.frames[0].postMessage('getcolor','http://lslib.com');}`\n      const {tokens,errorInfo} = reportErrorFun(source,type);\n      expect(errorInfo).to.be.empty;\n    });\n    it('test weex global variable that can not be used in web', function () {\n      const type = \"Web\";\n      const source = `weex.show()`\n      const {tokens,errorInfo} = reportErrorFun(source,type);\n      expect(errorInfo).to.not.be.empty;\n    });\n    it('test wx global variable  that can not be used in web', function () {\n      const type = \"Web\";\n      const source = `wx.login()`\n      const {tokens,errorInfo} = reportErrorFun(source,type);\n      expect(errorInfo).to.not.be.empty;\n    })\n  });\n  //检测weex端不允许出现web和wx端的全局变量：['wx','onload',....]\n  describe('test lib/check.js for web', function () {\n    it('test weex global variable that can be used in weex', function () {\n      const type = \"Weex\";\n      const source = `weex.show()`\n      const {tokens,errorInfo} = reportErrorFun(source,type);\n      expect(errorInfo).to.be.empty;\n    });\n    it('test web global variable that can not be used in weex ', function () {\n      const type = \"Weex\";\n      const source = `window.onload=function(){\n        window.frames[0].postMessage('getcolor','http://lslib.com');}`\n      const {tokens,errorInfo} = reportErrorFun(source,type);\n      expect(errorInfo).to.not.be.empty;\n    });\n    it('test wx global variable  that can not be used in weex', function () {\n      const type = \"Weex\";\n      const source = `wx.login()`\n      const {tokens,errorInfo} = reportErrorFun(source,type);\n      expect(errorInfo).to.not.be.empty;\n    })\n  });\n  //检测wx端不允许出现weex和web端的全局变量：['weex','onload',...]\n  describe('test lib/check.js for web', function () {\n    it('test wx global variable  that can be used in wx', function () {\n      const type = \"Wx\";\n      const source = `wx.login()`\n      const {tokens,errorInfo} = reportErrorFun(source,type);\n      expect(errorInfo).to.be.empty;\n    })\n    it('test weex global variable that can not be used in wx', function () {\n      const type = \"Wx\";\n      const source = `weex.show()`\n      const {tokens,errorInfo} = reportErrorFun(source,type);\n      expect(errorInfo).to.not.be.empty;\n    });\n    it('test web global variable that can not be used in wx ', function () {\n      const type = \"Wx\";\n      const source = `window.onload=function(){\n        window.frames[0].postMessage('getcolor','http://lslib.com');}`\n      const {tokens,errorInfo} = reportErrorFun(source,type);\n      expect(errorInfo).to.not.be.empty;\n    });\n    \n  })\n})\n\n"
  },
  {
    "path": "packages/webpack-liveload-middleware/.eslintrc",
    "content": "/* eslint-enable */\n{\n  \"globals\": {\n      \"cml\": false\n  },\n  \"env\": {\n      \"browser\": true,\n      \"node\": true,\n      \"commonjs\": true,\n      \"amd\": true,\n      \"es6\": true,\n      \"mocha\": true\n  },\n  \"parserOptions\": {\n      \"ecmaVersion\": 6,\n      \"sourceType\": \"module\", \n      \"ecmaFeatures\": {\n          \"globalReturn\": true,\n          \"impliedStrict\": true,\n          \"jsx\": true,\n          \"modules\": true\n      }\n  },\n  \"plugins\": [\n\n  ],\n  \"extends\": [\n      \"eslint:recommended\"\n  ],\n\n\n  \"rules\": {\n\n     \n      \"no-cond-assign\": 2,\n      \"no-console\": 0,\n      \n      \"no-constant-condition\": 2,\n      \"no-control-regex\": 2,\n      \"comma-dangle\": [1, \"never\"],\n      \"no-debugger\": 2,\n      \"no-dupe-args\": 2,\n      \"no-dupe-keys\": 2,\n      \"no-duplicate-case\": 2,\n      \"no-empty\": 2,\n      \"no-empty-character-class\": 2,\n      \"no-ex-assign\": 2,\n      \"no-extra-boolean-cast\": 2,\n      \"no-extra-parens\": 0,\n      \"no-extra-semi\": 2,\n      \"no-func-assign\": 2,\n      \"no-inner-declarations\": [2, \"functions\"],\n      \"no-invalid-regexp\": 2,\n      \"no-irregular-whitespace\": 2,\n      \"no-negated-in-lhs\": 2,\n      \"no-obj-calls\": 2,\n      \"no-prototype-builtins\": 0,\n      \"no-regex-spaces\": 2,\n      \"no-sparse-arrays\": 2,\n      \"no-unexpected-multiline\": 2,\n      \"no-unreachable\": 2,\n      \"use-isnan\": 2,\n      \"valid-jsdoc\": 0,\n      \"valid-typeof\": 2,\n\n\n      \"accessor-pairs\": 2,\n      \"array-callback-return\": 0,\n      \"block-scoped-var\": 0,\n      \"complexity\": [2, 30],\n      \"consistent-return\": 0,\n      \"curly\": [2, \"all\"],\n      \"default-case\": 2,\n      \"dot-location\": [2, \"property\"],\n      \"dot-notation\": [2, {\n          \"allowKeywords\": false\n      }],\n      \"eqeqeq\": [0, \"allow-null\"],\n      \"guard-for-in\": 2,\n      \"no-alert\": 0,\n      \"no-caller\": 2,\n      \"no-case-declarations\": 2,\n      \"no-div-regex\": 2,\n      \"no-else-return\": 0,\n      \"no-empty-function\": 2,\n      \"no-empty-pattern\": 2,\n      \"no-eq-null\": 1,\n      \"no-eval\": 2,\n      \"no-extend-native\": 2,\n      \"no-extra-bind\": 2,\n      \"no-extra-label:\": 0,\n      \"no-fallthrough\": 2,\n      \"no-floating-decimal\": 2,\n      \"no-implicit-coercion\": 0,\n      \"no-implicit-globals\": 1,\n      \"no-implied-eval\": 2,\n      \"no-invalid-this\": 0,\n      \"no-iterator\": 2,\n      \"no-labels\": 2,\n      \"no-lone-blocks\": 2,\n      \"no-loop-func\": 1,\n      \"no-magic-numbers\": [1, {\n          \"ignore\": [0, -1, 1]\n      }],\n      \"no-multi-spaces\": 2,\n      \"no-multi-str\": 2,\n      \"no-native-reassign\": 2,\n      \"no-new\": 2,\n      // 禁止对 Function 对象使用 new 操作符\n      \"no-new-func\": 0,\n      // 禁止对 String，Number 和 Boolean 使用 new 操作符\n      \"no-new-wrappers\": 2,\n      // 禁用八进制字面量\n      \"no-octal\": 2,\n      // 禁止在字符串中使用八进制转义序列\n      \"no-octal-escape\": 2,\n      // 不允许对 function 的参数进行重新赋值\n      \"no-param-reassign\": 0,\n      // 禁用 __proto__ 属性\n      \"no-proto\": 2,\n      // 禁止使用 var 多次声明同一变量\n      \"no-redeclare\": 2,\n      // 禁用指定的通过 require 加载的模块\n      \"no-return-assign\": 0,\n      // 禁止使用 javascript: url\n      \"no-script-url\": 0,\n      // 禁止自我赋值\n      \"no-self-assign\": 2,\n      // 禁止自身比较\n      \"no-self-compare\": 2,\n      // 禁用逗号操作符\n      \"no-sequences\": 2,\n      // 禁止抛出非异常字面量\n      \"no-throw-literal\": 2,\n      // 禁用一成不变的循环条件\n      \"no-unmodified-loop-condition\": 2,\n      // 禁止出现未使用过的表达式\n      \"no-unused-expressions\": 0,\n      // 禁用未使用过的标签\n      \"no-unused-labels\": 2,\n      // 禁止不必要的 .call() 和 .apply()\n      \"no-useless-call\": 2,\n      // 禁止不必要的字符串字面量或模板字面量的连接\n      \"no-useless-concat\": 0,\n      // 禁用不必要的转义字符\n      \"no-useless-escape\": 0,\n      // 禁用 void 操作符\n      \"no-void\": 0,\n      // 禁止在注释中使用特定的警告术语\n      \"no-warning-comments\": 0,\n      // 禁用 with 语句\n      \"no-with\": 2,\n      // 强制在parseInt()使用基数参数\n      \"radix\": 2,\n      // 要求所有的 var 声明出现在它们所在的作用域顶部\n      \"vars-on-top\": 0,\n      // 要求 IIFE 使用括号括起来\n      \"wrap-iife\": [2, \"any\"],\n      // 要求或禁止 “Yoda” 条件\n      \"yoda\": [2, \"never\"],\n      // 要求或禁止使用严格模式指令\n      \"strict\": 0,\n\n\n      //////////////\n      // 变量声明 //\n      //////////////\n\n      // 要求或禁止 var 声明中的初始化(初值)\n      \"init-declarations\": 0,\n      // 不允许 catch 子句的参数与外层作用域中的变量同名\n      \"no-catch-shadow\": 0,\n      // 禁止删除变量\n      \"no-delete-var\": 2,\n      // 不允许标签与变量同名\n      \"no-label-var\": 2,\n      // 禁用特定的全局变量\n      \"no-restricted-globals\": 0,\n      // 禁止 var 声明 与外层作用域的变量同名\n      \"no-shadow\": 0,\n      // 禁止覆盖受限制的标识符\n      \"no-shadow-restricted-names\": 2,\n      // 禁用未声明的变量，除非它们在 /*global */ 注释中被提到\n      \"no-undef\": 2,\n      // 禁止将变量初始化为 undefined\n      \"no-undef-init\": 2,\n      // 禁止将 undefined 作为标识符\n      \"no-undefined\": 0,\n      // 禁止出现未使用过的变量\n      \"no-unused-vars\": [2, {\n          \"vars\": \"all\",\n          \"args\": \"none\"\n      }],\n      // 不允许在变量定义之前使用它们\n      \"no-use-before-define\": 0,\n\n      //////////////////////////\n      // Node.js and CommonJS //\n      //////////////////////////\n\n      // require return statements after callbacks\n      \"callback-return\": 0,\n      // 要求 require() 出现在顶层模块作用域中\n      \"global-require\": 1,\n      // 要求回调函数中有容错处理\n      \"handle-callback-err\": [2, \"^(err|error)$\"],\n      // 禁止混合常规 var 声明和 require 调用\n      \"no-mixed-requires\": 0,\n      // 禁止调用 require 时使用 new 操作符\n      \"no-new-require\": 2,\n      // 禁止对 __dirname 和 __filename进行字符串连接\n      \"no-path-concat\": 0,\n      // 禁用 process.env\n      \"no-process-env\": 0,\n      // 禁用 process.exit()\n      \"no-process-exit\": 0,\n      // 禁用同步方法\n      \"no-sync\": 0,\n\n      //////////////\n      // 风格指南 //\n      //////////////\n\n      // 指定数组的元素之间要以空格隔开(, 后面)， never参数：[ 之前和 ] 之后不能带空格，always参数：[ 之前和 ] 之后必须带空格\n      \"array-bracket-spacing\": [2, \"never\"],\n      // 禁止或强制在单行代码块中使用空格(禁用)\n      \"block-spacing\": [1, \"never\"],\n      //强制使用一致的缩进 第二个参数为 \"tab\" 时，会使用tab，\n      // if while function 后面的{必须与if在同一行，java风格。\n      \"brace-style\": [2, \"1tbs\", {\n          \"allowSingleLine\": true\n      }],\n      // 双峰驼命名格式\n      \"camelcase\": 2,\n      // 控制逗号前后的空格\n      \"comma-spacing\": [2, {\n          \"before\": false,\n          \"after\": true\n      }],\n      // 控制逗号在行尾出现还是在行首出现 (默认行尾)\n      // http://eslint.org/docs/rules/comma-style\n      \"comma-style\": [2, \"last\"],\n      //\"SwitchCase\" (默认：0) 强制 switch 语句中的 case 子句的缩进水平\n      // 以方括号取对象属性时，[ 后面和 ] 前面是否需要空格, 可选参数 never, always\n      \"computed-property-spacing\": [2, \"never\"],\n      // 用于指统一在回调函数中指向this的变量名，箭头函数中的this已经可以指向外层调用者，应该没卵用了\n      // e.g [0,\"that\"] 指定只能 var that = this. that不能指向其他任何值，this也不能赋值给that以外的其他值\n      \"consistent-this\": [1, \"that\"],\n      // 强制使用命名的 function 表达式\n      \"func-names\": 0,\n      // 文件末尾强制换行\n      \"eol-last\": 2,\n      \"indent\": [2, 2, {\n          \"SwitchCase\": 1\n      }],\n      // 强制在对象字面量的属性中键和值之间使用一致的间距\n      \"key-spacing\": [2, {\n          \"beforeColon\": false,\n          \"afterColon\": true\n      }],\n      // 强制使用一致的换行风格\n      \"linebreak-style\": [1, \"unix\"],\n      // 要求在注释周围有空行 ( 要求在块级注释之前有一空行)\n      \"lines-around-comment\": [1, {\n          \"beforeBlockComment\": true\n      }],\n      // 强制一致地使用函数声明或函数表达式，方法定义风格，参数：\n      // declaration: 强制使用方法声明的方式，function f(){} e.g [2, \"declaration\"]\n      // expression：强制使用方法表达式的方式，var f = function() {} e.g [2, \"expression\"]\n      // allowArrowFunctions: declaration风格中允许箭头函数。 e.g [2, \"declaration\", { \"allowArrowFunctions\": true }]\n      \"func-style\": 0,\n      // 强制回调函数最大嵌套深度 5层\n      \"max-nested-callbacks\": [1, 5],\n      // 禁止使用指定的标识符\n      \"id-blacklist\": 0,\n      // 强制标识符的最新和最大长度\n      \"id-length\": 0,\n      // 要求标识符匹配一个指定的正则表达式\n      \"id-match\": 0,\n      // 强制在 JSX 属性中一致地使用双引号或单引号\n      \"jsx-quotes\": 0,\n      // 强制在关键字前后使用一致的空格 (前后腰需要)\n      \"keyword-spacing\": 2,\n      // 强制一行的最大长度\n      \"max-len\": [1, 200],\n      // 强制最大行数\n      \"max-lines\": 0,\n      // 强制 function 定义中最多允许的参数数量\n      \"max-params\": [1, 7],\n      // 强制 function 块最多允许的的语句数量\n      \"max-statements\": [1, 200],\n      // 强制每一行中所允许的最大语句数量\n      \"max-statements-per-line\": 0,\n      // 要求构造函数首字母大写 （要求调用 new 操作符时有首字母大小的函数，允许调用首字母大写的函数时没有 new 操作符。）\n      \"new-cap\": [2, {\n          \"newIsCap\": true,\n          \"capIsNew\": false\n      }],\n      // 要求调用无参构造函数时有圆括号\n      \"new-parens\": 2,\n      // 要求或禁止 var 声明语句后有一行空行\n      \"newline-after-var\": 0,\n      // 禁止使用 Array 构造函数\n      \"no-array-constructor\": 2,\n      // 禁用按位运算符\n      \"no-bitwise\": 0,\n      // 要求 return 语句之前有一空行\n      \"newline-before-return\": 0,\n      // 要求方法链中每个调用都有一个换行符\n      \"newline-per-chained-call\": 1,\n      // 禁用 continue 语句\n      \"no-continue\": 0,\n      // 禁止在代码行后使用内联注释\n      \"no-inline-comments\": 0,\n      // 禁止 if 作为唯一的语句出现在 else 语句中\n      \"no-lonely-if\": 0,\n      // 禁止混合使用不同的操作符\n      \"no-mixed-operators\": 0,\n      // 不允许空格和 tab 混合缩进\n      \"no-mixed-spaces-and-tabs\": 2,\n      // 不允许多个空行\n      \"no-multiple-empty-lines\": [2, {\n          \"max\": 2\n      }],\n      // 不允许否定的表达式\n      \"no-negated-condition\": 0,\n      // 不允许使用嵌套的三元表达式\n      \"no-nested-ternary\": 0,\n      // 禁止使用 Object 的构造函数\n      \"no-new-object\": 2,\n      // 禁止使用一元操作符 ++ 和 --\n      \"no-plusplus\": 0,\n      // 禁止使用特定的语法\n      \"no-restricted-syntax\": 0,\n      // 禁止 function 标识符和括号之间出现空格\n      \"no-spaced-func\": 2,\n      // 不允许使用三元操作符\n      \"no-ternary\": 0,\n      // 禁用行尾空格\n      \"no-trailing-spaces\": 2,\n      // 禁止标识符中有悬空下划线_bar\n      \"no-underscore-dangle\": 0,\n      // 禁止可以在有更简单的可替代的表达式时使用三元操作符\n      \"no-unneeded-ternary\": 2,\n      // 禁止属性前有空白\n      \"no-whitespace-before-property\": 0,\n      // 强制花括号内换行符的一致性\n      \"object-curly-newline\": 0,\n      // 强制在花括号中使用一致的空格\n      \"object-curly-spacing\": 0,\n      // 强制将对象的属性放在不同的行上\n      \"object-property-newline\": 0,\n      // 强制函数中的变量要么一起声明要么分开声明\n      \"one-var\": [2, {\n          \"initialized\": \"never\"\n      }],\n      // 要求或禁止在 var 声明周围换行\n      \"one-var-declaration-per-line\": 0,\n      // 要求或禁止在可能的情况下要求使用简化的赋值操作符\n      \"operator-assignment\": 0,\n      // 强制操作符使用一致的换行符\n      \"operator-linebreak\": [2, \"after\", {\n          \"overrides\": {\n              \"?\": \"before\",\n              \":\": \"before\"\n          }\n      }],\n      // 要求或禁止块内填充\n      \"padded-blocks\": 0,\n      // 要求对象字面量属性名称用引号括起来\n      \"quote-props\": 0,\n      // 强制使用一致的反勾号、双引号或单引号\n      // \"quotes\": [2, \"single\", \"avoid-escape\"],\n      // 要求使用 JSDoc 注释\n      \"require-jsdoc\": 0,\n      // 要求或禁止使用分号而不是 ASI（这个才是控制行尾部分号的，）\n      \"semi\": [0, \"always\"],\n      // 强制分号之前和之后使用一致的空格\n      \"semi-spacing\": 0,\n      // 要求同一个声明块中的变量按顺序排列\n      \"sort-vars\": 0,\n      // 强制在块之前使用一致的空格\n      \"space-before-blocks\": [2, \"always\"],\n      // 强制在 function的左括号之前使用一致的空格\n      \"space-before-function-paren\": [0, \"always\"],\n      // 强制在圆括号内使用一致的空格\n      \"space-in-parens\": [2, \"never\"],\n      // 要求操作符周围有空格\n      \"space-infix-ops\": 2,\n      // 强制在一元操作符前后使用一致的空格\n      \"space-unary-ops\": [2, {\n          \"words\": true,\n          \"nonwords\": false\n      }],\n      // 强制在注释中 // 或 /* 使用一致的空格\n      \"spaced-comment\": [2, \"always\", {\n          \"markers\": [\"global\", \"globals\", \"eslint\", \"eslint-disable\", \"*package\", \"!\"]\n      }],\n      // 要求或禁止 Unicode BOM\n      \"unicode-bom\": 0,\n      // 要求正则表达式被括号括起来\n      \"wrap-regex\": 0,\n\n      //////////////\n      // ES6.相关 //\n      //////////////\n\n      // 要求箭头函数体使用大括号\n      \"arrow-body-style\": 2,\n      // 要求箭头函数的参数使用圆括号\n      \"arrow-parens\": 0,\n      \"arrow-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 强制在子类构造函数中用super()调用父类构造函数，TypeScrip的编译器也会提示\n      \"constructor-super\": 0,\n      // 强制 generator 函数中 * 号周围使用一致的空格\n      \"generator-star-spacing\": [2, {\n          \"before\": true,\n          \"after\": true\n      }],\n      // 禁止修改类声明的变量\n      \"no-class-assign\": 2,\n      // 不允许箭头功能，在那里他们可以混淆的比较\n      \"no-confusing-arrow\": 0,\n      // 禁止修改 const 声明的变量\n      \"no-const-assign\": 2,\n      // 禁止类成员中出现重复的名称\n      \"no-dupe-class-members\": 2,\n      // 不允许复制模块的进口\n      \"no-duplicate-imports\": 0,\n      // 禁止 Symbol 的构造函数\n      \"no-new-symbol\": 2,\n      // 允许指定模块加载时的进口\n      \"no-restricted-imports\": 0,\n      // 禁止在构造函数中，在调用 super() 之前使用 this 或 super\n      \"no-this-before-super\": 2,\n      // 禁止不必要的计算性能键对象的文字\n      \"no-useless-computed-key\": 0,\n      // 要求使用 let 或 const 而不是 var\n      \"no-var\": 0,\n      // 要求或禁止对象字面量中方法和属性使用简写语法\n      \"object-shorthand\": 0,\n      // 要求使用箭头函数作为回调\n      \"prefer-arrow-callback\": 0,\n      // 要求使用 const 声明那些声明后不再被修改的变量\n      \"prefer-const\": 0,\n      // 要求在合适的地方使用 Reflect 方法\n      \"prefer-reflect\": 0,\n      // 要求使用扩展运算符而非 .apply()\n      \"prefer-spread\": 0,\n      // 要求使用模板字面量而非字符串连接\n      \"prefer-template\": 0,\n      // Suggest using the rest parameters instead of arguments\n      \"prefer-rest-params\": 0,\n      // 要求generator 函数内有 yield\n      \"require-yield\": 0,\n      // enforce spacing between rest and spread operators and their expressions\n      \"rest-spread-spacing\": 0,\n      // 强制模块内的 import 排序\n      \"sort-imports\": 0,\n      // 要求或禁止模板字符串中的嵌入表达式周围空格的使用\n      \"template-curly-spacing\": 1,\n      // 强制在 yield* 表达式中 * 周围使用空格\n      \"yield-star-spacing\": 2\n  }\n}\n/* eslint-enable */"
  },
  {
    "path": "packages/webpack-liveload-middleware/.gitignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n.vscode\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\n"
  },
  {
    "path": "packages/webpack-liveload-middleware/.npmignore",
    "content": "# Editor directories and files\n.DS_Store\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# Typescript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# ///////////////////////////\n\n"
  },
  {
    "path": "packages/webpack-liveload-middleware/LICENSE",
    "content": "Copyright JS Foundation and other contributors\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "packages/webpack-liveload-middleware/client.js",
    "content": "/* eslint-disable-next-line */\n/*eslint -env browser*/\n/*global __resourceQuery __webpack_public_path__*/\n\n\nvar options = {\n  path: \"/__webpack_liveload\",\n  timeout: 20 * 1000,\n  overlay: true,\n  reload: false,\n  log: true,\n  warn: true,\n  name: '',\n  autoConnect: true,\n  overlayStyles: {},\n  overlayWarnings: false,\n  ansiColors: {}\n};\nif (__resourceQuery) {\n  var querystring = require('querystring');\n  var overrides = querystring.parse(__resourceQuery.slice(1));\n  setOverrides(overrides);\n}\n\nif (typeof window === 'undefined') {\n  // do nothing\n} else if (typeof window.EventSource === 'undefined') {\n  console.warn(\n    \"webpack-hot-middleware's client requires EventSource to work. \" +\n    \"You should include a polyfill if you want to support this browser: \" +\n    \"https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events#Tools\"\n  );\n} else {\n  if (options.autoConnect) {\n    connect();\n  }\n}\n\n/* istanbul ignore next */\nfunction setOptionsAndConnect(overrides) {\n  setOverrides(overrides);\n  connect();\n}\n\nfunction setOverrides(overrides) {\n  if (overrides.autoConnect) {options.autoConnect = overrides.autoConnect == 'true';}\n  if (overrides.path) {options.path = overrides.path;}\n  if (overrides.timeout) {options.timeout = overrides.timeout;}\n  if (overrides.overlay) {options.overlay = overrides.overlay !== 'false';}\n  if (overrides.reload) {options.reload = overrides.reload !== 'false';}\n  if (overrides.noInfo && overrides.noInfo !== 'false') {\n    options.log = false;\n  }\n  if (overrides.name) {\n    options.name = overrides.name;\n  }\n  if (overrides.quiet && overrides.quiet !== 'false') {\n    options.log = false;\n    options.warn = false;\n  }\n\n  if (overrides.dynamicPublicPath) {\n    /* eslint-disable-next-line */\n    options.path = __webpack_public_path__ + options.path;\n  }\n\n  if (overrides.ansiColors) {options.ansiColors = JSON.parse(overrides.ansiColors);}\n  if (overrides.overlayStyles) {options.overlayStyles = JSON.parse(overrides.overlayStyles);}\n\n  if (overrides.overlayWarnings) {\n    options.overlayWarnings = overrides.overlayWarnings == 'true';\n  }\n}\n\nfunction EventSourceWrapper() {\n  var source;\n  var lastActivity = new Date();\n  var listeners = [];\n\n  init();\n  var timer = setInterval(function() {\n    if ((new Date() - lastActivity) > options.timeout) {\n      handleDisconnect();\n    }\n  }, options.timeout / 2);\n\n  function init() {\n    source = new window.EventSource(options.path);\n    source.onopen = handleOnline;\n    source.onerror = handleDisconnect;\n    source.onmessage = handleMessage;\n  }\n\n  function handleOnline() {\n    if (options.log) {console.log(\"[HMR] connected\");}\n    lastActivity = new Date();\n  }\n\n  function handleMessage(event) {\n    lastActivity = new Date();\n    for (var i = 0; i < listeners.length; i++) {\n      listeners[i](event);\n    }\n  }\n\n  function handleDisconnect() {\n    clearInterval(timer);\n    source.close();\n    setTimeout(init, options.timeout);\n  }\n\n  return {\n    addMessageListener: function(fn) {\n      listeners.push(fn);\n    }\n  };\n}\n\nfunction getEventSourceWrapper() {\n  if (!window.__whmEventSourceWrapper) {\n    window.__whmEventSourceWrapper = {};\n  }\n  if (!window.__whmEventSourceWrapper[options.path]) {\n    // cache the wrapper for other entries loaded on\n    // the same page with the same options.path\n    window.__whmEventSourceWrapper[options.path] = EventSourceWrapper();\n  }\n  return window.__whmEventSourceWrapper[options.path];\n}\n\nfunction connect() {\n  getEventSourceWrapper().addMessageListener(handleMessage);\n\n  function handleMessage(event) {\n    if (event.data == \"\\uD83D\\uDC93\") {\n      return;\n    }\n    try {\n      processMessage(JSON.parse(event.data));\n    } catch (ex) {\n      if (options.warn) {\n        console.warn(\"Invalid HMR message: \" + event.data + \"\\n\" + ex);\n      }\n    }\n  }\n}\n\nvar customHandler;\nvar subscribeAllHandler;\nfunction processMessage(obj) {\n  console.log('processMessage')\n  console.log(obj.action)\n  switch (obj.action) {\n    case \"building\":\n      if (options.log) {\n        console.log(\n          \"[HMR] bundle \" + (obj.name ? \"'\" + obj.name + \"' \" : \"\") +\n          \"rebuilding\"\n        );\n      }\n      break;\n    case \"reload\":\n      window.location.reload();\n      break;\n    default:\n      if (customHandler) {\n        customHandler(obj);\n      }\n  }\n\n  if (subscribeAllHandler) {\n    subscribeAllHandler(obj);\n  }\n}\n\nif (module) {\n  module.exports = {\n    subscribeAll: function subscribeAll(handler) {\n      subscribeAllHandler = handler;\n    },\n    subscribe: function subscribe(handler) {\n      customHandler = handler;\n    },\n    useCustomOverlay: function useCustomOverlay(customOverlay) {\n      /* eslint-disable-next-line */\n      if (reporter) {reporter.useCustomOverlay(customOverlay);}\n    },\n    setOptionsAndConnect: setOptionsAndConnect\n  };\n}\n"
  },
  {
    "path": "packages/webpack-liveload-middleware/helpers.js",
    "content": "var parse = require('url').parse;\n\nexports.pathMatch = function(url, path) {\n  try {\n    return parse(url).pathname === path;\n  } catch (e) {\n    return false;\n  }\n}\n"
  },
  {
    "path": "packages/webpack-liveload-middleware/middleware.js",
    "content": "module.exports = webpackLiveLoadMiddleware;\n\nvar helpers = require('./helpers');\nvar pathMatch = helpers.pathMatch;\n\nfunction webpackLiveLoadMiddleware(compiler, opts) {\n  opts = opts || {};\n  opts.log = typeof opts.log == 'undefined' ? console.log.bind(console) : opts.log;\n  opts.path = opts.path || '/__webpack_liveload';\n  opts.heartbeat = opts.heartbeat || 10 * 1000;\n\n  var eventStream = createEventStream(opts.heartbeat);\n  var latestStats = null;\n\n  if (compiler.hooks) {\n    compiler.hooks.invalid.tap(\"webpack-liveload-middleware\", onInvalid);\n    compiler.hooks.done.tap(\"webpack-liveload-middleware\", onDone);\n  } else {\n    compiler.plugin(\"invalid\", onInvalid);\n    compiler.plugin(\"done\", onDone);\n  }\n  function onInvalid() {\n    latestStats = null;\n    eventStream.publish({action: \"building\"});\n  }\n  function onDone(statsResult) {\n    // Keep hold of latest stats so they can be propagated to new clients\n    latestStats = statsResult;\n    eventStream.publish({action: \"reload\"});\n  }\n  var middleware = function(req, res, next) {\n    if (!pathMatch(req.url, opts.path)) {return next();}\n    eventStream.handler(req, res);\n    if (latestStats) {\n      // the server\n      // eventStream.publish({action: \"reload\"});\n    }\n  };\n  middleware.publish = eventStream.publish;\n  return middleware;\n}\n\nfunction createEventStream(heartbeat) {\n  var clientId = 0;\n  var clients = {};\n  function everyClient(fn) {\n    Object.keys(clients).forEach(function(id) {\n      fn(clients[id]);\n    });\n  }\n  setInterval(function heartbeatTick() {\n    everyClient(function(client) {\n      client.write(\"data: \\uD83D\\uDC93\\n\\n\");\n    });\n  }, heartbeat).unref();\n  return {\n    handler: function(req, res) {\n      req.socket.setKeepAlive(true);\n      res.writeHead(200, {\n        'Access-Control-Allow-Origin': '*',\n        'Content-Type': 'text/event-stream;charset=utf-8',\n        'Cache-Control': 'no-cache, no-transform',\n        'Connection': 'keep-alive',\n        // While behind nginx, event stream should not be buffered:\n        // http://nginx.org/docs/http/ngx_http_proxy_module.html#proxy_buffering\n        'X-Accel-Buffering': 'no'\n      });\n      res.write('\\n');\n      var id = clientId++;\n      clients[id] = res;\n      req.on(\"close\", function() {\n        delete clients[id];\n      });\n    },\n    publish: function(payload) {\n      everyClient(function(client) {\n        client.write(\"data: \" + JSON.stringify(payload) + \"\\n\\n\");\n      });\n    }\n  };\n}\n\n"
  },
  {
    "path": "packages/webpack-liveload-middleware/package.json",
    "content": "{\n  \"dependencies\": {\n    \"querystring\": \"^0.2.0\"\n  },\n  \"description\": \"基于webpack-hot-middleware2.22.2版本进行修改，删除热加载功能支持liveload\",\n  \"author\": \"Chameleon-Team\",\n  \"mail\": \"ChameleonCore@didiglobal.com\",\n  \"license\": \"Apache\",\n  \"main\": \"middleware.js\",\n  \"name\": \"webpack-liveload-middleware\",\n  \"scripts\": {\n    \"test\": \"mocha --recursive --reporter spec\",\n    \"cover\": \"istanbul cover --report lcov node_modules/mocha/bin/_mocha -- -R spec --recursive\",\n    \"eslint:fix\": \"eslint client.js helpers.js middleware.js --fix\",\n    \"eslint\": \"eslint client.js helpers.js middleware.js\"\n  },\n  \"devDependencies\": {\n    \"chai\": \"^4.2.0\",\n    \"coveralls\": \"^2.11.9\",\n    \"eslint\": \"^5.9.0\",\n    \"gulp\": \"^3.9.1\",\n    \"gulp-uglify-es\": \"^1.0.4\",\n    \"istanbul\": \"^0.4.5\",\n    \"mocha\": \"^5.2.0\"\n  },\n  \"version\": \"1.0.8\",\n  \"gitHead\": \"5ddcde4330774710f7646559446e008f7785ce00\"\n}"
  },
  {
    "path": "packages/webpack-liveload-middleware/test/helpers.test.js",
    "content": "const {pathMatch} = require('../helpers.js');\nconst {expect} = require('chai');\n\ndescribe('test helpers.js', function() {\n  it('test parse url', function() {\n    let url = 'https://www.chameleon.com/path/to/index?query=username&query1=age'; \n    let result = pathMatch(url, `/path/to/index`);\n    expect(result).to.be.ok;\n  })\n})\n"
  },
  {
    "path": "test/test.sh",
    "content": "node_modules/.bin/nyc --reporter=lcov node_modules/.bin/mocha packages/*/test/**/*.test.js packages/*/test/**/**/*.test.js packages/*/test/**/**/**/*.test.js packages/*/test/**/**/**/**/*.test.js\n"
  }
]